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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations)
Tue Apr 15 11:22:54 2025 UTC (11 months ago) by sysadm
Branch: MAIN
Changes since 1.4: +2 -2 lines
Update page layout for picture attachment

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     $article = $result_set["data"]["articles"][0];
13     ?>
14     <html>
15     <head>
16     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
17     <title><? echo $BBS_name; ?> - <? echo htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?> </title>
18     <link rel="stylesheet" href="<? echo get_theme_file('css/default'); ?>" type="text/css">
19     <style type="text/css">
20     TD.content
21     {
22     font-size: 16px;
23     line-height: 26px;
24     }
25     </style>
26     <script type="text/javascript" src="../js/img_adjust.js"></script>
27 sysadm 1.2 <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3013347141025996" crossorigin="anonymous">
28     </script>
29 sysadm 1.1 </head>
30     <body>
31     <center>
32     <?
33     include "../www/head.inc.php";
34     ?>
35 sysadm 1.3 <table width="1050" border="0" cellpadding="0" cellspacing="0">
36 sysadm 1.1 <tr height=20 bgcolor=#F3F9FC>
37     <td width="20">&nbsp;</td>
38     <td><? echo $BBS_name; ?> &gt;&gt; <? echo split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 65, 2); ?></td>
39     <td width="200" align="right">本文已被浏览<font color=red><? echo $result_set["data"]["view_count"]; ?></font>次</td>
40     <td width="20">&nbsp;</td>
41     </tr>
42     <tr>
43     <td colspan=4 height=1 bgcolor=gray></td>
44     </tr>
45     <tr height=5>
46     <td>&nbsp;</td>
47     </tr>
48     </table>
49 sysadm 1.3 <table width="1050" border="0" cellpadding="0" cellspacing="0">
50     <tr height="25">
51 sysadm 1.1 <td width="5%"></td>
52     <td width="90%"></td>
53     <td width="5%"></td>
54     </tr>
55     <tr>
56     <td></td>
57     <td>
58     <table width="100%" border="0" cellpadding="0" cellspacing="0">
59     <tr height="30">
60     <td align="center"><font size=4><b><? echo split_line(htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'), "", 70, 2); ?></b></font> <font color=gray>[<? echo ($article["transship"]?"转载":"原创"); ?>]</font></td>
61     </tr>
62 sysadm 1.3 <tr height="25">
63 sysadm 1.1 <td align="center">(<? echo $article["sub_dt"]->format("Y-m-d H:i:s"); ?>) <? echo ($article["transship"]?"转载":"作者"); ?>:<? echo htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8'); ?></td>
64     </tr>
65     <tr height="10">
66     <td></td>
67     </tr>
68     <tr height="1">
69     <td align="center" bgcolor=gray></td>
70     </tr>
71 sysadm 1.3 <tr height="25">
72 sysadm 1.1 <td></td>
73     </tr>
74     <tr>
75 sysadm 1.4 <td class="content"><? echo LML(htmlspecialchars($article["content"], ENT_HTML401, 'UTF-8'), true, true, 110); ?></td>
76 sysadm 1.1 </tr>
77     <tr>
78     <td>
79     <br />
80     <?
81     foreach ($article["attachments"] as $attachment)
82     {
83     $filename = $attachment["filename"];
84     $ext = strtolower(substr($filename, (strrpos($filename, ".") ? strrpos($filename, ".") + 1 : 0)));
85     ?>
86 sysadm 1.5 <img src="../www/images/dl.gif"><a class="s2" href="../bbs/dl_file.php?aid=<? echo $attachment["aid"]; ?>" target="_target"><? echo $filename; ?></a> (<? echo $attachment["size"]; ?>字节)
87 sysadm 1.1 <?
88     if ($attachment["check"] == 0)
89     {
90     ?><font color="red">未审核</font><?
91     }
92     else
93     {
94     switch ($ext)
95     {
96     case "bmp":
97     case "gif":
98     case "jpg":
99     case "jpeg":
100     case "png":
101     case "tif":
102     case "tiff":
103     ?>
104 sysadm 1.5 <br /><img onmousewheel="return bbs_img_zoom(event, this)" src="../bbs/dl_file.php?aid=<? echo $attachment["aid"]; ?>">
105 sysadm 1.1 <?
106     break;
107     }
108     }
109     ?>
110     <br />
111     <?
112     }
113     ?>
114     </td>
115     </tr>
116 sysadm 1.3 <tr height="25">
117 sysadm 1.1 <td>
118     </td>
119     </tr>
120 sysadm 1.3 <tr height="25">
121 sysadm 1.1 <td align="right">
122     已有<font color=red><? echo $result_set["data"]["reply_count"]; ?></font>人发表评论
123     </td>
124     </tr>
125     <tr height="10">
126     <td>
127     </td>
128     </tr>
129     <tr>
130     <td align="right">
131     【<a href="/bbs/view_article.php?id=<? echo $aid; ?>" >相关评论</a>】
132     </td>
133     </tr>
134     </table>
135     </td>
136     <td>
137     </td>
138     </tr>
139 sysadm 1.3 <tr height="25">
140 sysadm 1.1 <td></td>
141     </tr>
142     </table>
143     <?
144     include "../www/foot.inc.php";
145     ?>
146     </center>
147     </body>
148     </html>

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