Added printBody
authorslubek <slubek>
Sat, 1 Mar 2003 00:53:50 +0000 (00:53 +0000)
committerslubek <slubek>
Sat, 1 Mar 2003 00:53:50 +0000 (00:53 +0000)
24 files changed:
all_db.php
browser.php
classes/Misc.php
constraints.php
database.php
databases.php
display.php
functions.php
groups.php
indexes.php
intro.php
login.php
operators.php
privileges.php
reports.php
rules.php
sequences.php
tables.php
tblproperties.php
topbar.php
triggers.php
types.php
users.php
views.php

index 21374df8eceded114cd7b09ed412c0136c75a186..e24905d51f46daa1db4d6e808dc5881daf3e38ca 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage databases within a server
         *
-        * $Id: all_db.php,v 1.6 2003/02/07 17:34:32 xzilla Exp $
+        * $Id: all_db.php,v 1.7 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strDatabases);
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':
index 989b3d451bb3e315958b500872c2a9bc17702a2b..c1b384bcfb1e17f92741e46f2a63cd0d38e1c5cc 100644 (file)
@@ -5,7 +5,7 @@
         * if you click on a database it shows a list of database objects in that
         * database.
         *
-        * $Id: browser.php,v 1.2 2003/02/07 17:34:34 xzilla Exp $
+        * $Id: browser.php,v 1.3 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
@@ -16,6 +16,7 @@
 
        // Output header
        $misc->printHeader();
+       $misc->printBody('browser');
 
        // Construct expanding tree
        $tree = new Tree ('classes/class.tree');
index 7bb953edb34d328bea89b8b59ec8af5889f2b40b..5572076d832fe7c869a2316757ebf3768b1d5bd5 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.13 2003/02/09 09:23:39 chriskl Exp $
+        * $Id: Misc.php,v 1.14 2003/03/01 00:53:50 slubek Exp $
         */
         
        class Misc {
@@ -82,9 +82,8 @@
                 * Prints the page header.  If global variable $_no_output is
                 * set then no header is drawn.
                 * @param $title The title of the page
-                * @param $doBody True to output body tag, false otherwise
                 */
-               function printHeader($title = '', $doBody = true) {
+               function printHeader($title = '') {
                        global $appName, $appCharset, $_no_output, $guiTheme;
 
                        if (!isset($_no_output)) {
                                include("themes/{$guiTheme}/global.css");
                                echo "\n-->\n</style>\n";
                                echo "</head>\n";
-                               if ($doBody) echo "<body>\n";
                        }
                }
 
                        echo "</html>\n";
                }
 
+               /**
+                * Prints the page body.
+                * @param $doBody True to output body tag, false otherwise
+                * @param $bodyClass - name of body class
+                */
+               function printBody($bodyClass = '', $doBody = true ) {
+                       global $_no_output;
+
+                       if (!isset($_no_output)) {
+                               if ($doBody) {
+                                       $bodyClass = htmlspecialchars($bodyClass);
+                                       echo "<body", ($bodyClass == '' ? '' : " class=\"{$bodyClass}\"") , ">\n";
+                               }
+                       }
+               }
+
+
                /**
                 * Display the navigation header for tables
                 */
index 790faf919acfc9e47c86f948fbb57a00f2e285bd..6f079952e05cc19a29f3fe5633ccb17cc9d9a775 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List constraints on a table
         *
-        * $Id: constraints.php,v 1.2 2003/02/07 17:34:34 xzilla Exp $
+        * $Id: constraints.php,v 1.3 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
@@ -84,7 +84,8 @@
        }
 
        $misc->printHeader($strTables . ' - ' . $_REQUEST['table'] . ' - ' . $strConstraints);
