bernd
Neues Modul für "Kunde werden"
bernd commited 0d1b760 at 2007-06-25 19:17:14
<?php
require_once('inc/db_connect.php');
function db_query($query)
{
DEBUG($query);
$result = @mysql_query($query);
if (mysql_error())
{
$error = mysql_error();
logger("inc/base.php", "dberror", "mysql error: {$error}");
system_failure('Beim Datenbankzugriff ist ein Fehler aufgetreten. Sollte dies wiederholt vorkommen, senden Sie bitte die Fehlermeldung ('.$error.') an einen Administrator.');
}
return $result;
}
function maybe_null($value)
{
if (strlen( (string) $value ) > 0)
return "'{$value}'";
else
return 'NULL';
}
function logger($scriptname, $scope, $message)
{
$user = 'NULL';
if ($_SESSION['role'] == ROLE_SYSTEMUSER)
$user = "'{$_SESSION['userinfo']['username']}'";
elseif ($_SESSION['role'] == ROLE_CUSTOMER)
$user = "'{$_SESSION['customerinfo']['customerno']}'";
$remote = mysql_real_escape_string($_SERVER['REMOTE_ADDR']);
$scriptname = mysql_real_escape_string($scriptname);
$scope = mysql_real_escape_string($scope);
$message = mysql_real_escape_string($message);
db_query("INSERT INTO misc.scriptlog (remote, user,scriptname,scope,message) VALUES ('{$remote}', {$user}, '{$scriptname}', '{$scope}', '{$message}');");
}
function output($arg)
{
global $output;
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX