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

Annotation of /fenglin/www/view_article.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Sat Apr 5 04:18:25 2025 UTC (11 months, 1 week ago) by sysadm
Branch: MAIN
Changes since 1.3: +3 -0 lines
Refine

1 sysadm 1.1 <?
2     require_once "../lib/common.inc.php";
3     require_once "../lib/db_open.inc.php";
4     require_once "../lib/lml.inc.php";
5     require_once "../lib/str_process.inc.php";
6    
7     $aid = (isset($_GET["id"]) ? intval($_GET["id"]) : 0);
8     $aid = (isset($_GET["aid"]) ? intval($_GET["aid"]) : $aid);
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     echo ("文章不存在!");
28     exit();
29     }
30     mysql_free_result($rs);
31     ?>
32     <html>
33     <head>
34     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
35     <title><? echo $BBS_name; ?> - <? echo htmlspecialchars($row["title"], ENT_HTML401, 'UTF-8'); ?> </title>
36     <link rel="stylesheet" href="css/default.css" type="text/css">
37     <style type="text/css">
38     TD.content
39     {
40     font-size: 16px;
41     line-height: 26px;
42     }
43     </style>
44 sysadm 1.3 <script type="text/javascript" src="../js/img_adjust.js"></script>
45 sysadm 1.1 </head>
46     <body>
47     <center>
48     <?
49     include "./head.inc.php";
50     ?>
51     <table width="760" border="0" cellpadding="0" cellspacing="0">
52     <tr height=20 bgcolor=#F3F9FC>
53     <td width="20">&nbsp;</td>
54     <td><? echo $BBS_name; ?> &gt;&gt; <? echo split_line(htmlspecialchars($row["title"], ENT_HTML401, 'UTF-8'), "", 65, 2); ?></td>
55     <td width="200" align="right">本文已被浏览<font color=red><? echo $row["view_count"]; ?></font>次</td>
56     <td width="20">&nbsp;</td>
57     </tr>
58     <tr>
59     <td colspan=4 height=1 bgcolor=gray></td>
60     </tr>
61     <tr height=5>
62     <td>&nbsp;</td>
63     </tr>
64     </table>
65     <table width="760" border="0" cellpadding="0" cellspacing="0">
66     <tr height="20">
67     <td width="5%"></td>
68     <td width="80%"></td>
69     <td width="15%"></td>
70     </tr>
71     <tr>
72     <td></td>
73     <td valign="top">
74     <table width="95%" border="0" cellpadding="0" cellspacing="0">
75     <tr height="30">
76     <td align="center"><font size=4><b><? echo split_line(htmlspecialchars($row["title"], ENT_HTML401, 'UTF-8'), "", 65, 2); ?></b></font> <font color=gray>[<? echo ($row["transship"]?"转载":"原创"); ?>]</font></td>
77     </tr>
78     <tr height="20">
79     <td align="center">(<? echo $row["sub_dt"]; ?>) <? echo ($row["transship"]?"转载":"作者"); ?>:<? echo htmlspecialchars($row["nickname"], ENT_HTML401, 'UTF-8'); ?></td>
80     </tr>
81     <tr height="10">
82     <td></td>
83     </tr>
84     <tr height="1">
85     <td align="center" bgcolor=gray></td>
86     </tr>
87     <tr height="20">
88     <td></td>
89     </tr>
90     <tr>
91     <td class="content"><? echo LML(htmlspecialchars($content, ENT_HTML401, 'UTF-8'), true, true, 70); ?></td>
92     </tr>
93     <tr>
94     <td>
95     ========== * * * * * ==========
96     <br />
97     <?
98     $rs_attachment=mysql_query("select * from upload_file where ref_AID=".
99     $row["AID"]." and deleted=0 and deny=0 order by AID")
100     or die("Read attachment error!");
101     while($row_attachment=mysql_fetch_array($rs_attachment))
102     {
103     $filename=$row_attachment["filename"];
104     $size=$row_attachment["size"];
105     $check=$row_attachment["check"];
106     $ext=strtolower(substr($filename,(strrpos($filename,".") ? strrpos($filename,".")+1 : 0)));
107     ?>
108     <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; ?>字节)
109 sysadm 1.2 <? if ($check==0){?><font color=red>未审核</font><? } else { ?>
110 sysadm 1.1 <br>
111     <?
112     switch ($ext)
113     {
114     case "bmp":
115     case "gif":
116     case "jpg":
117     case "jpeg":
118 sysadm 1.4 case "png":
119     case "tif":
120     case "tiff":
121 sysadm 1.1 ?>
122     <img onmousewheel="return bbs_img_zoom(event, this)" src="/bbs/dl_file.php?aid=<? echo $row_attachment["AID"]; ?>">
123     <?
124     break;
125     }
126     ?>
127     <? } ?>
128     <br>
129     <?
130     }
131     mysql_free_result($rs_attachment);
132     ?>
133     </td>
134     </tr>
135     <tr height="20">
136     <td>
137     </td>
138     </tr>
139     <tr height="20">
140     <td align="right">
141     已有<font color=red><? echo $row["reply_count"]; ?></font>人发表评论
142     </td>
143     </tr>
144     <tr height="10">
145     <td>
146     </td>
147     </tr>
148     <tr>
149     <td align="right">
150     【<a href="/bbs/view_article.php?id=<? echo $aid; ?>" >相关评论</a>】
151     【<a href="javascript:self.close();" >关闭窗口</a>】
152     </td>
153     </tr>
154     </table>
155     </td>
156     <td valign="top">
157     <script type="text/javascript">
158     google_ad_client = "ca-pub-3013347141025996";
159     google_ad_slot = "1068955943";
160     google_ad_width = 120;
161     google_ad_height = 600;
162     </script>
163     <!-- fenglin_content_right -->
164     <script type="text/javascript"
165     src="//pagead2.googlesyndication.com/pagead/show_ads.js">
166     </script>
167     </td>
168     </tr>
169     <tr height="20">
170     <td></td>
171     </tr>
172     </table>
173     <?
174     mysql_close($db_conn);
175     include "./foot.inc.php";
176     ?>
177     </center>
178     </body>
179     </html>

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