<?php
/*
*(c) 2003 christoph althammer hide@address.com
* http://www.milpa.de
*
* GNU GENERAL PUBLIC LICENSE
* die deutsche Übersetzung der GPL ist zu finden auf www.suse.org.
*
* auth: c. althammer
* date: 2002-10-10
* lc : 2002-10-17
* comm: extend certain classes
*
*
*/
/* do not edit - class localization */
class PageSpanning extends Span {
var $SelfUrl = "";
var $PerPage = 3;
var $LinkClass = "textfettrot";
var $TextClass = "textfettgruen";
var $ActOffset = 0;
}
class Database extends DB_MySql {
function Database($Query=""){
$Conf = new Conf;
$this->Host = $Conf->Host;
$this->Database = $Conf->DbName;
$this->User = $Conf->DbUser;
$this->Password = $Conf->DbPass;
$this->Debug = $Conf->Debug;
$this->Halt_On_Error= $Conf->HaltOnDatabaseError;
$this->AdminEmail = $Conf->AdminEmail;
$LinkID = $this->query($Query);
return $LinkID;
}
function halt($msg) {
$this->Error = @mysql_error($this->Link_ID);
$this->Errno = @mysql_errno($this->Link_ID);
if ($this->Halt_On_Error == "no")
return;
if ($this->Halt_On_Error == "email"){
global $PHP_SELF;
$bod="Database Error!\nUrl=$PHP_SELF\n";
$bod.="Sent by lib_mysql.php\n\n";
$bod.="Database error:\n".$msg."\n";
$bod.="MySQL Error:\n".$this->Errno."\n".$this->Error."\n\n\n";
mail($this->AdminEmail,"Mysql Error",$bod);
} else { $this->haltmsg($msg); }
if ( ($this->Halt_On_Error != "no") && ($this->Halt_On_Error != "email"))
new Error("Session halted","Database");
}
function haltmsg($msg) {
new Debug("<b>Database error:$msg</b>\n","Database");
new Debug("<b>MySQL Error</b>:$this->Errno,$this->Error","Database");
}
}
?>