From f4691c84a4942b60c4cfb8f2845e63a3adde358e Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Thu, 14 Mar 2013 16:18:46 -0700 Subject: Old code. --- do.php | 49 +++++++------------------------------------------ 1 file changed, 7 insertions(+), 42 deletions(-) (limited to 'do.php') diff --git a/do.php b/do.php index f444faf..cb90d84 100644 --- a/do.php +++ b/do.php @@ -15,23 +15,21 @@ $note = false; //Auto login; include_once("globe.php"); -if (!isset($_SESSION['accepted']) || $_SESSION['accepted'] <> 1) - if (isset($_COOKIE['doLogin']) && $_COOKIE['doLogin'] == 'yes') +if (!isset($_SESSION['accepted']) || $_SESSION['accepted'] <> 1) { + if (isset($_COOKIE['doLogin']) && $_COOKIE['doLogin'] == 'yes') { CookieLogin(); + } +} -if (!isset($_SESSION['accepted']) || $_SESSION['accepted'] <> 1) +if (!isset($_SESSION['accepted']) || $_SESSION['accepted'] <> 1) { $accepted = false; -else +} else { $accepted = true; - - -// encode array $json to JSON string +} $debug = false; - //$debug = true; - if (isset($_GET['act']) && $_GET['act'] == "getmap") { $map = GenerateMapByCode($_GET['mapcode']); @@ -72,39 +70,6 @@ if ($_GET['r'] == 'reqMemberPage') { } -//TODO: DEPRECIATE! -if ($_GET['r'] == 'reqScorePage') { - $mapID = $_GET['mapid'] + 0; - $page = $_GET['reqPage'] + 0; - if (!is_int($mapID) OR !is_int($page)) - return; - - //Include the notification text - $json = getScores($mapID, $page, 10); - $json['mapid'] = $mapID; - $json['page'] = $page; - - $note = false; - if ($_SESSION['accepted'] == 1) { - $userID = $_SESSION['userID']; - $note = getNotified($userID); - } else { - if ($_SESSION['preCompletedTutorial'] == true && $_SESSION['preCompletedTutorialNotified'] == false) { - $_SESSION['preCompletedTutorialNotified'] = true; - $note = "Tutorial Completed!"; - $note .= "
You've unlocked: Blue Wall Color!"; - $note .= "
"; - $note .= '
Sign in to save your progress!
'; - $note .= "
"; - } - } - if ($note !== false) - $json['notificationtext'] = $note; - - $encoded = json_encode($json); - die($encoded); -} - if ($_GET['r'] == 'getsol') { $mapID = $_GET['mapID'] + 0; //echo "working..."; -- cgit v1.2.3