From 4b470911a5086ab9d2b648a134e447524b2f4747 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Mon, 26 Nov 2012 22:00:22 -0800 Subject: Added badge near username. --- includes/header.php | 63 +++++++++++++++++++++++++++++++++++++---------------- pages/home.php | 24 ++++++++++---------- 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/includes/header.php b/includes/header.php index f74a942..7c086fb 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,5 +1,20 @@ @@ -116,7 +131,7 @@ function htmlFooter() { } function topbar($links) { - global $accepted; + global $accepted, $wallColor, $wallEmblem; echo '
'; $page = isset($_GET['page']) ? $_GET['page'] : 'home'; @@ -130,28 +145,38 @@ function topbar($links) { echo "
"; if ($accepted) { - echo "Logged in as $_SESSION[displayName]
"; + echo "
"; + echo " Logged in as $_SESSION[displayName]
"; if ($_SESSION['displayName'] == 'noname') - echo "Update your name | "; - echo "Logout"; + echo " Update your name | "; + echo " Logout"; + echo "
"; + echo " + "; + + } else { ?> -Sign in -
-

Sign in

-
-

Do you have an account here?

- Sign in with Google - Sign in with Yahoo - Learn more about OpenID - X -
-
- Sign in +
+

Sign in

+
+

Do you have an account here?

+ Sign in with Google + Sign in with Yahoo + Learn more about OpenID + X +
+
+"; - - echo "
"; + echo "
"; + echo ""; //div id='user' } ?> diff --git a/pages/home.php b/pages/home.php index 4f69d67..50d3952 100644 --- a/pages/home.php +++ b/pages/home.php @@ -11,22 +11,22 @@ include_once ('./includes/mapoftheday.php'); include_once ('./includes/db.inc.php'); include_once ('./includes/datas.php'); -//Get custom wall colors; -$wallColor = ''; -$wallEmblem = ''; + $noteScript = ''; if ($accepted) { $userID = $_SESSION['userID']; - $sql = " - SELECT - userData.wallColor, - userData.wallEmblem - FROM `userData` - WHERE userID = '$userID' "; - $result = mysql_query($sql); - if ($result) - list($wallColor, $wallEmblem) = mysql_fetch_row($result); + // $sql = " + // SELECT + // userData.wallColor, + // userData.wallEmblem + // FROM `userData` + // WHERE userID = '$userID' "; + // $result = mysql_query($sql); + // if ($result) + // list($wallColor, $wallEmblem) = mysql_fetch_row($result); + //global $wallColor; + //echo ": Wallcolor: $wallColor :" ; //$note = getNotified($userID); $note = false; -- cgit v1.2.3