-
Notifications
You must be signed in to change notification settings - Fork 2
/
bbsfav.php
91 lines (89 loc) · 2.69 KB
/
bbsfav.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
$XX = isset($_GET["x"]);
require("www2-funcs.php");
login_init();
bbs_session_modify_user_mode(BBS_MODE_SELECT);
if ($XX) {
$page_title = "新分类讨论区";
} else {
assert_login();
$page_title = $currentuser["userid"] . " 的收藏夹";
}
page_header($page_title, "", "<meta name='kbsrc.brd' content='' />");
if (isset($_GET["select"]))
$select = $_GET["select"];
else
$select = 0;
settype($select, "integer");
if ($select < 0)
html_error_quit("错误的参数");
if (!$XX) {
if(bbs_load_favboard($select)==-1)
html_error_quit("错误的参数");
if (isset($_GET["delete"]))
{
$delete_s=$_GET["delete"];
settype($delete_s,"integer");
bbs_del_favboard($select,$delete_s);
}
if (isset($_GET["deldir"]))
{
$delete_s=$_GET["deldir"];
settype($delete_s,"integer");
bbs_del_favboarddir($select,$delete_s);
}
if (isset($_GET["dname"]))
{
$add_dname=trim($_GET["dname"]);
if ($add_dname)
bbs_add_favboarddir($add_dname);
}
if (isset($_GET["bname"]))
{
$add_bname=trim($_GET["bname"]);
if ($add_bname)
$sssss=bbs_add_favboard($add_bname);
}
}
$boards = bbs_fav_boards($select, $XX ? 2 : 1, 1);
$list_father = bbs_get_father($select);
if ($boards === FALSE)
html_error_quit("读取版列表失败");
$fix = $XX ? "&x" : "";
?>
<script type="text/javascript"><!--
var o = new brdWriter(<?php echo $list_father; ?>, <?php echo $select; ?>, '<?php echo $fix; ?>');
<?php
foreach($boards as $board) {
if( $board["UNREAD"] ==-1 && $board["ARTCNT"] ==-1) continue;
if ($board["BID"] == -1) continue;
if ($board["FLAG"] == -1 ) {
?>
o.f(<?php echo $board["BID"];?>,'<?php echo addslashes($board["DESC"]); ?> ',<?php echo $board["NPOS"]; ?>,'<?php echo $XX?$board["BM"]:""; ?>');
<?php
} else {
$isGroup = ($board["FLAG"]&BBS_BOARD_GROUP) ? "true" : "false";
?>
o.o(<?php echo $isGroup; ?>,<?php echo ($board["UNREAD"] == 1) ? "1" : "0"; ?>,<?php echo $board["BID"]; ?>,<?php echo $board["LASTPOST"];
?>,'<?php echo $board["CLASS"]; ?>','<?php echo addslashes($board["NAME"]); ?>','<?php echo addslashes($board["DESC"]);
?>','<?php echo $board["BM"]; ?>',<?php echo $board["ARTCNT"]; ?>,<?php echo $board["NPOS"];?>,<?php echo $board["CURRENTUSERS"];?>);
<?php
}
}
?>
o.t();
//-->
</script>
<?php
if (!$XX) {
?>
<div class="oper"><form action=bbsfav.php>增加目录: <input name=dname size=24 maxlength=20 type=text value="">
<input type=submit value=确定><input type=hidden name=select value=<?php echo $select;?>>
</form></div>
<div class="oper"><form action=bbsfav.php>增加版面: <input name=bname size=24 maxlength=20 type=text value="">
<input type=submit value=确定><input type=hidden name=select value=<?php echo $select;?>>
</form></div>
<?php
}
page_footer();
?>