aboutsummaryrefslogtreecommitdiff
path: root/blocks
diff options
context:
space:
mode:
authorjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-28 01:25:49 -0500
committerjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-28 01:25:49 -0500
commit84d0d57228ed159384c023e4f732d61b5cb25364 (patch)
tree55e5e4eb8ae02eb870e5042e74482733115f1a10 /blocks
parented943b32335933f369d9aa459689e986c10421ae (diff)
downloadbayonetcms-84d0d57228ed159384c023e4f732d61b5cb25364.tar.gz
Added SMF forum
Added block to interface with SMF logins (called forum_login) Fixed pages by removing articles Added contentHeading to page generation git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@404 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'blocks')
-rw-r--r--blocks/forum_login/index.php44
1 files changed, 44 insertions, 0 deletions
diff --git a/blocks/forum_login/index.php b/blocks/forum_login/index.php
new file mode 100644
index 0000000..c5343d9
--- /dev/null
+++ b/blocks/forum_login/index.php
@@ -0,0 +1,44 @@
+<?php
+$avatar_path = '/cms/forums/avatars/';
+require_once dirname(__FILE__) . '/../../forums/SSI.php';
+
+//decho($GLOBALS['user_info']);
+
+
+global $user_info;
+
+$user = $user_info;
+$name = $user['name'];
+$avatar = empty($user['avatar']['url']) ? 'blank.gif' : $user['avatar']['url'];
+$ip = $user['ip'];
+$posts = $user['posts'];
+$messages = $user['messages'];
+$unread_messages = $user['unread_messages'];
+
+if(strstr($avatar,'http://'))
+{
+ $avatar_path = NULL;
+}
+
+if (isset($GLOBALS['ID_MEMBER']) && $GLOBALS['ID_MEMBER'] != 0): ?>
+ <div>
+ <p>
+ <center>
+ <b>Your IP:</b> <?php echo $ip; ?><br />
+ <?php /* fix this, what about avatars that arent saved no our site */ ?>
+ <img src="<?php echo $avatar_path . $avatar; ?>" alt="<?php echo 'No Avatar'; ?>" /><br/>
+ <b>Total posts:</b> <?php echo $posts; ?><br />
+ </center>
+ </p>
+
+ <p>
+ Welcome, <?php echo $name; ?> (<?php ssi_logout('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?>)<br />
+ <b>Inbox:</b> <?php echo $messages; ?><br />
+ <b>Unread:</b> <?php echo $unread_messages; ?><br />
+ </p>
+
+ </div>
+
+<?php else: ?>
+<?php ssi_login('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?>
+<?php endif; ?>