显示主题内容页面。
1<html>
2<head>
3<title>狐网论坛</title>
4<style type="text/css">
5P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
6DIV {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
7</style>
8<link href="js/cpcw.css" link="" rel="stylesheet"/>
include "linkfox.inc.php";
include "info.inc.php";
1</head>
2<body bgcolor="#FFFFFF" id="all" text="#000000">
3<?
4$query="select * from foxbbs where id='".$id."'"; //这个ID是从上一页面也就是FOXBBS.PHP里传过来的。
5$req=mysql_query($query);
6if ($req) {
7$bbsmes=mysql_fetch_array($req);
8$djnum=$bbsmes["djnum"]+1; //点击数加一
9$query="update foxbbs set djnum='$djnum' where id='".$id."'";
10$req=mysql_query($query);
11}
12
13$query="select * from useinfo where usename='".$bbsmes["usename"]."'"; //从用户信息库里取出发帖用户的信息
14$req=mysql_query($query);
15if ($req) {
16$useinfo=mysql_fetch_array($req);
17switch ($useinfo[11]) //因为我是用一位数字来表示用户身份
18{
19case ($useinfo[11]==1):
20$useinfo[11]="会员";
21break;
22case ($useinfo[11]==2):
23$useinfo[11]="版主";
24break;
25case ($useinfo[11]==3):
26$useinfo[11]="管理员";
27break;
28case ($useinfo[11]==4):
29$useinfo[11]="站长";
30break;
31default:
32$useinfo[11]="游客";
33break;
34}
35}
36?>
37<table border="0" cellpadding="4" cellspacing="0" width="100%">
38<tr>
39<td height="20">
40<div align="right"></div>
41</td>
42<td height="20" width="75"> </td>
43<td height="20" width="75"> </td>
44<td height="20" width="75"> </td>
45<td height="20" width="75"> </td>
46</tr>
47<tr>
48<td height="20">
49<div align="right"></div>
50</td>
51<td height="20" width="75">
52<div align="center"><a href="reguse.php?action=xy"><img border="0" height="21" src="images/top_register.gif" width="74"/></a></div>
53</td>
54<td height="20" width="75">
55<div align="center"><a href="useinfo.php?action=find"><img border="0" height="21" src="images/top_members.gif" width="74"/></a></div>
56</td>
57<td height="20" width="10%"><a href="useinfo.php?action=use"><img border="0" height="21" src="images/top_profile.gif" width="74"/></a></td>
58<td height="20" width="75"><a href="foxbbs.php?d=q"><img border="0" height="21" src="images/top_logout.gif" width="74"/></a></td>
59</tr>
60<tr>
61<td height="20">
62<div align="left">当前位置:<font color="#0000FF">狐网─>狐网论坛─>论题:</font></div>
63</td>
64<td>
65<div align="center"><a href="foxbbs.php"><img border="0" height="20" src="images/index.gif" width="70"/></a></div>
66</td>
67<td>
68<div align="center"><a href="post.php"><img alt="发布新帖" border="0" height="20" src="images/newthread.gif" width="70"/></a></div>
69</td>
70<td height="20" width="10%">
71<div align="center"><? echo "<a href='repal.php?action=add&id=".$id."&zt=".$bbsmes[3]."&use=".$use."'><img alt="回复此贴" border="0" height="20" src="images/reply.gif" width="70"/>"; ?></div>
72</td>
73<td height="20" width="10%">
74<div align="center"><a href="reguse.php?action=dl"><img border="0" height="20" src="images/dl.gif" width="70"/></a></div>
75</td>
76</tr>
77</table>
78<table border="0" cellpadding="0" cellspacing="0" width="100%">
79<tr bgcolor="#000000">
80<td colspan="2">
81<table border="0" cellpadding="1" cellspacing="1" width="100%">
82<tr bgcolor="#009999">
83<td width="20%">
84<div align="center"><font color="#FFFFFF">原贴作者</font></div>
85</td>
86<td width="80%">
87<div align="center"><font color="#FFFFFF">原 贴 内 容</font></div>
88</td>
89</tr>
90<tr bgcolor="#eeeeee" valign="top">
91<td width="20%">
92<div align="center"> <? //在用户信息库里没存放表情图象的路径和扩展名
93echo $useinfo[2]."<br>";
94echo "<img .gif="" src='images/".$bbsmes[2]."'/><br/>";
95echo $useinfo[11]."<p>";
96echo "发帖数 [".$useinfo["ftnum"]."]<br/>";
97?></p></div>
98</td>
99<td width="80%"><div align="left"> <?
100$ft="foxbbs/".$bbsmes[5].".fox"; //取出存放的文件名
101$message=@file($ft); //读出文件内容
102for ($i=0;$i<count($message);$i++)
103{ if (ord(substr($message[$i],0,1))==161) //第一位是否全角空格
104echo $message[$i];
105else {
106$message[$i]=" ".trim($message[$i]);
107echo $message[$i]; //显示主题内容
108}
109}
110?></div></td>
111</tr>
112<tr bgcolor="#009999">
113<td width="20%">
114<div align="left"><img height="11" src="images/posticon.gif" width="14"/><? echo $bbsmes[4]; ?></div>
115</td>
116<td width="80%">
117<div align="left"><?
118if ($useinfo[9]=="不告诉你")
119echo "<img src='images/email.gif' width='43' height='17'>";
120else echo "<a href='mailto:".$useinfo[8]."'><img alt="给我发邮件" border="0" height="17" src="images/email.gif" width="43"/></a>";
121echo " <a href='".$useinfo[9]."'><img alt="我的主页" border="0" height="17" src="images/home.gif" width="43"/></a>";
122echo " <a href="useinfo.php?action=look"><img alt="我的详细信息" border="0" height="16" src="images/profile.gif" width="43"/></a>";
123echo " <a href="useinfo.php?action=edit"><img alt="修改信息" border="0" height="17" src="images/edit.gif" width="43"/></a>";
124echo " <a href='foxbbs.php?action=find&user=".$useinfo[0]."'><img alt="查找该用户的所以文章" border="0" height="17" src="images/find.gif" width="43"/></a>";
125echo " <a href='repal.php?action=add&use=".$useinfo[13]."&id=".$id."&zt=".$bbsmes[3]."&c=dd'><img alt="引用该用户的文章回复" border="0" height="17" src="images/quote.gif" width="43"/></a>";
126echo " <a href="#"><img alt='".$bbsmes[11]."' border="0" src="images/ip.gif"/></a>";
127?> </div>
128</td>
129</tr>
130</table>
131</td>
132</tr>
133<tr>
134<?
135$hfft="foxbbs/".substr($bbsmes[5]).".bbs";
136if (file_exists($hfft)) //是否有回复
137{
138$tem=@file($hfft);
139$temp=implode("",$tem); //先把数组转变成字符串,不用加分融符
140$tem=explode("δεζ",$temp);
141$num=count($tem)-1;
142for ($i=0;$i<$num;$i++)
143{ $x=$i+1;
144$temp=explode("ㄞㄚㄓ",$tem[$i]); //把每条回复信息分开
145if ($temp[5]>0) $temp[5]="images/".$temp[5].".gif"; //显示回复内容
146else $temp[5]="images/a.gif";
147if (!$temp[6]) $temp[6]="不想告诉你";
148echo "<tr><td><table border="0" cellpadding="1" cellspacing="1" width="100%">";
149echo "<tr bgcolor="#009999"><td width="20%"><div align="center"><font color="#FFFFFF">回贴作者</font></div></td>";
150echo "<td width="80%"><div align="center"><font color="#FFFFFF">回 复 内 容 (第<font color="00ff00">NO.".$x."</font>号)</font></div></td></tr>";
151echo "<tr bgcolor="#eeeeee" valign="top"><td width="20%"><div align="center">".$temp[1]."<br/><img src='".$temp[5]."'/><br/>OICQ:".$temp[2]."<br/>来自:".$temp[6]."<font color="#FFFFFF"></font></div></td>";
152echo "<td width="80%"><div align="left">".$temp[0]."</div></td></tr>";
153echo "<tr bgcolor="#009999"><td width="20%"><div align="left"><font color="#FFFFFF"><img height="11" src="images/posticon.gif" width="14"/>".$temp[7]."</font></div></td>";
154echo "<td width="80%"><div align="left">";
155echo "<a href='mailto:".$temp[4]."'><img alt="给我发邮件" border="0" height="17" src="images/email.gif" width="43"/></a>";
156echo " <a href='".$temp[3]."'><img alt="我的主页" border="0" height="17" src="images/home.gif" width="43"/></a>";
157echo " <a href="#"><img alt='".$temp[8]."' border="0" src="images/ip.gif"/></a>";
158echo "</div></td></tr>";
159echo "</table></td></tr>";
160}
161
162}
163?>
164</tr>
165</table>
166</body>
167</html>