diff options
author | raylu <raylu@cmu.edu> | 2011-04-07 00:31:46 -0400 |
---|---|---|
committer | raylu <raylu@cmu.edu> | 2011-04-07 00:31:46 -0400 |
commit | a8e48c969b5b56f76a37121fe157b75398461e84 (patch) | |
tree | ef32cd90ef2274807c57114e1447d53fb0c3066a /globe.php | |
parent | f8c9eb5220afaf2f9a62f9a176a45913240f4081 (diff) | |
download | pathery-a8e48c969b5b56f76a37121fe157b75398461e84.tar.xz |
Import mazetest from Dropbox
Excluded stray /db.inc.php file
Diffstat (limited to 'globe.php')
-rw-r--r-- | globe.php | 42 |
1 files changed, 36 insertions, 6 deletions
@@ -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 }
+
+
?>
|