/[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.38 - (show annotations)
Thu Jun 19 09:19:34 2025 UTC (8 months, 4 weeks ago) by sysadm
Branch: MAIN
Changes since 1.37: +8 -0 lines
Hide quick reply link if have no permission

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

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