From e6ecd5ae507731050d7281f2a2a192849f41912b Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Sun, 17 Feb 2013 03:06:24 -0800 Subject: Now using Jquery everywhere. Moved displayMap to mapSpecs. Using displayMap @ Home. Cleaned up scores page. --- pages/home.php | 20 ++----------- pages/scores.php | 88 ++++++++++++++++---------------------------------------- 2 files changed, 28 insertions(+), 80 deletions(-) (limited to 'pages') diff --git a/pages/home.php b/pages/home.php index 31ea756..544b3fe 100644 --- a/pages/home.php +++ b/pages/home.php @@ -219,37 +219,23 @@ function displayMaze($motd, $mapType) { $r = "
"; $r .= "
"; - $r .= "
"; $r .= "
"; $r .= " Load your best solution
"; - //TMP - - $mapObj = new map(getMapCode($mapID), $mapID); - $mapJSON = json_encode($mapObj); - $r .= "
"; - $r .= "
"; + $r .= "
\n"; + $r .= "
\n"; $r .= ""; - - //$r .= DisplayMap($map, $mapID); $r .= "
"; - $r .= "
"; $r .= $topscorediv; $r .= '
'; - $r .= '
'; $r .= '
'; - - $mapSolDiv = ""; - $r .= $mapSolDiv; //Clear our floatingness $r .= '
'; diff --git a/pages/scores.php b/pages/scores.php index 118dfa7..cf33b49 100644 --- a/pages/scores.php +++ b/pages/scores.php @@ -5,51 +5,23 @@ htmlHeader( array('scores', 'dateformat') ); -include_once('./includes/maps.php'); -//include('./includes/mapoftheday.php'); -include_once('./includes/datas.php'); -include_once('./includes/mapclass.php'); -include_once('./includes/constants.php'); - -include_once ('./includes/sqlEmbedded.php'); - -$time_start = microtime(true); -$time_end = microtime(true); - -//TESTCODE - -$time = $time_end - $time_start; -if ($_GET['debug'] == true) echo "StatContent Rechieve: $time seconds\n"; - - //The date to display $dateDisplay = date('Y-m-d', strtotime("-1 days")); //This is only used in a strtotime function, so this should be safe. if (isset($_GET['date'])) { $dateLookup = $_GET['date']; - if (!strtotime($dateLookup)) - $dateLookup = $dateDisplay; -} else - $dateLookup = $dateDisplay; - -$daysAgo = day_diff($dateLookup, date('Y-m-d')); -$dateAgo = strtotime("-$daysAgo days"); + if (!strtotime($dateLookup)) $dateLookup = $dateDisplay; +} else $dateLookup = $dateDisplay; -$dateAsStr = date('l, F jS, Y', $dateAgo); $dateNextDay = date('Y-m-d', strtotime("+1 day", $dateAgo)); -$datePrevDay = date('Y-m-d', strtotime("-1 day", $dateAgo)); - -//No cheater cheaters -if ($daysAgo < 1) - die("You must specify a date previous to today."); //!! TODO: $timeUntilNewDailyMap = strtotime("tomorrow") - strtotime("now"); ?> - +