Added help info for schemas and a few database tasks. A few items in database.php...
authorxzilla <xzilla>
Fri, 11 Jun 2004 05:08:19 +0000 (05:08 +0000)
committerxzilla <xzilla>
Fri, 11 Jun 2004 05:08:19 +0000 (05:08 +0000)
classes/Misc.php
classes/database/Postgres.php
classes/database/Postgres71.php
classes/database/Postgres72.php
classes/database/Postgres73.php
classes/database/Postgres74.php
database.php
schema.php

index 77195289e807948c5bbdea954c4b488c9bc6b0fd..6078c9d01564ee50a2a914267c9384cd40a9f422 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.65 2004/06/07 11:38:38 soranzo Exp $
+        * $Id: Misc.php,v 1.66 2004/06/11 05:08:26 xzilla Exp $
         */
         
        class Misc {
                        if (!is_array($arr) || sizeof($arr) == 0) return;
                        
                        if ($help !== null && isset($data->help_page[$help])) {
-                               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n";
+                               echo "<br /><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n";
                                echo "<tr><td><h2>";
                                // Join array with separator character
                                echo implode($lang['strseparator'], $arr);
index 06a198c1651e0a4022be3f95a63be696076b1b51..ee32be08556c21a9e38143454b4d0ffb481946f1 100755 (executable)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres.php,v 1.222 2004/06/07 11:38:39 soranzo Exp $
+ * $Id: Postgres.php,v 1.223 2004/06/11 05:08:26 xzilla Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -131,11 +131,22 @@ class Postgres extends BaseDB {
        var $joinOps = array('INNER JOIN' => 'INNER JOIN');
        
        // Default help URL
-       var $help_base = 'http://www.postgresql.org/docs/7/static/';
+       var $help_base = 'http://www.postgresql.org/docs/7/interactive/';
 
        // Help sub pages
        var $help_page = array(
                'create_table' => 'sql-createtable.htm'
+               'drop_table' => 'sql-droptable.htm',
+               'insert' => 'sql-insert.htm',
+               'select' => 'sql-select.htm',
+               'tables' => 'ddl.htm#DDL-BASICS',
+               'schemas' => 'ddl-schemas.htm',
+               'create_schema' => 'sql-createschema.htm',
+               'alter_schema' => 'sql-alterschema.htm',
+               'drop_schema' => 'sql-dropschema.htm',
+               'runtime_config' => 'runtime-config.htm',
+               'processes' => 'monitoring-stats.htm#MONITORING-STATS-VIEWS-TABLE',
+               'sql' => 'sql-syntax.htm',
        );
        
        /**
index 59e859076c688a29d26fbc2a13b39f54179589d3..9449f19a16a24fcd8bfc81d6eaf25ccddefde35f 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres71.php,v 1.59 2004/06/06 08:50:28 chriskl Exp $
+ * $Id: Postgres71.php,v 1.60 2004/06/11 05:08:26 xzilla Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -52,7 +52,7 @@ class Postgres71 extends Postgres {
        var $joinOps = array('INNER JOIN' => 'INNER JOIN', 'LEFT JOIN' => 'LEFT JOIN', 'RIGHT JOIN' => 'RIGHT JOIN', 'FULL JOIN' => 'FULL JOIN');
 
        // Default help URL
-       var $help_base = 'http://www.postgresql.org/docs/7.1/static/';
+       var $help_base = 'http://www.postgresql.org/docs/7.1/interactive/';
 
        // Help sub pages (alphabetical order)
        var $help_page = array(
@@ -60,7 +60,14 @@ class Postgres71 extends Postgres {
                'drop_table' => 'sql-droptable.html',
                'insert' => 'sql-insert.html',
                'select' => 'sql-select.html',
-               'tables' => 'ddl.html#DDL-BASICS'
+               'tables' => 'ddl.html#DDL-BASICS',
+               'schemas' => 'ddl-schemas.html',
+               'create_schema' => 'sql-createschema.html',
+               'alter_schema' => 'sql-alterschema.html',
+               'drop_schema' => 'sql-dropschema.html',
+               'runtime_config' => 'runtime-config.html',
+               'processes' => 'monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE',
+               'sql' => 'sql-syntax.html',
        );
 
        /**
index 14bd123ea9427a2ed391761ff44bbb3bd7ae0f8b..aef5b8a5405b5758bd96121b122eb13a90efabcf 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres72.php,v 1.69 2004/06/06 08:50:28 chriskl Exp $
+ * $Id: Postgres72.php,v 1.70 2004/06/11 05:08:26 xzilla Exp $
  */
 
 
@@ -27,7 +27,7 @@ class Postgres72 extends Postgres71 {
        var $extraTypes = array('SERIAL', 'BIGSERIAL');
 
        // Default help URL
-       var $help_base = 'http://www.postgresql.org/docs/7.2/static/';
+       var $help_base = 'http://www.postgresql.org/docs/7.2/interactive/';
 
        /**
         * Constructor
index 04f46d0309616fff431537e44bc702616999a936..a4881e2d7a3f9763ca4ca4899e6fc209c3353712 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres73.php,v 1.120 2004/06/07 11:38:39 soranzo Exp $
+ * $Id: Postgres73.php,v 1.121 2004/06/11 05:08:27 xzilla Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -50,7 +50,7 @@ class Postgres73 extends Postgres72 {
                                                                        'IN' => 'x', 'NOT IN' => 'x');
 
        // Default help URL
-       var $help_base = 'http://www.postgresql.org/docs/7.3/static/';
+       var $help_base = 'http://www.postgresql.org/docs/7.3/interactive/';
 
        /**
         * Constructor
index 4f7830e9854c04d42bbdbbd67f9e4cce8786f330..f4e184a078c180306782d46f43178262a967f402 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres74.php,v 1.33 2004/06/06 08:50:28 chriskl Exp $
+ * $Id: Postgres74.php,v 1.34 2004/06/11 05:08:27 xzilla Exp $
  */
 
 include_once('./classes/database/Postgres73.php');
@@ -18,7 +18,7 @@ class Postgres74 extends Postgres73 {
        var $_maxNameLen = 63;
 
        // Default help URL
-       var $help_base = 'http://www.postgresql.org/docs/7.4/static/';
+       var $help_base = 'http://www.postgresql.org/docs/7.4/interactive/';
        
        /**
         * Constructor
index f397d0cef4465604e52f547f27ff384ceccfeced..d7efef750e0e6c177c350965d7c8390ecfd9b1a8 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * Manage schemas within a database
         *
-        * $Id: database.php,v 1.47 2004/06/03 07:34:56 chriskl Exp $
+        * $Id: database.php,v 1.48 2004/06/11 05:08:19 xzilla Exp $
         */
 
        // Include application functions
@@ -27,7 +27,7 @@
                if (!isset($_GET['term'])) $_GET['term'] = '';
 
                $misc->printDatabaseNav();
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strfind']}</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strfind']));
                $misc->printMsg($msg);
                
                echo "<form action=\"$PHP_SELF\" method=\"get\">\n";
@@ -64,7 +64,7 @@
                                                else {
                                                        if ($curr != '') echo "</ul>\n";
                                                        $curr = $rs->f['type'];
-                                                       echo "<h2>";
+                                                       echo "<h3>";
                                                        switch ($curr) {
                                                                case 'SCHEMA':
                                                                        echo $lang['strschemas'];
                                                                        echo $lang['stropclasses'];
                                                                        break;
                                                        }
-                                                       echo "</h2>";
+                                                       echo "</h3>";
                                                        echo "<ul>\n";
                                                }
                                        }
                global $PHP_SELF, $lang;
 
                $misc->printDatabaseNav();
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strexport']}</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strexport']));
                $misc->printMsg($msg);
 
                echo "<form action=\"dbexport.php\" method=\"post\">\n";
                $variables = &$data->getVariables();
                
                $misc->printDatabaseNav();
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strvariables']}</h2>\n";
+
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strvariables']),'runtime_config');
 
                if ($variables->recordCount() > 0) {
                        echo "<table>\n";
                $processes = &$data->getProcesses($_REQUEST['database']);
                
                $misc->printDatabaseNav();
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strprocesses']}</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strprocesses']),'processes');
 
                if ($processes->recordCount() > 0) {
                        echo "<table>\n";
                                break;
                        default:
                                $misc->printDatabaseNav();
-                               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['stradmin']}</h2>\n";
+                               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['stradmin']));
                                $misc->printMsg($msg);
                                
                                // Vacuum
                if (!isset($_REQUEST['query'])) $_REQUEST['query'] = '';
 
                $misc->printDatabaseNav();
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strsql']}</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strsql']),'sql');
 
                echo "<p>{$lang['strentersql']}</p>\n";
                echo "<form action=\"sql.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
                global $lang, $_reload_browser;
 
                if ($confirm) {
-                       echo "<h2>", $misc->printVal($_REQUEST['database']), ": ",
-                               $misc->printVal($_REQUEST['schema']), ": {$lang['strdrop']}</h2>\n";
+                       $misc->printTitle(array($misc->printVal($_REQUEST['database']),$misc->printVal($_REQUEST['schema']),$lang['strdrop']),'drop_schema');
 
                        echo "<p>", sprintf($lang['strconfdropschema'], $misc->printVal($_REQUEST['schema'])), "</p>\n";
 
                // Fetch all users from the database
                $users = &$data->getUsers();
 
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strcreateschema']}</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strcreateschema']),'create_schema');
                $misc->printMsg($msg);
                
                echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                global $PHP_SELF, $lang;
                
                $misc->printDatabaseNav();
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strschemas']}</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strschemas']),'schemas');
                $misc->printMsg($msg);
                
                // Check that the DB actually supports schemas
