我的论坛源代码(三)


Posted in PHP onOctober 09, 2006

显示主题内容页面。

<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="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="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="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="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="images/index.gif" width="70" height="20" border="0"></a></div>
    </td>
    <td>

      <div align="center"><a href="post.php"><img src="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='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="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="images/posticon.gif" width="14" height="11"><? echo $bbsmes[4]; ?></div>
          </td>
          <td width="80%">
            <div align="left"><?
          if ($useinfo[9]=="不告诉你")
          echo "<img src='images/email.gif' width='43' height='17'>";
          else echo "<a href='mailto:".$useinfo[8]."'><img src='images/email.gif' width='43' height='17' alt='给我发邮件' border='0'></a>";
          echo "

<a href='".$useinfo[9]."' ><img src='images/home.gif' width='43' height='17' alt='我的主页' border='0'></a>";
          echo "

<a href='useinfo.php?action=look'><img src='images/profile.gif' width='43' height='16' alt='我的详细信息' border='0'></a>";
          echo "

<a href='useinfo.php?action=edit'><img src='images/edit.gif' width='43' height='17' alt='修改信息' border='0'></a>";
          echo "

<a href='foxbbs.php?action=find&user=".$useinfo[0]."'><img src='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='images/quote.gif' width='43' height='17' alt='引用该用户的文章回复' border='0'></a>";
          echo "

<a href='#'><img src='images/ip.gif' border='0' alt='".$bbsmes[11]."'></a>";
         ?> </div>
          </td>
        </tr>
              </table>
    </td>
  </tr>
   <tr>
<?
$hfft="foxbbs/".substr($bbsmes[5]).".bbs";
if (file_exists($hfft))       //是否有回复
{
   $tem=@file($hfft);
   $temp=implode("",$tem);        //先把数组转变成字符串,不用加分融符
   $tem=explode("δεζ",$temp);
   $num=count($tem)-1;
   for ($i=0;$i<$num;$i++)
   {   $x=$i+1;
       $temp=explode("ㄞㄚㄓ",$tem[$i]);         //把每条回复信息分开
       if ($temp[5]>0) $temp[5]="images/".$temp[5].".gif";      //显示回复内容
       else $temp[5]="images/a.gif";
       if (!$temp[6]) $temp[6]="不想告诉你";
          echo "<tr><td><table width='100%' border='0' cellspacing='1' cellpadding='1'>";
          echo "<tr bgcolor='#009999'><td width='20%'><div align='center'><font color='#FFFFFF'>回贴作者</font></div></td>";
          echo "<td width='80%'><div align='center'><font color='#FFFFFF'>回 复 内 容 (第<font color='00ff00'>NO.".$x."</font>号)</font></div></td></tr>";
          echo "<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>";
          echo "<td width='80%'><div align='left'>".$temp[0]."</div></td></tr>";
          echo "<tr bgcolor='#009999'><td width='20%'><div align='left'><font color='#FFFFFF'><img src='images/posticon.gif' width='14' height='11'>".$temp[7]."</font></div></td>";
          echo "<td width='80%'><div align='left'>";
          echo "<a href='mailto:".$temp[4]."'><img src='images/email.gif' width='43' height='17' alt='给我发邮件' border='0'></a>";
          echo "

<a href='".$temp[3]."' ><img src='images/home.gif' width='43' height='17' alt='我的主页' border='0'></a>";
          echo "

<a href='#'><img src='images/ip.gif' border='0' alt='".$temp[8]."'></a>";
          echo "</div></td></tr>";
          echo "</table></td></tr>";
   }

}
?>
</tr>

</table>
</body>
</html> 

PHP 相关文章推荐
PHP中集成PayPal标准支付的实现方法分享
Feb 06 PHP
PHPMailer使用教程(PHPMailer发送邮件实例分析)
Dec 06 PHP
php删除与复制文件夹及其文件夹下所有文件的实现代码
Jan 23 PHP
探讨PHP使用eAccelerator的API开发详解
Jun 09 PHP
zf框架的校验器使用使用示例(自定义校验器和校验器链)
Mar 13 PHP
php二维数组合并及去重复的方法
Mar 04 PHP
PHP获取QQ达人QQ信息的方法
Mar 05 PHP
php实现在限定区域里自动调整字体大小的类实例
Apr 02 PHP
weiphp微信公众平台授权设置
Jan 04 PHP
JavaScript实现删除电脑的关机键
Jul 26 PHP
Laravel学习教程之IOC容器的介绍与用例
Aug 15 PHP
php JWT在web端中的使用方法教程
Sep 06 PHP
我的论坛源代码(四)
Oct 09 #PHP
PHP的FTP学习(三)
Oct 09 #PHP
我的论坛源代码(六)
Oct 09 #PHP
我的论坛源代码(五)
Oct 09 #PHP
杏林同学录(五)
Oct 09 #PHP
PHP的FTP学习(二)
Oct 09 #PHP
杏林同学录(四)
Oct 09 #PHP
You might like
PHP 数组实例说明
2008/08/18 PHP
php实现对两个数组进行减法操作的方法
2015/04/17 PHP
[原创]PHP正则删除html代码中a标签并保留标签内容的方法
2017/05/23 PHP
JS中==与===操作符的比较
2009/03/21 Javascript
js处理json以及字符串的比较等常用操作
2013/09/08 Javascript
Javascript Memoizer浅析
2014/10/16 Javascript
jQuery实现彩带延伸效果的网页加载条loading动画
2015/10/29 Javascript
浅析JavaScript Array和string的转换(推荐)
2016/05/20 Javascript
js放到head中失效的原因与解决方法
2017/03/07 Javascript
vue-cli单页应用改成多页应用配置详解
2017/07/14 Javascript
详解webpack与SPA实践之开发环境搭建
2017/12/18 Javascript
Vue中的scoped实现原理及穿透方法
2018/05/15 Javascript
微信小程序实现获取准确的腾讯定位地址功能示例
2019/03/27 Javascript
jQuery表单校验插件validator使用方法详解
2020/02/18 jQuery
Vue多选列表组件深入详解
2021/03/02 Vue.js
python局部赋值的规则
2013/03/07 Python
Python操作SQLite数据库的方法详解
2017/06/16 Python
Django 配置多站点多域名的实现步骤
2019/05/17 Python
Flask框架学习笔记之表单基础介绍与表单提交方式
2019/08/12 Python
8段用于数据清洗Python代码(小结)
2019/10/31 Python
python处理RSTP视频流过程解析
2020/01/11 Python
Pytorch 使用不同版本的cuda的方法步骤
2020/04/02 Python
python将音频进行变速的操作方法
2020/04/08 Python
python Selenium 库的使用技巧
2020/10/16 Python
Python实现LR1文法的完整实例代码
2020/10/25 Python
CSS3移动端vw+rem不依赖JS实现响应式布局的方法
2019/01/23 HTML / CSS
详解如何使用rem或viewport进行移动端适配
2020/08/14 HTML / CSS
HTML5实现移动端点击翻牌功能
2020/10/23 HTML / CSS
澳大利亚第一旅行车和房车配件店:Caravan RV Camping
2020/12/26 全球购物
外语系大学生自荐信范文
2014/03/01 职场文书
学习经验演讲稿
2014/05/10 职场文书
村委会贫困证明范本
2014/09/17 职场文书
综合素质评价个性发展自我评价
2015/03/06 职场文书
房产销售员2015年终工作总结
2015/10/22 职场文书
Redis数据结构之链表与字典的使用
2021/05/11 Redis
nginx反向代理配置去除前缀案例教程
2021/07/26 Servers