我的论坛源代码(九)

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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">
<?
$query="select * from foxbbs where id='".$bbsid."'";
$req=mysql_query($query);
if ($req) {
$bbsmes=mysql_fetch_array($req);
$djnum=$bbsmes["djnum"]+1;
$query="update foxbbs set djnum='$djnum' where id='".$bbsid."'";
$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;
      }
}
if ($lock==yes)
{
$query="update foxbbs set lockes=1 where id='".$bbsid."'";
$req=mysql_query($query);
if ($req)
{
err_info("锁定成功");
echo "<script language='JavaScript'> javascript:location.href='superuse.php?d=editbbs'; </script>;";
echo "<div align='center'><a href='superuse.php?d=editbbs'>信息修改成功,返回</a></div>";
}
}
if ($unlock==yes)
{
$query="update foxbbs set lockes=0 where id='".$bbsid."'";
$req=mysql_query($query);
if ($req)
{
err_info("锁定成功");
echo "<script language='JavaScript'> javascript:location.href='superuse.php?d=editbbs'; </script>;";
echo "<div align='center'><a href='superuse.php?d=editbbs'>信息修改成功,返回</a></div>";
}
}
?>
<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>
        <tr bgcolor="#ffffff"><td colspan="2"><div align="center"><form  method="post"><input type="checkbox" name="lock"  value="yes">锁住?<input type="checkbox" name="unlock"  value="yes">解锁?<input type="submit" name="Submit" value="确定"></form></div></td></tr>
       </table>
    </td>
  </tr>
</table>
</body>
</html>

(0)

相关推荐

  • 我的论坛源代码(九)

    <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <STYLE type=text/css> P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt} DI

  • 我的论坛源代码(一)

    其实写这几篇代码的时间不过近三天而已,事前即没有经过详细思考和计划(可以说一点计划都没有)那天想起做个论坛试试,于是就做起来了,而我也是才接触了将近一个月时间的PHP,以前也没真正写过程序之类的东东,在写这段代码的两天半时间里,有好几次遇到困难,都想放弃,但是我还是写出来了,而且没想到居然能用,所以中间可能有很多隐患也说不清,虽然说是可以用了. 再过两天,我就要去上班,也没时间再仔细地从头到尾检查这些代码了,这也是我放上来的原因之一,还有一个原因是,因为我想让大家一起来看看这些字符,我只是个菜鸟

  • 我的论坛源代码(八)

    reguse.php用户注册与登录页面 <? if ($action==dl&&$uname) { $uinfo=$uname."|".$upass; setcookie("FlyFoxNet",$uinfo,time()+3600); } ?> <html> <head> <title>用户注册</title> <meta http-equiv="Content-Type&

  • 我的论坛源代码(四)

    POST.PHP发布主题的页面,发布的信息提交到OKEY.PHP中去处理. <html> <head> <title>论坛发帖</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <STYLE type=text/css> P {FONT-FAMILY: normal; FONT-SIZE: 9

  • 我的论坛源代码(十)

    reguse.inc.php处理注册用户时的信息 <? function regok($mess,$reginfo)       //记录成功后输出用户信息 { echo "<table width='70%' border='0' cellspacing='0' cellpadding='0' bgcolor='#000000' align='center'>"; echo "<tr><td><table width='100

  • 我的论坛源代码(三)

    显示主题内容页面. <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/c

  • 我的论坛源代码(二)

    主界面,也就是显示主题列表的这页. //foxbbs.php 功能:显示论坛的主题 <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} </ST

  • 我的论坛源代码(五)

    okey.php主要处理用户登录和发布的信息处理 <? if ($username)                       //是否有用户信息 $useinfo=$username."|".$userpass; setcookie("FlyFoxNet",$useinfo,time()+3600); if ($d==q) setcookie("FlyFoxNet");     //如果是退出的话,把COOKIE置为空 ?> &l

  • 我的论坛源代码(六)

    repal.php回复用的页面,因为回复可以不必要是用户,所以没加用户身份校验 <html> <head> <title>回复论题:<? echo $zt;?></title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <STYLE type=text/css> P {FONT-FAMIL

  • 我的论坛源代码(七)

    info.inc.php主要做些判断和信息处理 <?php function update($reginfo) {      switch ($reginfo[4])       {      case ($reginfo[4]==1):        $reginfo[4]="男";        break;      default:        $reginfo[4]="女";        break;       } switch ($regin

随机推荐