'.date("Y-m-d H:i:s").'

'.$_SERVER['REQUEST_URI'].' encountered the following MySQL Error:

Error number: '.mysql_errno($conn).'.

Error info: '.mysql_error($conn).'.

Query Failed: '.$val.'.

HOST NAME: ' . $_SERVER['HOSTNAME'] . '

Remote Address: '.$_SERVER['REMOTE_ADDR'].'

Server Address: '.$_SERVER['SERVER_ADDR'].'

HTTP Referrer: ' . $_SERVER['HTTP_REFERER'] . '

HTTP Request sent:
'; var_dump(debug_backtrace()); foreach ($request_array as $key => $value) { if (is_array($value)) { $value = implode('; ', $value); } $message.="$key : $value.
"; } $message .= 'SESSION variables:
'; foreach ($_SESSION as $key => $value) { if (is_array($value)) { $value = implode('; ', $value); } $message.="$key : $value.
"; } $message.=' '; // $mail = new PHPMailer(); // $mail->IsHTML(true); // $mail->AddAddress('rpelletier@theorchard.com','Rick Pelletier'); // $mail->Subject='MySQL Error'; // $mail->Body=$message; // $mail->Send(); echo ''; print "Error " . mysql_errno() . " : " . mysql_error() . " Query= " . $val; echo $message; die(); } function showierror($val=NULL,$mysqli=null) { if($mysqli == null) global $mysqli; $request_array=$_REQUEST; require_once("includes/phpmailer/class.phpmailer.php"); $message=' MySQL Error '.date("Y-m-d H:i:s").'

'.$_SERVER['REQUEST_URI'].' encountered the following MySQL Error:

Error number: '.$mysqli->errno.'.

Error info: '.$mysqli->error.'.

Query Failed: '.$val.'.

HOST NAME: ' . $_SERVER['HOSTNAME'] . '

Remote Address: '.$_SERVER['REMOTE_ADDR'].'

Server Address: '.$_SERVER['SERVER_ADDR'].'

HTTP Referrer: ' . $_SERVER['HTTP_REFERER'] . '

HTTP Request sent:
'; foreach ($request_array as $key => $value) { if (is_array($value)) { $value = implode('; ', $value); } $message.="$key : $value.
"; } $message .= 'SESSION variables:
'; foreach ($_SESSION as $key => $value) { if (is_array($value)) { $value = implode('; ', $value); } $message.="$key : $value.
"; } $message.=' '; // $mail = new PHPMailer(); // $mail->IsHTML(true); // $mail->AddAddress('webdev@theorchard.com','WebDev'); // $mail->Subject='MySQL Error'; // $mail->Body=$message; // $mail->Send(); echo ''; print "Error " . mysql_errno() . " : " . mysql_error() . " Query= " . $val; echo $message; die(); } function clean($input, $maxlength) { $input = substr($input, 0, $maxlength); $input = EscapeShellCmd($input); return ($input); } function sendErrorPage($mesg) { header("Content-type: text/vnd.wap.wml"); printf(""); printf("\n"); printf("\n"); printf("

\n"); printf("%s", $mesg); printf("

\n"); printf("
\n"); printf("
\n"); }