/[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.33 by sysadm, Wed May 7 11:27:22 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 326  Line 330 
330                  }                  }
331          });          });
332    
333            $(document).ready(function() {
334                    $("img[class=auto_adjust]").on("load", function() {
335                            if ($(this).width() > {$BBS_img_max_width})
336                            {
337                                    $(this).width({$BBS_img_max_width});
338                            }
339                            $(this).show();
340                    })
341                    .on("mousewheel", function(e) {
342                            var zoom = parseFloat($(this).css("zoom"));
343                            zoom *= (1 + e.originalEvent.wheelDelta / 1000);
344                            if (zoom > 0)
345                            {
346                                    $(this).css("zoom", zoom);
347                            }
348                    });
349            });
350          </script>          </script>
351          <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">
352          </script>          </script>
# Line 418  Line 439 
439                                          <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>
440                                  HTML;                                  HTML;
441                          }                          }
442                          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) &&
443                                  ($_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"]))
444                          {                          {
445                                  $set_lock_display = ($article["lock"] ? "none" : "inline");                                  $set_lock_display = ($article["lock"] ? "none" : "inline");
# Line 453  Line 474 
474                  $nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');                  $nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');
475                  $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 />");
476                  $title_class = ($article["visible"] ? "title_normal" : "title_deleted");                  $title_class = ($article["visible"] ? "title_normal" : "title_deleted");
477                  $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);
478                  $content_class = ($article["visible"] ? "content_normal" : "content_deleted");                  $content_class = ($article["visible"] ? "content_normal" : "content_deleted");
479    
480                  $transship_info = "";                  $transship_info = "";
# Line 470  Line 491 
491                  foreach ($article["attachments"] as $attachment)                  foreach ($article["attachments"] as $attachment)
492                  {                  {
493                          $filename = $attachment["filename"];                          $filename = $attachment["filename"];
                         $ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0)));  
494    
495                          $atta_list .= <<<HTML                          $atta_list .= <<<HTML
496                                  <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 514 
514    
515                          if ($attachment["check"])                          if ($attachment["check"])
516                          {                          {
517                                    $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
518                                  switch ($ext)                                  switch ($ext)
519                                  {                                  {
520                                          case "bmp":                                          case "bmp":
# Line 505  Line 526 
526                                          case "tiff":                                          case "tiff":
527                                                  $atta_list .= <<<HTML                                                  $atta_list .= <<<HTML
528                                                          <br />                                                          <br />
529                                                          <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']}">
530                                                  HTML;                                                  HTML;
531                                                  break;                                                  break;
532                                  }                                  }
# Line 533  Line 554 
554                                          作者:&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>
555                                  </td>                                  </td>
556                                  <td width="75%" class="body">                                  <td width="75%" class="body">
557                                          <span style="color:#606060;">标题:</span>                                          <span style="color: #606060">标题:</span>
558                                          <img src="images/expression/{$article['icon']}.gif">                                          <img src="images/expression/{$article['icon']}.gif">
559                                          <span id="title_{$article['aid']}" class="{$title_class}">                                          <span id="title_{$article['aid']}" class="{$title_class}">
560                                                  {$title_f}                                                  {$title_f}
# Line 545  Line 566 
566                          </tr>                          </tr>
567                          <tr>                          <tr>
568                                  <td align="center">                                  <td align="center">
569                                          昵称:&nbsp;<span style="color: #909090;">{$nickname}</span>                                          昵称:&nbsp;<span style="color: #909090">{$nickname}</span>
570                                  </td>                                  </td>
571                                  <td class="body">                                  <td class="body">
572                                          <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>
573                                  </td>                                  </td>
574                                  <td>                                  <td>
575                                  </td>                                  </td>
# Line 558  Line 579 
579                                          经验值:&nbsp;<span style="color:red;">{$article["exp"]}</span>                                          经验值:&nbsp;<span style="color:red;">{$article["exp"]}</span>
580                                  </td>                                  </td>
581                                  <td class="body">                                  <td class="body">
582                                          <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>
583                                  </td>                                  </td>
584                                  <td>                                  <td>
585                                  </td>                                  </td>
586                          </tr>                          </tr>
587                          <tr>                          <tr>
588                                  <td align="center">                                  <td align="center">
589                                          等级:&nbsp;<span style="color: #909090;">{$level}</span>                                          等级:&nbsp;<span style="color: #909090">{$level}</span>
590                                  </td>                                  </td>
591                                  <td class="body">                                  <td class="body">
592                                          <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>
593                                  </td>                                  </td>
594                                  <td>                                  <td>
595                                  </td>                                  </td>
# Line 576  Line 597 
597                          <tr height="2">                          <tr height="2">
598                                  <td>                                  <td>
599                                  </td>                                  </td>
600                                  <td style="background-color: #909090;">                                  <td style="background-color: #909090">
601                                  </td>                                  </td>
602                                  <td>                                  <td>
603                                  </td>                                  </td>
# Line 594  Line 615 
615                          <tr>                          <tr>
616                                  <td>                                  <td>
617                                  </td>                                  </td>
618                                  <td style="color:#000000; ">                                  <td style="color: #000000">
619                                          ========== * * * * * ==========                                          ========== * * * * * ==========
620                                          <br />                                          <br />
621                                          {$atta_list}                                          {$atta_list}
# Line 701  Line 722 
722          </body>          </body>
723          </html>          </html>
724          HTML;          HTML;
 ?>  


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

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