Fourth part of required+left style fixes: views.php. Added an incipit for view defini...
authorsoranzo <soranzo>
Wed, 15 Oct 2003 16:00:06 +0000 (16:00 +0000)
committersoranzo <soranzo>
Wed, 15 Oct 2003 16:00:06 +0000 (16:00 +0000)
sqledit.php
views.php

index 52e6f698fe966d7d6788fb9c3bc0d984bd68ca81..32030ed6d4aecc66cf57a6b5e9b732f4a4a3746e 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Alternative SQL editing window
         *
-        * $Id: sqledit.php,v 1.5 2003/09/17 09:03:15 chriskl Exp $
+        * $Id: sqledit.php,v 1.6 2003/10/15 16:00:06 soranzo Exp $
         */
 
        // Include application functions
@@ -78,7 +78,7 @@
 
                $rows = isset($_REQUEST['rows']) ? $_REQUEST['rows'] : 10;
 
-               echo "<textarea rows=\"{$rows}\" cols=\"50\" name=\"query\">",
+               echo "<textarea style=\"width: 100%\" rows=\"{$rows}\" cols=\"50\" name=\"query\">",
                        htmlspecialchars($_POST['query']), "</textarea>\n";
                echo "<p><input type=\"submit\" value=\"{$lang['strgo']}\" />\n";
                echo "<input type=\"submit\" name=\"explain\" value=\"{$lang['strexplain']}\" />\n";
index 009a6a6e829b3fd2cc8167e965f3ab3960bf1e0d..7975db20bb4d005394dc48f0beeff27d20990533 100644 (file)
--- a/views.php
+++ b/views.php
@@ -3,7 +3,7 @@
        /**
         * Manage views in a database
         *
-        * $Id: views.php,v 1.22 2003/09/10 07:13:18 chriskl Exp $
+        * $Id: views.php,v 1.23 2003/10/15 16:00:06 soranzo Exp $
         */
 
        // Include application functions
                        
                        echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                        echo "<table width=\"100%\">\n";
-                       echo "<tr><th class=\"data\">{$lang['strname']}</th></tr>\n";
-                       echo "<tr><td class=\"data1\">", $misc->printVal($viewdata->f[$data->vwFields['vwname']]), "</td></tr>\n";
-                       echo "<tr><th class=\"data\">{$lang['strdefinition']}</th></tr>\n";
-                       echo "<tr><td class=\"data1\"><textarea style=\"width:100%;\" rows=\"20\" cols=\"50\" name=\"formDefinition\" wrap=\"virtual\">", 
-                               htmlspecialchars($_POST['formDefinition']), "</textarea></td></tr>\n";
+                       echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strdefinition']}</th>\n";
+                       echo "\t\t<td class=\"data1\"><textarea style=\"width: 100%;\" rows=\"20\" cols=\"50\" name=\"formDefinition\" wrap=\"virtual\">", 
+                               htmlspecialchars($_POST['formDefinition']), "</textarea></td>\n\t</tr>\n";
                        echo "</table>\n";
                        echo "<p><input type=\"hidden\" name=\"action\" value=\"save_edit\" />\n";
                        echo "<input type=\"hidden\" name=\"view\" value=\"", htmlspecialchars($_REQUEST['view']), "\" />\n";
                
                if ($viewdata->recordCount() > 0) {
                        echo "<table width=\"100%\">\n";
-                       echo "<tr><th class=\"data\">{$lang['strname']}</th></tr>\n";
-                       echo "<tr><td class=\"data1\">", $misc->printVal($viewdata->f[$data->vwFields['vwname']]), "</td></tr>\n";
-                       echo "<tr><th class=\"data\">{$lang['strdefinition']}</th></tr>\n";
-                       echo "<tr><td class=\"data1\">", $misc->printVal($viewdata->f[$data->vwFields['vwdef']]), "</td></tr>\n";
+                       echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strname']}</th>\n";
+                       echo "\t\t<td class=\"data1\">", $misc->printVal($viewdata->f[$data->vwFields['vwname']]), "</td>\n\t</tr>\n";
+                       echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strdefinition']}</th>\n";
+                       echo "\t\t<td class=\"data1\">", $misc->printVal($viewdata->f[$data->vwFields['vwdef']]), "</td>\n\t</tr>\n";
                        echo "</table>\n";
                }
                else echo "<p>{$lang['strnodata']}</p>\n";
                global $PHP_SELF, $lang;
                
                if (!isset($_REQUEST['formView'])) $_REQUEST['formView'] = '';
-               if (!isset($_REQUEST['formDefinition'])) $_REQUEST['formDefinition'] = '';
+               if (!isset($_REQUEST['formDefinition'])) $_REQUEST['formDefinition'] = 'SELECT ';
                
                echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strviews']}: {$lang['strcreateview']}</h2>\n";
                
                
                echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                echo "<table width=\"100%\">\n";
-               echo "<tr><th class=\"data\">{$lang['strname']}</th></tr>\n";
-               echo "<tr><td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", 
-                       htmlspecialchars($_REQUEST['formView']), "\" /></td></tr>\n";
-               echo "<tr><th class=\"data\">{$lang['strdefinition']}</th></tr>\n";
-               echo "<tr><td class=\"data1\"><textarea style=\"width:100%;\" rows=\"10\" cols=\"50\" name=\"formDefinition\" wrap=\"virtual\">", 
-                       htmlspecialchars($_REQUEST['formDefinition']), "</textarea></td></tr>\n";
+               echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
+               echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", 
+                       htmlspecialchars($_REQUEST['formView']), "\" /></td>\n\t</tr>\n";
+               echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strdefinition']}</th>\n";
+               echo "\t<td class=\"data1\"><textarea style=\"width:100%;\" rows=\"10\" cols=\"50\" name=\"formDefinition\" wrap=\"virtual\">", 
+                       htmlspecialchars($_REQUEST['formDefinition']), "</textarea></td>\n\t</tr>\n";
                echo "</table>\n";
                echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create\" />\n";
                echo $misc->form;