| 1 |
<?
|
| 2 |
// Prevent load standalone
|
| 3 |
if (!isset($result_set))
|
| 4 |
{
|
| 5 |
exit();
|
| 6 |
}
|
| 7 |
|
| 8 |
require_once "../lib/lml.inc.php";
|
| 9 |
require_once "../lib/str_process.inc.php";
|
| 10 |
|
| 11 |
function pic_file(string $status) : string
|
| 12 |
{
|
| 13 |
switch(strtoupper($status))
|
| 14 |
{
|
| 15 |
case "H":
|
| 16 |
$file = "hotclosed.gif";
|
| 17 |
break;
|
| 18 |
case "M":
|
| 19 |
$file = "hotfolder.gif";
|
| 20 |
break;
|
| 21 |
case "G":
|
| 22 |
$file = "star.gif";
|
| 23 |
break;
|
| 24 |
case "B":
|
| 25 |
$file = "settop.gif";
|
| 26 |
break;
|
| 27 |
default:
|
| 28 |
$file = "closed.gif";
|
| 29 |
}
|
| 30 |
|
| 31 |
return($file);
|
| 32 |
}
|
| 33 |
?>
|
| 34 |
<html>
|
| 35 |
<head>
|
| 36 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
| 37 |
<title><? echo $result_set["data"]["section_title"] . "——" . ($result_set["data"]["ex"] ? "文摘区" : "讨论区"); ?></title>
|
| 38 |
<link rel="stylesheet" href="<? echo get_theme_file('css/default'); ?>" type="text/css">
|
| 39 |
<style type="text/css">
|
| 40 |
TD.head,TD.favor,TD.reply,TD.dark,TD.topic
|
| 41 |
{
|
| 42 |
border-right: #d0d3F0 1px solid;
|
| 43 |
border-left: #d0d3F0 1px solid;
|
| 44 |
border-bottom: #d0d3F0 1px solid;
|
| 45 |
}
|
| 46 |
TD.head
|
| 47 |
{
|
| 48 |
font-family: 楷体;
|
| 49 |
color: blue;
|
| 50 |
}
|
| 51 |
TD.favor,TD.dark
|
| 52 |
{
|
| 53 |
text-align: center;
|
| 54 |
}
|
| 55 |
TD.reply,TD.dark
|
| 56 |
{
|
| 57 |
color: #909090;
|
| 58 |
background-color: #eaf0Fa;
|
| 59 |
}
|
| 60 |
TD.head,TD.favor
|
| 61 |
{
|
| 62 |
background-color: #fafbfc;
|
| 63 |
}
|
| 64 |
TD.favor
|
| 65 |
{
|
| 66 |
color: #c0c3f0;
|
| 67 |
font-weight: bold;
|
| 68 |
}
|
| 69 |
TD.topic
|
| 70 |
{
|
| 71 |
background-color: #fafbfc;
|
| 72 |
}
|
| 73 |
TD.topic:hover
|
| 74 |
{
|
| 75 |
background-color: #eaf0Fa;
|
| 76 |
}
|
| 77 |
</style>
|
| 78 |
|
| 79 |
<script type="text/javascript">
|
| 80 |
function ch_page(page)
|
| 81 |
{
|
| 82 |
document.change_page.page.value = page;
|
| 83 |
document.change_page.submit();
|
| 84 |
return false;
|
| 85 |
}
|
| 86 |
|
| 87 |
function ch_rpp()
|
| 88 |
{
|
| 89 |
document.change_page.page.value = Math.floor((document.change_page.page.value - 1) * <? echo $result_set["data"]["rpp"]; ?> / document.change_page.rpp.value) + 1;
|
| 90 |
document.change_page.submit();
|
| 91 |
return false;
|
| 92 |
}
|
| 93 |
|
| 94 |
function ch_sect(sid)
|
| 95 |
{
|
| 96 |
if (sid > 0)
|
| 97 |
{
|
| 98 |
document.change_page.sid.value = sid;
|
| 99 |
document.change_page.page.value = 1;
|
| 100 |
document.change_page.submit();
|
| 101 |
}
|
| 102 |
return false;
|
| 103 |
}
|
| 104 |
|
| 105 |
function ch_ex(ex)
|
| 106 |
{
|
| 107 |
document.change_page.ex.value = ex;
|
| 108 |
document.change_page.submit();
|
| 109 |
return false;
|
| 110 |
}
|
| 111 |
|
| 112 |
function ch_reply(reply)
|
| 113 |
{
|
| 114 |
document.change_page.reply.value = reply;
|
| 115 |
document.change_page.submit();
|
| 116 |
return false;
|
| 117 |
}
|
| 118 |
|
| 119 |
function use_nick(use)
|
| 120 |
{
|
| 121 |
document.change_page.use_nick.value = use;
|
| 122 |
document.change_page.submit();
|
| 123 |
return false;
|
| 124 |
}
|
| 125 |
|
| 126 |
function ch_sort(type)
|
| 127 |
{
|
| 128 |
document.change_page.sort.value = type;
|
| 129 |
document.change_page.submit();
|
| 130 |
return false;
|
| 131 |
}
|
| 132 |
|
| 133 |
window.addEventListener("load", () => {
|
| 134 |
var s = document.change_section.sid;
|
| 135 |
for (i = 0; i < s.options.length; i++)
|
| 136 |
{
|
| 137 |
if (s.options[i].value == <? echo $result_set["data"]["sid"]; ?>)
|
| 138 |
{
|
| 139 |
s.selectedIndex = i;
|
| 140 |
break;
|
| 141 |
}
|
| 142 |
}
|
| 143 |
});
|
| 144 |
|
| 145 |
</script>
|
| 146 |
</head>
|
| 147 |
<body>
|
| 148 |
<center>
|
| 149 |
<table cols="2" border="0" cellpadding="0" cellspacing="0" width="1050">
|
| 150 |
<tr>
|
| 151 |
<td width="60%" style="color: green;">
|
| 152 |
<a class="s2" href="main.php?sid=<? echo $result_set["data"]["sid"]; ?>"><? echo $BBS_name; ?></a>>><? echo ($result_set["data"]["class_title"] . "[" . $result_set["data"]["class_name"] . "]"); ?>>><? echo ($result_set["data"]["section_title"] . "[" . $result_set["data"]["section_name"] . "]"); ?>>><? echo ($result_set["data"]["ex"] ? "文摘区" : "讨论区"); ?>
|
| 153 |
</td>
|
| 154 |
<td width="40%" align="right" style="color: gray;">
|
| 155 |
<?
|
| 156 |
if ($_SESSION["BBS_uid"] == 0)
|
| 157 |
{
|
| 158 |
?>
|
| 159 |
[<a class="s2" href="index.php?redir=<? echo $result_set["data"]["redir"]; ?>">登录</a>]
|
| 160 |
<?
|
| 161 |
}
|
| 162 |
else
|
| 163 |
{
|
| 164 |
if ($_SESSION["BBS_new_msg"] > 0)
|
| 165 |
{
|
| 166 |
?>
|
| 167 |
[<a class="s6" href="read_msg.php" target=_blank><? echo $_SESSION["BBS_new_msg"]; ?>条新消息</a>]
|
| 168 |
<?
|
| 169 |
}
|
| 170 |
?>
|
| 171 |
欢迎回来 <font color=blue><? echo ($_SESSION["BBS_username"]); ?></font>
|
| 172 |
[<a class="s6" href="logout.php">退出</a>]
|
| 173 |
<?
|
| 174 |
}
|
| 175 |
?>
|
| 176 |
</td>
|
| 177 |
</tr>
|
| 178 |
</table>
|
| 179 |
<table cols="2" border="0" cellpadding="0" cellspacing="0" width="1050">
|
| 180 |
<tr bgcolor="#d0d3F0" height="2">
|
| 181 |
<td colspan="2"></td>
|
| 182 |
</tr>
|
| 183 |
<tr>
|
| 184 |
<td class="dark" width="3%"><img src="images/master.gif" width="16" height="16" alt="本版版主"></td>
|
| 185 |
<td class="head" width="97%">
|
| 186 |
<?
|
| 187 |
foreach ($result_set["data"]["section_masters"] as $master)
|
| 188 |
{
|
| 189 |
?>
|
| 190 |
<img src="images/<? echo ($master["major"] ? "master_major.gif" : "master_minor.gif"); ?>" width="12" height="11" alt="<? echo ($master["major"] ? "正版主" : "副版主"); ?>"><a class="s3" href="show_profile.php?uid=<? echo $master['uid']; ?>" target=_blank title="查看版主资料"><? echo $master["username"]; ?></a>
|
| 191 |
<?
|
| 192 |
}
|
| 193 |
?>
|
| 194 |
</td>
|
| 195 |
</tr>
|
| 196 |
<?
|
| 197 |
if ($result_set["data"]["announcement"] != "")
|
| 198 |
{
|
| 199 |
?>
|
| 200 |
<tr>
|
| 201 |
<td class="dark"><img src="images/announce.gif" width="18" height="18" alt="本版公告"></td>
|
| 202 |
<td class="head">
|
| 203 |
<?
|
| 204 |
echo (LML(htmlspecialchars($result_set["data"]["announcement"], ENT_HTML401, 'UTF-8'), true));
|
| 205 |
?>
|
| 206 |
</td>
|
| 207 |
</tr>
|
| 208 |
<?
|
| 209 |
}
|
| 210 |
?>
|
| 211 |
<tr>
|
| 212 |
<td class="dark"></td>
|
| 213 |
<td class="head" align="right">
|
| 214 |
<?
|
| 215 |
if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST))
|
| 216 |
{
|
| 217 |
?>
|
| 218 |
<a class="s4" href="post.php?sid=<? echo $result_set["data"]["sid"]; ?>" title="发表新文章">发帖</a>
|
| 219 |
<?
|
| 220 |
}
|
| 221 |
?>
|
| 222 |
<a class="s4" href="" onclick='return ch_ex(<? echo ($result_set["data"]["ex"] ? 0 : 1); ?>);' title="切换"><? echo ($result_set["data"]["ex"] ? "讨论区" : "文摘区"); ?></a>
|
| 223 |
<a class="s4" href="/gen_ex/<? echo $result_set["data"]["sid"]; ?>/" title="浏览本版块精华区" target=_blank>精华区</a>
|
| 224 |
<a class="s4" href="" onclick='return ch_reply(<? echo ($result_set["data"]["reply"] ? 0 : 1); ?>);' title="切换文章显示模式"><? echo ($result_set["data"]["reply"] ? "主题" : "普通"); ?></a>
|
| 225 |
</td>
|
| 226 |
</tr>
|
| 227 |
<tr height="10">
|
| 228 |
<td colspan="2"></td>
|
| 229 |
</tr>
|
| 230 |
</table>
|
| 231 |
<table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050">
|
| 232 |
<tr bgcolor="#d0d3F0" height="25">
|
| 233 |
<td width="4%" class="title">状态</td>
|
| 234 |
<td width="39%" class="title"><a class="s10" href="" onclick="return ch_sort('topic');" title="按主题发表时间排序">标题</a></td>
|
| 235 |
<td width="16%" class="title"><a class="s10" href="" onclick='return use_nick(<? echo ($result_set["data"]["use_nick"] ? 0 : 1); ?>);' title="切换用户显示模式">作者</a></td>
|
| 236 |
<td width="10%" class="title"><a class="s10" href="" onclick="return ch_sort('hot');" title="按人气回复排序">回复/人气</a></td>
|
| 237 |
<td width="31%" class="title"><a class="s10" href="" onclick="return ch_sort('reply');" title="按最后回复时间排序">最后更新 | 回复人</a></td>
|
| 238 |
</tr>
|
| 239 |
</table>
|
| 240 |
<table cols="5" border="0" cellpadding="0" cellspacing="0" width="1050">
|
| 241 |
<?
|
| 242 |
foreach ($result_set["data"]["articles"] as $article)
|
| 243 |
{
|
| 244 |
$status = ($article["ontop"] ? "B" : ($article["gen_ex"] ? "G" : ($article["excerption"] ? "M" : ($article["reply_count"] < 10 ? "N" : "H"))));
|
| 245 |
$status = ($article["visited"] ? strtolower($status) : strtoupper($status));
|
| 246 |
|
| 247 |
if ($status == "n" || $status == "h")
|
| 248 |
{
|
| 249 |
$ss = "";
|
| 250 |
}
|
| 251 |
else if ($status == "H")
|
| 252 |
{
|
| 253 |
$ss = "N";
|
| 254 |
}
|
| 255 |
else
|
| 256 |
{
|
| 257 |
$ss = $status;
|
| 258 |
}
|
| 259 |
|
| 260 |
$status_str = "<font color=#b0b0b0>$ss</font>";
|
| 261 |
|
| 262 |
if ($article["lock"])
|
| 263 |
{
|
| 264 |
$status_str .= "<font color=red>x</font>";
|
| 265 |
}
|
| 266 |
|
| 267 |
$title = split_line(htmlspecialchars($article["title"], ENT_QUOTES | ENT_HTML401, 'UTF-8'), "", 50, 2, "<br />");
|
| 268 |
$username = htmlspecialchars($article["username"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
|
| 269 |
$nickname = htmlspecialchars($article["nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
|
| 270 |
$user_viewable = (isset($result_set["data"]["author_list"][$article["uid"]]));
|
| 271 |
$last_reply_username = htmlspecialchars($article["last_reply_username"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
|
| 272 |
$last_reply_nickname = htmlspecialchars($article["last_reply_nickname"], ENT_QUOTES | ENT_HTML401, 'UTF-8');
|
| 273 |
$last_reply_user_viewable = (isset($result_set["data"]["author_list"][$article["last_reply_uid"]]));
|
| 274 |
?>
|
| 275 |
<tr height="30">
|
| 276 |
<td width="4%" class="dark">
|
| 277 |
<a class="s0" href="view_article.php?tn=xml&rpp=20&id=<? echo $article["aid"]; ?>&ex=<? echo $result_set["data"]["ex"]; ?>#<? echo $article["aid"]; ?>" target=_blank>
|
| 278 |
<img src="images/<? echo pic_file($status); ?>" border="0">
|
| 279 |
</a>
|
| 280 |
</td>
|
| 281 |
<td width="39%" class="topic">
|
| 282 |
<a class="s0" href="view_article.php?id=<? echo $article["aid"]; ?>&ex=<? echo $result_set["data"]["ex"]; ?>#<? echo $article["aid"]; ?>" target=_blank title="发表时间:<? echo $article["sub_dt"]->format("Y-m-d H:i:s") . "\n"; ?>文章长度:<? echo $article["length"]; ?>字">
|
| 283 |
<img src="images/expression/<? echo $article["icon"]; ?>.gif" border="0">
|
| 284 |
<?
|
| 285 |
if ($article["transship"])
|
| 286 |
{
|
| 287 |
?>
|
| 288 |
<font color=#b0b0b0>[转]</font>
|
| 289 |
<?
|
| 290 |
}
|
| 291 |
?>
|
| 292 |
<? echo $title; ?>
|
| 293 |
</a>
|
| 294 |
<? echo $status_str; ?>
|
| 295 |
</td>
|
| 296 |
<td width="16%" class="dark">
|
| 297 |
<a class="s2" href="show_profile.php?uid=<? echo $article["uid"]; ?>" onclick='return <? echo ($user_viewable ? "true" : "false"); ?>' title="<? echo ($result_set["data"]["use_nick"] ? $username : $nickname); ?>" target=_blank>
|
| 298 |
<? echo ($result_set["data"]["use_nick"] ? $nickname : $username); ?>
|
| 299 |
</a>
|
| 300 |
</td>
|
| 301 |
<td width="10%" class="favor">
|
| 302 |
<? echo $article["reply_count"]; ?>/<? echo $article["view_count"]; ?>
|
| 303 |
</td>
|
| 304 |
<td width="31%" class="reply"><? echo $article["last_reply_dt"]->format("Y-m-d H:i:s"); ?> |
|
| 305 |
<?
|
| 306 |
if ($article["reply_count"] > 0)
|
| 307 |
{
|
| 308 |
?>
|
| 309 |
<a class="s2" href="show_profile.php?uid=<? echo $article["last_reply_uid"]; ?>" onclick='return <? echo ($last_reply_user_viewable ? "true" : "false"); ?>' title="<? echo ($result_set["data"]["use_nick"] ? $last_reply_username : $last_reply_nickname); ?>" target=_blank>
|
| 310 |
<? echo ($result_set["data"]["use_nick"] ? $last_reply_nickname : $last_reply_username); ?>
|
| 311 |
</a>
|
| 312 |
<?
|
| 313 |
}
|
| 314 |
else
|
| 315 |
{
|
| 316 |
?>
|
| 317 |
------
|
| 318 |
<?
|
| 319 |
}
|
| 320 |
?>
|
| 321 |
</td>
|
| 322 |
</tr>
|
| 323 |
<?
|
| 324 |
}
|
| 325 |
?>
|
| 326 |
</table>
|
| 327 |
<table cols="3" border="0" cellpadding="0" cellspacing="0" width="1050">
|
| 328 |
<tr bgcolor="#d0d3F0" height="5">
|
| 329 |
<td colspan="3"></td></tr>
|
| 330 |
<tr height="10">
|
| 331 |
<td colspan="3"></td></tr>
|
| 332 |
<tr valign="top">
|
| 333 |
<form action="list.php" method="get" id="change_page" name="change_page">
|
| 334 |
<td width="40%" style="color: #909090">
|
| 335 |
<input type="hidden" id="sid" name="sid" value="<? echo $result_set["data"]["sid"]; ?>">
|
| 336 |
<input type="hidden" id="reply" name="reply" value="<? echo $result_set["data"]["reply"]; ?>">
|
| 337 |
<input type="hidden" id="ex" name="ex" value="<? echo $result_set["data"]["ex"]; ?>">
|
| 338 |
<input type="hidden" id="use_nick" name="use_nick" value="<? echo $result_set["data"]["use_nick"]; ?>">
|
| 339 |
<input type="hidden" id="sort" name="sort" value="<? echo $result_set["data"]["sort"]; ?>">
|
| 340 |
每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">
|
| 341 |
<?
|
| 342 |
foreach ($BBS_list_rpp_options as $v)
|
| 343 |
{
|
| 344 |
echo ("<option value=\"$v\"" . ($v == $result_set["data"]["rpp"] ? " selected" : "") . ">$v</option>");
|
| 345 |
}
|
| 346 |
?>
|
| 347 |
</select>篇
|
| 348 |
<?
|
| 349 |
if ($result_set["data"]["page"] > 1)
|
| 350 |
{
|
| 351 |
?>
|
| 352 |
<a class="s8" title="首页" href="" onclick="return ch_page(1);">|◀</a>
|
| 353 |
<a class="s8" title="上一页" href="" onclick='return ch_page(<? echo ($result_set["data"]["page"] - 1); ?>);'>◀</a>
|
| 354 |
<?
|
| 355 |
}
|
| 356 |
else
|
| 357 |
{
|
| 358 |
?>
|
| 359 |
|◀ ◀
|
| 360 |
<?
|
| 361 |
}
|
| 362 |
?>
|
| 363 |
第<input id="page" name="page" value="<? echo ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<? echo $result_set["data"]["page_total"]; ?>页
|
| 364 |
<?
|
| 365 |
if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
|
| 366 |
{
|
| 367 |
?>
|
| 368 |
<a class="s8" title="下一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] + 1); ?>);">▶</a>
|
| 369 |
<a class="s8" title="尾页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page_total"]); ?>);">▶|</a>
|
| 370 |
<?
|
| 371 |
}
|
| 372 |
else
|
| 373 |
{
|
| 374 |
?>
|
| 375 |
▶ ▶|
|
| 376 |
<?
|
| 377 |
}
|
| 378 |
?>
|
| 379 |
</td>
|
| 380 |
<td width="35%">
|
| 381 |
<font color=#909090>查找文章</font>
|
| 382 |
<input type="text" id="search_text" name="search_text" value='<? echo $result_set["data"]["search_text"];?>' size="15"> <input type=image src="images/search.gif" alt="按主题内容查找文章" border="0"></a>
|
| 383 |
<a class="s8" href="search_form.php?sid=<? echo $result_set["data"]["sid"]; ?>" target=_blank title="全功能检索">高级</a>
|
| 384 |
</td>
|
| 385 |
</form>
|
| 386 |
<td width="25%" align="right">
|
| 387 |
<form action="" method="get" id="change_section" name="change_section">
|
| 388 |
<select size="1" id="sid" name="sid" onchange="ch_sect(this.value);">
|
| 389 |
<?
|
| 390 |
echo $result_set["data"]["section_select_options"];
|
| 391 |
?>
|
| 392 |
</select>
|
| 393 |
</form>
|
| 394 |
</td>
|
| 395 |
</tr>
|
| 396 |
</table>
|
| 397 |
</center>
|
| 398 |
<?
|
| 399 |
include "./foot.inc.php";
|
| 400 |
?>
|
| 401 |
</body>
|
| 402 |
</html>
|