-
Notifications
You must be signed in to change notification settings - Fork 2
/
bbsdelmail.php
76 lines (71 loc) · 1.84 KB
/
bbsdelmail.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
69
70
71
72
73
74
75
76
<?php
require("www2-funcs.php");
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 echo $dend; ?></b><br/>
删除类型:<b class="red">
<?php
if($dtype == 1)
echo "强制删除";
else
echo "普通删除";
?>
</b><br/>
<input type="hidden" name="act2" value="delarea">
<?php
$dnum = $dend - $dstart + 1;
$dstart-- ;
$j = 0;
$maildata = bbs_getmails($mail_fullpath,$dstart,$dnum);
if($dtype == 1)
{
foreach( $maildata as $mail )
{
echo "<input type=\"hidden\" name=\"file".$j."\" value=\"".$mail["FILENAME"]."\"/>\n";
$j ++;
}
}
else
{
foreach( $maildata as $mail )
{
if(stristr($mail["FLAGS"],"m"))
continue;
else
{
echo "<input type=\"hidden\" name=\"file".$j."\" value=\"".$mail["FILENAME"]."\"/>\n";
$j ++;
}
}
}
?>
<input type="hidden" name="mailnum" value="<?php echo $j; ?>"/>
<div class="oper">
<input type="button" value="修改" onclick="history.go(-1)"/>
<input type="submit" value="确认"/>
</div>
</fieldset></form>
<?php
page_footer(FALSE);
?>