Exemple #1
0
if ($start < 0) {
    $start = 0;
    if ($num > $mail_num) {
        $num = $mail_num;
    }
}
$maildata = bbs_getmails($mail_fullpath, $start, $num);
if ($maildata == FALSE) {
    html_error_quit("读取邮件数据失败!");
}
//system mailboxs
$mail_box = array(".DIR", ".SENT", ".DELETED");
$mail_boxtitle = array("收件箱", "发件箱", "垃圾箱");
//$mail_boxnums = array(bbs_getmailnum2(bbs_setmailfile($currentuser["userid"],".DIR")),bbs_getmailnum2(bbs_setmailfile($currentuser["userid"],".SENT")),bbs_getmailnum2(bbs_setmailfile($currentuser["userid"],".DELETED")));
//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_title_encode = rawurlencode($mail_title);
?>
<script type="text/javascript">
Exemple #2
0
function display_mail_menu($userid)
{
    ?>
<div class="mi"><a href="bbsnewmail.php">阅览新邮件</a></div>
<div class="mi"><a href="bbsmailbox.php?path=.DIR&title=<?php 
    echo rawurlencode("收件箱");
    ?>
">收件箱</a></div>
<div class="mi"><a href="bbsmailbox.php?path=.SENT&title=<?php 
    echo rawurlencode("发件箱");
    ?>
">发件箱</a></div>
<div class="mi"><a href="bbsmailbox.php?path=.DELETED&title=<?php 
    echo rawurlencode("垃圾箱");
    ?>
">垃圾箱</a></div>
<?php 
    //custom mailboxs
    $mail_cusbox = bbs_loadmaillist($userid);
    if ($mail_cusbox != -1) {
        foreach ($mail_cusbox as $mailbox) {
            echo "<div class=\"mi\">" . "<a href=\"bbsmailbox.php?path=" . $mailbox["pathname"] . "&title=" . urlencode($mailbox["boxname"]) . "\">" . htmlspecialchars($mailbox["boxname"]) . "</a></div>\n";
        }
    }
    ?>
<div class="lmi"><a href="bbspstmail.php">发送邮件</a></div>
<?php 
}