function doDefault() { global $data, $lang; if (isset($_REQUEST['help'])) { $url = $data->getHelp($_REQUEST['help']); if (is_array($url)) { doChoosePage($url); return; } if ($url) { header("Location: {$url}"); exit; } } doBrowse($lang['strinvalidhelppage']); }
/** * Show confirmation of drop and perform actual drop */ function doDelRow($confirm) { global $data, $misc; global $lang; if ($confirm) { $misc->printTrail($_REQUEST['subject']); $misc->printTitle($lang['strdeleterow']); $rs = $data->browseRow($_REQUEST['table'], $_REQUEST['key']); echo "<form action=\"display.php\" method=\"post\">\n"; echo $misc->form; if ($rs->recordCount() == 1) { echo "<p>{$lang['strconfdeleterow']}</p>\n"; $fkinfo = array(); echo "<table><tr>"; printTableHeaderCells($rs, false, true); echo "</tr>"; echo "<tr class=\"data1\">\n"; printTableRowCells($rs, $fkinfo, true); echo "</tr>\n"; echo "</table>\n"; echo "<br />\n"; echo "<input type=\"hidden\" name=\"action\" value=\"delrow\" />\n"; echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" />\n"; echo "<input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\" />\n"; } elseif ($rs->recordCount() != 1) { echo "<p>{$lang['strrownotunique']}</p>\n"; echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n"; } else { echo "<p>{$lang['strinvalidparam']}</p>\n"; echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n"; } if (isset($_REQUEST['table'])) { echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n"; } if (isset($_REQUEST['subject'])) { echo "<input type=\"hidden\" name=\"subject\" value=\"", htmlspecialchars($_REQUEST['subject']), "\" />\n"; } if (isset($_REQUEST['query'])) { echo "<input type=\"hidden\" name=\"query\" value=\"", htmlspecialchars($_REQUEST['query']), "\" />\n"; } if (isset($_REQUEST['count'])) { echo "<input type=\"hidden\" name=\"count\" value=\"", htmlspecialchars($_REQUEST['count']), "\" />\n"; } if (isset($_REQUEST['return'])) { echo "<input type=\"hidden\" name=\"return\" value=\"", htmlspecialchars($_REQUEST['return']), "\" />\n"; } echo "<input type=\"hidden\" name=\"page\" value=\"", htmlspecialchars($_REQUEST['page']), "\" />\n"; echo "<input type=\"hidden\" name=\"sortkey\" value=\"", htmlspecialchars($_REQUEST['sortkey']), "\" />\n"; echo "<input type=\"hidden\" name=\"sortdir\" value=\"", htmlspecialchars($_REQUEST['sortdir']), "\" />\n"; echo "<input type=\"hidden\" name=\"strings\" value=\"", htmlspecialchars($_REQUEST['strings']), "\" />\n"; echo "<input type=\"hidden\" name=\"key\" value=\"", htmlspecialchars(urlencode(serialize($_REQUEST['key']))), "\" />\n"; echo "</form>\n"; } else { $status = $data->deleteRow($_POST['table'], unserialize(urldecode($_POST['key']))); if ($status == 0) { doBrowse($lang['strrowdeleted']); } elseif ($status == -2) { doBrowse($lang['strrownotunique']); } else { doBrowse($lang['strrowdeletedbad']); } } }
/** * Show confirmation of drop and perform actual drop */ function doDelRow($confirm) { global $data, $misc; global $lang; if ($confirm) { $misc->printTrail($_REQUEST['subject']); $misc->printTitle($lang['strdeleterow']); echo "<p>{$lang['strconfdeleterow']}</p>\n"; echo "<form action=\"display.php\" method=\"post\">\n"; echo "<input type=\"hidden\" name=\"action\" value=\"delrow\" />\n"; echo $misc->form; if (isset($_REQUEST['table'])) { echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n"; } if (isset($_REQUEST['subject'])) { echo "<input type=\"hidden\" name=\"subject\" value=\"", htmlspecialchars($_REQUEST['subject']), "\" />\n"; } if (isset($_REQUEST['query'])) { echo "<input type=\"hidden\" name=\"query\" value=\"", htmlspecialchars($_REQUEST['query']), "\" />\n"; } if (isset($_REQUEST['count'])) { echo "<input type=\"hidden\" name=\"count\" value=\"", htmlspecialchars($_REQUEST['count']), "\" />\n"; } if (isset($_REQUEST['return'])) { echo "<input type=\"hidden\" name=\"return\" value=\"", htmlspecialchars($_REQUEST['return']), "\" />\n"; } echo "<input type=\"hidden\" name=\"page\" value=\"", htmlspecialchars($_REQUEST['page']), "\" />\n"; echo "<input type=\"hidden\" name=\"sortkey\" value=\"", htmlspecialchars($_REQUEST['sortkey']), "\" />\n"; echo "<input type=\"hidden\" name=\"sortdir\" value=\"", htmlspecialchars($_REQUEST['sortdir']), "\" />\n"; echo "<input type=\"hidden\" name=\"strings\" value=\"", htmlspecialchars($_REQUEST['strings']), "\" />\n"; echo "<input type=\"hidden\" name=\"key\" value=\"", htmlspecialchars(urlencode(serialize($_REQUEST['key']))), "\" />\n"; echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" />\n"; echo "<input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\" />\n"; echo "</form>\n"; } else { $status = $data->deleteRow($_POST['table'], unserialize(urldecode($_POST['key']))); if ($status == 0) { doBrowse($lang['strrowdeleted']); } elseif ($status == -2) { doBrowse($lang['strrownotunique']); } else { doBrowse($lang['strrowdeletedbad']); } } }