/[LeafOK_CVS]/fenglin/bbs/themes/default/list.view.php
ViewVC logotype

Contents of /fenglin/bbs/themes/default/list.view.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Sat Apr 12 11:36:06 2025 UTC (11 months ago) by sysadm
Branch: MAIN
Changes since 1.1: +2 -2 lines
Update

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

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