<?php require "www2-funcs.php"; login_init(); bbs_session_modify_user_mode(BBS_MODE_MAIL); assert_login(); mailbox_header("阅读信件"); if (isset($_GET["path"])) { $mail_path = $_GET["path"]; $mail_title = $_GET["title"]; } else { $mail_path = ".DIR"; //default is .DIR $mail_title = "收件箱"; } if (isset($_GET["start"])) { $start = $_GET["start"]; } else { $start = 999999; } //default*/ if (strstr($mail_path, '..')) { html_error_quit("读取邮件数据失败!"); } $mail_fullpath = bbs_setmailfile($currentuser["userid"], $mail_path); $mail_num = bbs_getmailnum2($mail_fullpath); if ($mail_num < 0 || $mail_num > 30000) { html_error_quit("Too many mails!"); } $num = 19; if ($start > $mail_num - 19) {
<?php require "www2-funcs.php"; login_init(); page_header($currentuser["userid"] . " 的信箱"); assert_login(); $mail_fullpath = bbs_setmailfile($currentuser["userid"], ".DIR"); $mail_num = bbs_getmailnum2($mail_fullpath); if ($mail_num < 0 || $mail_num > 30000) { html_error_quit("Too many mails!"); } $maildata = bbs_getmails($mail_fullpath, 0, $mail_num); if ($maildata == FALSE) { html_error_quit("读取邮件数据失败!"); } mailbox_header("新信件列表"); ?> <table class="main wide adj"> <caption>新信件列表</caption> <col class="center"/><col class="center"/><col class="center"/><col class="center"/><col/> <tbody><tr><th>序号</th><th>状态</th><th>发信人</th><th>日期</th><th>信件标题</th> <?php $newtotal = 0; $start = 0; for ($i = 0; $i < $mail_num; $i++) { if ($maildata[$i]["FLAGS"][0] == 'N') { $newtotal++; ?> <tr><td><?php echo $start + $i + 1; ?>
if (bbs_get_records_from_num($dir, $num, $articles)) { $file = $articles[0]["FILENAME"]; } else { html_error_quit("错误的参数"); } $filename = bbs_setmailfile($currentuser["userid"], $file); if (!file_exists($filename)) { html_error_quit("信件不存在..."); } @($attachpos = $_GET["ap"]); //pointer to the size after ATTACHMENT PAD if ($attachpos != 0) { bbs_file_output_attachment($filename, $attachpos); exit; } mailbox_header("信件阅读"); ?> <div class="large"> <div class="article"> <script type="text/javascript"><!-- <?php $s = bbs2_readfile($filename); if (is_string($s)) { echo 'att=new attWriter(-1);' . $s; } ?> //--> </script> </div></div> <div class="oper"> [<a onclick='return confirm("你真的要删除这封信吗?")' href="bbsmailact.php?act=del&dir=<?php
<?php require "www2-funcs.php"; require "www2-board.php"; login_init(); bbs_session_modify_user_mode(BBS_MODE_SMAIL); assert_login(); mailbox_header("写邮件"); if (!bbs_can_send_mail(isset($_GET["file"]) ? 1 : 0)) { html_error_quit("您不能发送信件"); } if (isset($_GET["board"])) { $board = $_GET["board"]; } if (isset($board)) { $brdarr = array(); $brdnum = bbs_getboard($board, $brdarr); if ($brdnum == 0) { html_error_quit("错误的讨论区"); } $usernum = $currentuser["index"]; if (bbs_checkreadperm($usernum, $brdnum) == 0) { html_error_quit("错误的讨论区"); } $id = intval(@$_GET["id"]); if ($id <= 0) { html_error_quit("错误的文章"); } $articles = array(); $num = bbs_get_records_from_id($brdarr["NAME"], $id, $dir_modes["NORMAL"], $articles); if ($num <= 0) {
<?php require "www2-funcs.php"; login_init(); assert_login(); mailbox_header("发送信件"); $mailfile = @$_POST["file"]; $dirfile = @$_POST["dir"]; if (strstr($dirfile, '..')) { die; } $maildir = bbs_setmailfile($currentuser["userid"], $dirfile); $num = @intval($_POST["num"]); if (!bbs_can_send_mail($mailfile ? 1 : 0)) { html_error_quit("您不能发送信件"); } if ($mailfile == "") { $incept = trim(@$_POST['userid']); if (!$incept) { html_error_quit("请输入收件人ID"); } $lookupuser = array(); if (!bbs_getuser($incept, $lookupuser)) { html_error_quit("错误的收件人ID"); } $incept = $lookupuser['userid']; if (!strcasecmp($incept, 'guest')) { html_error_quit("不能发信给guest"); } if (!bbs_sufficient_score_to_sendmail($incept)) { html_error_quit("您积分不足,不能给 " . $incept . " 发信!");
login_init(); assert_login(); $dirname = $_POST["dir"]; $title = urldecode($_POST["title"]); $dstart = $_POST["dstart"]; $dend = $_POST["dend"]; $dtype = $_POST["dtype"]; if (strstr($dirname, '..')) { html_error_quit("��ȡ�ʼ�����ʧ��!"); } $mail_fullpath = bbs_setmailfile($currentuser["userid"], $dirname); $mail_num = bbs_getmailnum2($mail_fullpath); if ($dstart < 1 || $dstart > $mail_num || $dend < 1 || $dend > $mail_num || $dstart > $dend) { html_error_quit("����ɾ����ʼ����������������������룡"); } mailbox_header("����ɾ��"); ?> <form action="bbsmailact.php?act=move&<?php echo "dir=" . urlencode($dirname) . "&title=" . urlencode($title); ?> " method="POST" class="small"> <fieldset><legend>����ɾ��</legend> �������ƣ�<b class="red"><?php echo $title; ?> </b><br/> ��ʼ�ʼ���ţ�<b class="red"><?php echo $dstart; ?> </b><br/> �����ʼ���ţ�<b class="red"><?php
html_error_quit("信笺不存在"); } if ($num >= $total) { html_error_quit("信笺不存在"); } $articles = array(); if (bbs_get_records_from_num($dir, $num, $articles)) { $file = $articles[0]["FILENAME"]; } else { html_error_quit("错误的参数"); } $filename = "mail/" . strtoupper($currentuser["userid"][0]) . "/" . $currentuser["userid"] . "/" . $file; if (!file_exists($filename)) { html_error_quit("信件不存在..."); } mailbox_header("转寄信件"); if (isset($_POST["target"])) { $target = $_POST["target"]; } else { $target = ""; } if ($target == "") { html_error_quit("请指定对象"); } if (isset($_POST["big5"])) { $big5 = $_POST["big5"]; } else { $big5 = 0; } settype($big5, "integer"); if (isset($_POST["noansi"])) {
<?php require "www2-funcs.php"; login_init(); bbs_session_modify_user_mode(BBS_MODE_MAIL); assert_login(); mailbox_header("信箱一览"); //add custom mail box if (isset($_POST["boxname"])) { $boxname = $_POST["boxname"]; $ret = bbs_changemaillist(TRUE, $currentuser["userid"], $boxname, 0); if (!$ret) { html_error_quit("存储自定义邮箱数据失败!"); } if ($ret > 0) { html_error_quit("自定义邮箱数已到上限!上限是" . $ret); } } //delete custom mail box if (isset($_GET["delete"])) { $delete = $_GET["delete"]; //1-based if (!bbs_changemaillist(FALSE, $currentuser["userid"], "", $delete - 1)) { 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