improve table browsing
authorchriskl <chriskl>
Sat, 11 Jan 2003 08:32:26 +0000 (08:32 +0000)
committerchriskl <chriskl>
Sat, 11 Jan 2003 08:32:26 +0000 (08:32 +0000)
lang/english.php
public_html/tables.php
public_html/tblproperties.php

index 04edfea98a70997f14896ed6c9f35c2e911eac98..edc12038a4821a154030262150376671dc8e2162 100755 (executable)
@@ -4,7 +4,7 @@
         * Language template file for WebDB.  Use this to base language
         * files.
         *
-        * $Id: english.php,v 1.36 2003/01/11 07:38:54 chriskl Exp $
+        * $Id: english.php,v 1.37 2003/01/11 08:32:26 chriskl Exp $
         */
 
        // Language and character set
@@ -68,6 +68,7 @@
        $strSQLError = 'SQL error:';
        $strInStatement = 'In statement:';
        $strInvalidParam = 'Invalid script parameters.';
+       $strNoData = 'No rows found.';
 
        // Tables
        $strNoTables = 'No tables found.';
index ca93df6d437160965084007056a464823c2269ec..74afb0958b6b463831ccb04ba20557c09730a680 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.18 2003/01/11 04:32:39 chriskl Exp $
+        * $Id: tables.php,v 1.19 2003/01/11 08:32:27 chriskl Exp $
         */
 
        // Include application functions
                        echo "<input type=hidden name=action value=insertrow>\n";
                        echo "<input type=hidden name=table value=\"", htmlspecialchars($_REQUEST['table']), "\">\n";
                        echo $misc->form;
-                       echo "<input type=submit name=choice value=\"{$strSave}\">\n";
+                       echo "<p><input type=submit name=choice value=\"{$strSave}\">\n";
                        echo "<input type=submit name=choice value=\"{$strSaveAndRepeat}\">\n";
-                       echo "<input type=submit name=choice value=\"{$strCancel}\">\n";
+                       echo "<input type=submit name=choice value=\"{$strCancel}\"></p>\n";
                        echo "</form>\n";
                }
                else {
        function doBrowse($msg = '') {
                global $data, $localData, $misc, $guiMaxRows, $strBrowse;
                global $PHP_SELF, $strActions, $guiShowOIDs, $strShowAllTables, $strRows;
-               global $strInvalidParam;
+               global $strNoData;
                
                echo "<h2>", htmlspecialchars($_REQUEST['database']), ": ", htmlspecialchars($_REQUEST['table']), ": {$strBrowse}</h2>\n";
                $misc->printMsg($msg);
                        reset($rs->f);
                        while(list($k, ) = each($rs->f)) {
                                if ($k == $localData->id && !$guiShowOIDs) continue;
-                               echo "<th class=data>", htmlspecialchars($k), "</td>";
+                               echo "<th class=data>", htmlspecialchars($k), "</th>";
                        }
                        
                        // @@ CHECK THAT KEY ACTUALLY IS IN THE RESULT SET...
                                echo "<tr>\n";
                                while(list($k, $v) = each($rs->f)) {
                                        if ($k == $localData->id && !$guiShowOIDs) continue;
-                                       echo "<td class=data{$id} nowrap>", nl2br(htmlspecialchars($v)), "</td>";
+                                       elseif ($v == '') echo "<td class=\"data{$id}\">&nbsp;</td>";
+                                       else echo "<td class=data{$id} nowrap>", nl2br(htmlspecialchars($v)), "</td>";
                                }                                                       
                                if (sizeof($key) > 0) {
                                        $key_str = '';
                        echo "</table>\n";
                        echo "<p>", $rs->recordCount(), " {$strRows}</p>\n";
                }
-               else echo "<p>{$strInvalidParam}</p>\n";
+               else echo "<p>{$strNoData}</p>\n";
                
                echo "<p><a class=navlink href=\"$PHP_SELF?{$misc->href}\">{$strShowAllTables}</a></p>\n";
        }
index 30f25a768d735b37c464a72b20a65e7a7e62bf28..aa5b48d31515249e14cad457a9ca03790d5a190e 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tblproperties.php,v 1.18 2003/01/09 06:32:37 chriskl Exp $
+        * $Id: tblproperties.php,v 1.19 2003/01/11 08:32:27 chriskl Exp $
         */
 
        // Include application functions
                                        "&table=", htmlspecialchars($_REQUEST['table']), "\">{$strDrop}</td>\n";
                                echo "<td class=\"data{$id}\">";
                                echo "<a href=\"$PHP_SELF?action=priviledges_index&{$misc->href}&index=", htmlspecialchars( $indexes->f[$data->ixFields['idxname']]), "\">{$strPrivileges}</td></tr>\n";
-                               
+
                                $indexes->movenext();
                                $i++;
                        }
        }       
 
        /**
-        * Displays a screen where they can enter a new table
+        * Displays a screen where they can alter a column
         */
        function doProperties($msg = '') {
                global $data, $localData, $misc;