function atomic_mailread() { global $currentuser; atomic_mail_header(); $mail_fullpath = bbs_setmailfile($currentuser["userid"], ".DIR"); $mail_num = bbs_getmailnum2($mail_fullpath); if ($mail_num <= 0 || $mail_num > 30000) { atomic_error("读取邮件数据失败!"); } if (isset($_GET["num"])) { $num = @intval($_GET["num"]); } else { atomic_error("错误的参数"); } if ($num <= 0 || $num > $mail_num) { atomic_error("错误的参数"); } $articles = array(); if (bbs_get_records_from_num($mail_fullpath, $num - 1, $articles)) { $filename = bbs_setmailfile($currentuser["userid"], $articles[0]["FILENAME"]); } else { atomic_error("错误的参数"); } $html = "<p>"; $html .= '<a href="?act=mailpost">写信</a> <a href="?act=mailpost&num=' . $num . '">回信</a> '; if ($num > 1) { $html .= '<a href="?act=mailread&num=' . ($num - 1) . '">上一篇</a> '; } $html .= '<a href="?act=mail&start=' . $num . '">收件箱</a> '; if ($num < $mail_num) { $html .= '<a href="?act=mailread&num=' . ($num + 1) . '">下一篇</a> '; } $html .= "</p>"; echo $html; echo bbs2_readfile_text($filename, 0, 2); bbs_setmailreaded($mail_fullpath, $num - 1); atomic_footer(); }
"/> <fieldset><legend>转寄信件</legend> <div class="inputs"> <label>对方的id或email:</label><input type="text" name="target" size="20" maxlength="69" value="<?php echo $currentuser["userid"]; ?> "/><br/> <input type="checkbox" name="big5" id="big5" value="1"/><label for="big5" class="clickable">BIG5</label> <input type="checkbox" name="noansi" id="noansi" value="1"/><label for="noansi" class="clickable">过滤ANSI</label> <input type="submit" value="转寄"/> </div></fieldset> </form> <form action="bbsmailcross.php" method="post" class="medium"> <input type="hidden" name="filename" value="<?php echo $articles[0]["FILENAME"]; ?> "/> <input type="hidden" name="title" value="<?php echo urlencode($articles[0]["TITLE"]); ?> "/> <fieldset><legend>转贴到版面</legend> <div class="inputs"> <label>版面名称:</label><input type="text" name="target" size="20" maxlength="69" value=""/> <input type="checkbox" name="outgo" checked />转信 <input type="submit" value="转贴"/> </div></fieldset> </form><br /><br /> <?php bbs_setmailreaded($dir, $num); page_footer();
/** * function setRead set the mail read * * @return null * @access public */ public function setRead() { bbs_setmailreaded($this->_box->getFullPath(), $this->num); }