| 1 |
<? |
<?php |
| 2 |
require_once "../bbs/section_list.inc.php"; |
require_once "../bbs/section_list.inc.php"; |
| 3 |
|
|
| 4 |
function section_list_dst(mysqli $db_conn, int $sid_exclude = 0) : string |
function section_list_dst(mysqli $db_conn, int $sid_exclude = 0) : string |
| 11 |
$ret = load_section_list($section_hierachy, |
$ret = load_section_list($section_hierachy, |
| 12 |
function (array $section, array $filter_param) : bool |
function (array $section, array $filter_param) : bool |
| 13 |
{ |
{ |
| 14 |
return ($section["SID"] != $filter_param["sid"] && $_SESSION["BBS_priv"]->checkpriv($secion["SID"], S_POST)); |
return ($section["SID"] != $filter_param["sid"] && $_SESSION["BBS_priv"]->checkpriv($section["SID"], S_POST)); |
| 15 |
}, |
}, |
| 16 |
function (array $section, array $filter_param) : mixed |
function (array $section, array $filter_param) : mixed |
| 17 |
{ |
{ |
| 26 |
if ($ret == false) |
if ($ret == false) |
| 27 |
{ |
{ |
| 28 |
echo mysqli_error($db_conn); |
echo mysqli_error($db_conn); |
| 29 |
?> |
|
| 30 |
<option value="0">---数据查询错误---</option> |
echo <<<HTML |
| 31 |
<? |
<option value="0">---数据查询错误---</option> |
| 32 |
|
HTML; |
| 33 |
} |
} |
| 34 |
else |
else |
| 35 |
{ |
{ |
| 36 |
?> |
echo <<<HTML |
| 37 |
<option value="0">-----选择版块-----</option> |
<option value="0">-----选择版块-----</option> |
| 38 |
<? |
HTML; |
| 39 |
} |
} |
| 40 |
|
|
| 41 |
foreach ($section_hierachy as $c_index => $section_class) |
foreach ($section_hierachy as $c_index => $section_class) |
| 42 |
{ |
{ |
| 43 |
?> |
echo <<<HTML |
| 44 |
<option value="0">==<? echo $section_class["title"]; ?>==</option> |
<option value="0">=={$section_class["title"]}==</option> |
| 45 |
<? |
HTML; |
| 46 |
|
|
| 47 |
foreach ($section_class["sections"] as $s_index => $section) |
foreach ($section_class["sections"] as $s_index => $section) |
| 48 |
{ |
{ |
| 49 |
?> |
echo <<<HTML |
| 50 |
<option value="<? echo $section["sid"]; ?>"> ├<? echo $section["title"]; ?></option> |
<option value="{$section["sid"]}"> ├{$section["title"]}</option> |
| 51 |
<? |
HTML; |
| 52 |
} |
} |
| 53 |
} |
} |
| 54 |
|
|
| 58 |
|
|
| 59 |
return $buffer; |
return $buffer; |
| 60 |
} |
} |
|
?> |
|