diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -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';
}
|