* Script execution needs to support error handling - make it pass thru adodb layer
* COPY should work in normal sql screen and sql popup window
-* Create view wizard is buggy
* notice on viewing reports page - does this still occur?
* highlight things on the info stats page
* advanced stats functions
Version 3.5-dev
-----------
+Features
+* Context-sensitive online help system
+
+Version 3.4.1
+-------------
+
Bugs
* Fix export of mixed case tables pre 7.4
/**
* Class to hold various commonly used functions
*
- * $Id: Misc.php,v 1.63 2004/05/16 07:31:21 chriskl Exp $
+ * $Id: Misc.php,v 1.64 2004/06/06 08:50:27 chriskl Exp $
*/
class Misc {
$var = stripslashes($var);
}
+ /**
+ * Print out the page heading and help link
+ * @param $arr Array of heading items, already escaped
+ * @param $help (optional) The identifier for the help link
+ */
+ function printTitle($arr, $help = null) {
+ global $data, $lang;
+
+ // Don't continue unles we are actually displaying something
+ 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 "<tr><td><h2>";
+ // Join array with separator character
+ echo implode($lang['strseparator'], $arr);
+ echo "</h2></td><td style=\"text-align: right\"><a class=\"navlink help\" href=\"";
+ // Output URL to help
+ echo htmlspecialchars($data->help_base . $data->help_page[$help]);
+ echo "\" target=\"ppa_help\">{$lang['strhelp']}</a></td></tr>\n";
+ echo "</table>\n";
+ echo "<br />\n";
+ }
+ else {
+ echo "<h2>";
+ // Join array with separator character
+ echo implode($lang['strseparator'], $arr);
+ echo "</h2>\n";
+ }
+ }
+
/**
* Print out a message
* @param $msg The message to print
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.220 2004/06/03 06:42:20 chriskl Exp $
+ * $Id: Postgres.php,v 1.221 2004/06/06 08:50:27 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
'~' => 'i', '!~' => 'i', '~*' => 'i', '!~*' => 'i', 'IS NULL' => 'p', 'IS NOT NULL' => 'p',
'IN' => 'x', 'NOT IN' => 'x');
- //Supported join operations for use with view wizard
+ // Supported join operations for use with view wizard
var $joinOps = array('INNER JOIN' => 'INNER JOIN');
+
+ // Default help URL
+ var $help_base = 'http://www.postgresql.org/docs/7/static/';
+
+ // Help sub pages
+ var $help_page = array(
+ 'create_table' => 'sql-createtable.htm'
+ );
+
/**
* Constructor
* @param $conn The database connection
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres71.php,v 1.58 2004/05/26 13:54:42 chriskl Exp $
+ * $Id: Postgres71.php,v 1.59 2004/06/06 08:50:28 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
var $selectOps = array('=' => 'i', '!=' => 'i', '<' => 'i', '>' => 'i', '<=' => 'i', '>=' => 'i', 'LIKE' => 'i', 'NOT LIKE' => 'i',
'ILIKE' => 'i', 'NOT ILIKE' => 'i', '~' => 'i', '!~' => 'i', '~*' => 'i', '!~*' => 'i',
'IS NULL' => 'p', 'IS NOT NULL' => 'p', 'IN' => 'x', 'NOT IN' => 'x');
- //Supported join operations for use with view wizard
+ // Supported join operations for use with view wizard
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/';
+
+ // Help sub pages (alphabetical order)
+ var $help_page = array(
+ 'create_table' => 'sql-createtable.html',
+ 'drop_table' => 'sql-droptable.html',
+ 'insert' => 'sql-insert.html',
+ 'select' => 'sql-select.html',
+ 'tables' => 'ddl.html#DDL-BASICS'
+ );
+
/**
* Constructor
* @param $conn The database connection
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres72.php,v 1.68 2004/05/26 14:29:50 chriskl Exp $
+ * $Id: Postgres72.php,v 1.69 2004/06/06 08:50:28 chriskl Exp $
*/
// Extra "magic" types. BIGSERIAL was added in PostgreSQL 7.2.
var $extraTypes = array('SERIAL', 'BIGSERIAL');
+ // Default help URL
+ var $help_base = 'http://www.postgresql.org/docs/7.2/static/';
+
/**
* Constructor
* @param $conn The database connection
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres73.php,v 1.118 2004/06/04 05:26:35 chriskl Exp $
+ * $Id: Postgres73.php,v 1.119 2004/06/06 08:50:28 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
'SIMILAR TO' => 'i', 'NOT SIMILAR TO' => 'i', '~' => 'i', '!~' => 'i', '~*' => 'i', '!~*' => 'i', 'IS NULL' => 'p', 'IS NOT NULL' => 'p',
'IN' => 'x', 'NOT IN' => 'x');
+ // Default help URL
+ var $help_base = 'http://www.postgresql.org/docs/7.3/static/';
+
/**
* Constructor
* @param $conn The database connection
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres74.php,v 1.32 2004/06/03 07:34:56 chriskl Exp $
+ * $Id: Postgres74.php,v 1.33 2004/06/06 08:50:28 chriskl Exp $
*/
include_once('./classes/database/Postgres73.php');
// Max object name length
var $_maxNameLen = 63;
+ // Default help URL
+ var $help_base = 'http://www.postgresql.org/docs/7.4/static/';
+
/**
* Constructor
* @param $conn The database connection
/**
* PostgreSQL 7.5 support
*
- * $Id: Postgres75.php,v 1.5 2004/05/23 04:10:20 chriskl Exp $
+ * $Id: Postgres75.php,v 1.6 2004/06/06 08:50:28 chriskl Exp $
*/
include_once('./classes/database/Postgres74.php');
// Last oid assigned to a system object
var $_lastSystemOID = 17137;
+ // Default help URL
+ var $help_base = 'http://developer.postgresql.org/docs/postgres/';
+
/**
* Constructor
* @param $conn The database connection
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.145 2004/05/26 11:27:00 soranzo Exp $
+ * $Id: english.php,v 1.146 2004/06/06 08:50:28 chriskl Exp $
*/
// Language and character set
$lang['strconfirm'] = 'Confirm';
$lang['strexpression'] = 'Expression';
$lang['strellipsis'] = '...';
+ $lang['strseparator'] = ': ';
$lang['strexpand'] = 'Expand';
$lang['strcollapse'] = 'Collapse';
$lang['strexplain'] = 'Explain';
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.98 2004/05/26 11:27:00 soranzo Exp $
+ * $Id: english.php,v 1.99 2004/06/06 08:50:28 chriskl Exp $
*/
// Language and character set
$lang['strconfirm'] = 'Confirm';
$lang['strexpression'] = 'Expression';
$lang['strellipsis'] = '...';
+ $lang['strseparator'] = ': ';
$lang['strexpand'] = 'Expand';
$lang['strcollapse'] = 'Collapse';
$lang['strexplain'] = 'Explain';
/**
* List tables in a database
*
- * $Id: tables.php,v 1.53 2004/06/03 06:42:20 chriskl Exp $
+ * $Id: tables.php,v 1.54 2004/06/06 08:50:27 chriskl Exp $
*/
// Include application functions
switch ($_REQUEST['stage']) {
case 1:
- echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: {$lang['strcreatetable']}</h2>\n";
+ $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strtables'], $lang['strcreatetable']), 'create_table');
$misc->printMsg($msg);
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
$types = &$data->getTypes(true);
- echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: {$lang['strcreatetable']}</h2>\n";
+ $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strtables'], $lang['strcreatetable']), 'create_table');
$misc->printMsg($msg);
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
global $PHP_SELF;
if ($confirm) {
- echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strselect']}</h2>\n";
+ $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strtables'], $misc->printVal($_REQUEST['table']), $lang['strselect']), 'select');
$misc->printMsg($msg);
$attrs = &$data->getTableAttributes($_REQUEST['table']);
global $PHP_SELF;
if ($confirm) {
- echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strinsertrow']}</h2>\n";
+ $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strtables'], $misc->printVal($_REQUEST['table']), $lang['strinsertrow']), 'insert');
$misc->printMsg($msg);
$attrs = &$data->getTableAttributes($_REQUEST['table']);
global $PHP_SELF;
if ($confirm) {
- echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strempty']}</h2>\n";
+ $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strtables'], $misc->printVal($_REQUEST['table']), $lang['strempty']));
echo "<p>", sprintf($lang['strconfemptytable'], $misc->printVal($_REQUEST['table'])), "</p>\n";
global $PHP_SELF;
if ($confirm) {
- echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strdrop']}</h2>\n";
+ $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strtables'], $misc->printVal($_REQUEST['table']), $lang['strdrop']), 'drop_table');
echo "<p>", sprintf($lang['strconfdroptable'], $misc->printVal($_REQUEST['table'])), "</p>\n";
global $data, $conf, $misc, $data;
global $PHP_SELF, $lang;
- echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}</h2>\n";
+ $misc->printTitle(array($misc->printVal($_REQUEST['database']), $lang['strtables']), 'tables');
$tables = &$data->getTables();
/**
* Default style sheet
*
- * $Id: global.css,v 1.16 2003/09/30 09:33:43 soranzo Exp $
+ * $Id: global.css,v 1.17 2004/06/06 08:50:28 chriskl Exp $
*/
/** ELEMENTS */
text-decoration: none;
}
+a.help { margin-right: 10px }
+
a.navlink:link, a.toplink:link
{
color: #336699;
font-weight: bold;
text-decoration: none;
}
-