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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 by sysadm, Tue Apr 15 01:10:48 2025 UTC Revision 1.23 by sysadm, Wed Apr 23 10:35:39 2025 UTC
# Line 1  Line 1 
1  <?  <?php
2          // Prevent load standalone          // Prevent load standalone
3          if (!isset($result_set))          if (!isset($result_set))
4          {          {
# Line 19  Line 19 
19  <html>  <html>
20  <head>  <head>
21  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
22  <title><? echo htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?></title>  <title><?= htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?></title>
23  <link rel="stylesheet" href="<? echo get_theme_file('css/default'); ?>" type="text/css">  <link rel="stylesheet" href="<?= get_theme_file('css/default'); ?>" type="text/css">
24  <style type="text/css">  <style type="text/css">
25  SPAN.title_normal  SPAN.title_normal
26  {  {
# Line 41  TD.content_deleted Line 41  TD.content_deleted
41          text-decoration: line-through;          text-decoration: line-through;
42  }  }
43  </style>  </style>
 <script type="text/javascript" src="/js/nw_open.js"></script>  
44  <script type="text/javascript" src="../js/img_adjust.js"></script>  <script type="text/javascript" src="../js/img_adjust.js"></script>
45  <script src="../js/polyfill.min.js"></script>  <script src="../js/polyfill.min.js"></script>
46  <script src="../js/axios.min.js"></script>  <script src="../js/axios.min.js"></script>
# Line 55  function ch_page(page) Line 54  function ch_page(page)
54    
55  function ch_rpp()  function ch_rpp()
56  {  {
57          document.change_page.page.value = Math.floor((document.change_page.page.value - 1) * <? echo $result_set["data"]["rpp"]; ?> / document.change_page.rpp.value) + 1;          document.change_page.page.value = Math.floor((document.change_page.page.value - 1) * <?= $result_set["data"]["rpp"]; ?> / document.change_page.rpp.value) + 1;
58          document.change_page.submit();          document.change_page.submit();
59          return false;          return false;
60  }  }
# Line 111  function upload_del(id) Line 110  function upload_del(id)
110  function article_op(op_type, id, set, confirm = false)  function article_op(op_type, id, set, confirm = false)
111  {  {
112          var opService = new Map([          var opService = new Map([
113                  ["delete", "delete.php"],                  ["delete", "article_service_del.php"],
114                  ["restore", "restore.php"],                  ["restore", "article_service_restore.php"],
115                  ["excerption", "set_excerption.php"],                  ["excerption", "article_service_excerption.php"],
116                  ["ontop", "set_ontop.php"],                  ["ontop", "article_service_ontop.php"],
117                  ["lock", "lock.php"],                  ["lock", "article_service_lock.php"],
118                  ["transship", "set_transship.php"],                  ["transship", "set_transship.php"],
119          ]);          ]);
120    
# Line 143  function article_op(op_type, id, set, co Line 142  function article_op(op_type, id, set, co
142                                  if (opNeedRefresh.has(op_type))                                  if (opNeedRefresh.has(op_type))
143                                  {                                  {
144                                          // Refresh with additional parameters                                          // Refresh with additional parameters
145                                          document.location = "view_article.php?trash=1&rpp=<? echo $result_set["data"]["rpp"]; ?>&ts=" + Date.now() + "&id=" + id + "#" + id;                                          document.location = "view_article.php?trash=1&rpp=<?= $result_set["data"]["rpp"]; ?>&ts=" + Date.now() + "&id=" + id + "#" + id;
146                                          break;                                          break;
147                                  }                                  }
148                                  document.getElementById("set_" + op_type + "_" + id).style.display = (set ? "none" : "inline");                                  document.getElementById("set_" + op_type + "_" + id).style.display = (set ? "none" : "inline");
# Line 173  function article_op(op_type, id, set, co Line 172  function article_op(op_type, id, set, co
172    
173  function move_article(sid)  function move_article(sid)
174  {  {
175          instance.post('move_article.php', {          instance.post('article_service_move.php', {
176                  id: <? echo $result_set["data"]["id"]; ?>,                  id: <?= $result_set["data"]["id"]; ?>,
177                  sid: sid,                  sid: sid,
178          })          })
179          .then(function (response) {          .then(function (response) {
# Line 184  function move_article(sid) Line 183  function move_article(sid)
183                  {                  {
184                          case 0: // OK                          case 0: // OK
185                                  refresh_err_msg(errorFieldMap);                                  refresh_err_msg(errorFieldMap);
186                                  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();                                  document.location = "view_article.php?id=<?= $result_set["data"]["id"]; ?>&trash=<?= $result_set["data"]["trash"]; ?>&rpp=<?= $result_set["data"]["rpp"]; ?>&ts=" + Date.now();
187                                  break;                                  break;
188                          case -1: // Input validation failed                          case -1: // Input validation failed
189                                  errorFieldMap.set("err_msg_move", ret.return.message);                                  errorFieldMap.set("err_msg_move", ret.return.message);
# Line 209  function move_article(sid) Line 208  function move_article(sid)
208    
209  function set_ex_dir(fid)  function set_ex_dir(fid)
210  {  {
211          instance.post('set_ex_file_sub.php', {          instance.post('article_service_genex.php', {
212                  id: <? echo $result_set["data"]["id"]; ?>,                  id: <?= $result_set["data"]["id"]; ?>,
213                  fid: fid,                  fid: fid,
214          })          })
215          .then(function (response) {          .then(function (response) {
# Line 220  function set_ex_dir(fid) Line 219  function set_ex_dir(fid)
219                  {                  {
220                          case 0: // OK                          case 0: // OK
221                                  refresh_err_msg(errorFieldMap);                                  refresh_err_msg(errorFieldMap);
222                                  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();                                  document.location = "view_article.php?id=<?= $result_set["data"]["id"]; ?>&trash=<?= $result_set["data"]["trash"]; ?>&rpp=<?= $result_set["data"]["rpp"]; ?>&ts=" + Date.now();
223                                  break;                                  break;
224                          case -1: // Input validation failed                          case -1: // Input validation failed
225                                  errorFieldMap.set("err_msg_ex_dir", ret.return.message);                                  errorFieldMap.set("err_msg_ex_dir", ret.return.message);
# Line 279  window.addEventListener("load", () => { Line 278  window.addEventListener("load", () => {
278                  <table cols="2" border="0" cellpadding="0" cellspacing="0" width="1050">                  <table cols="2" border="0" cellpadding="0" cellspacing="0" width="1050">
279                          <tr>                          <tr>
280                                  <td width="50%">                                  <td width="50%">
281                                          <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>                                          <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"]); ?>"><?= ($result_set["data"]["ex"] ? "文摘区" : "讨论区"); ?></a>
282                                          <a class="s2" href="post.php?reply_id=<? echo $result_set["data"]["id"]; ?>&quote=0" title="直接回复该文章">[快速回复]</a>                                          <a class="s2" href="article_post.php?reply_id=<?= $result_set["data"]["id"]; ?>&quote=0" title="直接回复该文章">[快速回复]</a>
283  <?  <?php
284          if ($previous_id > 0)          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>                                          <a class="s2" href="view_article.php?id=<?= $previous_id; ?>&ex=<?= $result_set["data"]["ex"]; ?>&trash=<?= $result_set["data"]["trash"]; ?>">[上一主题]</a>
288  <?  <?php
289          }          }
290          if ($next_id > 0)          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>                                          <a class="s2" href="view_article.php?id=<?= $next_id; ?>&ex=<?= $result_set["data"]["ex"]; ?>&trash=<?= $result_set["data"]["trash"]; ?>">[下一主题]</a>
294  <?  <?php
295          }          }
296  ?>  ?>
297                                  </td>                                  </td>
298                                  <td width="50%" align="right">                                  <td width="50%" align="right">
299  <?  <?php
300          // Only show set_ex_file at page 1          // 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))          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>                                          <span id="err_msg_ex_dir" name="err_msg" style="color: red;"></span>
305                                          <select id="ex_dir" name="ex_dir" size="1">                                          <select id="ex_dir" name="ex_dir" size="1">
306                                                  <option value="-1" <? echo ($result_set["data"]["fid"] == -1 ? "selected" : ""); ?>>[不属于精华区]</option>                                                  <option value="-1" <?= ($result_set["data"]["fid"] == -1 ? "selected" : ""); ?>>[不属于精华区]</option>
307                                                  <option value="0" <? echo ($result_set["data"]["fid"] == 0 ? "selected" : ""); ?>>(根目录)</option>                                                  <option value="0" <?= ($result_set["data"]["fid"] == 0 ? "selected" : ""); ?>>(根目录)</option>
308  <?  <?php
309                  foreach ($result_set["data"]["section_ex_dirs"] as $section_ex_dir)                  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>                                                  <option value="<?= $section_ex_dir["fid"]; ?>" <?= ($result_set["data"]["fid"] == $section_ex_dir["fid"] ? "selected" : ""); ?>><?= $section_ex_dir["dir"]; ?>(<?= $section_ex_dir["name"]; ?>)</option>
313  <?  <?php
314                  }                  }
315  ?>  ?>
316                                          </select>                                          </select>
317  <?  <?php
318          }          }
319          else if ($result_set["data"]["fid"] >= 0)          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>                                          <a class="s2" href="/gen_ex/<?= $result_set["data"]["sid"] . "/" . $result_set["data"]["ex_dir"]; ?>" target=_blank title="精华区目录"><?= $result_set["data"]["ex_dir"] . "(" . $result_set["data"]["ex_name"] . ")"; ?></a>
323  <?  <?php
324          }          }
325  ?>  ?>
326                                  </td>                                  </td>
327                          </tr>                          </tr>
328                          <tr bgcolor="#d0d3F0" height="25">                          <tr bgcolor="#d0d3F0" height="25">
329                                  <td colspan="2" align="center" class="title">                                  <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'); ?>                                          [<?= $result_set["data"]["id"]; ?>]&nbsp;主题:&nbsp;<?= htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?>
331                                  </td>                                  </td>
332                          </tr>                          </tr>
333                  </table>                  </table>
334  <?  <?php
335          foreach ($result_set["data"]["articles"] as $article)          foreach ($result_set["data"]["articles"] as $article)
336          {          {
337                  $color_index = ($color_index + 1) % count($color);                  $color_index = ($color_index + 1) % count($color);
# Line 342  window.addEventListener("load", () => { Line 341  window.addEventListener("load", () => {
341                  if ($article["tid"] != 0)                  if ($article["tid"] != 0)
342                  {                  {
343  ?>  ?>
344                  <a name="<? echo $article["aid"]; ?>"></a>                  <a name="<?= $article["aid"]; ?>"></a>
345                  <table bgcolor="<? echo $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="0" width="1050">                  <table bgcolor="<?= $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="0" width="1050">
346                          <tr height="1" bgcolor="#202020">                          <tr height="1" bgcolor="#202020">
347                                  <td colspan="3">                                  <td colspan="3">
348                                  </td>                                  </td>
349                          </tr>                          </tr>
350                  </table>                  </table>
351  <?  <?php
352                  }                  }
353  ?>  ?>
354                  <table bgcolor="<? echo $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="10" width="1050">                  <table bgcolor="<?= $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="10" width="1050">
355                          <tr>                          <tr>
356                                  <td width="20%">                                  <td width="20%">
357                                  </td>                                  </td>
358                                  <td width="75%">                                  <td width="75%">
359  <?  <?php
360                  if ($_SESSION["BBS_priv"]->checkpriv(0, S_MSG) && $_SESSION["BBS_uid"] != $article["uid"])                  if ($_SESSION["BBS_priv"]->checkpriv(0, S_MSG) && $_SESSION["BBS_uid"] != $article["uid"])
361                  {                  {
362  ?>  ?>
363                                          <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>                                          <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>
364  <?  <?php
365                  }                  }
366                  if ($article["visible"])                  if ($article["visible"])
367                  {                  {
368                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) && $_SESSION["BBS_uid"] == $article["uid"] && (!$article["excerption"]))                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) && $_SESSION["BBS_uid"] == $article["uid"] && (!$article["excerption"]))
369                          {                          {
370  ?>  ?>
371                                          <a class="s4" href="post.php?id=<? echo $article["aid"]; ?>" title="修改该文章">修改</a>                                          <a class="s4" href="article_post.php?id=<?= $article["aid"]; ?>" title="修改该文章">修改</a>
372  <?  <?php
373                          }                          }
374                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
375                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))
376                          {                          {
377  ?>  ?>
378                                          <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>                                          <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>
379  <?  <?php
380                          }                          }
381                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST))                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST))
382                          {                          {
383  ?>  ?>
384                                          <img src="images/edit.gif" width="16" height="16"><a class="s4" href="post.php?reply_id=<? echo $article["aid"]; ?>" title="引用回复该文章">回复</a>                                          <img src="images/edit.gif" width="16" height="16"><a class="s4" href="article_post.php?reply_id=<?= $article["aid"]; ?>" title="引用回复该文章">回复</a>
385  <?  <?php
386                          }                          }
387                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
388                          {                          {
389  ?>  ?>
390                                          <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>                                          <a class="s4" id="set_excerption_<?= $article["aid"]; ?>" style="display: <?= ($article["excerption"] ? "none" : "inline"); ?>" href="" onclick="return article_op('excerption', <?= $article["aid"]; ?>, 1);" title="加入文摘区">收录</a>
391                                          <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>                                          <a class="s4" id="unset_excerption_<?= $article["aid"]; ?>" style="display: <?= ($article["excerption"] ? "inline" : "none"); ?>" href="" onclick="return article_op('excerption', <?= $article["aid"]; ?>, 0, true);" title="移出文摘区">移出</a>
392  <?  <?php
393                          }                          }
394                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S))
395                          {                          {
396  ?>  ?>
397                                          <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>                                          <a class="s4" id="set_ontop_<?= $article["aid"]; ?>" style="display: <?= ($article["ontop"] ? "none" : "inline"); ?>" href="" onclick="return article_op('ontop', <?= $article["aid"]; ?>, 1, true);" title="置顶">置顶</a>
398                                          <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>                                          <a class="s4" id="unset_ontop_<?= $article["aid"]; ?>" style="display: <?= ($article["ontop"] ? "inline" : "none"); ?>" href="" onclick="return article_op('ontop', <?= $article["aid"]; ?>, 0);" title="取消置顶">取消置顶</a>
399  <?  <?php
400                          }                          }
401                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST) &&
402                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]))                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]))
403                          {                          {
404  ?>  ?>
405                                          <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>                                          <a class="s4" id="set_lock_<?= $article["aid"]; ?>" style="display: <?= ($article["lock"] ? "none" : "inline"); ?>" href="" onclick="return article_op('lock', <?= $article["aid"]; ?>, 1);" title="禁止回复">静默</a>
406                                          <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>                                          <a class="s4" id="unset_lock_<?= $article["aid"]; ?>" style="display: <?= ($article["lock"] ? "inline" : "none"); ?>" href="" onclick="return article_op('lock', <?= $article["aid"]; ?>, 0);" title="取消禁止回复">取消静默</a>
407  <?  <?php
408                          }                          }
409                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$article["transship"]) && (!$article["excerption"]))                          if ($article["tid"] == 0 && $_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$article["transship"]) && (!$article["excerption"]))
410                          {                          {
411  ?>  ?>
412                                          <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>                                          <a class="s4" id="set_transship_<?= $article["aid"]; ?>" style="display: <?= ($article["transship"] ? "none" : "inline"); ?>" href="" onclick="return article_op('transship', <?= $article["aid"]; ?>, 1, true);" title="设为转载">设为转载</a>
413                                          <a class="s4" id="unset_transship_<? echo $article["aid"]; ?>" style="display: none" href=""></a>                                          <a class="s4" id="unset_transship_<?= $article["aid"]; ?>" style="display: none" href=""></a>
414  <?  <?php
415                          }                          }
416                  }                  }
417                  else                  else
# Line 420  window.addEventListener("load", () => { Line 419  window.addEventListener("load", () => {
419                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && $article["m_del"])                          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && $article["m_del"])
420                          {                          {
421  ?>  ?>
422                                          <a class="s4" id="set_restore_<? echo $article["aid"]; ?>" href="" onclick="return article_op('restore', <? echo $article["aid"]; ?>, 1, true);" title="恢复删除">恢复</a>                                          <a class="s4" id="set_restore_<?= $article["aid"]; ?>" href="" onclick="return article_op('restore', <?= $article["aid"]; ?>, 1, true);" title="恢复删除">恢复</a>
423  <?  <?php
424                          }                          }
425                  }                  }
426  ?>  ?>
427                                          <span id="err_msg_ctrl_<? echo $article["aid"]; ?>" name="err_msg" style="color: red;"></span>                                          <span id="err_msg_ctrl_<?= $article["aid"]; ?>" name="err_msg" style="color: red;"></span>
428                                  </td>                                  </td>
429                                  <td width="5%">                                  <td width="5%">
430                                  </td>                                  </td>
431                          </tr>                          </tr>
432                          <tr>                          <tr>
433                                  <td width="20%" align="center">                                  <td width="20%" align="center">
434                                          作者:&nbsp;<a class="s2" href="show_profile.php?uid=<? echo $article["uid"]; ?>" onclick='return <? echo ($user_viewable ? "true" : "false"); ?>' target=_blank title="查看用户资料"><? echo htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8'); ?></a>                                          作者:&nbsp;<a class="s2" href="show_profile.php?uid=<?= $article["uid"]; ?>" onclick='return <?= ($user_viewable ? "true" : "false"); ?>' target=_blank title="查看用户资料"><?= htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8'); ?></a>
435                                  </td>                                  </td>
436                                  <td width="75%" class="body">                                  <td width="75%" class="body">
437                                          <span style="color:#606060;">标题:</span>                                          <span style="color:#606060;">标题:</span>
438                                          <img src="images/expression/<? echo $article["icon"]; ?>.gif">                                          <img src="images/expression/<?= $article["icon"]; ?>.gif">
439                                          <span id="title_<? echo $article["aid"]; ?>" class="<? echo ($article["visible"] ? "title_normal" : "title_deleted"); ?>">                                          <span id="title_<?= $article["aid"]; ?>" class="<?= ($article["visible"] ? "title_normal" : "title_deleted"); ?>">
440                                                  <? echo split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?>                                                  <?= split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />"); ?>
441                                          </span>                                          </span>
442                                          <? if ($article["transship"]) { ?><font color="red">[转载]</font><? } ?>                                          <?php if ($article["transship"]) { ?><font color="red">[转载]</font><?php } ?>
443                                  </td>                                  </td>
444                                  <td width="5%">                                  <td width="5%">
445                                  </td>                                  </td>
446                          </tr>                          </tr>
447                          <tr>                          <tr>
448                                  <td align="center">                                  <td align="center">
449                                          昵称:&nbsp;<span style="color:#909090;"><? echo htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8'); ?></span>                                          昵称:&nbsp;<span style="color: #909090;"><?= htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8'); ?></span>
450                                  </td>                                  </td>
451                                  <td class="body">                                  <td class="body">
452                                          <span style="color:#606060;">来自:</span>&nbsp;<span style="color:#909090; "><? echo $article["sub_ip"]; ?></span>                                          <span style="color:#606060;">来自:</span>&nbsp;<span style="color: #909090; "><?= $article["sub_ip"]; ?></span>
453                                  </td>                                  </td>
454                                  <td>                                  <td>
455                                  </td>                                  </td>
456                          </tr>                          </tr>
457                          <tr>                          <tr>
458                                  <td align="center">                                  <td align="center">
459                                          经验值:&nbsp;<span style="color:red;"><? echo $article["exp"]; ?></span>                                          经验值:&nbsp;<span style="color:red;"><?= $article["exp"]; ?></span>
460                                  </td>                                  </td>
461                                  <td class="body">                                  <td class="body">
462                                          <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>                                          <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>
463                                  </td>                                  </td>
464                                  <td>                                  <td>
465                                  </td>                                  </td>
466                          </tr>                          </tr>
467                          <tr>                          <tr>
468                                  <td align="center">                                  <td align="center">
469                                          等级:&nbsp;<span style="color:#909090;"><? echo user_level($article["exp"]); ?></span>                                          等级:&nbsp;<span style="color: #909090;"><?= user_level($article["exp"]); ?></span>
470                                  </td>                                  </td>
471                                  <td class="body">                                  <td class="body">
472                                          <span style="color:#606060;">长度:</span>&nbsp;<span style="color:#909090; "><? echo $article["length"]; ?>字</span>                                          <span style="color:#606060;">长度:</span>&nbsp;<span style="color: #909090; "><?= $article["length"]; ?>字</span>
473                                  </td>                                  </td>
474                                  <td>                                  <td>
475                                  </td>                                  </td>
# Line 478  window.addEventListener("load", () => { Line 477  window.addEventListener("load", () => {
477                          <tr height="2">                          <tr height="2">
478                                  <td>                                  <td>
479                                  </td>                                  </td>
480                                  <td style="background-color:#909090;">                                  <td style="background-color: #909090;">
481                                  </td>                                  </td>
482                                  <td>                                  <td>
483                                  </td>                                  </td>
484                          </tr>                          </tr>
485                          <tr>                          <tr>
486                                  <td align="center" valign="top">                                  <td align="center" valign="top">
487                                          <img src="<? echo $article["photo_path"]; ?>" border="0">                                          <img src="<?= $article["photo_path"]; ?>" border="0">
488                                  </td>                                  </td>
489                                  <td id="content_<? echo $article["aid"]; ?>" class="<? echo ($article["visible"] ? "content_normal" : "content_deleted"); ?>">                                  <td id="content_<?= $article["aid"]; ?>" class="<?= ($article["visible"] ? "content_normal" : "content_deleted"); ?>">
490                                          <? echo LML(htmlspecialchars((isset($article["content"]) ? $article["content"] : ""), ENT_HTML401, 'UTF-8'), true, true, 80); ?>                                          <pre><?= LML(htmlspecialchars((isset($article["content"]) ? $article["content"] : ""), ENT_HTML401, 'UTF-8'), true, true, 80); ?></pre>
491                                  </td>                                  </td>
492                                  <td>                                  <td>
493                                  </td>                                  </td>
# Line 499  window.addEventListener("load", () => { Line 498  window.addEventListener("load", () => {
498                                  <td style="color:#000000; ">                                  <td style="color:#000000; ">
499                                          ========== * * * * * ==========                                          ========== * * * * * ==========
500                                          <br />                                          <br />
501  <?  <?php
502                  foreach ($article["attachments"] as $attachment)                  foreach ($article["attachments"] as $attachment)
503                  {                  {
504                          $filename = $attachment["filename"];                          $filename = $attachment["filename"];
505                          $ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0)));                          $ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0)));
506  ?>  ?>
507                                          <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"]; ?>字节)                                          <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"]; ?>字节)
508  <?  <?php
509                          if ($attachment["check"] == 0)                          if ($attachment["check"] == 0)
510                          {                          {
511  ?><font color="red">未审核</font><?  ?><font color="red">未审核</font><?php
512                          }                          }
513                          else                          else
514                          {                          {
# Line 523  window.addEventListener("load", () => { Line 522  window.addEventListener("load", () => {
522                                          case "tif":                                          case "tif":
523                                          case "tiff":                                          case "tiff":
524  ?>  ?>
525                                          <img onmousewheel="return bbs_img_zoom(event, this)" src="dl_file.php?aid=<? echo $attachment["aid"]; ?>">                                          <br /><img onmousewheel="return bbs_img_zoom(event, this)" src="dl_file.php?aid=<?= $attachment["aid"]; ?>">
526  <?  <?php
527                                                  break;                                                  break;
528                                  }                                  }
529                          }                          }
# Line 533  window.addEventListener("load", () => { Line 532  window.addEventListener("load", () => {
532                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))                                  ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_MAN_S) || $_SESSION["BBS_uid"] == $article["uid"]) && (!$article["excerption"]))
533                          {                          {
534  ?>  ?>
535                                          <a class="s2" href="#" onclick="return upload_del(<? echo $attachment["aid"]; ?>);">删除</a>                                          <a class="s2" href="#" onclick="return upload_del(<?= $attachment["aid"]; ?>);">删除</a>
536                                          <span id="err_msg_attachment_<? echo $attachment["aid"]; ?>" name="err_msg" style="color: red;"></span>                                          <span id="err_msg_attachment_<?= $attachment["aid"]; ?>" name="err_msg" style="color: red;"></span>
537  <?  <?php
538                          }                          }
539  ?>  ?>
540                                          <br /></span>                                          <br /></span>
541  <?  <?php
542                  }                  }
543  ?>  ?>
544                                  </td>                                  </td>
# Line 547  window.addEventListener("load", () => { Line 546  window.addEventListener("load", () => {
546                                  </td>                                  </td>
547                          </tr>                          </tr>
548                  </table>                  </table>
549  <?  <?php
550          }          }
551  ?>  ?>
552                  <table cols="3" border="0" cellpadding="5" cellspacing="0" width="1050">                  <table cols="3" border="0" cellpadding="5" cellspacing="0" width="1050">
# Line 556  window.addEventListener("load", () => { Line 555  window.addEventListener("load", () => {
555                                  </td>                                  </td>
556                          </tr>                          </tr>
557                          <tr>                          <tr>
558                                  <td width="40%" style="color:#909090">                                  <td width="40%" style="color: #909090">
559                                  <form action="view_article.php" method="get" id="change_page" name="change_page">                                  <form action="view_article.php" method="get" id="change_page" name="change_page">
560                                          <input type="hidden" id="id" name="id" value="<? echo $result_set["data"]["id"]; ?>">                                          <input type="hidden" id="id" name="id" value="<?= $result_set["data"]["id"]; ?>">
561                                          <input type="hidden" id="ex" name="ex" value="<? echo $result_set["data"]["ex"]; ?>">                                          <input type="hidden" id="ex" name="ex" value="<?= $result_set["data"]["ex"]; ?>">
562                                          <input type="hidden" id="trash" name="trash" value="<? echo $result_set["data"]["trash"]; ?>">                                          <input type="hidden" id="trash" name="trash" value="<?= $result_set["data"]["trash"]; ?>">
563                                          每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">                                          每页<select size="1" id="rpp" name="rpp" onchange="ch_rpp();">
564  <?  <?php
565          foreach ($BBS_view_rpp_options as $v)          foreach ($BBS_view_rpp_options as $v)
566          {          {
567                  echo ("<option value=\"$v\"" . ($v == $result_set["data"]["rpp"] ? " selected" : "") . ">$v</option>");                  echo ("<option value=\"$v\"" . ($v == $result_set["data"]["rpp"] ? " selected" : "") . ">$v</option>");
568          }          }
569  ?>  ?>
570                                          </select>条                                          </select>条
571  <?  <?php
572          if ($result_set["data"]["page"] > 1)          if ($result_set["data"]["page"] > 1)
573          {          {
574  ?>  ?>
575                                          <a class="s8" title="首页" href="" onclick="return ch_page(1);">|◀</a>                                          <a class="s8" title="首页" href="" onclick="return ch_page(1);">|◀</a>
576                                          <a class="s8" title="上一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] - 1); ?>);">◀</a>                                          <a class="s8" title="上一页" href="" onclick="return ch_page(<?= ($result_set["data"]["page"] - 1); ?>);">◀</a>
577  <?  <?php
578          }          }
579          else          else
580          {          {
581  ?>  ?>
582                                          |◀ ◀                                          |◀ ◀
583  <?  <?php
584          }          }
585  ?>  ?>
586                                          第<input id="page" name="page" value="<? echo ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<? echo $result_set["data"]["page_total"]; ?>页                                          第<input id="page" name="page" value="<?= ($result_set["data"]["page"]) ; ?>" style="width: 30px;">/<?= $result_set["data"]["page_total"]; ?>页
587  <?  <?php
588          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])          if ($result_set["data"]["page"] < $result_set["data"]["page_total"])
589          {          {
590  ?>  ?>
591                                          <a class="s8" title="下一页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page"] + 1); ?>);">▶</a>                                          <a class="s8" title="下一页" href="" onclick="return ch_page(<?= ($result_set["data"]["page"] + 1); ?>);">▶</a>
592                                          <a class="s8" title="尾页" href="" onclick="return ch_page(<? echo ($result_set["data"]["page_total"]); ?>);">▶|</a>                                          <a class="s8" title="尾页" href="" onclick="return ch_page(<?= ($result_set["data"]["page_total"]); ?>);">▶|</a>
593  <?  <?php
594          }          }
595          else          else
596          {          {
597  ?>  ?>
598                                          ▶ ▶|                                          ▶ ▶|
599  <?  <?php
600          }          }
601  ?>  ?>
602                                  </form>                                  </form>
603                                  </td>                                  </td>
604                                  <td width="35%" align="center">                                  <td width="35%" align="center">
605  <?  <?php
606          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$result_set["data"]["excerption"]))          if ($_SESSION["BBS_priv"]->checkpriv($result_set["data"]["sid"], S_POST | S_MAN_S) && (!$result_set["data"]["excerption"]))
607          {          {
608  ?>  ?>
609                                  <form method="post" id="move_article" name="move_article" action="#">                                  <form method="post" id="move_article" name="move_article" action="#">
610                                          <select id="sid" name="sid" size="1">                                          <select id="sid" name="sid" size="1">
611  <?  <?php
612                  echo $result_set["data"]["section_list_options"];                  echo $result_set["data"]["section_list_options"];
613  ?>  ?>
614                                          </select>                                          </select>
615                                          <input type="submit" value="移动">                                          <input type="submit" value="移动">
616                                          <span id="err_msg_move" name="err_msg" style="color: red;"></span>                                          <span id="err_msg_move" name="err_msg" style="color: red;"></span>
617                                  </form>                                  </form>
618  <?  <?php
619          }          }
620  ?>                              </td>  ?>                              </td>
621                                  <td width="25%" align="right">                                  <td width="25%" align="right">
# Line 625  window.addEventListener("load", () => { Line 624  window.addEventListener("load", () => {
624                          </tr>                          </tr>
625                  </table>                  </table>
626          </center>          </center>
627  <?  <?php
628          include "./foot.inc.php";          include "./foot.inc.php";
629  ?>  ?>
630  </body>  </body>


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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