-
Notifications
You must be signed in to change notification settings - Fork 2
/
bbsboa.php
70 lines (68 loc) · 1.84 KB
/
bbsboa.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
<?php
require("www2-funcs.php");
login_init();
bbs_session_modify_user_mode(BBS_MODE_SELECT);
require("www2-board.php");
if (isset($_GET["group"]))
$group = $_GET["group"];
else
$group = 0;
settype($group, "integer");
if (isset($_GET["group2"]))
$group2 = $_GET["group2"];
else
$group2 = 0;
settype($group2, "integer");
if ($group < 0 || $group >= BBS_SECNUM)
html_error_quit("错误的参数");
$boards = bbs_getboards(constant("BBS_SECCODE".$group), $group2, 8);
if ($boards === FALSE)
html_error_quit("该目录尚未有版面");
page_header(constant("BBS_SECNAME".$group."_0"), "", "<meta name='kbsrc.brd' content='' />");
?>
<h1><?php echo constant("BBS_SECNAME".$group."_0"); ?>分区</h1>
<script type="text/javascript"><!--
var o = new brdWriter(<?php echo $group; ?>, <?php echo $group2; ?>);
<?php
$rows = sizeof($boards);
$board_list = array();
$list_gnum = $rows;
$list_bnum = $rows;
for ($i = $rows - 1; $i>=0 ; $i--)
{
if ($boards[$i]["FLAG"]&BBS_BOARD_GROUP)
{
$board_list[$list_gnum] = $i;
$list_gnum = $list_gnum + 1;
}
else
{
$list_bnum = $list_bnum - 1;
$board_list[$list_bnum] = $i;
}
}
if ($list_gnum > $rows)
{
for ($i = $rows; $i < $list_gnum; $i++)
{
$board_list[$i - $rows]= $board_list[$i];
}
}
for ($j = 0; $j< $rows; $j++)
{
$board = $boards[$board_list[$j]];
$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"]; ?>,0,<?php echo $board["CURRENTUSERS"];?>);
<?php
}
?>
o.t();
//-->
</script>
<?php
bbs_boards_navigation_bar();
page_footer();
?>