* Language template file for WebDB. Use this to base language
* files.
*
- * $Id: english.php,v 1.22 2002/12/24 02:44:21 chriskl Exp $
+ * $Id: english.php,v 1.23 2002/12/24 04:03:29 chriskl Exp $
*/
$appLang = 'English';
$strNoFrames = 'You need a frames-enabled browser to use this application.';
$strLogin = 'Login';
+ $strLoginFailed = 'Login failed';
$strNoTables = 'No tables found.';
$strNoTable = 'No table found.';
$strNoViews = 'No views found.';
}\r
\r
//if ($user) $linea = "user=$user host=$linea password=$pwd dbname=$db port=5432";\r
- $this->_connectionID = pg_connect($str);\r
+ $this->_connectionID = @pg_connect($str);\r
+\r
if ($this->_connectionID === false) return false;\r
$this->Execute("set datestyle='ISO'");\r
return true;\r
if ($pwd) $str .= " password='{$pwd}'";\r
if ($db) $str .= " dbname='{$db}'";\r
}//print $str;\r
- $this->_connectionID = pg_pconnect($str);\r
+ $this->_connectionID = @pg_pconnect($str);\r
if ($this->_connectionID === false) return false;\r
$this->Execute("set datestyle='ISO'");\r
return true;\r
/**
* Overrides default ADODB error handler to provide nicer error handling.
*
- * $Id: errorhandler.inc.php,v 1.1 2002/12/22 15:01:32 chriskl Exp $
+ * $Id: errorhandler.inc.php,v 1.2 2002/12/24 04:03:29 chriskl Exp $
*/
define('ADODB_ERROR_HANDLER','Error_Handler');
*/
function Error_Handler($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
{
- global $strSQLError, $strInStatement;
+ global $strSQLError, $strInStatement, $strLogin, $strLoginFailed;
switch($fn) {
case 'EXECUTE':
case 'PCONNECT':
case 'CONNECT':
- $host = $p1;
- $database = $p2;
-
- $s = "$dbms error: [$errno: $errmsg] in $fn($host, ?, ?, $database)\n";
- /*
- echo $s;
include('../conf/config.inc.php');
+ $_failed = true;
include($appBase . '/login.php');
// Theme
echo "<style type=\"text/css\">\n<!--\n";
include("../themes/{$guiTheme}/global.css");
echo "\n-->\n</style>\n";
exit;
- */
break;
default:
$s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
/**
* Login screen
*
- * $Id: login.php,v 1.7 2002/12/23 10:38:16 jmpoure Exp $
+ * $Id: login.php,v 1.8 2002/12/24 04:03:29 chriskl Exp $
*/
// Include application functions
<td height="115" align="center" valign="middle">
<center>
<h1><?php echo $appName ?> <?php echo $strLogin ?></h1>
+ <?php if (isset($_failed) && $_failed) echo "<p class=\"message\">$strLoginFailed</p>" ?>
<table class="navbar" border="0" cellpadding="5" cellspacing="3">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" name="login_form">
<tr>