{
if ($breaks)
br($breaks);
- echo "<input type=\"hidden\" name=\"_focus\" value=\"".$_POST['_focus']."\">\n";
+ echo "<input type=\"hidden\" name=\"_focus\" value=\"".get_post('_focus')."\">\n";
echo "</form>\n";
}
global $Ajax;
echo "<meta http-equiv='Refresh' content='0; url=$forward_to?$params'>\n";
echo "<center><br>" . _("You should automatically be forwarded.");
- echo " " . _("If this does not happen") . " " . "<a href='$forward_to'>" . _("click here") . "</a> " . _("to continue") . ".<br><br></center>\n";
+ echo " " . _("If this does not happen") . " " . "<a href='$forward_to?$params'>" . _("click here") . "</a> " . _("to continue") . ".<br><br></center>\n";
$Ajax->redirect($forward_to.'?'.$params);
exit;
}
{
if ($center)
echo "<center>";
- echo "<a href='javascript:goBack();'>"._("Back")."</a>\n";
+ //echo "<a href='javascript:goBack();'>"._("Back")."</a>\n";
+ echo "<p><a href='javascript:goBack();'>"._("Back")."</a></p>\n";
if ($center)
echo "</center>";
echo "<br>";
function hyperlink_params_td($target, $label, $params)
{
echo "<td>";
- hyperlink_params($target, $label, $params);
+ hyperlink_params($target, $label, $params, false);
echo "</td>\n";
}
end_row();
}
-function edit_link_cell($param)
+function edit_link_cell($param, $title=false)
{
- label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'>" . _("Edit") . "</a>", "nowrap");
+ label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'"
+ .($title ? " title='$title'":'').">" . _("Edit") . "</a>", "nowrap");
}
-function delete_link_cell($param)
+function delete_link_cell($param, $title=false)
{
- label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'>" . _("Delete") . "</a>", "nowrap");
+ label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'"
+ .($title ? " title='$title'":'') .">" . _("Delete") . "</a>", "nowrap");
}
-function edit_button_cell($name, $value)
+function edit_button_cell($name, $value, $title=false)
{
- label_cell("<input type=\"submit\" class=\"editbutton\" name=\"$name\" value=\"$value\" />\n");
+ label_cell("<input type=\"submit\" class=\"editbutton\" name=\"$name\" value=\"$value\""
+ .($title ? " title='$title'":'')." />\n");
}
//-----------------------------------------------------------------------------------
$ajax_divs = array();
-function div_start($id='')
+function div_start($id='', $trigger=null, $non_ajax=false)
{
global $ajax_divs;
- array_push($ajax_divs, $id);
- echo "<div ". ($id !='' ? "id='$id'" : '').">";
- ob_start();
+ if ($non_ajax) { // div for non-ajax elements
+ array_push($ajax_divs, array($id, null));
+ echo "<div style='display:none' class='js_only' ".($id !='' ? "id='$id'" : '').">";
+ } else { // ajax ready div
+ array_push($ajax_divs, array($id, $trigger===null ? $id : $trigger));
+ echo "<div ". ($id !='' ? "id='$id'" : '').">";
+ ob_start();
+ }
}
function div_end()
if (count($ajax_divs))
{
- $id = array_pop($ajax_divs);
- $Ajax->addUpdate($id, $id, ob_get_flush());
+ $div = array_pop($ajax_divs);
+ if ($div[1] !== null)
+ $Ajax->addUpdate($div[1], $div[0], ob_get_flush());
echo "</div>";
}
}