don't compare againstr stryes for foreign langs - doesn't work
authorchriskl <chriskl>
Fri, 18 Apr 2003 11:08:26 +0000 (11:08 +0000)
committerchriskl <chriskl>
Fri, 18 Apr 2003 11:08:26 +0000 (11:08 +0000)
all_db.php
groups.php
indexes.php
reports.php
rules.php
sequences.php
tables.php
triggers.php

index f0c4a0a6866b23572b731fa6c851e3742b38cfcf..566c913b756e7a3cd97698612f6191839bee55c5 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage databases within a server
         *
-        * $Id: all_db.php,v 1.11 2003/04/18 09:15:55 chriskl Exp $
+        * $Id: all_db.php,v 1.12 2003/04/18 11:08:26 chriskl Exp $
         */
 
        // Include application functions
@@ -26,7 +26,7 @@
                        echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                        echo "<input type=hidden name=action value=drop>\n";
                        echo "<input type=hidden name=database value=\"", htmlspecialchars($_REQUEST['database']), "\">\n";
-                       echo "<input type=submit name=choice value=\"{$lang['stryes']}\"> <input type=submit name=choice value=\"{$lang['strno']}\">\n";
+                       echo "<input type=submit name=yes value=\"{$lang['stryes']}\"> <input type=submit name=no value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        doCreate();
                        break;
                case 'drop':
