summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-02-14 00:44:31 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-02-14 00:44:31 -0800
commit319da55b31b57557848fe6a60fed612532bff71a (patch)
tree6bb9550c0ea591c886e89047d53e89c25f655d41 /includes
parentf65cf9406397ac688ec4060ba070e172af0cd90b (diff)
downloadpathery-319da55b31b57557848fe6a60fed612532bff71a.tar.xz
Chat restyled.
Diffstat (limited to 'includes')
-rw-r--r--includes/header.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/includes/header.php b/includes/header.php
index e654cd3..11a99db 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -39,6 +39,7 @@ function htmlHeader($css = array(), $title = 'Pathery', $desc = '', $scripts = a
</script>
<script>
+<? echo userDataToJS(); ?>
function showSignin() {
if (document.getElementById('oid_hidden') !== undefined) {
document.getElementById('oid_hidden').id = 'oid_wrapper';
@@ -199,4 +200,17 @@ function topbar($links) {
echo "</div>"; //div id='user'
}
+function userDataToJS() {
+ global $wallColor, $wallEmblem, $accepted;
+ if (!$accepted) {
+ $r = 'var userObj = {"wallColor":false,"wallEmblem":false,';
+ $r .= '"ID":"-1","accepted":false};';
+ } else {
+ $userID = $_SESSION['userID'];
+ $r = 'var userObj = {"wallColor":"'.$wallColor.'","wallEmblem":"'.$wallEmblem.'",';
+ $r .= '"ID":"'.$userID.'","accepted":true};';
+ }
+ return $r;
+}
+
?>