/[LeafOK_CVS]/fenglin/bbs/section_list_dst.inc.php
ViewVC logotype

Contents of /fenglin/bbs/section_list_dst.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Thu Mar 6 02:36:16 2025 UTC (12 months, 1 week ago) by sysadm
Branch: MAIN
Move section list from detail.php to seperate file

1 <?
2 $sql = "SELECT section_config.SID, section_config.CID, section_config.title AS s_title, section_class.title AS c_title
3 FROM section_config INNER JOIN section_class ON section_config.CID = section_class.CID
4 WHERE section_config.SID <> $sid AND section_config.enable AND section_class.enable
5 ORDER BY section_class.sort_order, section_config.sort_order";
6 $rs_section = mysqli_query($db_conn, $sql);
7
8 if ($rs_section == false)
9 {
10 echo mysqli_error($db_conn);
11 ?> <option value="0">---数据查询错误---</option>
12 <?
13 }
14 else
15 {
16 ?> <option value="0">---选择别的版块---</option>
17 <?
18 }
19
20 $last_cid = -1;
21 $have_result = false;
22 ob_start();
23
24 while ($rs_section != false && $row_section = mysqli_fetch_array($rs_section))
25 {
26 if ($row_section["CID"] != $last_cid)
27 {
28 if ($have_result)
29 {
30 ob_end_flush();
31 }
32 else
33 {
34 ob_end_clean();
35 }
36
37 $last_cid = $row_section["CID"];
38 $have_result = false;
39 ob_start();
40 ?> <option value="-<? echo $row_section['CID']; ?>">==<? echo $row_section["c_title"]; ?>==</option>
41 <?
42 }
43
44 if ($_SESSION["BBS_priv"]->checkpriv($row_section["SID"], S_POST))
45 {
46 $have_result = true;
47 ?> <option value="<? echo $row_section['SID'];?>">&nbsp;&nbsp;├<? echo $row_section["s_title"]; ?></option>
48 <?
49 }
50 }
51
52 if ($have_result)
53 {
54 ob_end_flush();
55 }
56 else
57 {
58 ob_end_clean();
59 }
60
61 mysqli_free_result($rs_section);
62 ?>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1