/[LeafOK_CVS]/fenglin/www/show_article.php
ViewVC logotype

Annotation of /fenglin/www/show_article.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations)
Sat Mar 1 09:08:07 2025 UTC (12 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.7: +13 -16 lines
Convert GB2312 to UTF-8

1 sysadm 1.1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2     <?
3     require_once "./lml.inc.php";
4     $db_conn=include "./db_open.inc.php";
5     if (isset($_GET["aid"]))
6     $aid=intval($_GET["aid"]);
7     else
8     $aid=0;
9    
10     $rs=mysql_query("select * from bbs where AID=$aid and ".
11     "TID=0 and visible and SID>0 limit 1")
12     or die("Query article error!");
13     if ($row=mysql_fetch_array($rs))
14     {
15     mysql_query("update bbs set view_count=view_count+1 where AID=".$row["AID"])
16     or die("Update article error!");
17     $rs_content=mysql_query("select content from bbs_content where CID=".$row["CID"])
18     or die("Read content error!");
19     if($row_content=mysql_fetch_array($rs_content))
20     $content=$row_content["content"];
21     else
22     $content="";
23     mysql_free_result($rs_content);
24     }
25     else
26     {
27 sysadm 1.8 echo ("文章不存在!");
28 sysadm 1.1 exit();
29     }
30     mysql_free_result($rs);
31     ?>
32     <html>
33     <head>
34 sysadm 1.8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
35     <title>枫林在线 - <? echo $row["title"]; ?> </title>
36 sysadm 1.1 <link rel="stylesheet" href="css/default.css" type="text/css">
37     <style type="text/css">
38    
39     TD.content
40     {
41     font-size: 16px;
42     line-height: 26px;
43     }
44    
45     </style>
46    
47     <script language="JavaScript" src="/js/bbs_article.js"></script>
48     </head>
49    
50     <body>
51     <center>
52     <?
53     include "./head.inc.php";
54     ?>
55     <table width="760" border="0" cellpadding="0" cellspacing="0">
56     <tr height=20 bgcolor=#F3F9FC>
57     <td width="20">&nbsp;</td>
58 sysadm 1.8 <td>枫林在线 &gt;&gt; <? echo $row["title"]; ?> </td>
59     <td width="200" align="right">本文已被浏览<font color=red><? echo $row["view_count"]; ?></font>次</td>
60 sysadm 1.1 <td width="20">&nbsp;</td>
61     </tr>
62     <tr>
63     <td colspan=4 height=1 bgcolor=gray></td>
64     </tr>
65     <tr height=5>
66     <td>&nbsp;</td>
67     </tr>
68     </table>
69     <table width="760" border="0" cellpadding="0" cellspacing="0">
70     <tr height="20">
71 sysadm 1.2 <td width="5%"></td>
72 sysadm 1.5 <td width="80%"></td>
73     <td width="15%"></td>
74 sysadm 1.1 </tr>
75     <tr>
76     <td></td>
77     <td>
78     <table width="95%" border="0" cellpadding="0" cellspacing="0">
79     <tr height="30">
80 sysadm 1.8 <td align="center"><font size=4><b><? echo $row["title"]; ?> </b></font><font color=gray>[<? echo ($row["transship"]?"转载":"原创"); ?>]</font></td>
81 sysadm 1.1 </tr>
82     <tr height="20">
83 sysadm 1.8 <td align="center">(<? echo $row["sub_dt"]; ?>) <? echo ($row["transship"]?"转载":"作者"); ?>:<? echo $row["nickname"]; ?></td>
84 sysadm 1.1 </tr>
85     <tr height="10">
86     <td></td>
87     </tr>
88     <tr height="1">
89     <td align="center" bgcolor=gray></td>
90     </tr>
91     <tr height="20">
92     <td></td>
93     </tr>
94     <tr>
95 sysadm 1.8 <td class="content"><? echo LML(htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, 'UTF-8'),true,true,1024); ?></td>
96 sysadm 1.1 </tr>
97     <tr>
98     <td>
99     ========== * * * * * ==========
100     <br>
101     <?
102     $rs_attachment=mysql_query("select * from upload_file where ref_AID=".
103     $row["AID"]." and deleted=0 and deny=0 order by AID")
104     or die("Read attachment error!");
105     while($row_attachment=mysql_fetch_array($rs_attachment))
106     {
107     $filename=$row_attachment["filename"];
108     $size=$row_attachment["size"];
109     $check=$row_attachment["check"];
110     $ext=strtolower(substr($filename,(strrpos($filename,".") ? strrpos($filename,".")+1 : 0)));
111     ?>
112 sysadm 1.8 <img src="images/dl.gif"><a class="s2" href="/bbs/dl_file.php?aid=<? echo $row_attachment["AID"]; ?>" target="_target"><? echo $filename; ?></a> (<? echo $size; ?>字节)
113     <? if ($check==0){?><font color=red>未验证</font><? } else { ?>
114 sysadm 1.1 <br>
115     <?
116     switch ($ext)
117     {
118     case "bmp":
119     case "gif":
120     case "jpg":
121     case "jpeg":
122     ?>
123     <img onmousewheel="return bbs_img_zoom(event,this)" src="/bbs/dl_file.php?aid=<? echo $row_attachment["AID"]; ?>">
124     <?
125     break;
126     case "swf":
127     ?>
128     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
129     <param name=movie value="/bbs/dl_file.php?aid=<? echo $row_attachment["AID"]; ?>">
130     <param name=quality value=high>
131     <embed src="/bbs/dl_file.php?aid=<? echo $row_attachment["AID"]; ?>" quality=high type="application/x-shockwave-flash">
132     </embed>
133     </object>
134     <?
135     break;
136     }
137     ?>
138     <? } ?>
139     <br>
140     <?
141     }
142     mysql_free_result($rs_attachment);
143     ?>
144     </td>
145     </tr>
146     <tr height="20">
147     <td>
148     </td>
149     </tr>
150     <tr height="20">
151     <td align="right">
152 sysadm 1.8 已有<font color=red><? echo $row["reply_count"]; ?></font>人发表评论
153 sysadm 1.1 </td>
154     </tr>
155     <tr height="10">
156     <td>
157     </td>
158     </tr>
159     <tr>
160     <td align="right">
161 sysadm 1.8 【<a href="/bbs/view_article.php?id=<? echo $aid; ?>" >相关评论</a>】
162     【<a href="javascript:self.close();" >关闭窗口</a>】
163 sysadm 1.1 </td>
164     </tr>
165     </table>
166     </td>
167 sysadm 1.2 <td valign="top">
168 sysadm 1.7 <script type="text/javascript">
169     google_ad_client = "ca-pub-3013347141025996";
170     google_ad_slot = "1068955943";
171     google_ad_width = 120;
172     google_ad_height = 600;
173 sysadm 1.3 </script>
174 sysadm 1.7 <!-- fenglin_content_right -->
175 sysadm 1.3 <script type="text/javascript"
176 sysadm 1.7 src="//pagead2.googlesyndication.com/pagead/show_ads.js">
177 sysadm 1.3 </script>
178 sysadm 1.2 </td>
179 sysadm 1.1 </tr>
180     <tr height="20">
181     <td></td>
182     </tr>
183     </table>
184     <?
185     mysql_close($db_conn);
186     include "./foot.inc.php";
187     ?>
188     </center>
189     </body>
190     </html>

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