From 4565a86946464f124110db11e3ba7331018d8664 Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Mon, 21 Dec 2009 05:40:20 +0000 Subject: added working login script and announcment block git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@386 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- blocks/soldier_info/index.php | 48 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) (limited to 'blocks') diff --git a/blocks/soldier_info/index.php b/blocks/soldier_info/index.php index f40f528..4db230d 100644 --- a/blocks/soldier_info/index.php +++ b/blocks/soldier_info/index.php @@ -1,10 +1,44 @@ +Query("SELECT `uid`, `username`, `unreadpms`, `totalpms`, `postnum`, `usergroup`, `additionalgroups` FROM `mybb_users` WHERE `uid` = '".$login_cookie['0']."' AND `loginkey` = '".$login_cookie['1']."'"); + $check_num = $db->Rows($result); + if ($check_num != '1') + { + $past = time() - 100; + $logged_in = ''; + setcookie('mybbuser', gone, $past); + header("location: index.php"); + } + while(($row = $db->Fetch($result))!==false) + { + $logged_uid = $row['uid']; + $logged_username = $row['username']; + $avatar_type = $row['avatartype']; + $pm_unread = $row['unreadpms']; + $pm_total = $row['totalpms']; + $postnum = $row['postnum']; + + $main_usergroup = $row['usergroup']; + $add_usergroup = $row['additionalgroups']; + + $add_usergroups= explode(',', $add_usergroup); + } +} +?>
Your IP:


'.$postnum.' post(s)

-
+ //echo ''.$logged_username.'

+ echo $postnum.' post(s)

'; + echo ' Welcome, '.$logged_username.'
@@ -16,10 +50,12 @@
'; } if ($logged_in == 'true'){ - echo'
- Private Messages
- Unread: '.$pm_unread.'
- Total: '.$pm_total.'

'; + ?> +
+ Private Messages
+ Unread:
+ Total:

+ \ No newline at end of file -- cgit