当前位置: 首页 > 图文教程 > 网络编程 > PHP > 我的论坛源代码(九)

PHP
PHP新手总结的PHP基础知识
php实现gb2312和unicode间编码转换
用php语言实现数据库连接详细代码介绍
详细解析 PHP 向 MySQL 发送数据过程
利用PHP V5开发多任务应用程序
详细讲解PHP中缓存技术的应用
php escapeshellcmd多字节编码漏洞
《PHP设计模式介绍》导言
《PHP设计模式介绍》第一章 编程惯用法
《PHP设计模式介绍》第二章 值对象模式
《PHP设计模式介绍》第三章 工厂模式
《PHP设计模式介绍》第四章 单件模式
《PHP设计模式介绍》第五章 注册模式
《PHP设计模式介绍》第六章 伪对象模式
《PHP设计模式介绍》第七章 策略模式
《PHP设计模式介绍》第八章 迭代器模式
《PHP设计模式介绍》第九章 观测模式
《PHP设计模式介绍》第十章 规范模式
《PHP设计模式介绍》第十一章 代理模式
《PHP设计模式介绍》第十二章 装饰器模式

PHP 中的 我的论坛源代码(九)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 138 ::
收藏到网摘: n/a

<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="/upload/tech/20091012/20091012013329_fec8d47d412bcbeece3d9128ae855a7a.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="/upload/tech/20091012/20091012013330_c3e878e27f52e2a57ace4d9a76fd9acf.gif" width="74" height="21" border="0"></a></div>
</td>
<td height="20" width="10%"><a href="useinfo.php?action=use"><img src="/upload/tech/20091012/20091012013330_d79aac075930c83c2f1e369a511148fe.gif" width="74" height="21" border="0"></a></td>
<td height="20" width="75"><a href="foxbbs.php?d=q"><img src="/upload/tech/20091012/20091012013331_bea5955b308361a1b07bc55042e25e54.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="/upload/tech/20091012/20091012013331_c3e878e27f52e2a57ace4d9a76fd9acf.gif" width="70" height="20" border="0"></a></div>
</td>
<td>
<div align="center"><a href="post.php"><img src="/upload/tech/20091012/20091012013332_85fc37b18c57097425b52fc7afbb6969.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='/upload/tech/20091012/20091012013332_e97ee2054defb209c35fe4dc94599061.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="/upload/tech/20091012/20091012013333_ad972f10e0800b49d76fed33a21f6698.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="/upload/tech/20091012/20091012013333_e1e32e235eee1f970470a3a6658dfdd5.gif" width="14" height="11"><? echo $bbsmes[4]; ?></div>
</td>
<td width="80%">
<div align="left"><?
if ($useinfo[9]=="不告诉你")
echo "<img src='/upload/tech/20091012/20091012013334_99c5e07b4d5de9d18c350cdf64c5aa3d.gif' width='43' height='17'>";
else echo "<a href='mailto:".$useinfo[8]."'><img src='/upload/tech/20091012/20091012013334_99c5e07b4d5de9d18c350cdf64c5aa3d.gif' width='43' height='17' alt='给我发邮件' border='0'></a>";
echo "  <a href='".$useinfo[9]."' ><img src='/upload/tech/20091012/20091012013335_248e844336797ec98478f85e7626de4a.gif' width='43' height='17' alt='我的主页' border='0'></a>";
echo "  <a href='useinfo.php?action=look'><img src='/upload/tech/20091012/20091012013335_d58072be2820e8682c0a27c0518e805e.gif' width='43' height='16' alt='我的详细信息' border='0'></a>";
echo "  <a href='useinfo.php?action=edit'><img src='/upload/tech/20091012/20091012013335_7f5d04d189dfb634e6a85bb9d9adf21e.gif' width='43' height='17' alt='修改信息' border='0'></a>";
echo "  <a href='foxbbs.php?action=find&user=".$useinfo[0]."'><img src='/upload/tech/20091012/20091012013336_fae0b27c451c728867a567e8c1bb4e53.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='/upload/tech/20091012/20091012013336_8f7d807e1f53eff5f9efbe5cb81090fb.gif' width='43' height='17' alt='引用该用户的文章回复' border='0'></a>";
echo "  <a href='#'><img src='/upload/tech/20091012/20091012013337_a8abb4bb284b5b27aa7cb790dc20f80b.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>