-                       if ($_POST['choice'] == $lang['stryes']) doDrop(false);
+                       if (isset($_REQUEST['yes'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':
index a5cad3c271b0549cb269265982055503a490d3b5..86cb249c551c415002fa8bc2817b994a2b40d609 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage groups in a database cluster
         *
-        * $Id: groups.php,v 1.6 2003/03/19 03:29:51 chriskl Exp $
+        * $Id: groups.php,v 1.7 2003/04/18 11:08:26 chriskl Exp $
         */
 
        // Include application functions
@@ -55,7 +55,7 @@
                        echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
                        echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
                        echo "<input type=\"hidden\" name=\"groname\" value=\"", htmlspecialchars($_REQUEST['groname']), "\" />\n";
-                       echo "<input type=\"submit\" name=\"choice\" value=\"{$lang['stryes']}\" /> <input type=\"submit\" name=\"choice\" value=\"{$lang['strno']}\" />\n";
+                       echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" /> <input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\" />\n";
                        echo "</form>\n";
                }
                else {
                        doCreate();
                        break;
                case 'drop':
-                       if ($_REQUEST['choice'] == $lang['stryes']) doDrop(false);
+                       if (isset($_REQUEST['yes'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':
index c9758d2490946aa88e7808666a5ff2b4879c4ff7..1cef7c7b6810c95ccae4c672342bdf15ffb02909 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List indexes on a table
         *
-        * $Id: indexes.php,v 1.9 2003/03/25 00:26:27 chriskl Exp $
+        * $Id: indexes.php,v 1.10 2003/04/18 11:08:26 chriskl Exp $
         */
 
        // Include application functions
                        echo "<input type=hidden name=table value=\"", htmlspecialchars($_REQUEST['table']), "\">\n";
                        echo "<input type=hidden name=index value=\"", htmlspecialchars($_REQUEST['index']), "\">\n";
                        echo $misc->form;
-                       echo "<input type=submit name=choice value=\"{$lang['stryes']}\"> <input type=submit name=choice value=\"{$lang['strno']}\">\n";
+                       echo "<input type=submit name=yes value=\"{$lang['stryes']}\"> <input type=submit name=no value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        doCreateIndex();
                        break;
                case 'drop_index':
-                       if ($_POST['choice'] == $lang['stryes']) doDropIndex(false);
+                       if (isset($_POST['yes'])) doDropIndex(false);
                        else doDefault();
                        break;
                case 'confirm_drop_index':
index b4f76b848a50578b2b48f10d952df101be2e0671..079a2225499ddbe0d89daf292391331d0002bdeb 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List reports in a database
         *
-        * $Id: reports.php,v 1.9 2003/04/09 20:11:44 slubek Exp $
+        * $Id: reports.php,v 1.10 2003/04/18 11:08:26 chriskl Exp $
         */
 
        // Include application functions
                        echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                        echo "<input type=\"hidden\" name=\"action\" value=\"drop\">\n";
                        echo "<input type=\"hidden\" name=\"report_id\" value=\"", htmlspecialchars($_REQUEST['report_id']), "\">\n";
-                       echo "<input type=\"submit\" name=\"choice\" value=\"{$lang['stryes']}\"> <input type=\"submit\" name=\"choice\" value=\"{$lang['strno']}\">\n";
+                       echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\"> <input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        doCreate();
                        break;
                case 'drop':
-                       if ($_POST['choice'] == $lang['stryes']) doDrop(false);
+                       if (isset($_POST['yes'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':
 
        $misc->printFooter();
 
-?>
+?>
\ No newline at end of file
index eeffdd0ee3272b00e96c9b04103ad20297d87375..77c3333e64aa8c8c3a1e21bb487a62ce86ec3dad 100644 (file)
--- a/rules.php
+++ b/rules.php
@@ -3,7 +3,7 @@
        /**
         * List rules on a table
         *
-        * $Id: rules.php,v 1.8 2003/03/26 01:23:55 chriskl Exp $
+        * $Id: rules.php,v 1.9 2003/04/18 11:08:27 chriskl Exp $
         */
 
        // Include application functions
@@ -98,7 +98,7 @@
                        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=\"{$lang['stryes']}\"> <input type=\"submit\" name=\"choice\" value=\"{$lang['strno']}\">\n";
+                       echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\"> <input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        else createRule(false);
                        break;
                case 'drop':
-                       if ($_POST['choice'] == $lang['stryes']) doDrop(false);
+                       if (isset($_POST['yes'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':
index 317a6b448b18166638683396402409ee822d153d..9aa77a3c90b1767b9332852c12cf8c355e5926c1 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage sequences in a database
         *
-        * $Id: sequences.php,v 1.8 2003/03/23 03:13:57 chriskl Exp $
+        * $Id: sequences.php,v 1.9 2003/04/18 11:08:27 chriskl Exp $
         */
        
        // Include application functions
                        echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
                        echo "<input type=\"hidden\" name=\"sequence\" value=\"", htmlspecialchars($_REQUEST['sequence']), "\" />\n";
                        echo $misc->form;
-                       echo "<input type=\"submit\" name=\"choice\" value=\"{$lang['stryes']}\" /> <input type=\"submit\" name=\"choice\" value=\"{$lang['strno']}\" />\n";
+                       echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" /> <input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\" />\n";
                        echo "</form>\n";
                }
                else {
                        doProperties(); 
                        break;
                case 'drop':
-                       if ($_POST['choice'] == $lang['stryes']) doDrop(false);
+                       if (isset($_POST['yes'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':
index 9c7f3d9143eb1ade26642d438b0a5f4eb779c28e..881bc00260a5d513f7c635ad28315be6654d2941 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.14 2003/04/18 09:15:55 chriskl Exp $
+        * $Id: tables.php,v 1.15 2003/04/18 11:08:27 chriskl Exp $
         */
 
        // Include application functions
                        echo "<p><input type=hidden name=action value=selectrows>\n";
                        echo "<input type=hidden name=table value=\"", htmlspecialchars($_REQUEST['table']), "\">\n";
                        echo $misc->form;
-                       echo "<input type=submit name=choice value=\"{$lang['strselect']}\">\n";
-                       echo "<input type=submit name=choice value=\"{$lang['strcancel']}\"></p>\n";
+                       echo "<input type=submit name=select value=\"{$lang['strselect']}\">\n";
+                       echo "<input type=submit name=cancel value=\"{$lang['strcancel']}\"></p>\n";
                        echo "</form>\n";
                }
                else {
                        echo "<input type=hidden name=action value=insertrow>\n";
                        echo "<input type=hidden name=table value=\"", htmlspecialchars($_REQUEST['table']), "\">\n";
                        echo $misc->form;
-                       echo "<p><input type=submit name=choice value=\"{$lang['strsave']}\">\n";
-                       echo "<input type=submit name=choice value=\"{$lang['strsaveandrepeat']}\">\n";
-                       echo "<input type=submit name=choice value=\"{$lang['strcancel']}\"></p>\n";
+                       echo "<p><input type=submit name=save value=\"{$lang['strsave']}\">\n";
+                       echo "<input type=submit name=saveandrepeat value=\"{$lang['strsaveandrepeat']}\">\n";
+                       echo "<input type=submit name=cancel value=\"{$lang['strcancel']}\"></p>\n";
                        echo "</form>\n";
                }
                else {
 
                        $status = $localData->insertRow($_POST['table'], $_POST['values'], $_POST['nulls']);
                        if ($status == 0) {
-                               // @@ This test seems a bit dodgy - comparing against the button name!
-                               if ($_POST['choice'] == $lang['strsave'])
+                               if (isset($_POST['save']))
                                        doDefault($lang['strrowinserted']);
                                else {
                                        $_REQUEST['values'] = array();
                        echo "<input type=hidden name=action value=empty>\n";
                        echo "<input type=hidden name=table value=\"", htmlspecialchars($_REQUEST['table']), "\">\n";
                        echo $misc->form;
-                       echo "<input type=submit name=choice value=\"{$lang['stryes']}\"> <input type=submit name=choice value=\"{$lang['strno']}\">\n";
+                       echo "<input type=submit name=yes value=\"{$lang['stryes']}\"> <input type=submit name=no value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        echo "<input type=hidden name=action value=drop>\n";
                        echo "<input type=hidden name=table value=\"", htmlspecialchars($_REQUEST['table']), "\">\n";
                        echo $misc->form;
-                       echo "<input type=submit name=choice value=\"{$lang['stryes']}\"> <input type=submit name=choice value=\"{$lang['strno']}\">\n";
+                       echo "<input type=submit name=yes value=\"{$lang['stryes']}\"> <input type=submit name=no value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        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=key value=\"", htmlspecialchars(serialize($key)), "\">\n";
-                       echo "<p><input type=submit name=choice value=\"{$lang['strsave']}\"> <input type=submit name=choice value=\"{$lang['strcancel']}\"></p>\n";
+                       echo "<p><input type=submit name=save value=\"{$lang['strsave']}\"> <input type=submit name=cancel value=\"{$lang['strcancel']}\"></p>\n";
                        echo "</form>\n";
                }
                else {
                        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=key value=\"", htmlspecialchars(serialize($_REQUEST['key'])), "\">\n";
-                       echo "<input type=submit name=choice value=\"{$lang['stryes']}\"> <input type=submit name=choice value=\"{$lang['strno']}\">\n";
+                       echo "<input type=submit name=yes value=\"{$lang['stryes']}\"> <input type=submit name=no value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        doCreate();
                        break;
                case 'selectrows':
-                       if ($_POST['choice'] != $lang['strcancel']) doSelectRows(false);
+                       if (!isset($_POST['cancel'])) doSelectRows(false);
                        else doDefault();
                        break;
                case 'confselectrows':
                        doSelectRows(true);
                        break;
                case 'insertrow':
-                       if ($_POST['choice'] != $lang['strcancel']) doInsertRow(false);
+                       if (!isset($_POST['cancel'])) doInsertRow(false);
                        else doDefault();
                        break;
                case 'confinsertrow':
                        doInsertRow(true);
                        break;
                case 'empty':
-                       if ($_POST['choice'] == $lang['stryes']) doEmpty(false);
+                       if (isset($_POST['yes'])) doEmpty(false);
                        else doDefault();
                        break;
                case 'confirm_empty':
                        doEmpty(true);
                        break;
                case 'drop':
-                       if ($_POST['choice'] == $lang['stryes']) doDrop(false);
+                       if (isset($_POST['yes'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':
                        doDrop(true);
                        break;
                case 'editrow':
-                       if ($_POST['choice'] == $lang['strsave']) doEditRow(false);
+                       if (isset($_POST['save'])) doEditRow(false);
                        else doBrowse();
                        break;
                case 'confeditrow':
                        doEditRow(true);
                        break;
                case 'delrow':
-                       if ($_POST['choice'] == $lang['stryes']) doDelRow(false);
+                       if (isset($_POST['yes'])) doDelRow(false);
                        else doBrowse();
                        break;
                case 'confdelrow':
index ffd149f4a12548d27100f61d6192884c5e93f24d..e9b19aa981f61306de819118403dd7f1e5d4fa58 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List triggers on a table
         *
-        * $Id: triggers.php,v 1.10 2003/03/26 02:14:03 chriskl Exp $
+        * $Id: triggers.php,v 1.11 2003/04/18 11:08:27 chriskl Exp $
         */
 
        // Include application functions
@@ -32,7 +32,7 @@
                        echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\">\n";
                        echo "<input type=\"hidden\" name=\"trigger\" value=\"", htmlspecialchars($_REQUEST['trigger']), "\">\n";
                        echo $misc->form;
-                       echo "<input type=\"submit\" name=\"choice\" value=\"{$lang['stryes']}\"> <input type=\"submit\" name=\"choice\" value=\"{$lang['strno']}\">\n";
+                       echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\"> <input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\">\n";
                        echo "</form>\n";
                }
                else {
                        doCreate();
                        break;
                case 'drop':
-                       if ($_POST['choice'] == $lang['stryes']) doDrop(false);
+                       if (isset($_POST['yes'])) doDrop(false);
                        else doDefault();
                        break;
                case 'confirm_drop':