summaryrefslogtreecommitdiffstats
path: root/do.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-03-14 16:18:46 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-03-14 16:18:46 -0700
commitf4691c84a4942b60c4cfb8f2845e63a3adde358e (patch)
treeb981b8ec9a685d0457a8dd9b486ebdc5c9b41099 /do.php
parentf797f84a2f708912ac039340a217e18066f9eba3 (diff)
downloadpathery-f4691c84a4942b60c4cfb8f2845e63a3adde358e.tar.xz
Old code.
Diffstat (limited to 'do.php')
-rw-r--r--do.php49
1 files changed, 7 insertions, 42 deletions
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 = "<strong>Tutorial Completed!</strong>";
- $note .= "<center>You've unlocked: Blue Wall Color!";
- $note .= "<table><tr><td onclick='changeWallColor(\"#4444ff\")' style='background-color:#4444ff;' class='grid_td_rocks'></td></tr></table>";
- $note .= '<br /><a href="javascript:showSignin();"><strong>Sign in</strong></a> to save your progress!<br />';
- $note .= "</center>";
- }
- }
- if ($note !== false)
- $json['notificationtext'] = $note;
-
- $encoded = json_encode($json);
- die($encoded);
-}
-
if ($_GET['r'] == 'getsol') {
$mapID = $_GET['mapID'] + 0;
//echo "working...";