-       
+       $misc->printBody();
+
        switch ($action) {
                case 'save_create':
                        doSaveCreate();
index 521719378f75556636c7826572eb43e3f548a635..9b990e7fb0f1ba29dad9e63902717a0ee2879f10 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * Manage schemas within a database
         *
-        * $Id: database.php,v 1.5 2003/02/20 23:17:05 slubek Exp $
+        * $Id: database.php,v 1.6 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strSchemas);
+       $misc->printBody();
 
        switch ($action) {
                case 'sql':
index 018499410bb643de6825dffc6e649193c63fa571..56b6dc1c4c054c02fbb8866bf3094a4abb68c0ef 100755 (executable)
@@ -4,13 +4,14 @@
         * List databases in a server
         * @param $webdbServerID The ID of the current server
         *
-        * $Id: databases.php,v 1.2 2003/02/07 17:34:34 xzilla Exp $
+        * $Id: databases.php,v 1.3 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        include_once('libraries/lib.inc.php');
 
        $misc->printHeader($strDatabases);
+       $misc->printBody();
 ?>
 
 <h1><?php echo $appName ?></h1>
index 1dad153e901af504a388969507e7a1a6e8af7f30..c40d9f36761265366550dfb208e92851600e8298 100644 (file)
@@ -9,7 +9,7 @@
         * @param $return_desc The return link name
         * @param $page The current page
         *
-        * $Id: display.php,v 1.5 2003/02/09 09:23:37 chriskl Exp $
+        * $Id: display.php,v 1.6 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
@@ -21,7 +21,8 @@
        $PHP_SELF = $_SERVER['PHP_SELF'];
 
        $misc->printHeader($strQueryResults);
-       
+       $misc->printBody();
+
        echo "<h2>", htmlspecialchars($_REQUEST['database']), ": {$strQueryResults}</h2>\n";
        
        // If current page is not set, default to first page
index 0289a25fbcd28a0fb31802ef237f4063c3a742d1..fa9ed457c8723d968241f411c86d79fbfc207697 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage functions in a database
         *
-        * $Id: functions.php,v 1.5 2003/02/23 11:34:48 chriskl Exp $
+        * $Id: functions.php,v 1.6 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
        
        $misc->printHeader($strFunctions);
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':
index 9577eef5bd821917b9279e215e7c96914c01554d..c115ef6e30e775768aa676b5ad32073479cecec2 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage groups in a database cluster
         *
-        * $Id: groups.php,v 1.3 2003/02/07 17:34:34 xzilla Exp $
+        * $Id: groups.php,v 1.4 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strGroups);
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':
index 093c450adda74e7db753e4fc3e0e1a333c51f808..9de9ee42389c85dfc375a2b816a652e9b8132c33 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List indexes on a table
         *
