/[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.27 by sysadm, Sat Apr 26 05:28:31 2025 UTC Revision 1.35 by sysadm, Wed May 7 12:22:45 2025 UTC
# Line 99  Line 99 
99                  font-size: 16px;                  font-size: 16px;
100                  text-decoration: line-through;                  text-decoration: line-through;
101          }          }
102            IMG.auto_adjust
103            {
104                    display: none;
105            }
106          </style>          </style>
         <script type="text/javascript" src="../js/img_adjust.js"></script>  
107          <script src="../js/polyfill.min.js"></script>          <script src="../js/polyfill.min.js"></script>
108          <script src="../js/axios.min.js"></script>          <script src="../js/axios.min.js"></script>
109            <script src="../js/jquery.min.js"></script>
110          <script type="text/javascript">          <script type="text/javascript">
111          function ch_page(page)          function ch_page(page)
112          {          {
# Line 321  Line 325 
325                  {                  {
326                          f.addEventListener("submit", (e) => {                          f.addEventListener("submit", (e) => {
327                                  e.preventDefault();                                  e.preventDefault();
328                                  move_article(f.sid.value);                                  if (f.sid.value > 0)
329                                    {
330                                            move_article(f.sid.value);
331                                    }
332                          });                          });
333                  }                  }
334          });          });
335    
336            $(document).ready(function() {
337                    $("img[class=auto_adjust]").on("load", function() {
338                            if ($(this).width() > {$BBS_img_max_width})
339                            {
340                                    $(this).width({$BBS_img_max_width});
341                            }
342                            $(this).show();
343                    })
344                    .on("mousewheel", function(e) {
345                            var zoom = parseFloat($(this).css("zoom"));
346                            zoom *= (1 + e.originalEvent.wheelDelta / 1000);
347                            if (zoom > 0)
348                            {
349                                    $(this).css("zoom", zoom);
350                            }
351                    });
352            });
353          </script>          </script>
354          <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3013347141025996" crossorigin="anonymous">          <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3013347141025996" crossorigin="anonymous">
355          </script>          </script>
# Line 418  Line 442 
442                                          <a class="s4" id="unset_ontop_{$article['aid']}" style="display: {$unset_ontop_display}" href="" onclick="return article_op('ontop', {$article['aid']}, 0)" title="取消置顶">取消置顶</a>                                          <a class="s4" id="unset_ontop_{$article['aid']}" style="display: {$unset_ontop_display}" href="" onclick="return article_op('ontop', {$article['aid']}, 0)" title="取消置顶">取消置顶</a>
443                                  HTML;                                  HTML;
444                          }                          }
445                          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) &&
446                                  ($_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"]))
447                          {                          {
448                                  $set_lock_display = ($article["lock"] ? "none" : "inline");                                  $set_lock_display = ($article["lock"] ? "none" : "inline");
# Line 453  Line 477 
477                  $nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');                  $nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');
478                  $title_f = split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />");                  $title_f = split_line(htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'), "", 65, 2, "<br />");
479                  $title_class = ($article["visible"] ? "title_normal" : "title_deleted");                  $title_class = ($article["visible"] ? "title_normal" : "title_deleted");
480                  $content_f = LML(htmlspecialchars((isset($article["content"]) ? $article["content"] : ""), ENT_HTML401, 'UTF-8'), true, true, 80);                  $content_f = LML(htmlspecialchars($article["content"], ENT_HTML401, 'UTF-8'), true, true, 80);
481                  $content_class = ($article["visible"] ? "content_normal" : "content_deleted");                  $content_class = ($article["visible"] ? "content_normal" : "content_deleted");
482    
483                  $transship_info = "";                  $transship_info = "";
# Line 470  Line 494 
494                  foreach ($article["attachments"] as $attachment)                  foreach ($article["attachments"] as $attachment)
495                  {                  {
496                          $filename = $attachment["filename"];                          $filename = $attachment["filename"];
                         $ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0)));  
497    
498                          $atta_list .= <<<HTML                          $atta_list .= <<<HTML
499                                  <span id="attachment_{$attachment['aid']}"><img src="images/closed.gif"><a class="s2" href="dl_file.php?aid={$attachment['aid']}" target="_target">{$filename}</a> ({$attachment["size"]}字节)                                  <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"]}字节)
# Line 494  Line 517 
517    
518                          if ($attachment["check"])                          if ($attachment["check"])
519                          {                          {
520                                    $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
521                                  switch ($ext)                                  switch ($ext)
522                                  {                                  {
523                                          case "bmp":                                          case "bmp":
# Line 505  Line 529 
529                                          case "tiff":                                          case "tiff":
530                                                  $atta_list .= <<<HTML                                                  $atta_list .= <<<HTML
531                                                          <br />                                                          <br />
532                                                          <img onmousewheel="return bbs_img_zoom(event, this)" src="dl_file.php?aid={$attachment['aid']}">                                                          <img class="auto_adjust" src="dl_file.php?aid={$attachment['aid']}">
533                                                  HTML;                                                  HTML;
534                                                  break;                                                  break;
535                                  }                                  }
# Line 533  Line 557 
557                                          作者:&nbsp;<a class="s2" href="view_user.php?uid={$article['uid']}" onclick='return {$user_viewable}' target=_blank title="查看用户资料">{$username}</a>                                          作者:&nbsp;<a class="s2" href="view_user.php?uid={$article['uid']}" onclick='return {$user_viewable}' target=_blank title="查看用户资料">{$username}</a>
558                                  </td>                                  </td>
559                                  <td width="75%" class="body">                                  <td width="75%" class="body">
560                                          <span style="color:#606060;">标题:</span>                                          <span style="color: #606060">标题:</span>
561                                          <img src="images/expression/{$article['icon']}.gif">                                          <img src="images/expression/{$article['icon']}.gif">
562                                          <span id="title_{$article['aid']}" class="{$title_class}">                                          <span id="title_{$article['aid']}" class="{$title_class}">
563                                                  {$title_f}                                                  {$title_f}
# Line 545  Line 569 
569                          </tr>                          </tr>
570                          <tr>                          <tr>
571                                  <td align="center">                                  <td align="center">
572                                          昵称:&nbsp;<span style="color: #909090;">{$nickname}</span>                                          昵称:&nbsp;<span style="color: #909090">{$nickname}</span>
573                                  </td>                                  </td>
574                                  <td class="body">                                  <td class="body">
575                                          <span style="color:#606060;">来自:</span>&nbsp;<span style="color: #909090; ">{$article["sub_ip"]}</span>                                          <span style="color: #606060">来自:</span>&nbsp;<span style="color: #909090">{$article["sub_ip"]}</span>
576                                  </td>                                  </td>
577                                  <td>                                  <td>
578                                  </td>                                  </td>
# Line 558  Line 582 
582                                          经验值:&nbsp;<span style="color:red;">{$article["exp"]}</span>                                          经验值:&nbsp;<span style="color:red;">{$article["exp"]}</span>
583                                  </td>                                  </td>
584                                  <td class="body">                                  <td class="body">
585                                          <span style="color:#606060;">发贴时间:</span>&nbsp;<span style="color: #909090; ">{$article["sub_dt"]->format("Y年m月d日 H:i:s (\U\T\C P)")}</span>                                          <span style="color: #606060">发贴时间:</span>&nbsp;<span style="color: #909090">{$article["sub_dt"]->format("Y年m月d日 H:i:s (\U\T\C P)")}</span>
586                                  </td>                                  </td>
587                                  <td>                                  <td>
588                                  </td>                                  </td>
589                          </tr>                          </tr>
590                          <tr>                          <tr>
591                                  <td align="center">                                  <td align="center">
592                                          等级:&nbsp;<span style="color: #909090;">{$level}</span>                                          等级:&nbsp;<span style="color: #909090">{$level}</span>
593                                  </td>                                  </td>
594                                  <td class="body">                                  <td class="body">
595                                          <span style="color:#606060;">长度:</span>&nbsp;<span style="color: #909090; ">{$article["length"]}字</span>                                          <span style="color: #606060">长度:</span>&nbsp;<span style="color: #909090">{$article["length"]}字</span>
596                                  </td>                                  </td>
597                                  <td>                                  <td>
598                                  </td>                                  </td>
# Line 576  Line 600 
600                          <tr height="2">                          <tr height="2">
601                                  <td>                                  <td>
602                                  </td>                                  </td>
603                                  <td style="background-color: #909090;">                                  <td style="background-color: #909090">
604                                  </td>                                  </td>
605                                  <td>                                  <td>
606                                  </td>                                  </td>
# Line 594  Line 618 
618                          <tr>                          <tr>
619                                  <td>                                  <td>
620                                  </td>                                  </td>
621                                  <td style="color:#000000; ">                                  <td style="color: #000000">
622                                          ========== * * * * * ==========                                          ========== * * * * * ==========
623                                          <br />                                          <br />
624                                          {$atta_list}                                          {$atta_list}
# Line 701  Line 725 
725          </body>          </body>
726          </html>          </html>
727          HTML;          HTML;
 ?>  


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

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