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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.35 - (show annotations)
Wed May 7 12:22:45 2025 UTC (10 months, 1 week ago) by sysadm
Branch: MAIN
Changes since 1.34: +21 -11 lines
Refine

1 <?php
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 require_once "./user_level.inc.php";
11
12 // Pre-defined color setting of article display
13 $color = array(
14 "#FAFBFC",
15 "#f0F3Fa"
16 );
17 $color_index = 0;
18
19 $title = htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8');
20 $section_scope = ($result_set["data"]["ex"] ? "文摘区" : "讨论区");
21
22 $css_file = get_theme_file('css/default');
23
24 $navigator_bar = <<<HTML
25 <a class="s2" href="main.php?sid={$result_set['data']['sid']}">{$BBS_name}</a>&gt;&gt;<a class="s2" href="list.php?sid={$result_set['data']['sid']}">{$result_set["data"]["section_title"]}</a>&gt;&gt;<a class="s2" href="list.php?sid={$result_set['data']['sid']}&ex={$result_set['data']['ex']}">{$section_scope}</a>
26 <a class="s2" href="article_post.php?reply_id={$result_set['data']['id']}&quote=0" title="直接回复该文章">[快速回复]</a>
27 HTML;
28 if ($previous_id > 0)
29 {
30 $navigator_bar .= <<<HTML
31 <a class="s2" href="view_article.php?id={$previous_id}&ex={$result_set['data']['ex']}&trash={$result_set['data']['trash']}">[上一主题]</a>
32 HTML;
33 }
34 if ($next_id > 0)
35 {
36 $navigator_bar .= <<<HTML
37 <a class="s2" href="view_article.php?id={$next_id}&ex={$result_set['data']['ex']}&trash={$result_set['data']['trash']}">[下一主题]</a>
38 HTML;
39 }
40
41 $ex_dir_selector = "";
42 // Only show set_ex_file at page 1
43 if ($result_set["data"]["excerption"] && $result_set["data"]["page"] == 1 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
44 {
45 $option_non_ex_checked = ($result_set["data"]["fid"] == -1 ? "selected" : "");
46 $option_root_checked = ($result_set["data"]["fid"] == 0 ? "selected" : "");
47
48 $ex_dir_selector .= <<<HTML
49 <span id="err_msg_ex_dir" name="err_msg" style="color: red;"></span>
50 <select id="ex_dir" name="ex_dir" size="1">
51 <option value="-1" {$option_non_ex_checked}>[不属于精华区]</option>
52 <option value="0" {$option_root_checked}>(根目录)</option>
53 HTML;
54
55 foreach ($result_set["data"]["section_ex_dirs"] as $section_ex_dir)
56 {
57 $option_checked = ($result_set["data"]["fid"] == $section_ex_dir["fid"] ? "selected" : "");
58
59 $ex_dir_selector .= <<<HTML
60 <option value="{$section_ex_dir['fid']}" {$option_checked}>{$section_ex_dir["dir"]}({$section_ex_dir["name"]})</option>
61 HTML;
62 }
63
64 $ex_dir_selector .= <<<HTML
65 </select>
66 HTML;
67 }
68 else if ($result_set["data"]["fid"] >= 0)
69 {
70 $ex_dir_selector .= <<<HTML
71 <a class="s2" href="/gen_ex/{$result_set['data']['sid']}/{$result_set['data']['ex_dir']}" target="_blank" title="精华区目录">
72 {$result_set["data"]["ex_dir"]}({$result_set["data"]["ex_name"]})
73 </a>
74 HTML;
75 }
76
77 echo <<<HTML
78 <html>
79 <head>
80 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
81 <title>{$title}</title>
82 <link rel="stylesheet" href="{$css_file}" type="text/css">
83 <style type="text/css">
84 SPAN.title_normal
85 {
86 color: #909090;
87 }
88 SPAN.title_deleted
89 {
90 color: red;
91 text-decoration: line-through;
92 }
93 TD.content_normal
94 {
95 font-size: 16px;
96 }
97 TD.content_deleted
98 {
99 font-size: 16px;
100 text-decoration: line-through;
101 }
102 IMG.auto_adjust
103 {
104 display: none;
105 }
106 </style>
107 <script src="../js/polyfill.min.js"></script>
108 <script src="../js/axios.min.js"></script>
109 <script src="../js/jquery.min.js"></script>
110 <script type="text/javascript">
111 function ch_page(page)
112 {
113 document.change_page.page.value = page;
114 document.change_page.submit();
115 return false;
116 }
117
118 function ch_rpp()
119 {
120 document.change_page.page.value = Math.floor((document.change_page.page.value - 1) * {$result_set["data"]["rpp"]} / document.change_page.rpp.value) + 1;
121 document.change_page.submit();
122 return false;
123 }
124
125 function refresh_err_msg(errorFieldMap)
126 {
127 document.getElementsByName("err_msg").forEach(element => {
128 element.innerHTML = (errorFieldMap.has(element.id) ? errorFieldMap.get(element.id) : "");
129 });
130 }
131
132 function upload_del(id)
133 {
134 if (window.confirm('真的要删除吗?') == false)
135 {
136 return false;
137 }
138
139 instance.post('upload_service_del.php', {
140 aid: id,
141 })
142 .then(function (response) {
143 var ret = response.data;
144 var errorFieldMap = new Map();
145 switch (ret.return.code)
146 {
147 case 0: // OK
148 case 1: // Already deleted
149 document.getElementById("attachment_" + id).style.display = "none";
150 refresh_err_msg(errorFieldMap);
151 break;
152 case -1: // Input validation failed
153 errorFieldMap.set("err_msg_attachment_" + id, ret.return.message);
154 refresh_err_msg(errorFieldMap);
155 break;
156 case -2: // Internal error
157 console.log(ret.return.message);
158 errorFieldMap.set("err_msg_attachment_" + id, "内部错误<br />");
159 refresh_err_msg(errorFieldMap);
160 break;
161 default:
162 console.log(ret.return.code);
163 break;
164 }
165 })
166 .catch(function (error) {
167 console.log(error);
168 });
169
170 return false;
171 }
172
173 function article_op(op_type, id, set, confirm = false)
174 {
175 var opService = new Map([
176 ["delete", "article_service_del.php"],
177 ["restore", "article_service_restore.php"],
178 ["excerption", "article_service_excerption.php"],
179 ["ontop", "article_service_ontop.php"],
180 ["lock", "article_service_lock.php"],
181 ["transship", "article_service_transship.php"],
182 ]);
183
184 var opNeedRefresh = new Set([
185 "delete",
186 "restore",
187 ]);
188
189 if (confirm && window.confirm('真的要操作吗?') == false)
190 {
191 return false;
192 }
193
194 instance.post(opService.get(op_type), {
195 id: id,
196 set: set,
197 })
198 .then(function (response) {
199 var ret = response.data;
200 var errorFieldMap = new Map();
201 switch (ret.return.code)
202 {
203 case 0: // OK
204 case 1: // Already set
205 if (opNeedRefresh.has(op_type))
206 {
207 // Refresh with additional parameters
208 document.location = "view_article.php?trash=1&rpp={$result_set["data"]["rpp"]}&ts=" + Date.now() + "&id=" + id + "#" + id;
209 break;
210 }
211 document.getElementById("set_" + op_type + "_" + id).style.display = (set ? "none" : "inline");
212 document.getElementById("unset_" + op_type + "_" + id).style.display = (set ? "inline" : "none");
213 refresh_err_msg(errorFieldMap);
214 break;
215 case -1: // Input validation failed
216 errorFieldMap.set("err_msg_ctrl_" + id, ret.return.message);
217 refresh_err_msg(errorFieldMap);
218 break;
219 case -2: // Internal error
220 console.log(ret.return.message);
221 errorFieldMap.set("err_msg_ctrl_" + id, "内部错误");
222 refresh_err_msg(errorFieldMap);
223 break;
224 default:
225 console.log(ret.return.code);
226 break;
227 }
228 })
229 .catch(function (error) {
230 console.log(error);
231 });
232
233 return false;
234 }
235
236 function move_article(sid)
237 {
238 instance.post('article_service_move.php', {
239 id: {$result_set["data"]["id"]},
240 sid: sid,
241 })
242 .then(function (response) {
243 var ret = response.data;
244 var errorFieldMap = new Map();
245 switch (ret.return.code)
246 {
247 case 0: // OK
248 refresh_err_msg(errorFieldMap);
249 document.location = "view_article.php?id={$result_set["data"]["id"]}&trash={$result_set["data"]["trash"]}&rpp={$result_set["data"]["rpp"]}&ts=" + Date.now();
250 break;
251 case -1: // Input validation failed
252 errorFieldMap.set("err_msg_move", ret.return.message);
253 refresh_err_msg(errorFieldMap);
254 break;
255 case -2: // Internal error
256 console.log(ret.return.message);
257 errorFieldMap.set("err_msg_move", "内部错误");
258 refresh_err_msg(errorFieldMap);
259 break;
260 default:
261 console.log(ret.return.code);
262 break;
263 }
264 })
265 .catch(function (error) {
266 console.log(error);
267 });
268
269 return false;
270 }
271
272 function set_ex_dir(fid)
273 {
274 instance.post('article_service_genex.php', {
275 id: {$result_set["data"]["id"]},
276 fid: fid,
277 })
278 .then(function (response) {
279 var ret = response.data;
280 var errorFieldMap = new Map();
281 switch (ret.return.code)
282 {
283 case 0: // OK
284 refresh_err_msg(errorFieldMap);
285 document.location = "view_article.php?id={$result_set["data"]["id"]}&trash={$result_set["data"]["trash"]}&rpp={$result_set["data"]["rpp"]}&ts=" + Date.now();
286 break;
287 case -1: // Input validation failed
288 errorFieldMap.set("err_msg_ex_dir", ret.return.message);
289 refresh_err_msg(errorFieldMap);
290 break;
291 case -2: // Internal error
292 console.log(ret.return.message);
293 errorFieldMap.set("err_msg_ex_dir", "内部错误");
294 refresh_err_msg(errorFieldMap);
295 break;
296 default:
297 console.log(ret.return.code);
298 break;
299 }
300 })
301 .catch(function (error) {
302 console.log(error);
303 });
304
305 return false;
306 }
307
308 const instance = axios.create({
309 withCredentials: true,
310 timeout: 3000,
311 baseURL: document.location.protocol + '//' + document.location.hostname + (document.location.port=='' ? '' : (':' + document.location.port)) + '/bbs/',
312 });
313
314 window.addEventListener("load", () => {
315 var s = document.getElementById("ex_dir");
316 if (s)
317 {
318 s.addEventListener("change", (e) => {
319 set_ex_dir(s.value);
320 });
321 }
322
323 var f = document.getElementById("move_article");
324 if (f)
325 {
326 f.addEventListener("submit", (e) => {
327 e.preventDefault();
328 if (f.sid.value > 0)
329 {
330 move_article(f.sid.value);
331 }
332 });
333 }
334 });
335
336 $(document).ready(function() {
337 $("img[class=auto_adjust]").on("load", function() {
338 if ($(this).width() > {$BBS_img_max_width})
339 {
340 $(this).width({$BBS_img_max_width});
341 }
342 $(this).show();
343 })
344 .on("mousewheel", function(e) {
345 var zoom = parseFloat($(this).css("zoom"));
346 zoom *= (1 + e.originalEvent.wheelDelta / 1000);
347 if (zoom > 0)
348 {
349 $(this).css("zoom", zoom);
350 }
351 });
352 });
353 </script>
354 <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3013347141025996" crossorigin="anonymous">
355 </script>
356 </head>
357 <body>
358 <a name="top"></a>
359 <center>
360 <span id="err_msg_prompt" name="err_msg" style="color: red;"></span>
361 <table cols="2" border="0" cellpadding="0" cellspacing="0" width="1050">
362 <tr>
363 <td width="50%">
364 {$navigator_bar}
365 </td>
366 <td width="50%" align="right">
367 {$ex_dir_selector}
368 </td>
369 </tr>
370 <tr bgcolor="#d0d3F0" height="25">
371 <td colspan="2" align="center" class="title">
372 [{$result_set["data"]["id"]}]&nbsp;主题:&nbsp;{$title}
373 </td>
374 </tr>
375 </table>
376 HTML;
377
378 foreach ($result_set["data"]["articles"] as $article)
379 {
380 $color_index = ($color_index + 1) % count($color);
381
382 $user_viewable = (isset($result_set["data"]["author_list"][$article["uid"]]) ? "true" : "false");
383
384 if ($article["tid"] != 0)
385 {
386 echo <<<HTML
387 <a name="{$article['aid']}"></a>
388 <table border="0" cellpadding="0" cellspacing="0" width="1050">
389 <tr height="1" bgcolor="#202020">
390 <td>
391 </td>
392 </tr>
393 </table>
394 HTML;
395 }
396
397 $article_ctrl_bar = "";
398 if ($_SESSION["BBS_priv"]->checkpriv(0, S_MSG) && $_SESSION["BBS_uid"] != $article["uid"])
399 {
400 $article_ctrl_bar .= <<<HTML
401 <img src="images/mail.gif" width="16" height="16"><a class="s4" href="msg_read.php?sent=1&uid={$article['uid']}" target="_blank" title="给作者发消息">消息</a>
402 HTML;
403 }
404 if ($article["visible"])
405 {
406 if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) && $_SESSION["BBS_uid"] == $article["uid"] && (!$article["excerption"]))
407 {
408 $article_ctrl_bar .= <<<HTML
409 <a class="s4" href="article_post.php?id={$article['aid']}" title="修改该文章">修改</a>
410 HTML;
411 }
412 if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
413 ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))
414 {
415 $article_ctrl_bar .= <<<HTML
416 <span id="set_delete_{$article['aid']}"><img src="images/del.gif" width="16" height="16"><a class="s4" href="" onclick="return article_op('delete', {$article['aid']}, 1, true);" title="删除该文章">删除</a></span>
417 HTML;
418 }
419 if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST))
420 {
421 $article_ctrl_bar .= <<<HTML
422 <img src="images/edit.gif" width="16" height="16"><a class="s4" href="article_post.php?reply_id={$article['aid']}" title="引用回复该文章">回复</a>
423 HTML;
424 }
425 if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
426 {
427 $set_ex_display = ($article["excerption"] ? "none" : "inline");
428 $unset_ex_display = ($article["excerption"] ? "inline" : "none");
429
430 $article_ctrl_bar .= <<<HTML
431 <a class="s4" id="set_excerption_{$article['aid']}" style="display: {$set_ex_display}" href="" onclick="return article_op('excerption', {$article['aid']}, 1)" title="加入文摘区">收录</a>
432 <a class="s4" id="unset_excerption_{$article['aid']}" style="display: {$unset_ex_display}" href="" onclick="return article_op('excerption', {$article['aid']}, 0, true)" title="移出文摘区">移出</a>
433 HTML;
434 }
435 if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
436 {
437 $set_ontop_display = ($article["ontop"] ? "none" : "inline");
438 $unset_ontop_display = ($article["ontop"] ? "inline" : "none");
439
440 $article_ctrl_bar .= <<<HTML
441 <a class="s4" id="set_ontop_{$article['aid']}" style="display: {$set_ontop_display}" href="" onclick="return article_op('ontop', {$article['aid']}, 1, true)" title="置顶">置顶</a>
442 <a class="s4" id="unset_ontop_{$article['aid']}" style="display: {$unset_ontop_display}" href="" onclick="return article_op('ontop', {$article['aid']}, 0)" title="取消置顶">取消置顶</a>
443 HTML;
444 }
445 if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
446 ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]))
447 {
448 $set_lock_display = ($article["lock"] ? "none" : "inline");
449 $unset_lock_display = ($article["lock"] ? "inline" : "none");
450
451 $article_ctrl_bar .= <<<HTML
452 <a class="s4" id="set_lock_{$article['aid']}" style="display: {$set_lock_display}" href="" onclick="return article_op('lock', {$article['aid']}, 1);" title="禁止回复">静默</a>
453 <a class="s4" id="unset_lock_{$article['aid']}" style="display: {$unset_lock_display}" href="" onclick="return article_op('lock', {$article['aid']}, 0);" title="取消禁止回复">取消静默</a>
454 HTML;
455 }
456 if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$article["transship"]) && (!$article["excerption"]))
457 {
458 $set_transship_display = ($article["transship"] ? "none" : "inline");
459
460 $article_ctrl_bar .= <<<HTML
461 <a class="s4" id="set_transship_{$article['aid']}" style="display: {$set_transship_display}" href="" onclick="return article_op('transship', {$article['aid']}, 1, true);" title="设为转载">设为转载</a>
462 <a class="s4" id="unset_transship_{$article['aid']}" style="display: none" href=""></a>
463 HTML;
464 }
465 }
466 else
467 {
468 if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && $article["m_del"])
469 {
470 $article_ctrl_bar .= <<<HTML
471 <a class="s4" id="set_restore_{$article['aid']}" href="" onclick="return article_op('restore', {$article['aid']}, 1, true);" title="恢复删除">恢复</a>
472 HTML;
473 }
474 }
475
476 $username = htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8');
477 $nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');
478 $title_f = split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />");
479 $title_class = ($article["visible"] ? "title_normal" : "title_deleted");
480 $content_f = LML(htmlspecialchars($article["content"], ENT_HTML401, 'UTF-8'), true, true, 80);
481 $content_class = ($article["visible"] ? "content_normal" : "content_deleted");
482
483 $transship_info = "";
484 if ($article["transship"])
485 {
486 $transship_info = <<<HTML
487 <font color="red">[转载]</font>
488 HTML;
489 }
490
491 $level = user_level($article["exp"]);
492
493 $atta_list = "";
494 foreach ($article["attachments"] as $attachment)
495 {
496 $filename = $attachment["filename"];
497
498 $atta_list .= <<<HTML
499 <span id="attachment_{$attachment['aid']}"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid={$attachment['aid']}" target="_target">{$filename}</a> ({$attachment["size"]}字节)
500 HTML;
501
502 if (!$attachment["check"])
503 {
504 $atta_list .= <<<HTML
505 <font color="red">未审核</font>
506 HTML;
507 }
508
509 if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
510 ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))
511 {
512 $atta_list .= <<<HTML
513 <a class="s2" href="#" onclick="return upload_del({$attachment['aid']});">删除</a>
514 <span id="err_msg_attachment_{$attachment['aid']}" name="err_msg" style="color: red;"></span>
515 HTML;
516 }
517
518 if ($attachment["check"])
519 {
520 $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
521 switch ($ext)
522 {
523 case "bmp":
524 case "gif":
525 case "jpg":
526 case "jpeg":
527 case "png":
528 case "tif":
529 case "tiff":
530 $atta_list .= <<<HTML
531 <br />
532 <img class="auto_adjust" src="dl_file.php?aid={$attachment['aid']}">
533 HTML;
534 break;
535 }
536 }
537
538 $atta_list .= <<<HTML
539 </span><br />
540 HTML;
541 }
542
543 echo <<<HTML
544 <table bgcolor="{$color[$color_index]}" border="0" cellpadding="0" cellspacing="10" width="1050">
545 <tr>
546 <td width="20%">
547 </td>
548 <td width="75%">
549 {$article_ctrl_bar}
550 <span id="err_msg_ctrl_{$article['aid']}" name="err_msg" style="color: red;"></span>
551 </td>
552 <td width="5%">
553 </td>
554 </tr>
555 <tr>
556 <td width="20%" align="center">
557 作者:&nbsp;<a class="s2" href="view_user.php?uid={$article['uid']}" onclick='return {$user_viewable}' target=_blank title="查看用户资料">{$username}</a>
558 </td>
559 <td width="75%" class="body">
560 <span style="color: #606060">标题:</span>
561 <img src="images/expression/{$article['icon']}.gif">
562 <span id="title_{$article['aid']}" class="{$title_class}">
563 {$title_f}
564 </span>
565 {$transship_info}
566 </td>
567 <td width="5%">
568 </td>
569 </tr>
570 <tr>
571 <td align="center">
572 昵称:&nbsp;<span style="color: #909090">{$nickname}</span>
573 </td>
574 <td class="body">
575 <span style="color: #606060">来自:</span>&nbsp;<span style="color: #909090">{$article["sub_ip"]}</span>
576 </td>
577 <td>
578 </td>
579 </tr>
580 <tr>
581 <td align="center">
582 经验值:&nbsp;<span style="color:red;">{$article["exp"]}</span>
583 </td>
584 <td class="body">
585 <span style="color: #606060">发贴时间:</span>&nbsp;<span style="color: #909090">{$article["sub_dt"]->format("Y年m月d日 H:i:s (\U\T\C P)")}</span>
586 </td>
587 <td>
588 </td>
589 </tr>
590 <tr>
591 <td align="center">
592 等级:&nbsp;<span style="color: #909090">{$level}</span>
593 </td>
594 <td class="body">
595 <span style="color: #606060">长度:</span>&nbsp;<span style="color: #909090">{$article["length"]}字</span>
596 </td>
597 <td>
598 </td>
599 </tr>
600 <tr height="2">
601 <td>
602 </td>
603 <td style="background-color: #909090">
604 </td>
605 <td>
606 </td>
607 </tr>
608 <tr>
609 <td align="center" valign="top">
610 <img src="{$article['photo_path']}" border="0">
611 </td>
612 <td id="content_{$article['aid']}" class="{$content_class}">
613 <pre>{$content_f}</pre>
614 </td>
615 <td>
616 </td>
617 </tr>
618 <tr>
619 <td>
620 </td>
621 <td style="color: #000000">
622 ========== * * * * * ==========
623 <br />
624 {$atta_list}
625 </td>
626 <td>
627 </td>
628 </tr>
629 </table>
630
631 HTML;
632 }
633
634 $rpp_options = "";
635 foreach ($BBS_view_rpp_options as $v)
636 {
637 $selected = ($v == $result_set["data"]["rpp"] ? "selected" : "");
638
639 $rpp_options .= <<<HTML
640 <option value="{$v}" {$selected}>{$v}</option>
641 HTML;
642 }
643
644 echo <<<HTML
645 <table cols="3" border="0" cellpadding="5" cellspacing="0" width="1050">
646 <tr bgcolor="#d0d3F0" height="10">
647 <td colspan="3">
648 </td>
649 </tr>
650 <tr>
651 <td width="40%" style="color: #909090">
652 <form action="view_article.php" method="get" id="change_page" name="change_page">
653 <input type="hidden" id="id" name="id" value="{$result_set['data']['id']}">
654 <input type="hidden" id="ex" name="ex" value="{$result_set['data']['ex']}">
655 <input type="hidden" id="trash" name="trash" value="{$result_set['data']['trash']}">
656 每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp()">
657 {$rpp_options}
658 </select>条
659 HTML;
660
661 if ($result_set["data"]["page"] > 1)
662 {
663 echo <<<HTML
664 <a class="s8" title="首页" href="" onclick="return ch_page(1)">|◀</a>
665 <a class="s8" title="上一页" href="" onclick="return ch_page({$result_set['data']['page']} - 1)">◀</a>
666 HTML;
667 }
668 else
669 {
670 echo <<<HTML
671 |◀ ◀
672 HTML;
673 }
674
675 echo <<<HTML
676 第<input id="page" name="page" value="{$result_set['data']['page']}" style="width: 30px;">/{$result_set['data']['page_total']}页
677 HTML;
678
679 if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
680 {
681 echo <<<HTML
682 <a class="s8" title="下一页" href="" onclick="return ch_page({$result_set['data']['page']} + 1)">▶</a>
683 <a class="s8" title="尾页" href="" onclick="return ch_page({$result_set['data']['page_total']})">▶|</a>
684 HTML;
685 }
686 else
687 {
688 echo <<<HTML
689 ▶ ▶|
690 HTML;
691 }
692
693 echo <<<HTML
694 </form>
695 </td>
696 <td width="35%" align="center">
697 HTML;
698
699 if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$result_set["data"]["excerption"]))
700 {
701 echo <<<HTML
702 <form method="post" id="move_article" name="move_article" action="#">
703 <select id="sid" name="sid" size="1">
704 {$result_set["data"]["section_list_options"]}
705 </select>
706 <input type="submit" value="移动">
707 <span id="err_msg_move" name="err_msg" style="color: red;"></span>
708 </form>
709 HTML;
710 }
711
712 echo <<<HTML
713 </td>
714 <td width="25%" align="right">
715 <a class="s2" href="#top" title="返回页首"><img src="images/gotop.gif" border="0">Top<img src="images/gotop.gif" border="0"></a>
716 </td>
717 </tr>
718 </table>
719 </center>
720 HTML;
721
722 include "./foot.inc.php";
723
724 echo <<<HTML
725 </body>
726 </html>
727 HTML;

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