summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2012-11-29 15:00:11 -0800
committerPatrick Davison <snapwilliam@gmail.com>2012-11-29 15:00:11 -0800
commit1399d45c68e7d14fc1f3e8f2b5451669cce4ffa4 (patch)
treeab28080501f9dc8e4ffdc29742f45e2acf3fdcbf /index.php
parent23b7ddabd4c2c6286a9b3ef0791befbc6f4ef89f (diff)
downloadpathery-1399d45c68e7d14fc1f3e8f2b5451669cce4ffa4.tar.xz
Lots of fixes and changes.
nofollow on login links. tutorial fix changed how $accepted works changed how $wallColor/Emblem works fixed a bug when multiple players scored at the same momment.
Diffstat (limited to 'index.php')
-rw-r--r--index.php24
1 files changed, 21 insertions, 3 deletions
diff --git a/index.php b/index.php
index c1491e5..a1446cd 100644
--- a/index.php
+++ b/index.php
@@ -1,15 +1,33 @@
<?PHP
+//globe will start the session.
include_once("globe.php");
include_once("./includes/header.php");
+$accepted = isset($_SESSION['accepted']) && $_SESSION['accepted'] == 1;
+
+//Not logged in?
if (!$accepted)
if (isset($_COOKIE['doLogin']) && $_COOKIE['doLogin'] == 'yes')
CookieLogin();
-
-
if (isset($_SESSION['accepted']) AND $_SESSION['accepted'] == 1)
$accepted = true;
+//TODO: We could store this data in the session
+if ($accepted) {
+ $userID = $_SESSION['userID'];
+ include_once ('./includes/db.inc.php');
+ $sql = "
+ SELECT
+ userData.wallColor,
+ userData.wallEmblem
+ FROM `userData`
+ WHERE userID = '$userID' ";
+ $result = mysql_query($sql);
+ if ($result)
+ list($wallColor, $wallEmblem) = mysql_fetch_row($result);
+}
+
+
//Links appear in order.
$Links['home'] = "Home";
$Links['leaderboard'] = "Scoreboard";
@@ -20,7 +38,7 @@ if ($accepted) {
$linkname = 'achievements?id='.$_SESSION['userID'];
$Links[$linkname] = "Achievements";
}
-$Links['members'] = "<i title='New!'>Member List</i>";
+$Links['members'] = "Member List";
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin'] == true) {
$Links['admin'] = 'Admin';
}