index 2158d71e0897e9ff5cc323dbac5973ae0eba78b6..b91e3a1684599cd48f6cd24f9e97b6827042a1b0 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * Display properties of a schema
         *
-        * $Id: schema.php,v 1.16 2004/05/31 13:25:49 chriskl Exp $
+        * $Id: schema.php,v 1.17 2004/06/11 05:08:25 xzilla Exp $
         */
 
        include_once('./libraries/lib.inc.php');
@@ -20,8 +20,7 @@
 
                $schema = &$data->getSchemaByName($_REQUEST['schema']);
                
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strschemas']}: ", 
-                       $misc->printVal($_REQUEST['schema']), "</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$lang['strschemas'],$misc->printVal($_REQUEST['schema'])),'schemas');
 
                // Show comment if any
                if ($schema->f[$data->nspFields['nspcomment']] !== null)
@@ -60,7 +59,7 @@
        function doAlter($msg = '') {
                global $data, $misc,$PHP_SELF, $lang;
                
-               echo "<h2>", $misc->printVal($_REQUEST['database']), ": ", $misc->printVal($_REQUEST['schema']), ": {$lang['stralter']}</h2>\n";
+               $misc->printTitle(array($misc->printVal($_REQUEST['database']),$misc->printVal($_REQUEST['schema']),$lang['stralter']),'alter_schema');
                $misc->printMsg($msg);
 
                $schema = &$data->getSchemaByName($_REQUEST['schema']);