diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2013-03-19 03:26:48 -0500 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2013-03-19 03:26:48 -0500 |
commit | b6680dd405fdf6cd2784facfe799742cfaf805ab (patch) | |
tree | e9cd81aebfc67c76053792583efb0a1fe942ff6c /do.php | |
parent | a600bd24aa5272dfd3b9f178ef9e2c81ec0525b9 (diff) | |
parent | bc57b007dfa5e6e723946143671a9db68a82f348 (diff) | |
download | pathery-b6680dd405fdf6cd2784facfe799742cfaf805ab.tar.xz |
Merge branch 'master' of git.raylu.net:pathery
Conflicts:
globe.php
pages/login.php
Diffstat (limited to 'do.php')
-rw-r--r-- | do.php | 52 |
1 files changed, 8 insertions, 44 deletions
@@ -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']);
@@ -52,8 +50,7 @@ if (isset($_GET['checkachieve']) && $_GET['checkachieve'] == 'true' && $_SESSION $userID = $_SESSION['userID'];
//Located in includes/datas.php
$note = getNotified($userID);
- if ($note !== false)
- $json['notificationtext'] = $note;
+ if ($note !== false) $json['notificationtext'] = $note;
}
if ($_GET['r'] == 'reqMemberPage') {
@@ -73,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...";
|