/[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.3 - (show annotations)
Fri Apr 11 03:45:26 2025 UTC (11 months ago) by sysadm
Branch: MAIN
Changes since 1.2: +31 -46 lines
Refact

1 <?
2 require_once "./section_list.inc.php";
3
4 // Load section list
5 $section_hierachy = array();
6
7 $ret = load_section_list($section_hierachy,
8 function (int $s) : bool
9 {
10 global $sid;
11 return ($s != $sid && $_SESSION["BBS_priv"]->checkpriv($s, S_POST));
12 },
13 function (int $s) : mixed
14 {
15 return null;
16 },
17 $db_conn);
18
19 if ($ret == false)
20 {
21 echo mysqli_error($db_conn);
22 ?>
23 <option value="0">---数据查询错误---</option>
24 <?
25 }
26 else
27 {
28 ?>
29 <option value="0">---选择别的版块---</option>
30 <?
31 }
32
33 foreach ($section_hierachy as $c_index => $section_class)
34 {
35 ?>
36 <option value="0">==<? echo $section_class["title"]; ?>==</option>
37 <?
38 foreach ($section_class["sections"] as $s_index => $section)
39 {
40 ?>
41 <option value="<? echo $section["sid"]; ?>">&nbsp;&nbsp;├<? echo $section["title"]; ?></option>
42 <?
43 }
44 }
45
46 unset($section_hierachy);
47 ?>

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