blob: 4db230da2acd6ad0cbf8e6318e185d191ec4011f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<?php
if($_COOKIE['mybbuser'] != '')
{
global $db;
$logged_in = 'true';
$username = stripslashes($_COOKIE['mybbuser']);
$login_cookie = explode('_', $username);
$result = $db->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);
}
}
?>
<center>
Your IP: <?php echo $_SERVER['REMOTE_ADDR']; ?><br />
<?php
if ($logged_in == 'true'){
//echo '<img src="'.$avatar.'" alt="'.$logged_username.'"/><br /><br />
echo $postnum.' post(s)<br /><br />';
echo '</center>
Welcome, '.$logged_username.' <br />
<a href="logout.php"><img src="images/arrow-blk.gif" border="0" alt="" /> Logout</a><br />';
}
else{
echo 'Welcome Guest.<br />
</center>
<br />';
}
if ($logged_in == 'true'){
?>
<hr />
<!-- <img src="images/email-y.gif" /> -->Private Messages <br />
<!-- <img src="images/email-r.gif" /> -->Unread: <a href="forums/private.php"><?php echo $pm_unread; ?></a><br />
<!-- <img src="images/email-g.gif" /> -->Total: <a href="forums/private.php"><?php echo $pm_total; ?></a><br /><hr />
<?php
}
?>
</center>
|