/[LeafOK_CVS]/fenglin/bbs/view_article_body.inc.php
ViewVC logotype

Contents of /fenglin/bbs/view_article_body.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Sun Mar 2 02:32:55 2025 UTC (12 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.1: +2 -2 lines
Remove ip query feature
Fix minor bug

1 <?
2 require_once "./lml.inc.php";
3 require_once "./user_level.inc.php";
4 require_once "./photo_path.inc.php";
5 require_once "./ip_mask.inc.php";
6 ?>
7 <?
8 $color[0]="#f0F3Fa";
9 $color[1]="#FAFBFC";
10 $color_index=0;
11 $color_count=2;
12
13 $rs=mysql_query("SELECT * from bbs".
14 " where AID=$id and TID=0 and visible and ".$ex_str.
15 " limit 1")
16 or die("Query article error!");
17 $row=mysql_fetch_array($rs) or die("Read article error!");
18
19 $rs_content=mysql_query("select content from bbs_content where CID=".$row["CID"])
20 or die("Read content error!");
21 if($row_content=mysql_fetch_array($rs_content))
22 $content=$row_content["content"];
23 else
24 $content="";
25 mysql_free_result($rs_content);
26 ?>
27 <table bgcolor="<? echo $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="10" width="770">
28 <tr>
29 <td width="20%">
30 </td>
31 <td width="75%">
32 <?
33 echo ("<script language=JavaScript>\n");
34 echo ("show_ctrl_bar(".$row["UID"].",".$id.",".$row["AID"].");\n");
35 echo ("</script>\n");
36 ?>
37 </td>
38 <td width="5%">
39 </td>
40 </tr>
41 <tr>
42 <td width="20%" align="center">
43 作者:&nbsp;<a class="s2" href="javascript:show_profile(<? echo $row["UID"]; ?>)" title="查看用户资料"><? echo $row["username"]; ?></a>
44 </td>
45 <td width="75%" class="body">
46 <span style="color:#606060;">标题:</span>&nbsp;<img src="images/expression/<? echo $row["icon"]; ?>.gif">&nbsp;<span style="color:#909090; "><? echo $row["title"]; ?></span><? if ($row["transship"]) { ?><span style="color:red">[转载]</span><? } ?>
47 </td>
48 <td width="5%">
49 </td>
50 </tr>
51 <tr>
52 <td align="center">
53 昵称:&nbsp;<span style="color:#909090;"><? echo $row["nickname"]; ?></span>
54 </td>
55 <td class="body">
56 <span style="color:#606060;">来自:</span>&nbsp;<span style="color:#909090; "><? echo ip_mask($row["sub_ip"]); ?></span>
57 </td>
58 <td>
59 </td>
60 </tr>
61 <tr>
62 <td align="center">
63 经验值:&nbsp;<span style="color:red;"><? echo $row["exp"]; ?></span>
64 </td>
65 <td class="body">
66 <span style="color:#606060;">发贴时间:</span>&nbsp;<span style="color:#909090; "><? echo date("Y年m月d日 H:i:s",strtotime($row["sub_dt"])); ?></span>
67 </td>
68 <td>
69 </td>
70 </tr>
71 <tr>
72 <td align="center">
73 等级:&nbsp;<span style="color:#909090;"><? echo user_level($row["exp"]); ?></span>
74 </td>
75 <td class="body">
76 <span style="color:#606060;">长度:</span>&nbsp;<span style="color:#909090; "><? echo $row["length"]; ?>字</span>
77 </td>
78 <td>
79 </td>
80 </tr>
81 <tr height="2">
82 <td>
83 </td>
84 <td style="background-color:#909090;">
85 </td>
86 <td>
87 </td>
88 </tr>
89 <tr>
90 <td align="center" valign="top">
91 <img src="<? echo photo_path($row["UID"],$db_conn); ?>" border="0">
92 </td>
93 <td style="font-size: 14px; ">
94 <? echo LML(htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, 'UTF-8'),true); ?>
95 </td>
96 <td>
97 </td>
98 </tr>
99 <tr>
100 <td>
101 </td>
102 <td style="color:#000000; ">
103 ========== * * * * * ==========
104 <br>
105 <?
106 $rs_attachment=mysql_query("select * from upload_file where ref_AID=".
107 $row["AID"]." and deleted=0 and deny=0")
108 or die("Read attachment error!");
109 while($row_attachment=mysql_fetch_array($rs_attachment))
110 {
111 $filename=$row_attachment["filename"];
112 $size=$row_attachment["size"];
113 $check=$row_attachment["check"];
114 $ext=strtolower(substr($filename,(strrpos($filename,".") ? strrpos($filename,".")+1 : 0)));
115 ?>
116 <img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>" target="_target"><? echo $filename; ?></a> (<? echo $size; ?>字节)
117 <? if ($check==0){?><font color=red>未验证</font><? } else { ?>
118 <br>
119 <?
120 switch ($ext)
121 {
122 case "bmp":
123 case "gif":
124 case "jpg":
125 case "jpeg":
126 ?>
127 <img onmousewheel="return bbs_img_zoom(event,this)" src="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>">
128 <?
129 break;
130 case "swf":
131 ?>
132 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
133 <param name=movie value="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>">
134 <param name=quality value=high>
135 <embed src="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>" quality=high type="application/x-shockwave-flash">
136 </embed>
137 </object>
138 <?
139 break;
140 }
141 ?>
142 <? } ?>
143 <br>
144 <?
145 }
146 mysql_free_result($rs_attachment);
147 ?>
148 </td>
149 <td>
150 </td>
151 </tr>
152 </table>
153 <?
154 mysql_free_result($rs);
155
156 $rs=mysql_query("SELECT * from bbs".
157 " where TID=$id and visible and ".$ex_str.
158 " order by sub_dt")
159 or die("Read reply error!");
160
161 while($row=mysql_fetch_array($rs))
162 {
163 $color_index=($color_index+1)%$color_count;
164
165 $rs_content=mysql_query("select content from bbs_content where CID=".$row["CID"])
166 or die("Read content error!");
167 if($row_content=mysql_fetch_array($rs_content))
168 $content=$row_content["content"];
169 else
170 $content="";
171 mysql_free_result($rs_content);
172 ?>
173 <a name="<? echo $row["AID"]; ?>"></a>
174 <table bgcolor="<? echo $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="0" width="770">
175 <tr height="1" bgcolor="#202020">
176 <td colspan="3">
177 </td>
178 </tr>
179 </table>
180 <table bgcolor="<? echo $color[$color_index]; ?>" border="0" cellpadding="0" cellspacing="10" width="770">
181 <tr>
182 <td width="20%">
183 </td>
184 <td width="75%">
185 <?
186 echo ("<script language=JavaScript>\n");
187 echo ("show_ctrl_bar(".$row["UID"].",".$id.",".$row["AID"].");\n");
188 echo ("</script>\n");
189 ?>
190 </td>
191 <td width="5%">
192 </td>
193 </tr>
194 <tr>
195 <td width="20%" align="center">
196 作者:&nbsp;<a class="s2" href="javascript:show_profile(<? echo $row["UID"]; ?>)" title="查看用户资料"><? echo $row["username"]; ?></a>
197 </td>
198 <td width="75%" class="body">
199 <span style="color:#606060;">标题:</span>&nbsp;<img src="images/expression/<? echo $row["icon"]; ?>.gif">&nbsp;<span style="color:#909090; "><? echo $row["title"]; ?></span>
200 </td>
201 <td width="5%">
202 </td>
203 </tr>
204 <tr>
205 <td align="center">
206 昵称:&nbsp;<span style="color:#909090;"><? echo $row["nickname"]; ?></span>
207 </td>
208 <td class="body">
209 <span style="color:#606060;">来自:</span>&nbsp;<span style="color:#909090; "><? echo ip_mask($row["sub_ip"]); ?></span>
210 </td>
211 <td>
212 </td>
213 </tr>
214 <tr>
215 <td align="center">
216 经验值:&nbsp;<span style="color:red;"><? echo $row["exp"]; ?></span>
217 </td>
218 <td class="body">
219 <span style="color:#606060;">发贴时间:</span>&nbsp;<span style="color:#909090; "><? echo date("Y年m月d日 H:i:s",strtotime($row["sub_dt"])); ?></span>
220 </td>
221 <td>
222 </td>
223 </tr>
224 <tr>
225 <td align="center">
226 等级:&nbsp;<span style="color:#909090;"><? echo user_level($row["exp"]); ?></span>
227 </td>
228 <td class="body">
229 <span style="color:#606060;">长度:</span>&nbsp;<span style="color:#909090; "><? echo $row["length"]; ?>字</span>
230 </td>
231 <td>
232 </td>
233 </tr>
234 <tr height="2">
235 <td>
236 </td>
237 <td style="background-color:#909090; ">
238 </td>
239 <td>
240 </td>
241 </tr>
242 <tr>
243 <td align="center" valign="top">
244 <img src="<? echo photo_path($row["UID"],$db_conn); ?>" border="0">
245 </td>
246 <td style="font-size: 14px; ">
247 <? echo LML(htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, 'UTF-8'),true); ?>
248 </td>
249 <td>
250 </td>
251 </tr>
252 <tr>
253 <td>
254 </td>
255 <td style="color:#000000; ">
256 ========== * * * * * ==========
257 <br>
258 <?
259 $rs_attachment=mysql_query("select * from upload_file where ref_AID=".
260 $row["AID"]." and deleted=0 and deny=0")
261 or die("Read attachment error!");
262 while($row_attachment=mysql_fetch_array($rs_attachment))
263 {
264 $filename=$row_attachment["filename"];
265 $size=$row_attachment["size"];
266 $check=$row_attachment["check"];
267 $ext=strtolower(substr($filename,(strrpos($filename,".") ? strrpos($filename,".")+1 : 0)));
268 ?>
269 <img src="images/closed.gif"><a class="s2" href="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>" target="_target"><? echo $filename; ?></a> (<? echo $size; ?>字节)
270 <? if ($check==0){?><font color=red>未验证</font><? } else { ?>
271 <br>
272 <?
273 switch ($ext)
274 {
275 case "bmp":
276 case "gif":
277 case "jpg":
278 case "jpeg":
279 ?>
280 <img onmousewheel="return bbs_img_zoom(event,this)" src="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>">
281 <?
282 break;
283 case "swf":
284 ?>
285 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
286 <param name=movie value="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>">
287 <param name=quality value=high>
288 <embed src="dl_file.php?aid=<? echo $row_attachment["AID"]; ?>" quality=high type="application/x-shockwave-flash">
289 </embed>
290 </object>
291 <?
292 break;
293 }
294 ?>
295 <? } ?>
296 <br>
297 <?
298 }
299 mysql_free_result($rs_attachment);
300 ?>
301 </td>
302 <td>
303 </td>
304 </tr>
305 </table>
306 <?
307 flush();
308 }
309 mysql_free_result($rs);
310 ?>

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