|
|
@ -6,6 +6,12 @@
|
|
|
|
* @author hecht
|
|
|
|
* @author hecht
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function send_report($report) {
|
|
|
|
|
|
|
|
$backtrace = debug_backtrace();
|
|
|
|
|
|
|
|
@mail($GLOBALS['email_webmaster'],'Bugreport', 'Reporter:'.$_COOKIE['name']."\nFehler:\n".$report."\nBacktrace:\n".print_r($backtrace, true)."\n\n", 'From: Admin'."\n".'Reply-To: '$GLOBALS['email_webmaster']."\n".'X-Mailer: PHP/'.phpversion());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function silent_query($sql) {
|
|
|
|
function silent_query($sql) {
|
|
|
|
return mysqli_query($GLOBALS['main_db'], $sql);
|
|
|
|
return mysqli_query($GLOBALS['main_db'], $sql);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -13,11 +19,11 @@ function silent_query($sql) {
|
|
|
|
function db_query($sql) {
|
|
|
|
function db_query($sql) {
|
|
|
|
$qry = mysqli_query($GLOBALS['main_db'], $sql);
|
|
|
|
$qry = mysqli_query($GLOBALS['main_db'], $sql);
|
|
|
|
if(!$qry) {
|
|
|
|
if(!$qry) {
|
|
|
|
echo $sql . '<br>';
|
|
|
|
send_report('Query failed: '
|
|
|
|
die('Query failed: '
|
|
|
|
|
|
|
|
.'<li>errorno='.mysqli_errno($GLOBALS['main_db'])
|
|
|
|
.'<li>errorno='.mysqli_errno($GLOBALS['main_db'])
|
|
|
|
.'<li>error='.mysqli_error($GLOBALS['main_db'])
|
|
|
|
.'<li>error='.mysqli_error($GLOBALS['main_db'])
|
|
|
|
.'<li>query='.$query);
|
|
|
|
.'<li>query='.$sql);
|
|
|
|
|
|
|
|
die('Ein Fehler ist aufgetreten. Dieser wurde zum Administrator geschickt. Vielen Dank!');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $qry;
|
|
|
|
return $qry;
|
|
|
|
}
|
|
|
|
}
|
|
|
|