From a8e48c969b5b56f76a37121fe157b75398461e84 Mon Sep 17 00:00:00 2001 From: raylu Date: Thu, 7 Apr 2011 00:31:46 -0400 Subject: Import mazetest from Dropbox Excluded stray /db.inc.php file --- globe.php | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'globe.php') diff --git a/globe.php b/globe.php index 72795c8..8fb1994 100644 --- a/globe.php +++ b/globe.php @@ -6,15 +6,12 @@ session_start(); //include_once 'db.inc.php'; - - -$mydomain = "http://www.snapems.com/"; +$mydomain = "http://www.mazetd.4xg.net"; //https://www.google.com/accounts/o8/id?id=AItOawl4GX29ka40T4ZeuXnR2FVsP4LZWaED_T8 //https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawl - include_once("./includes/header.php"); @@ -63,6 +60,37 @@ function CookieLogin() { } +//error_reporting(0); +//$old_error_handler = set_error_handler("userErrorHandler"); +function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) { + $time=date("d M Y H:i:s"); + // Get the error type from the error number + $errortype = array (1 => "Error", + 2 => "Warning", + 4 => "Parsing Error", + 8 => "Notice", + 16 => "Core Error", + 32 => "Core Warning", + 64 => "Compile Error", + 128 => "Compile Warning", + 256 => "User Error", + 512 => "User Warning", + 1024 => "User Notice"); + $errlevel=$errortype[$errno]; + + //Write error to log file (CSV format) + $errfile=fopen("errors.csv","a"); + fputs($errfile,"\"$time\",\"$filename: + $linenum\",\"($errlevel) $errmsg\"\r\n"); + fclose($errfile); + + //if($errno!=2 && $errno!=8) { + //Terminate script if fatal error + //die("A fatal error has occurred. Script execution has been aborted"); + //} +} + + @@ -122,8 +150,8 @@ Function CheckAuth($page) { } //!! Contains domain !! -Function DoRedirect($message = "Thanks", $to = "http://www.snapems.com/", $duration = "3") { - $to=(is_null($to)?'http://www.snapems.com/':$to); +Function DoRedirect($message = "Thanks", $to = "http://www.mazetd.4xg.net/", $duration = "3") { + $to=(is_null($to)?'http://www.mazetd.4xg.net/':$to); if ($duration == 0) { header("Location: $to"); @@ -154,4 +182,6 @@ Function DoRedirect($message = "Thanks", $to = "http://www.snapems.com/", $durat } + + ?> -- cgit v1.2.3