我的论坛源代码(三)
作者:未知 来源:转载 发布时间:2005-7-30 20:52:31 发布人:acx
显示主题内容页面。
<HTML>
<HEAD>
<TITLE>狐网论坛</TITLE>
<STYLE type=text/css>
P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
DIV {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
</STYLE>
<LINK href="js/cpcw.css" rel=stylesheet /LINK>
<?php
include "linkfox.inc.php";
include "info.inc.php";
?>
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" id=all>
<?
$query="select * from foxbbs where id='".$id."'"; //这个ID是从上一页面也就是FOXBBS.PHP里传过来的。
$req=mysql_query($query);
if ($req) {
$bbsmes=mysql_fetch_array($req);
$djnum=$bbsmes["djnum"]+1; //点击数加一
$query="update foxbbs set djnum='$djnum' where id='".$id."'";
$req=mysql_query($query);
}
$query="select * from useinfo where usename='".$bbsmes["usename"]."'"; //从用户信息库里取出发帖用户的信息
$req=mysql_query($query);
if ($req) {
$useinfo=mysql_fetch_array($req);
switch ($useinfo[11]) //因为我是用一位数字来表示用户身份
{
case ($useinfo[11]==1):
$useinfo[11]="会员";
break;
case ($useinfo[11]==2):
$useinfo[11]="版主";
break;
case ($useinfo[11]==3):
$useinfo[11]="管理员";
break;
case ($useinfo[11]==4):
$useinfo[11]="站长";
break;
default:
$useinfo[11]="游客";
break;
}
}
?>
<table width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>
<td height="20">
<div align="right"></div>
</td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
</tr>
<tr>
<td height="20">
<div align="right"></div>
</td>
<td height="20" width="75">
<div align="center"><a href="reguse.php?action=xy"><img src="http://www.7880.com/Info/images/top_register.gif" width="74" height="21" border="0"></a></div>
</td>
<td height="20" width="75">
<div align="center"><a href="useinfo.php?action=find"><img src="http://www.7880.com/Info/images/top_members.gif" width="74" height="21" border="0"></a></div>
</td>
<td height="20" width="10%"><a href="useinfo.php?action=use"><img src="http://www.7880.com/Info/images/top_profile.gif" width="74" height="21" border="0"></a></td>
<td height="20" width="75"><a href="foxbbs.php?d=q"><img src="http://www.7880.com/Info/images/top_logout.gif" width="74" height="21" border="0"></a></td>
</tr>
<tr>
<td height="20">
<div align="left">当前位置:<font color="#0000FF">狐网─>狐网论坛─>论题:</font></div>
</td>
<td>
<div align="center"><a href="foxbbs.php"><img src="http://www.7880.com/Info/images/index.gif" width="70" height="20" border="0"></a></div>
</td>
<td>
<div align="center"><a href="post.php"><img src="http://www.7880.com/Info/images/newthread.gif" width="70" height="20" border="0" alt="发布新帖"></a></div>
</td>
<td height="20" width="10%">
<div align="center"><? echo "<a href='repal.php?action=add&id;=".$id."&zt;=".$bbsmes[3]."&use;=".$use."'><img src='http://www.7880.com/Info/images/reply.gif' width='70' height='20' border='0' alt='回复此贴'></a>"; ?></div>
</td>
<td height="20" width="10%">
<div align="center"><a href="reguse.php?action=dl"><img src="http://www.7880.com/Info/images/dl.gif" width="70" height="20" border="0"></a></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#000000">
<td colspan="2">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr bgcolor="#009999">
<td width="20%">
<div align="center"><font color="#FFFFFF">原贴作者</font></div>
</td>
<td width="80%">
<div align="center"><font color="#FFFFFF">原 贴 内 容</font></div>
</td>
</tr>
<tr bgcolor="#eeeeee" valign="top">
<td width="20%">
<div align="center"> <? //在用户信息库里没存放表情图象的路径和扩展名
echo $useinfo[2]."<br>";
echo "<img src='images/".$bbsmes[2]."'.gif><br>";
echo $useinfo[11]."<p>";
echo "发帖数 [".$useinfo["ftnum"]."]<br>";
?></div>
</td>
<td width="80%"><div align="left"> <?
$ft="foxbbs/".$bbsmes[5].".fox"; //取出存放的文件名
$message=@file($ft); //读出文件内容
for ($i=0;$i<count($message);$i++)
{ if (ord(substr($message[$i],0,1))==161) //第一位是否全角空格
echo $message[$i];
else {
$message[$i]=" ".trim($message[$i]);
echo $message[$i]; //显示主题内容
}
}
?></div></td>
</tr>
<tr bgcolor="#009999">
<td width="20%">
<div align="left"><img src="http://www.7880.com/Info/http://www.7880.com/Info/images/posticon.gif" width="14" height="11"><? echo $bbsmes[4]; ?></div>
</td>
<td width="80%">
<div align="left"><?
if ($useinfo[9]=="不告诉你")
echo "<img src='http://www.7880.com/Info/images/email.gif' width='43' height='17'>";
else echo "<a href='mailto:".$useinfo[8]."'><img src='http://www.7880.com/Info/images/email.gif' width='43' height='17' alt='给我发邮件' border='0'></a>";
echo " <a href='".$useinfo[9]."' ><img src='http://www.7880.com/Info/images/home.gif' width='43' height='17' alt='我的主页' border='0'></a>";
echo " <a href='useinfo.php?action=look'><img src='http://www.7880.com/Info/images/profile.gif' width='43' height='16' alt='我的详细信息' border='0'></a>";
echo " <a href='useinfo.php?action=edit'><img src='http://www.7880.com/Info/images/edit.gif' width='43' height='17' alt='修改信息' border='0'></a>";
echo " <a href='foxbbs.php?action=find&user;=".$useinfo[0]."'><img src='http://www.7880.com/Info/images/find.gif' width='43' height='17' alt='查找该用户的所以文章' border='0'></a>";
echo " <a href='repal.php?action=add&use;=".$useinfo[13]."&id;=".$id."&zt;=".$bbsmes[3]."&c;=dd'><img src='http:/
<HTML>
<HEAD>
<TITLE>狐网论坛</TITLE>
<STYLE type=text/css>
P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
DIV {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
</STYLE>
<LINK href="js/cpcw.css" rel=stylesheet /LINK>
<?php
include "linkfox.inc.php";
include "info.inc.php";
?>
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" id=all>
<?
$query="select * from foxbbs where id='".$id."'"; //这个ID是从上一页面也就是FOXBBS.PHP里传过来的。
$req=mysql_query($query);
if ($req) {
$bbsmes=mysql_fetch_array($req);
$djnum=$bbsmes["djnum"]+1; //点击数加一
$query="update foxbbs set djnum='$djnum' where id='".$id."'";
$req=mysql_query($query);
}
$query="select * from useinfo where usename='".$bbsmes["usename"]."'"; //从用户信息库里取出发帖用户的信息
$req=mysql_query($query);
if ($req) {
$useinfo=mysql_fetch_array($req);
switch ($useinfo[11]) //因为我是用一位数字来表示用户身份
{
case ($useinfo[11]==1):
$useinfo[11]="会员";
break;
case ($useinfo[11]==2):
$useinfo[11]="版主";
break;
case ($useinfo[11]==3):
$useinfo[11]="管理员";
break;
case ($useinfo[11]==4):
$useinfo[11]="站长";
break;
default:
$useinfo[11]="游客";
break;
}
}
?>
<table width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>
<td height="20">
<div align="right"></div>
</td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
</tr>
<tr>
<td height="20">
<div align="right"></div>
</td>
<td height="20" width="75">
<div align="center"><a href="reguse.php?action=xy"><img src="http://www.7880.com/Info/images/top_register.gif" width="74" height="21" border="0"></a></div>
</td>
<td height="20" width="75">
<div align="center"><a href="useinfo.php?action=find"><img src="http://www.7880.com/Info/images/top_members.gif" width="74" height="21" border="0"></a></div>
</td>
<td height="20" width="10%"><a href="useinfo.php?action=use"><img src="http://www.7880.com/Info/images/top_profile.gif" width="74" height="21" border="0"></a></td>
<td height="20" width="75"><a href="foxbbs.php?d=q"><img src="http://www.7880.com/Info/images/top_logout.gif" width="74" height="21" border="0"></a></td>
</tr>
<tr>
<td height="20">
<div align="left">当前位置:<font color="#0000FF">狐网─>狐网论坛─>论题:</font></div>
</td>
<td>
<div align="center"><a href="foxbbs.php"><img src="http://www.7880.com/Info/images/index.gif" width="70" height="20" border="0"></a></div>
</td>
<td>
<div align="center"><a href="post.php"><img src="http://www.7880.com/Info/images/newthread.gif" width="70" height="20" border="0" alt="发布新帖"></a></div>
</td>
<td height="20" width="10%">
<div align="center"><? echo "<a href='repal.php?action=add&id;=".$id."&zt;=".$bbsmes[3]."&use;=".$use."'><img src='http://www.7880.com/Info/images/reply.gif' width='70' height='20' border='0' alt='回复此贴'></a>"; ?></div>
</td>
<td height="20" width="10%">
<div align="center"><a href="reguse.php?action=dl"><img src="http://www.7880.com/Info/images/dl.gif" width="70" height="20" border="0"></a></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#000000">
<td colspan="2">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr bgcolor="#009999">
<td width="20%">
<div align="center"><font color="#FFFFFF">原贴作者</font></div>
</td>
<td width="80%">
<div align="center"><font color="#FFFFFF">原 贴 内 容</font></div>
</td>
</tr>
<tr bgcolor="#eeeeee" valign="top">
<td width="20%">
<div align="center"> <? //在用户信息库里没存放表情图象的路径和扩展名
echo $useinfo[2]."<br>";
echo "<img src='images/".$bbsmes[2]."'.gif><br>";
echo $useinfo[11]."<p>";
echo "发帖数 [".$useinfo["ftnum"]."]<br>";
?></div>
</td>
<td width="80%"><div align="left"> <?
$ft="foxbbs/".$bbsmes[5].".fox"; //取出存放的文件名
$message=@file($ft); //读出文件内容
for ($i=0;$i<count($message);$i++)
{ if (ord(substr($message[$i],0,1))==161) //第一位是否全角空格
echo $message[$i];
else {
$message[$i]=" ".trim($message[$i]);
echo $message[$i]; //显示主题内容
}
}
?></div></td>
</tr>
<tr bgcolor="#009999">
<td width="20%">
<div align="left"><img src="http://www.7880.com/Info/http://www.7880.com/Info/images/posticon.gif" width="14" height="11"><? echo $bbsmes[4]; ?></div>
</td>
<td width="80%">
<div align="left"><?
if ($useinfo[9]=="不告诉你")
echo "<img src='http://www.7880.com/Info/images/email.gif' width='43' height='17'>";
else echo "<a href='mailto:".$useinfo[8]."'><img src='http://www.7880.com/Info/images/email.gif' width='43' height='17' alt='给我发邮件' border='0'></a>";
echo " <a href='".$useinfo[9]."' ><img src='http://www.7880.com/Info/images/home.gif' width='43' height='17' alt='我的主页' border='0'></a>";
echo " <a href='useinfo.php?action=look'><img src='http://www.7880.com/Info/images/profile.gif' width='43' height='16' alt='我的详细信息' border='0'></a>";
echo " <a href='useinfo.php?action=edit'><img src='http://www.7880.com/Info/images/edit.gif' width='43' height='17' alt='修改信息' border='0'></a>";
echo " <a href='foxbbs.php?action=find&user;=".$useinfo[0]."'><img src='http://www.7880.com/Info/images/find.gif' width='43' height='17' alt='查找该用户的所以文章' border='0'></a>";
echo " <a href='repal.php?action=add&use;=".$useinfo[13]."&id;=".$id."&zt;=".$bbsmes[3]."&c;=dd'><img src='http:/
上一篇:我的论坛源代码(二)
下一篇:我的论坛源代码(四)