function atomic_mainpage() { global $currentuser; atomic_header(); if (strcmp($currentuser["userid"], "guest")) { $html = "<p>欢迎 " . $currentuser["userid"] . ". <a href='?act=logout'>注销</a></p>"; $select = 0; if (bbs_load_favboard($select) != -1) { $boards = bbs_fav_boards($select, 1); if ($boards) { $html .= "<p>顶层收藏夹: "; $brd_name = $boards["NAME"]; $brd_flag = $boards["FLAG"]; $brd_bid = $boards["BID"]; $rows = sizeof($brd_name); for ($i = 0; $i < $rows; $i++) { if ($brd_bid[$i] == -1) { continue; } if ($brd_flag[$i] == -1) { continue; } if ($brd_flag[$i] & BBS_BOARD_GROUP) { continue; } $html .= '<a href="?act=board&board=' . $brd_name[$i] . '">' . $brd_name[$i] . '</a> '; } $html .= '</p>'; } } $oldtotal = 0; $oldunread = 0; if (!bbs_getmailnum($currentuser["userid"], $total, $unread, $oldtotal, $oldunread)) { $unread = $total = 0; } $html .= "<p><a href='?act=mail'>信箱</a>: {$total} 封, 新信: {$unread} 封. <a href='?act=mailpost'>写信</a></p>"; echo $html; } else { echo <<<END <form action="bbslogin.php?mainurl=atomic.php" method="post"> 用户名: <input type="text" name="id" /> 密码: <input type="password" name="passwd" maxlength="39" /> <input type="submit" value="登录"/> </form> END; } atomic_show_boardjump(); if (is_null(UTF8SP)) { $url = $_SERVER['REQUEST_URI']; if (strstr($url, 'utf8=')) { $url = substr($url, 0, strlen($url) - 1); } else { if (!strstr($url, '?')) { $url .= '?utf8='; } } echo "UTF8: <a href='" . $url . (UTF8 ? "0" : "1") . "'>" . (UTF8 ? "ON" : "OFF") . "</a>. "; } else { echo "UTF8: " . (UTF8 ? "ON" : "OFF") . ". "; } echo "文章显示长度限制: " . MAXCHAR . "."; atomic_footer(); }
//custom mailboxs $mail_cusbox = bbs_loadmaillist($currentuser["userid"]); $totle_mails = $mail_boxnums[0] + $mail_boxnums[1] + $mail_boxnums[2]; $i = 2; if ($mail_cusbox != -1) { foreach ($mail_cusbox as $mailbox) { $i++; $mail_box[$i] = $mailbox["pathname"]; $mail_boxtitle[$i] = $mailbox["boxname"]; $mail_boxnums[$i] = bbs_getmailnum2(bbs_setmailfile($currentuser["userid"], $mailbox["pathname"])); $totle_mails += $mail_boxnums[$i]; } } $mailboxnum = $i + 1; $mail_used_space = bbs_getmailusedspace(); bbs_getmailnum($currentuser["userid"], $total, $unread, 0, 0); ?> <table class="main wide adj"> <col class="center"/><col class="center"/><col class="center"/><col class="center"/> <caption>您的邮箱中共有 <?php echo $totle_mails; ?> 封邮件,占用空间 <?php echo $mail_used_space; ?> K。</caption> <tbody> <tr><th>文件夹</th><th>信件数</th><th>新邮件</th><th>删除</th></tr> <?php for ($i = 0; $i < $mailboxnum; $i++) { ?>