From: Christopher Kings-L. <ch...@us...> - 2003-01-16 15:04:31
|
Update of /cvsroot/phppgadmin/webdb/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv22288/public_html Modified Files: constraints.php Log Message: drop constraint Index: constraints.php =================================================================== RCS file: /cvsroot/phppgadmin/webdb/public_html/constraints.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** constraints.php 16 Jan 2003 14:45:31 -0000 1.1 --- constraints.php 16 Jan 2003 15:04:28 -0000 1.2 *************** *** 18,44 **** function doDrop($confirm) { global $localData, $misc; ! global $PHP_SELF, $strConfDropRule, $strRuleDropped, $strRuleDroppedBad, $strYes, $strNo; if ($confirm) { echo "<h2>", htmlspecialchars($_REQUEST['database']), ": Tables: ", ! htmlspecialchars($_REQUEST['table']), ": " , htmlspecialchars($_REQUEST['rule']), ": Drop</h2>\n"; ! echo "<p>", sprintf($strConfDropRule, htmlspecialchars($_REQUEST['rule']), htmlspecialchars($_REQUEST['table'])), "</p>\n"; echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; ! echo "<input type=hidden name=action value=drop>\n"; ! echo "<input type=hidden name=table value=\"", htmlspecialchars($_REQUEST['table']), "\">\n"; ! echo "<input type=hidden name=rule value=\"", htmlspecialchars($_REQUEST['rule']), "\">\n"; echo $misc->form; ! echo "<input type=submit name=choice value=\"{$strYes}\"> <input type=submit name=choice value=\"{$strNo}\">\n"; echo "</form>\n"; } else { ! $status = $localData->dropRule($_POST['rule'], $_POST['table']); if ($status == 0) ! doDefault($strRuleDropped); else ! doDefault($strRuleDroppedBad); } --- 18,44 ---- function doDrop($confirm) { global $localData, $misc; ! global $PHP_SELF, $strDrop, $strConfDropConstraint, $strConstraintDropped, $strConstraintDroppedBad, $strYes, $strNo; if ($confirm) { echo "<h2>", htmlspecialchars($_REQUEST['database']), ": Tables: ", ! htmlspecialchars($_REQUEST['table']), ": " , htmlspecialchars($_REQUEST['constraint']), ": {$strDrop}</h2>\n"; ! echo "<p>", sprintf($strConfDropConstraint, htmlspecialchars($_REQUEST['constraint']), htmlspecialchars($_REQUEST['table'])), "</p>\n"; echo "<form action=\"$PHP_SELF\" method=\"post\">\n"; ! echo "<input type=\"hidden\" name=\"action\" value=\"drop\">\n"; ! echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\">\n"; ! echo "<input type=\"hidden\" name=\"constraint\" value=\"", htmlspecialchars($_REQUEST['constraint']), "\">\n"; echo $misc->form; ! echo "<input type=\"submit\" name=\"choice\" value=\"{$strYes}\"> <input type=\"submit\" name=\"choice\" value=\"{$strNo}\">\n"; echo "</form>\n"; } else { ! $status = $localData->dropConstraint($_POST['constraint'], $_POST['table']); if ($status == 0) ! doDefault($strConstraintDropped); else ! doDefault($strConstraintDroppedBad); } *************** *** 51,55 **** global $data, $localData, $misc; global $PHP_SELF; ! global $strConstraints, $strName, $strDefinition, $strActions, $strNoRules, $strCreateRule, $strDrop; $misc->printTableNav(); --- 51,55 ---- global $data, $localData, $misc; global $PHP_SELF; ! global $strConstraints, $strName, $strDefinition, $strActions, $strNoConstraints, $strCreateConstraint, $strDrop; $misc->printTableNav(); *************** *** 69,76 **** echo "<td class=\"data{$id}\">", htmlspecialchars( $constraints->f[$data->cnFields['consrc']]), "</td>"; echo "<td class=\"data{$id}\">"; ! echo "<a href=\"$PHP_SELF?action=confirm_drop&{$misc->href}&constraint=", htmlspecialchars( $rules->f[$data->rlFields['rulename']]), "&table=", htmlspecialchars($_REQUEST['table']), "\">{$strDrop}</td></tr>\n"; ! $constraints->movenext(); $i++; } --- 69,76 ---- echo "<td class=\"data{$id}\">", htmlspecialchars( $constraints->f[$data->cnFields['consrc']]), "</td>"; echo "<td class=\"data{$id}\">"; ! echo "<a href=\"$PHP_SELF?action=confirm_drop&{$misc->href}&constraint=", htmlspecialchars( $constraints->f[$data->cnFields['conname']]), "&table=", htmlspecialchars($_REQUEST['table']), "\">{$strDrop}</td></tr>\n"; ! $constraints->moveNext(); $i++; } *************** *** 79,83 **** } else ! echo "<p>{$strNoRules}</p>\n"; //echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}&table=", htmlspecialchars($_REQUEST['table']), "\">{$strCreateRule}</a></p>\n"; --- 79,83 ---- } else ! echo "<p>{$strNoConstraints}</p>\n"; //echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&{$misc->href}&table=", htmlspecialchars($_REQUEST['table']), "\">{$strCreateRule}</a></p>\n"; |