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

Contents of /fenglin/bbs/themes/portal/view_article.view.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.20 - (show annotations)
Sat Nov 1 07:53:40 2025 UTC (4 months, 2 weeks ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.19: +1 -1 lines
Remove $lml_tag param from LML()

1 <?php
2 // Prevent load standalone
3 if (!isset($result_set))
4 {
5 exit();
6 }
7
8 require_once "../lib/lml.inc.php";
9 require_once "../lib/str_process.inc.php";
10 require_once "./user_level.inc.php";
11
12 $article = $result_set["data"]["articles"][0];
13
14 $title = htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8');
15
16 $css_file = get_theme_file('css/default');
17
18 echo <<<HTML
19 <html>
20 <head>
21 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
22 <base href="/www/" />
23 <title>{$BBS_name} - {$title}</title>
24 <link rel="stylesheet" href="{$css_file}" type="text/css">
25 <style type="text/css">
26 TD.content
27 {
28 font-size: 16px;
29 line-height: 26px;
30 }
31 IMG.auto_adjust
32 {
33 display: none;
34 }
35 </style>
36 <script src="../js/jquery.min.js"></script>
37 <script type="text/javascript">
38 $(document).ready(function() {
39 $("img[class=auto_adjust]").on("load", function() {
40 if ($(this).width() > {$BBS_img_max_width})
41 {
42 $(this).width({$BBS_img_max_width});
43 }
44 $(this).show();
45 })
46 .on("mousewheel", function(e) {
47 var zoom = parseFloat($(this).css("zoom"));
48 zoom *= (1 + e.originalEvent.wheelDelta / 1000);
49 if (zoom > 0)
50 {
51 $(this).css("zoom", zoom);
52 }
53 });
54 });
55 </script>
56 </head>
57 <body>
58 <center>
59 HTML;
60
61 include "../www/head.inc.php";
62
63 $title_f = split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 70, 2, "<br />");
64 $transship_info = ($article["transship"] ? "转载" : "原创");
65 $author_type = ($article["transship"] ? "转载" : "作者");
66 $nickname = htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8');
67 $content_f = LML($article["content"], 110);
68
69 $atta_list = "";
70 foreach ($article["attachments"] as $attachment)
71 {
72 if (!$attachment["check"])
73 {
74 continue;
75 }
76
77 $filename = $attachment["filename"];
78
79 $atta_list .= <<<HTML
80 <img src="../www/images/dl.gif"><a class="s2" href="../bbs/dl_file.php?aid={$attachment['aid']}" target="_target">{$filename}</a> ({$attachment["size"]}字节)
81 HTML;
82
83 $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
84 switch ($ext)
85 {
86 case "bmp":
87 case "gif":
88 case "jpg":
89 case "jpeg":
90 case "png":
91 case "tif":
92 case "tiff":
93 $atta_list .= <<<HTML
94 <br />
95 <img class="auto_adjust" src="../bbs/dl_file.php?aid={$attachment['aid']}">
96 HTML;
97 break;
98 }
99
100 $atta_list .= <<<HTML
101 <br />
102 HTML;
103 }
104
105 echo <<<HTML
106 <table width="1050" border="0" cellpadding="0" cellspacing="0">
107 <tr height=20 bgcolor=#F3F9FC>
108 <td width="20">&nbsp;</td>
109 <td>{$BBS_name} &gt;&gt; {$title}</td>
110 <td width="200" align="right">本文已被浏览<font color=red>{$result_set["data"]["view_count"]}</font>次</td>
111 <td width="20">&nbsp;</td>
112 </tr>
113 <tr>
114 <td colspan="4" height="1" bgcolor="gray"></td>
115 </tr>
116 <tr height="5">
117 <td>&nbsp;</td>
118 </tr>
119 </table>
120 <table width="1050" border="0" cellpadding="0" cellspacing="0">
121 <tr height="25">
122 <td width="5%"></td>
123 <td width="90%"></td>
124 <td width="5%"></td>
125 </tr>
126 <tr>
127 <td></td>
128 <td>
129 <table width="100%" border="0" cellpadding="0" cellspacing="0">
130 <tr height="30">
131 <td align="center"><font size="4"><b>{$title_f}</b></font> <font color="gray">[{$transship_info}]</font></td>
132 </tr>
133 <tr height="25">
134 <td align="center">({$article["sub_dt"]->format("Y-m-d H:i:s")}) {$author_type}:{$nickname}</td>
135 </tr>
136 <tr height="10">
137 <td></td>
138 </tr>
139 <tr height="1">
140 <td align="center" bgcolor="gray"></td>
141 </tr>
142 <tr height="25">
143 <td></td>
144 </tr>
145 <tr>
146 <td class="content">
147 <pre>{$content_f}</pre>
148 </td>
149 </tr>
150 <tr>
151 <td>
152 <br />
153 {$atta_list}
154 </td>
155 </tr>
156 <tr height="25">
157 <td>
158 </td>
159 </tr>
160 <tr height="25">
161 <td align="right">
162 已有<font color="red">{$result_set["data"]["reply_count"]}</font>人发表评论
163 </td>
164 </tr>
165 <tr height="10">
166 <td>
167 </td>
168 </tr>
169 <tr>
170 <td align="right">
171 【<a href="../bbs/view_article.php?id={$result_set['data']['id']}">查看回复</a>】
172 </td>
173 </tr>
174 </table>
175 </td>
176 <td>
177 </td>
178 </tr>
179 <tr height="25">
180 <td></td>
181 </tr>
182 </table>
183 HTML;
184
185 include "../www/foot.inc.php";
186
187 echo <<<HTML
188 </center>
189 </body>
190 </html>
191 HTML;

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