-        * $Id: indexes.php,v 1.3 2003/02/21 06:43:21 chriskl Exp $
+        * $Id: indexes.php,v 1.4 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strTables . ' - ' . $_REQUEST['table'] . ' - ' . $strIndexes);
+       $misc->printBody();
        
        switch ($action) {
                case 'save_create_index':
index 4c43a9c6fadfd33df6ec2ed12b97342eed1533ec..aae154255650462aaf65a8bd0089f4ee13b53e4e 100755 (executable)
--- a/intro.php
+++ b/intro.php
@@ -3,13 +3,14 @@
        /**
         * Intro screen
         *
-        * $Id: intro.php,v 1.2 2003/02/07 17:34:34 xzilla Exp $
+        * $Id: intro.php,v 1.3 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        include_once('libraries/lib.inc.php');
        
        $misc->printHeader();
+       $misc->printBody();
 ?>
 
 <h1><?php echo $appName ?></h1>
index 13d88c99df586d4ae726be0ed07f74fdf94f03d6..a5c7be412cbd23f3c7ad66e4d28e90bbc16fca48 100755 (executable)
--- a/login.php
+++ b/login.php
@@ -3,7 +3,7 @@
        /**
         * Login screen
         *
-        * $Id: login.php,v 1.4 2003/02/08 15:25:58 xzilla Exp $
+        * $Id: login.php,v 1.5 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
@@ -15,6 +15,7 @@
 
        // Output header
        $misc->printHeader($strLogin);
+       $misc->printBody();
 ?>
 
        <table class="navbar" border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
index af90df34af5d46ee99c3e5d614af474f9e01de0c..07a5433da2b007d45e12c68171c8656369d539f3 100644 (file)
@@ -2,7 +2,7 @@
 /**
  *  FILENAME:   operators.php
  *
- *  $Id: operators.php,v 1.2 2003/02/07 17:34:35 xzilla Exp $
+ *  $Id: operators.php,v 1.3 2003/03/01 00:53:51 slubek Exp $
  */
 
 include_once( 'libraries/lib.inc.php' );
@@ -123,6 +123,7 @@ function doDefault()
 
 
 $misc->printHeader($strOperators);
+$misc->printBody();
 
 switch( $action )
 {
index a3a40dbd2733908ad9afc64dd1d5dbc654fafc6e..49da258ac2b8b3dd726e7f902fead091df0d9048 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage privileges in a database
         *
-        * $Id: privileges.php,v 1.6 2003/02/10 14:48:53 chriskl Exp $
+        * $Id: privileges.php,v 1.7 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strPrivileges);
+       $misc->printBody();
 
        switch ($action) {
                case 'savegrantgroup':
index afc2e03306fa89d19097f0db1eff3ad018ed0d6e..eb6a673ce59dc1058ebd27d5891e163caf643153 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List reports in a database
         *
-        * $Id: reports.php,v 1.5 2003/02/26 04:39:50 chriskl Exp $
+        * $Id: reports.php,v 1.6 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
        
        $misc->printHeader($strReports);
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':
index b54a72a9dc0a63599890d73863873ef52bb9e9fa..5d503049829e64b79e0c3c972d7593f9f0f265f7 100644 (file)
--- a/rules.php
+++ b/rules.php
@@ -3,7 +3,7 @@
        /**
         * List rules on a table
         *
-        * $Id: rules.php,v 1.2 2003/02/07 17:34:35 xzilla Exp $
+        * $Id: rules.php,v 1.3 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strTables . ' - ' . $_REQUEST['table'] . ' - ' . $strRules);
+       $misc->printBody();
        
        switch ($action) {
                case 'save_create':
index 51536577eb680ae8795d220f0d659da8bc3e5ba5..ec12c66750e80faf14a4603d0f5902d600d898b5 100644 (file)
@@ -2,7 +2,7 @@
 /**
  *  FILENAME:   sequence.php
  *
- *  $Id: sequences.php,v 1.4 2003/02/18 00:53:19 slubek Exp $
+ *  $Id: sequences.php,v 1.5 2003/03/01 00:53:51 slubek Exp $
  */
 
 include_once( 'libraries/lib.inc.php' );
@@ -146,6 +146,7 @@ function doDefault($msg='')
        }
 
 $misc->printHeader($strSequences);
+       $misc->printBody();
 
 switch( $action )
 {
index e5b9509d1a6667fc73dc984990494fa1a0186306..656ef2156ec1c205538f18b6637b516c8e84e892 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.6 2003/02/23 11:37:09 chriskl Exp $
+        * $Id: tables.php,v 1.7 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
        
        $misc->printHeader($strTables);
+       $misc->printBody();
 
        switch ($action) {
                case 'create':
index ec4f3dcd2e0035ad007527e5055fc921cb22fdb3..72b5ac60451725d395a21e1c79fbc3ee3f637b98 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tblproperties.php,v 1.3 2003/02/20 23:17:05 slubek Exp $
+        * $Id: tblproperties.php,v 1.4 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strTables . ' - ' . $_REQUEST['table']);
+       $misc->printBody();
        
        switch ($action) {
                case 'triggers':
index 754d05c9d3c1046e96b1a90572b5de0e45159121..d4152d05f1ac831a5d06e2eccc9d42c6e051c483 100755 (executable)
@@ -3,13 +3,14 @@
        /**
         * Top menu for WebDB
         *
-        * $Id: topbar.php,v 1.4 2003/02/16 05:30:53 chriskl Exp $
+        * $Id: topbar.php,v 1.5 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        include_once('libraries/lib.inc.php');
        
        $misc->printHeader();
+       $misc->printBody('topbar');
 ?>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
index 26afc8bec1238ef962318a02319051c2c2d3c856..746e033a5035d081a9ca2c18657205c03d9bbee4 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List triggers on a table
         *
-        * $Id: triggers.php,v 1.2 2003/02/07 17:34:35 xzilla Exp $
+        * $Id: triggers.php,v 1.3 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
@@ -83,6 +83,7 @@
        }
 
        $misc->printHeader($strTables . ' - ' . $_REQUEST['table'] . ' - ' . $strTriggers);
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':
index 748f5ad093947311c1f865418a3e5ddbc57ced6a..d081d656327fbd9dce3f4ad4cacbc0394cbf5e95 100644 (file)
--- a/types.php
+++ b/types.php
@@ -3,7 +3,7 @@
        /**
         * Manage types in a database
         *
-        * $Id: types.php,v 1.3 2003/02/20 23:17:05 slubek Exp $
+        * $Id: types.php,v 1.4 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strTypes);
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':
index 8ff11e31c4d3fe041d4d30fe3a660cf453332aec..367f9b868a01191e6929d6c59e1b25d2734c9bcd 100644 (file)
--- a/users.php
+++ b/users.php
@@ -3,7 +3,7 @@
        /**
         * Manage users in a database cluster
         *
-        * $Id: users.php,v 1.3 2003/02/20 23:19:38 slubek Exp $
+        * $Id: users.php,v 1.4 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader('Users');
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':
index 4b4ebbebacda7ab088dec0b34f47c18a74db395d..b0a4b73a9cfc39f154e36bc21b088d54c42db87e 100644 (file)
--- a/views.php
+++ b/views.php
@@ -3,7 +3,7 @@
        /**
         * Manage views in a database
         *
-        * $Id: views.php,v 1.4 2003/02/20 23:17:05 slubek Exp $
+        * $Id: views.php,v 1.5 2003/03/01 00:53:51 slubek Exp $
         */
 
        // Include application functions
        }
 
        $misc->printHeader($strViews);
+       $misc->printBody();
 
        switch ($action) {
                case 'save_create':