bernd
Einige Dummheiten repariert, die beim ersetzen von $config durch config() aufgetreten sind. Zudem einige Closing-Tag-mismatches repariert, die man nur sieht wenn man XHTML-Modus einschaltet
bernd commited 75feee8 at 2009-05-23 15:55:23
<?php
require_once('inc/db_connect.php');
function config($key)
{
global $config;
if (array_key_exists($key, $config))
return $config[$key];
else
logger("inc/base", "config", "Request to read nonexistant config option »{$key}«.");
return NULL;
}
function db_query($query)
{
DEBUG($query);
$result = @mysql_query($query);
if (mysql_error())
{
$error = mysql_error();
logger("inc/base", "dberror", "mysql error: {$error}");
system_failure('Interner Datenbankfehler: »'.iconv('ISO-8859-1', 'UTF-8', $error).'«.');
}
$count = @mysql_num_rows($result);
if (! $count)
$count = 'no';
DEBUG("=> {$count} rows");
return $result;
}
function maybe_null($value)
{
if ($value == NULL)
return 'NULL';
if (strlen( (string) $value ) > 0)
return "'".mysql_real_escape_string($value)."'";
else
return 'NULL';
}
function logger($scriptname, $scope, $message)
{
if (config('logging') == false)
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX