diff options
-rw-r--r-- | globe.php | 4 | ||||
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | pages/home.php | 31 | ||||
-rw-r--r-- | pages/memberlist.php | 7 |
4 files changed, 10 insertions, 36 deletions
@@ -1,5 +1,5 @@ <?PHP
-date_default_timezone_set('America/Los_Angeles');
+date_default_timezone_set('America/New_York');
if (!session_id())
session_start();
//session_regenerate_id();
@@ -22,6 +22,7 @@ function sql_clean($string) { }
function CookieLogin() {
+ global $accepted;
include_once "includes/db.inc.php";
$userID = $_COOKIE['userID'];
$auth = $_COOKIE['auth'];
@@ -53,6 +54,7 @@ function CookieLogin() { if ($auth == $three) {
$_SESSION['accepted'] = 1;
+ $accepted = 1;
$_SESSION['userID'] = $userID;
$_SESSION['displayName'] = $display;
if ($isAdmin == 1)
@@ -5,6 +5,10 @@ include_once("./includes/header.php"); if (!$accepted)
if (isset($_COOKIE['doLogin']) && $_COOKIE['doLogin'] == 'yes')
CookieLogin();
+
+
+if (isset($_SESSION['accepted']) AND $_SESSION['accepted'] == 1)
+ $accepted = true;
//Links appear in order.
$Links['home'] = "Home";
diff --git a/pages/home.php b/pages/home.php index c2a8e8a..7e5e401 100644 --- a/pages/home.php +++ b/pages/home.php @@ -58,37 +58,6 @@ function tutorialComplete($userID) { return false;
}
-//Get the current day as int.
-$numday = date('w');
-$numday = intval($numday);
-switch ($numday) {
- case 0:
- $mapstyle = 'Thirty';
- break;
- case 1:
- $mapstyle = 'Simple';
- break;
- case 2:
- $mapstyle = "ABC's";
- break;
- case 3:
- $mapstyle = 'Teleport Madness';
- break;
- case 4:
- $mapstyle = 'Rocky Maze';
- break;
- case 5: //Friday
- $mapstyle = 'Side to Side';
- break;
- case 6: //Saturday
- $mapstyle = "Seeing Double";
- break;
-}
-
-
-
-
-
?>
<body>
diff --git a/pages/memberlist.php b/pages/memberlist.php index 191bfa5..a250cb6 100644 --- a/pages/memberlist.php +++ b/pages/memberlist.php @@ -54,7 +54,6 @@ if (isset($_GET['o'])) { $sql = "SELECT
users.ID,
users.displayName,
- userData.displayColor,
(SELECT SUM(moves) FROM solutions WHERE solutions.userID = users.ID) AS totalMoves,
(SELECT SUM(moves) FROM solutions
WHERE solutions.userID = users.ID AND
@@ -127,7 +126,7 @@ foreach ($cat as $name => $item) { //Echo Table Data
$i = 0;
-while (list($userID, $display, $displayColor, $moveCount, $moveCountWeek, $mazeCount, $winCount, $tieCount, $wallColor, $nameColor, $wallEmblem, $joined, $lastLogon) = mysql_fetch_row($result)) {
+while (list($userID, $display, $moveCount, $moveCountWeek, $mazeCount, $winCount, $tieCount, $wallColor, $nameColor, $wallEmblem, $joined, $lastLogon) = mysql_fetch_row($result)) {
//Prepare data
$i++;
@@ -150,7 +149,7 @@ while (list($userID, $display, $displayColor, $moveCount, $moveCountWeek, $mazeC $background = '#343c57';
echo "
-<tr style='background-color: $background; color:$displayColor;' >
+<tr style='background-color: $background; color:$nameColor;' >
<td>$i</td>
<td>
<div class='grid_td' style='width:35px; height:35px; background:$wallColor url(images/marks/$wallEmblem);'>
@@ -158,7 +157,7 @@ while (list($userID, $display, $displayColor, $moveCount, $moveCountWeek, $mazeC </div>
</div>
</td>
- <td><span title='UserID: $userID'><a href='achievements?id=$userID' style='color:$displayColor'>$display</a></span></td>
+ <td><span title='UserID: $userID'><a href='achievements?id=$userID' style='color:$nameColor'>$display</a></span></td>
<td>$mazeCount</td>
<td>$moveCount</td>
|