WebDB Installation Guide
------------------------
-We have tried to code WebDB in a secure fashion, and as such it is a little
-more difficult installing WebDB than phpPgAdmin.
-
1. Unpack your download
tar -xvzf webdb-*.tar.gz
-2. The webdb/public_html directory is the only directory that should be
- made public. You should prevent people from browsing to any other
- directory.
-
-3. Configure WebDB
+2. Configure WebDB
cp webdb/config.inc.php-dist webdb/config.inc.php
Then edit config.inc.php and configure WebDB to your requirements.
-4. Configure your PHP installation (optional)
+3. Configure your PHP installation (optional)
There are several settings you can use for optimal and more secure
WebDB operation. WebDB will still function regardless of these
/**
* Manage databases within a server
*
- * $Id: all_db.php,v 1.4 2003/01/06 04:39:23 chriskl Exp $
+ * $Id: all_db.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
* if you click on a database it shows a list of database objects in that
* database.
*
- * $Id: browser.php,v 1.19 2003/01/04 07:08:03 chriskl Exp $
+ * $Id: browser.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
// Include tree classes
- include_once('class.tree/class.tree.php');
+ include_once('classes/class.tree/class.tree.php');
// Output header
$misc->printHeader();
// Construct expanding tree
- $tree = new Tree ('class.tree');
+ $tree = new Tree ('classes/class.tree');
$tree->set_frame ('detail');
$root = $tree->open_tree ('<a href=\"all_db.php\" target=\"detail\">'. htmlspecialchars($confServers[$_SESSION['webdbServerID']]['desc']) .'</a>', '');
$tree->add_document($table_node, htmlspecialchars($tables->f[$data->tbFields['tbname']]),
'tblproperties.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]) . '&schema=' .
urlencode($schemas->f[$data->nspFields['nspname']]) . '&table=' .
- urlencode($tables->f[$data->tbFields['tbname']]), 'detail', "../images/themes/{$guiTheme}/tables.gif");
+ urlencode($tables->f[$data->tbFields['tbname']]), 'detail', "../../images/themes/{$guiTheme}/tables.gif");
$tables->moveNext();
}
}
if ($data->hasViews())
- $tree->add_document($schemanode, $strViews, "views.php?{$querystr}", 'detail', "../images/themes/{$guiTheme}/views.gif");
+ $tree->add_document($schemanode, $strViews, "views.php?{$querystr}", 'detail', "../../images/themes/{$guiTheme}/views.gif");
if ($data->hasSequences())
- $tree->add_document($schemanode, $strSequences, "sequences.php?{$querystr}", 'detail', "../images/themes/{$guiTheme}/sequences.gif");
+ $tree->add_document($schemanode, $strSequences, "sequences.php?{$querystr}", 'detail', "../../images/themes/{$guiTheme}/sequences.gif");
if ($data->hasFunctions())
- $tree->add_document($schemanode, $strFunctions, "functions.php?{$querystr}", 'detail', "../images/themes/{$guiTheme}/functions.gif");
+ $tree->add_document($schemanode, $strFunctions, "functions.php?{$querystr}", 'detail', "../../images/themes/{$guiTheme}/functions.gif");
// if ($data->hasOperators())
-// $tree->add_document($schemanode, $strOperators, "operators.php?{$querystr}", 'detail', "../images/themes/{$guiTheme}/operators.gif");
+// $tree->add_document($schemanode, $strOperators, "operators.php?{$querystr}", 'detail', "../../images/themes/{$guiTheme}/operators.gif");
if ($data->hasTypes())
$tree->add_document($schemanode, $strTypes, "types.php?{$querystr}", 'detail');
// if ($data->hasAggregates())
while (!$tables->EOF) {
$tree->add_document($table_node, htmlspecialchars($tables->f[$data->tbFields['tbname']]),
'tblproperties.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]) . '&table=' .
- urlencode($tables->f[$data->tbFields['tbname']]), 'detail', "../images/themes/{$guiTheme}/tables.gif");
+ urlencode($tables->f[$data->tbFields['tbname']]), 'detail', "../../images/themes/{$guiTheme}/tables.gif");
$tables->moveNext();
}
}
if ($data->hasViews())
- $tree->add_document($node, $strViews, 'views.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../images/themes/{$guiTheme}/views.gif");
+ $tree->add_document($node, $strViews, 'views.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../../images/themes/{$guiTheme}/views.gif");
if ($data->hasSequences())
- $tree->add_document($node, $strSequences, 'sequences.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../images/themes/{$guiTheme}/sequences.gif");
+ $tree->add_document($node, $strSequences, 'sequences.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../../images/themes/{$guiTheme}/sequences.gif");
if ($data->hasFunctions())
- $tree->add_document($node, $strFunctions, 'functions.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../images/themes/{$guiTheme}/functions.gif");
+ $tree->add_document($node, $strFunctions, 'functions.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../../images/themes/{$guiTheme}/functions.gif");
// if ($data->hasOperators())
-// $tree->add_document($node, $strOperators, 'operators.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../images/themes/{$guiTheme}/operators.gif");
+// $tree->add_document($node, $strOperators, 'operators.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail', "../../images/themes/{$guiTheme}/operators.gif");
if ($data->hasTypes())
$tree->add_document($node, $strTypes, 'types.php?database=' . urlencode($databases->f[$data->dbFields['dbname']]), 'detail');
// if ($data->hasAggregates())
}
} else {
$node = $tree->add_document($root, htmlspecialchars($databases->f[$data->dbFields['dbname']]),
- "{$_SERVER['PHP_SELF']}?database=" . urlencode($databases->f[$data->dbFields['dbname']]), '_self', "../images/themes/{$guiTheme}/database.gif");
+ "{$_SERVER['PHP_SELF']}?database=" . urlencode($databases->f[$data->dbFields['dbname']]), '_self', "../../images/themes/{$guiTheme}/database.gif");
}
$databases->moveNext();
// Output footer
$misc->printFooter();
-?>
\ No newline at end of file
+?>
/**
* Class to hold various commonly used functions
*
- * $Id: Misc.php,v 1.10 2003/01/16 15:20:25 chriskl Exp $
+ * $Id: Misc.php,v 1.11 2003/01/18 06:38:36 chriskl Exp $
*/
class Misc {
* Creates a database accessor
*/
function &getDatabaseAccessor($type, $host, $port, $database, $username, $password) {
- include_once('../classes/database/' . $type . '.php');
+ include_once('classes/database/' . $type . '.php');
$localData = new $type( $host,
$port,
$database,
// Theme
echo "<style type=\"text/css\">\n<!--\n";
- include("../themes/{$guiTheme}/global.css");
+ include("themes/{$guiTheme}/global.css");
echo "\n-->\n</style>\n";
echo "</head>\n";
if ($doBody) echo "<body>\n";
/*
* Parent class of all ADODB objects.
*
- * $Id: ADODB_base.php,v 1.8 2003/01/11 04:32:37 chriskl Exp $
+ * $Id: ADODB_base.php,v 1.9 2003/01/18 06:38:37 chriskl Exp $
*/
-include_once('../libraries/errorhandler.inc.php');
-include_once('../libraries/adodb/adodb.inc.php');
+include_once('libraries/errorhandler.inc.php');
+include_once('libraries/adodb/adodb.inc.php');
class ADODB_base {
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: BaseDB.php,v 1.7 2003/01/11 04:32:38 chriskl Exp $
+ * $Id: BaseDB.php,v 1.8 2003/01/18 06:38:37 chriskl Exp $
*/
-include_once('../classes/database/ADODB_base.php');
+include_once('classes/database/ADODB_base.php');
class BaseDB extends ADODB_base {
/**\r
* A class that implements the DB interface for MySQL 3.23 and up\r
*\r
- * $Id: MySQL.php,v 1.4 2003/01/08 05:42:47 chriskl Exp $\r
+ * $Id: MySQL.php,v 1.5 2003/01/18 06:38:37 chriskl Exp $\r
*/\r
\r
-include_once('../classes/database/BaseDB.php');\r
+include_once('classes/database/BaseDB.php');\r
\r
class MySQL extends BaseDB {\r
\r
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.41 2003/01/16 14:45:30 chriskl Exp $
+ * $Id: Postgres.php,v 1.42 2003/01/18 06:38:37 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
-include_once('../classes/database/BaseDB.php');
+include_once('classes/database/BaseDB.php');
class Postgres extends BaseDB {
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres71.php,v 1.21 2003/01/04 08:55:28 chriskl Exp $
+ * $Id: Postgres71.php,v 1.22 2003/01/18 06:38:37 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
-include_once('../classes/database/Postgres.php');
+include_once('classes/database/Postgres.php');
class Postgres71 extends Postgres {
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres72.php,v 1.24 2003/01/17 23:10:10 xzilla Exp $
+ * $Id: Postgres72.php,v 1.25 2003/01/18 06:38:37 chriskl Exp $
*/
-require_once('../classes/database/Postgres71.php');
+include_once('classes/database/Postgres71.php');
class Postgres72 extends Postgres71 {
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres73.php,v 1.16 2003/01/16 15:13:15 chriskl Exp $
+ * $Id: Postgres73.php,v 1.17 2003/01/18 06:38:37 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
-include_once('../classes/database/Postgres72.php');
+include_once('classes/database/Postgres72.php');
class Postgres73 extends Postgres72 {
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres74.php,v 1.1 2003/01/16 15:06:13 chriskl Exp $
+ * $Id: Postgres74.php,v 1.2 2003/01/18 06:38:37 chriskl Exp $
*/
-include_once('../classes/database/Postgres73.php');
+include_once('classes/database/Postgres73.php');
class Postgres74 extends Postgres73 {
* Central WebDB configuration. As a user you may modify the
* settings here for your particular configuration.
*
- * $Id: config.inc.php-dist,v 1.7 2003/01/12 04:37:36 chriskl Exp $
+ * $Id: config.inc.php-dist,v 1.8 2003/01/18 06:38:37 chriskl Exp $
*/
// Set error reporting level
error_reporting(E_ALL);
- // App settings
- $appBase = '../public_html';
-
// Default language setting. eg 'english', 'polish', etc.
$appDefaultLanguage = 'english';
$appConfVersion = 2;
// Main library
- include_once('../libraries/lib.inc.php');
+ include_once('libraries/lib.inc.php');
?>
/**
* List constraints on a table
*
- * $Id: constraints.php,v 1.2 2003/01/16 15:04:28 chriskl Exp $
+ * $Id: constraints.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
$PHP_SELF = $_SERVER['PHP_SELF'];
/**
* Manage schemas within a database
*
- * $Id: database.php,v 1.7 2003/01/04 07:56:23 chriskl Exp $
+ * $Id: database.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
* List databases in a server
* @param $webdbServerID The ID of the current server
*
- * $Id: databases.php,v 1.7 2003/01/04 07:08:03 chriskl Exp $
+ * $Id: databases.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$misc->printHeader($strDatabases);
?>
<?php
$misc->printFooter();
-?>
\ No newline at end of file
+?>
* @param $return_desc The return link name
* @param $page The current page
*
- * $Id: display.php,v 1.1 2003/01/10 06:55:02 chriskl Exp $
+ * $Id: display.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
$PHP_SELF = $_SERVER['PHP_SELF'];
/**
* Manage functions in a database
*
- * $Id: functions.php,v 1.9 2003/01/09 06:40:33 chriskl Exp $
+ * $Id: functions.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
/**
* Manage groups in a database cluster
*
- * $Id: groups.php,v 1.3 2003/01/14 00:28:18 xzilla Exp $
+ * $Id: groups.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
/**
* Main access point to the app.
*
- * $Id: index.php,v 1.11 2003/01/04 07:08:03 chriskl Exp $
+ * $Id: index.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$misc->printHeader('', false);
?>
/**
* List indexes on a table
*
- * $Id: indexes.php,v 1.2 2003/01/11 09:50:22 chriskl Exp $
+ * $Id: indexes.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
$PHP_SELF = $_SERVER['PHP_SELF'];
/**
* Intro screen
*
- * $Id: intro.php,v 1.10 2003/01/04 07:08:03 chriskl Exp $
+ * $Id: intro.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$misc->printHeader();
?>
* Language template file for WebDB. Use this to base language
* files.
*
- * $Id: english.php,v 1.42 2003/01/16 15:04:28 chriskl Exp $
+ * $Id: english.php,v 1.43 2003/01/18 06:38:37 chriskl Exp $
*/
// Language and character set
$appCharset = 'ISO-8859-1';
// Basic strings
- $strIntro = 'Welcome to WebDB.';
+ $strIntro = 'Welcome to phpPgAdmin.';
$strLogin = 'Login';
$strLoginFailed = 'Login failed';
$strServer = 'Server';
/**
* Overrides default ADODB error handler to provide nicer error handling.
*
- * $Id: errorhandler.inc.php,v 1.7 2003/01/12 04:37:36 chriskl Exp $
+ * $Id: errorhandler.inc.php,v 1.8 2003/01/18 06:38:37 chriskl Exp $
*/
define('ADODB_ERROR_HANDLER','Error_Handler');
function Error_Handler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
{
global $strSQLError, $strInStatement, $strLogin, $strLoginFailed;
- global $misc, $appName, $appVersion, $appBase, $guiTheme, $appLangFiles;
+ global $misc, $appName, $appVersion, $guiTheme, $appLangFiles;
global $strUsername, $strPassword, $strServer, $strLanguage;
switch($fn) {
$_failed = true;
// Theme
echo "<style type=\"text/css\">\n<!--\n";
- include("../themes/{$guiTheme}/global.css");
+ include("themes/{$guiTheme}/global.css");
echo "\n-->\n</style>\n";
- include($appBase . '/login.php');
+ include('login.php');
exit;
break;
default:
/**
* Function library read in upon startup
*
- * $Id: lib.inc.php,v 1.12 2003/01/17 01:26:39 chriskl Exp $
+ * $Id: lib.inc.php,v 1.13 2003/01/18 06:38:37 chriskl Exp $
*/
// Application name
- $appName = 'WebDB';
+ $appName = 'phpPgAdmin';
// Application version
- $appVersion = '0.6.5';
+ $appVersion = '3.0-dev';
// Configuration file version. If this is greater than that in config.inc.php, then
// the app will refuse to run. This and $appConfVersion should be incremented whenever
// language file, and then overwrite it with the user-specified language.
// Default language to English if it's not set.
if (!isset($appDefaultLanguage)) $appDefaultLanguage = 'english';
- include_once('../lang/english.php');
+ include_once('lang/english.php');
// Check for config file version mismatch
if (!isset($appConfVersion) || $appBaseConfVersion > $appConfVersion) {
}
// Create Misc class references
- include_once('../classes/Misc.php');
+ include_once('classes/Misc.php');
$misc = new Misc();
// Start session
|| !isset($_SESSION['webdbServerID'])
|| !isset($_SESSION['webdbLanguage'])
|| !isset($confServers[$_SESSION['webdbServerID']])){
- include($appBase . '/login.php');
+ include('login.php');
exit;
}
// Import language file
- include("../lang/" . strtolower($_SESSION['webdbLanguage']) . ".php");
+ include("lang/" . strtolower($_SESSION['webdbLanguage']) . ".php");
// Create data accessor object, if valid
if (isset($_SESSION['webdbServerID']) && isset($confServers[$_SESSION['webdbServerID']])) {
$_type = $confServers[$_SESSION['webdbServerID']]['type'];
- require_once('../classes/database/' . $_type . '.php');
+ require_once('classes/database/' . $_type . '.php');
$data = new $_type( $confServers[$_SESSION['webdbServerID']]['host'],
$confServers[$_SESSION['webdbServerID']]['port'],
$confServers[$_SESSION['webdbServerID']]['default'],
// Create local (database-specific) data accessor object, if valid
if (isset($_SESSION['webdbServerID']) && isset($confServers[$_SESSION['webdbServerID']]) && isset($_REQUEST['database'])) {
$_type = $confServers[$_SESSION['webdbServerID']]['type'];
- require_once('../classes/database/' . $_type . '.php');
+ require_once('classes/database/' . $_type . '.php');
$localData = new $_type( $confServers[$_SESSION['webdbServerID']]['host'],
$confServers[$_SESSION['webdbServerID']]['port'],
$_REQUEST['database'],
/**
* Login screen
*
- * $Id: login.php,v 1.12 2003/01/12 04:37:36 chriskl Exp $
+ * $Id: login.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include('../conf/config.inc.php');
+ include('conf/config.inc.php');
// Prepare form variables
if (!isset($_POST['formServer'])) $_POST['formServer'] = '';
if (!isset($_POST['formLanguage'])) $_POST['formLanguage'] = $appDefaultLanguage;
/**
* Logs a user out of the app
*
- * $Id: logout.php,v 1.2 2003/01/04 07:08:03 chriskl Exp $
+ * $Id: logout.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
session_start();
/**
* FILENAME: operators.php
*
- * $Id: operators.php,v 1.3 2003/01/04 07:08:03 chriskl Exp $
+ * $Id: operators.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
-include_once( '../conf/config.inc.php' );
+include_once( 'conf/config.inc.php' );
$action = ( isset( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : '';
/**
* Manage views in a database
*
- * $Id: privileges.php,v 1.4 2003/01/17 23:10:11 xzilla Exp $
+ * $Id: privileges.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
+++ /dev/null
-<?php
-/**
- * FILENAME: index.php
- *
- * $Id: indicies.php,v 1.5 2003/01/04 07:08:03 chriskl Exp $
- */
-
-include_once( '../conf/config.inc.php' );
-
-$action = ( isset( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : '';
-
-if( !isset( $msg) )
-{
- $msg = '';
-}
-
-$PHP_SELF = $_SERVER['PHP_SELF'];
-
-// {{{ doDefault()
-function doDefault()
-{
- global $data, $localData, $misc, $database, $indexs;
- global $PHP_SELF;
- global $strNoIndicies, $strIndicies, $strOwner, $strActions;
-
- echo '<h2>', htmlspecialchars( $_REQUEST['database']), ": Indicies</h2>\n";
-
- $indexs = &$localData->getIndicies();
-
- if( $indexs->recordCount() > 0 )
- {
- echo "<table>\n";
- echo "<tr><th class=\"data\">{$strIndicies}</th><th colspan=\"3\" class=\"data\">{$strActions}</th>\n";
- $i = 0;
-
- while( !$indexs->EOF )
- {
- $id = ( ($i % 2 ) == 0 ? '1' : '2' );
- echo "<tr><td class=\"data{$id}\">", htmlspecialchars( $indexs->f[$data->ixFields['idxname']]), "</td>";
- echo "<td class=\"data{$id}\">";
- echo "<a href=\"$PHP_SELF?action=properties&database=", htmlspecialchars($_REQUEST['database']), "&index=", htmlspecialchars( $indexs->f[$data->ixFields['idxname']]), "\">Properties</a></td>\n";
- echo "<td class=\"data{$id}\">";
- echo "<a href=\"$PHP_SELF?action=confirm_drop&database=", htmlspecialchars($_REQUEST['database']), "&index=", htmlspecialchars( $indexs->f[$data->ixFields['idxname']]), "\">Drop</td>\n";
- echo "<td class=\"data{$id}\">";
- echo "<a href=\"$PHP_SELF?action=priviledges&database=", htmlspecialchars($_REQUEST['database']), "&index=", htmlspecialchars( $indexs->f[$data->ixFields['idxname']]), "\">Privileges</td></tr>\n";
-
- $indexs->movenext();
- $i++;
- }
-
- echo "</table>\n";
- }
- else
- {
- echo "<p>{$strNoIndicies}</p>\n";
- }
-
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?action=create&database=", urlencode( $_REQUEST['database'] ), "\">Create index</a></p>\n";
-
-}
-// }}}
-
- function doProperties($msg = '')
- {
- global $data, $localData, $misc, $PHP_SELF;
- global $strIndicies, $strIndexName, $strTabName, $strColumnName, $strUniqueKey, $strPrimaryKey;
-
- echo "<h2>", htmlspecialchars($_REQUEST['database']), ": $strIndicies : ", htmlspecialchars($_REQUEST['index']), ": Properties</h2>\n";
- $misc->printMsg($msg);
-
- $index = &$localData->getindex($_REQUEST['index']);
-
-
- if ($index->recordCount() > 0) {
-
- echo"<table border=0>";
- echo "<tr><th class=\"data\">$strIndexName</th><th class=\"data\">$strTabName</th><th class=\"data\">$strColumnName</th><th class=\"data\">$strUniqueKey</th><th class=\"data\">$strPrimaryKey</th></tr>";
- echo "<tr>";
- echo "<td class=\"data1\">", $index->f[$data->ixFields['idxname']], "</td>";
- echo "<td class=\"data1\">", $index->f[$data->ixFields['tabname']], "</td>";
- echo "<td class=\"data1\">", $index->f[$data->ixFields['columnname']], "</td>";
- echo "<td class=\"data1\">", $index->f[$data->ixFields['uniquekey']], "</td>";
- echo "<td class=\"data1\">", $index->f[$data->ixFields['primarykey']], "</td>";
- echo "</tr>";
- echo "</table>";
- echo "<br /><br />";
- }
- else echo "<p>No data.</p>\n";
- }
-
-
- function doPrivileges()
- {
- global $localData, $database;
- global $PHP_SELF, $strIndicies ;
- }
-
- function doDrop($confirm)
- {
- global $localData, $database;
- global $PHP_SELF, $strIndicies, $strDropped, $strDrop, $strFailed;
-
- if ($confirm) {
- echo "<h2>", htmlspecialchars($_REQUEST['database']), ": $strIndicies : ", htmlspecialchars($_REQUEST['index']), ": Drop</h2>\n";
-
- echo "<p>Are you sure you want to drop the index \"", htmlspecialchars($_REQUEST['index']), "\"?</p>\n";
-
- echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
- echo "<input type=hidden name=action value=drop>\n";
- echo "<input type=hidden name=index value=\"", htmlspecialchars($_REQUEST['index']), "\">\n";
- echo "<input type=hidden name=database value=\"", htmlspecialchars($_REQUEST['database']), "\">\n";
- echo "<input type=submit name=choice value=\"Yes\"> <input type=submit name=choice value=\"No\">\n";
- echo "</form>\n";
- }
- else {
- $status = $localData->dropindex($_POST['index']);
- if ($status == 0)
- doDefault("$strindex $strDropped.");
- else
- doDefault("$strindex $strDrop $strFailed.");
- }
-
- }
-
-
-$misc->printHeader($strIndicies);
-
-switch( $action )
-{
- case 'create':
- echo "<p>Creating index</p>";
- break;
- case 'properties':
- doProperties();
- break;
- case 'drop':
- if ($_POST['choice'] == 'Yes') doDrop(false);
- else doDefault();
- break;
- case 'confirm_drop':
- doDrop(true);
- break;
- case 'privileges':
- doPrivileges();
- break;
- default:
- doDefault();
- break;
-}
-
-$misc->printFooter();
-
-?>
/**
* List rules on a table
*
- * $Id: rules.php,v 1.2 2003/01/16 14:45:31 chriskl Exp $
+ * $Id: rules.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
$PHP_SELF = $_SERVER['PHP_SELF'];
/**
* FILENAME: sequence.php
*
- * $Id: sequences.php,v 1.13 2003/01/09 06:35:13 chriskl Exp $
+ * $Id: sequences.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
-include_once( '../conf/config.inc.php' );
+include_once( 'conf/config.inc.php' );
$action = ( isset( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : '';
/**
* List tables in a database
*
- * $Id: tables.php,v 1.21 2003/01/12 04:37:36 chriskl Exp $
+ * $Id: tables.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
$PHP_SELF = $_SERVER['PHP_SELF'];
/**
* Does an export to the screen or as a download
*
- * $Id: tblexport.php,v 1.3 2003/01/04 07:08:04 chriskl Exp $
+ * $Id: tblexport.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
$extensions = array(
// Include application functions
$_no_output = true;
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
// Return all rows in the table
// @@ Note: This should really use a cursor
/**
* List tables in a database
*
- * $Id: tblproperties.php,v 1.22 2003/01/12 07:25:44 chriskl Exp $
+ * $Id: tblproperties.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
$PHP_SELF = $_SERVER['PHP_SELF'];
/**
* Top menu for WebDB
*
- * $Id: topbar.php,v 1.14 2003/01/11 07:38:54 chriskl Exp $
+ * $Id: topbar.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$misc->printHeader();
?>
/**
* Manage types in a database
*
- * $Id: types.php,v 1.4 2003/01/09 06:44:21 chriskl Exp $
+ * $Id: types.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
/**
* Manage users in a database cluster
*
- * $Id: users.php,v 1.7 2003/01/04 07:08:04 chriskl Exp $
+ * $Id: users.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
/**
* Manage views in a database
*
- * $Id: views.php,v 1.9 2003/01/10 06:55:02 chriskl Exp $
+ * $Id: views.php,v 1.1 2003/01/18 06:38:36 chriskl Exp $
*/
// Include application functions
- include_once('../conf/config.inc.php');
+ include_once('conf/config.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';