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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Sat Apr 12 14:05:40 2025 UTC (11 months ago) by sysadm
Branch: MAIN
Changes since 1.2: +1 -1 lines
Refine

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

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