/[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.4 - (show annotations)
Sun Mar 9 07:30:37 2025 UTC (12 months, 1 week ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
Merge view_article_body.inc.php to view_article.php

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

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