-
Notifications
You must be signed in to change notification settings - Fork 2
/
bbsfoot.php
68 lines (67 loc) · 1.95 KB
/
bbsfoot.php
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
62
63
64
65
66
67
68
<?php
$setboard=0;
require("www2-funcs.php");
login_init();
page_header("状态", FALSE);
$unread = false;
if (strcmp($currentuser["userid"], "guest")) {
$tn = bbs_mail_get_num($currentuser["userid"]);
if ($tn) {
$unread = $tn["newmail"];
$total = $tn["total"];
$full = $tn["full"];
}
}
?>
<script type="text/javascript">
<!--
addBootFn(footerStart);
var stayTime = <?php echo (time()-$currentuinfo["logintime"]); ?>;
var serverTime = <?php echo (time() + intval(date("Z"))); ?>;
var hasMail = <?php echo $unread ? "1" : "0"; ?>;
var MailFull = <?php echo $full ? "1" : "0"; ?>;
<?php
if (isset($currentuser["userid"]) && $currentuser["userid"] != "guest" && bbs_checkwebmsg()) {
?>
alertmsg();
<?php
}
?>
function newmailnotice() {
var thespan = document.getElementById('mailnotice');
if(thespan.style.display == '')
thespan.style.display = 'none';
else
thespan.style.display = '';
if(hasMail || MailFull)
setTimeout('newmailnotice();', 800);
else
thespan.style.display = 'none';
}
function clearjunkmail() {
if(confirm('你是否要清空垃圾箱?')) {
if(top.window['f3'])
top.window['f3'].location='bbsmailact.php?act=clear';
return true;
}
return false;
}
//-->
</script>
<body><div class="footer">时间[<span id="divTime"></span>] 在线[<?php echo bbs_getonlinenumber(); ?>]
帐号[<a href="bbsqry.php?userid=<?php echo $currentuser["userid"]; ?>" target="f3"><?php echo $currentuser["userid"]; ?></a>]
<?php
if (isset($total)) {
echo "信箱[<a href=\"bbsmailbox.php?path=.DIR&title=收件箱\" target=\"f3\">";
if ($full) {
echo $total . "封</a><a href=\"javascript:void(0);\" onclick=\"return clearjunkmail()\">(信箱超容)</a>] <bgsound src='sound/mailfull.mp3'>";
} else if ($unread) {
echo $total . "封(有新信)</a>] <bgsound src='sound/newmail.mp3'>";
} else {
echo $total . "封</a>] ";
}
}
?>
停留[<span id="divStay"></span>]
<span id="mailnotice" style="display:none">您有信件</span></div></body>
</html>