| 50 |
{ |
{ |
| 51 |
instance.post('section_setting_service.php', { |
instance.post('section_setting_service.php', { |
| 52 |
sid: <? echo $result_set["data"]["sid"]; ?>, |
sid: <? echo $result_set["data"]["sid"]; ?>, |
| 53 |
|
sname: f.sname.value, |
| 54 |
|
title: f.title.value, |
| 55 |
comment: f.textarea_comment.value, |
comment: f.textarea_comment.value, |
| 56 |
announcement: f.textarea_announcement.value, |
announcement: f.textarea_announcement.value, |
| 57 |
|
exp_get: (f.exp_get.checked ? "1" : "0"), |
| 58 |
|
recommend: (f.recommend.checked ? "1" : "0"), |
| 59 |
|
read_user_level: f.read_user_level.value, |
| 60 |
|
write_user_level: f.write_user_level.value, |
| 61 |
|
sort_order: f.sort_order.value, |
| 62 |
ex_update: (f.ex_update.checked ? "1" : "0"), |
ex_update: (f.ex_update.checked ? "1" : "0"), |
| 63 |
}) |
}) |
| 64 |
.then(function (response) { |
.then(function (response) { |
| 222 |
document.location = "section_setting.php?sid=" + s.value + "&ts=" + Date.now(); |
document.location = "section_setting.php?sid=" + s.value + "&ts=" + Date.now(); |
| 223 |
} |
} |
| 224 |
}); |
}); |
| 225 |
|
|
| 226 |
|
<? |
| 227 |
|
$user_level_types = array("read_user_level", "write_user_level"); |
| 228 |
|
|
| 229 |
|
foreach ($user_level_types as $t) |
| 230 |
|
{ |
| 231 |
|
?> |
| 232 |
|
var l = document.getElementById("<? echo $t; ?>"); |
| 233 |
|
var found = false; |
| 234 |
|
for (i = 0; !found && i < l.options.length; i++) |
| 235 |
|
{ |
| 236 |
|
if (l.options[i].value == <? echo $result_set["data"][$t]; ?>) |
| 237 |
|
{ |
| 238 |
|
l.selectedIndex = i; |
| 239 |
|
found = true; |
| 240 |
|
} |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
for (i = 0; !found && i < l.options.length; i++) |
| 244 |
|
{ |
| 245 |
|
if (l.options[i].value >= <? echo $result_set["data"][$t]; ?>) |
| 246 |
|
{ |
| 247 |
|
l.selectedIndex = i; |
| 248 |
|
found = true; |
| 249 |
|
} |
| 250 |
|
} |
| 251 |
|
<? |
| 252 |
|
} |
| 253 |
|
?> |
| 254 |
|
|
| 255 |
|
var s_sort = document.getElementById("sort_order"); |
| 256 |
|
for (i = 0; i < s_sort.options.length; i++) |
| 257 |
|
{ |
| 258 |
|
if (s_sort.options[i].value == <? echo $result_set["data"]["sort_order"]; ?>) |
| 259 |
|
{ |
| 260 |
|
s_sort.selectedIndex = i; |
| 261 |
|
break; |
| 262 |
|
} |
| 263 |
|
} |
| 264 |
}); |
}); |
| 265 |
|
|
| 266 |
</script> |
</script> |
| 270 |
<p style="FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: red; FONT-FAMILY: 楷体">版块设定</p> |
<p style="FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: red; FONT-FAMILY: 楷体">版块设定</p> |
| 271 |
<p><span id="err_msg_prompt" name="err_msg" style="color: red"></span></p> |
<p><span id="err_msg_prompt" name="err_msg" style="color: red"></span></p> |
| 272 |
<form method="post" action="#" id="section_setting" name="section_setting" > |
<form method="post" action="#" id="section_setting" name="section_setting" > |
| 273 |
<table border="1" cellpadding="10" cellspacing="0" width="90%" bgcolor="#ffdead"> |
<table border="1" cellpadding="10" cellspacing="0" width="1050" bgcolor="#ffdead"> |
| 274 |
<tr> |
<tr> |
| 275 |
<td width="30%" align="right"> |
<td width="25%" align="right"> |
| 276 |
版块名称 |
操作版块 |
| 277 |
</td> |
</td> |
| 278 |
<td width="70%"> |
<td width="75%"> |
| 279 |
<select id="section_switch" name="section_switch" size="1"> |
<select id="section_switch" name="section_switch" size="1"> |
| 280 |
<? |
<? |
| 281 |
foreach ($result_set["data"]["section_hierachy"] as $c_index => $section_class) |
foreach ($result_set["data"]["section_hierachy"] as $c_index => $section_class) |
| 295 |
</td> |
</td> |
| 296 |
</tr> |
</tr> |
| 297 |
<tr> |
<tr> |
| 298 |
|
<td width="25%" align="right"> |
| 299 |
|
版块名称 |
| 300 |
|
</td> |
| 301 |
|
<td width="75%"> |
| 302 |
|
<span id="err_msg_sname" name="err_msg" style="color: red;"></span> |
| 303 |
|
<input id="sname" name="sname" size="20" value="<? echo htmlspecialchars($result_set["data"]["sname"], ENT_QUOTES | ENT_HTML401, 'UTF-8'); ?>" |
| 304 |
|
<? echo ($_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ? "" : "disabled"); ?> |
| 305 |
|
<br />1-20位大小写字母、数字、下划线的组合,必须以字母开头 |
| 306 |
|
</td> |
| 307 |
|
</tr> |
| 308 |
|
<tr> |
| 309 |
|
<td width="25%" align="right"> |
| 310 |
|
版块标题 |
| 311 |
|
</td> |
| 312 |
|
<td width="75%"> |
| 313 |
|
<span id="err_msg_title" name="err_msg" style="color: red;"></span> |
| 314 |
|
<input id="title" name="title" size="20" value="<? echo htmlspecialchars($result_set["data"]["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'); ?>" |
| 315 |
|
<? echo ($_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ? "" : "disabled"); ?> |
| 316 |
|
<br />长度不超过10个全角字符,不能包含空格和HTML特殊语义字符 |
| 317 |
|
</td> |
| 318 |
|
</tr> |
| 319 |
|
<tr> |
| 320 |
<td align="right"> |
<td align="right"> |
| 321 |
版块介绍 |
版块介绍 |
| 322 |
</td> |
</td> |
| 323 |
<td> |
<td> |
| 324 |
<span id="err_msg_comment" name="err_msg" style="color: red;"></span> |
<span id="err_msg_comment" name="err_msg" style="color: red;"></span> |
| 325 |
<textarea id="textarea_comment" name="textarea" cols="80" rows="5"><? echo htmlspecialchars($result_set["data"]["comment"], ENT_HTML401, 'UTF-8'); ?></textarea> |
<textarea id="textarea_comment" name="textarea" cols="80" rows="5"><? echo htmlspecialchars($result_set["data"]["comment"], ENT_HTML401, 'UTF-8'); ?></textarea> |
| 326 |
限3行80列以内 |
<br />限3行80列以内 |
| 327 |
</td> |
</td> |
| 328 |
</tr> |
</tr> |
| 329 |
<tr> |
<tr> |
| 333 |
<td> |
<td> |
| 334 |
<span id="err_msg_announcement" name="err_msg" style="color: red;"></span> |
<span id="err_msg_announcement" name="err_msg" style="color: red;"></span> |
| 335 |
<textarea id="textarea_announcement" name="textarea" cols="80" rows="5"><? echo htmlspecialchars($result_set["data"]["announcement"], ENT_HTML401, 'UTF-8'); ?></textarea> |
<textarea id="textarea_announcement" name="textarea" cols="80" rows="5"><? echo htmlspecialchars($result_set["data"]["announcement"], ENT_HTML401, 'UTF-8'); ?></textarea> |
| 336 |
限3行以内,每行不超过150字符 |
<br />限3行以内,每行不超过150字符 |
| 337 |
|
</td> |
| 338 |
|
</tr> |
| 339 |
|
<tr> |
| 340 |
|
<td width="25%" align="right"> |
| 341 |
|
版块属性 |
| 342 |
|
</td> |
| 343 |
|
<td width="75%"> |
| 344 |
|
<span id="err_msg_flag" name="err_msg" style="color: red;"></span> |
| 345 |
|
<input type="checkbox" id="exp_get" name="exp_get" <? echo ($result_set["data"]["exp_get"] ? "checked" : ""); ?> |
| 346 |
|
<? echo ($_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ? "" : "disabled"); ?>>经验 |
| 347 |
|
<input type="checkbox" id="recommend" name="recommend" <? echo ($result_set["data"]["recommend"] ? "checked" : ""); ?> |
| 348 |
|
<? echo ($_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ? "" : "disabled"); ?>>推荐 |
| 349 |
|
<select id="read_user_level" name="read_user_level" size="1" |
| 350 |
|
<? echo ($_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ? "" : "disabled"); ?>> |
| 351 |
|
<? |
| 352 |
|
foreach (user_priv::$user_level_list as $level) |
| 353 |
|
{ |
| 354 |
|
?> |
| 355 |
|
<option value="<? echo $level; ?>"><? echo user_priv::s_levelname($level); ?></option> |
| 356 |
|
<? |
| 357 |
|
} |
| 358 |
|
?> |
| 359 |
|
</select>可读 |
| 360 |
|
<select id="write_user_level" name="write_user_level" size="1" |
| 361 |
|
<? echo ($_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ? "" : "disabled"); ?>> |
| 362 |
|
<? |
| 363 |
|
foreach (user_priv::$user_level_list as $level) |
| 364 |
|
{ |
| 365 |
|
if ($level < P_USER) // Guests are not allowed to write |
| 366 |
|
{ |
| 367 |
|
continue; |
| 368 |
|
} |
| 369 |
|
?> |
| 370 |
|
<option value="<? echo $level; ?>"><? echo user_priv::s_levelname($level); ?></option> |
| 371 |
|
<? |
| 372 |
|
} |
| 373 |
|
?> |
| 374 |
|
</select>可写 |
| 375 |
|
位于 |
| 376 |
|
<select id="sort_order" name="sort_order" size="1" |
| 377 |
|
<? echo ($_SESSION["BBS_priv"]->checklevel(P_ADMIN_M) ? "" : "disabled"); ?>> |
| 378 |
|
<? |
| 379 |
|
$class_sections = $result_set["data"]["class_sections"]; |
| 380 |
|
for ($i = 0; $i < count($class_sections); $i++) |
| 381 |
|
{ |
| 382 |
|
?> |
| 383 |
|
<option value="<? echo ($i + 1); ?>"> |
| 384 |
|
<? echo $class_sections[$i]["title"]; ?> |
| 385 |
|
<? echo ($i + 1 < $result_set["data"]["sort_order"] ? "之前" : ($i + 1 > $result_set["data"]["sort_order"] ? "之后" : "")); ?> |
| 386 |
|
|
| 387 |
|
</option> |
| 388 |
|
<? |
| 389 |
|
} |
| 390 |
|
?> |
| 391 |
|
</select><br /> |
| 392 |
</td> |
</td> |
| 393 |
</tr> |
</tr> |
| 394 |
<? |
<? |
| 415 |
<a class="s3" href="show_profile.php?uid=<? echo $section_master['uid']; ?>" target=_blank><? echo $section_master["username"]; ?></a> |
<a class="s3" href="show_profile.php?uid=<? echo $section_master['uid']; ?>" target=_blank><? echo $section_master["username"]; ?></a> |
| 416 |
<? echo (new DateTimeImmutable($section_master["begin_dt"]))->setTimezone($_SESSION["BBS_user_tz"])->format("y年m月d日"); ?>--<? echo (new DateTimeImmutable($section_master["end_dt"]))->setTimezone($_SESSION["BBS_user_tz"])->format("y年m月d日"); ?> |
<? echo (new DateTimeImmutable($section_master["begin_dt"]))->setTimezone($_SESSION["BBS_user_tz"])->format("y年m月d日"); ?>--<? echo (new DateTimeImmutable($section_master["end_dt"]))->setTimezone($_SESSION["BBS_user_tz"])->format("y年m月d日"); ?> |
| 417 |
<? |
<? |
| 418 |
if ($section_master["username"] != $_SESSION["BBS_username"] && |
if ($_SESSION["BBS_priv"]->checkpriv($sid, S_ADMIN) || $section_master["major"] == 0) |
|
($_SESSION["BBS_priv"]->checkpriv($sid, S_ADMIN) || |
|
|
($section_master["major"] == 0 && $_SESSION["BBS_priv"]->checkpriv($sid, S_MAN_M)))) |
|
| 419 |
{ |
{ |
| 420 |
?> |
?> |
| 421 |
<a class="s2" href="#" onclick="return master_op(section_setting, 2, '<? echo $section_master["username"]; ?>');">撤销</a> |
<a class="s2" href="#" onclick="return master_op(section_setting, 2, '<? echo $section_master["username"]; ?>');">撤销</a> |