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 --- changelog/changelog.txt | 18 ------------------ css/mapstyle.css | 11 ++++++----- globe.php | 42 ++++++++++++++++++++++++++++++++++++------ includes/db.inc.php | 9 +++++---- pages/gallery.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 94 insertions(+), 33 deletions(-) diff --git a/changelog/changelog.txt b/changelog/changelog.txt index 4489604..5aca7cf 100644 --- a/changelog/changelog.txt +++ b/changelog/changelog.txt @@ -1,24 +1,6 @@ ================= == NamePending == ================= -04-04-11 - Setup the leaderboard to show every solution from yesterday. - Snap - Modified loadSol() JS function to support other calls. - Snap - Added col1 and col2 classes for the columns. They're now used on the homepage and leaderboard page. - raylu - The leaderboard specific CSS is in statsstyle.css. It's currently included on all pages, unfortunately. - raylu - Cleaned up the leaderboard.php code duplication. - raylu - Added some Javascript to only show one stats section at a time on the leaderboard page. - raylu - -04-03-11 - Fixed a database related issue, solution size was insuffecient. - Snap - Preferences for mute/speed is now saved - Snap - Facebook page semi-started (awaiting name?) - Snap - -03-28-11 - 03-31-11 - Added maps-per-day. - Snap - A few map-types designed and added. - Snap - Added deny all .htaccess to /pages. - Snap - 03-27-11 Added yesterdays best solution to leaderboard. - Snap diff --git a/css/mapstyle.css b/css/mapstyle.css index 77a8089..3dbf8c1 100644 --- a/css/mapstyle.css +++ b/css/mapstyle.css @@ -24,7 +24,6 @@ color: #FFFF33; } - .dsp_33 { width:32%; } @@ -118,21 +117,22 @@ .grid_td { background: #F5FBFE url(../images/OverlayTile10.png); + background-color: #F5FBFE; } .grid_td:hover { background: #CCCCCC url(../images/OverlayTileFaceted10.png); + background-color: #CCC; } .grid_td_pressed { background: #111122; } .grid_td_rocks { - background: #b85555 url(../images/OverlayTileFaceted50.png); + background-color: #b76666; } .grid_td_walls { background-color: #777; - background: url(../images/OverlayTileFaceted50.png); transition:background-color 1.6s ease-out; -webkit-transition:background-color 1.6s ease-out; -o-transition:background-color 1.6s ease-out; @@ -145,11 +145,12 @@ .grid_td_start { background: url(../images/OverlayStart50i.png); - background-color: #F75555; + background-color: #E44; + color: #fff; } .grid_td_finish { background: url(../images/OverlayStart50.png); - background-color: #6666FF; + background-color: #55e; color: #fff; } 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 } + + ?> diff --git a/includes/db.inc.php b/includes/db.inc.php index 8e9bdfb..9287ed2 100644 --- a/includes/db.inc.php +++ b/includes/db.inc.php @@ -1,10 +1,11 @@