【 tulaoshi.com - PHP 】
repal.php回复用的页面,因为回复可以不必要是用户,所以没加用户身份校验
<html
<head
<title回复论题:<? echo $zt;?</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";
function yy($f)
{
$oldmess=@file($f); //引用原文处理
for ($i=0;$i<count($oldmess);$i++)
{
if (ord(substr($oldmess[$i],0,1))==161) //第一位是否全角空格
$mess=$mess.$oldmess[$i];
else $mess=$mess." ".trim($oldmess[$i]);
}
return $mess;
}
function mesput($query,$use,$id)
{
$req=mysql_query($query);
if ($req)
{
echo "<script language='JavaScript' alert('谢谢你的回复!系统将返回论题!'); </script";
echo "<script language='JavaScript' javascript:location.href='dispbbs.php?id=".$id."&use=".$use."'; </script;";
echo "<div align='center'<a href='dispbbs.php?id=".$id."&use=".$use."'如果系统没有反应,请点击</a</a";
}
else
echo "<script language='JavaScript' alert('写入失败!'); </script";
}
function usehf($message,$useinfo,$id,$use,$ft,$mess,$c) //用户回复就直接从表里调出用户信息
{
$query="select * from useinfo where usename='".$useinfo[0]."'";
$req=mysql_query($query);
if ($req)
{
$useinfo=mysql_fetch_array($req);
$fo=fopen($ft,"a");
$message=str_replace("<","<",str_replace("",">",$message));
$message=nl2br($message);
$gip=getenv("REMOTE_ADDR");
$messages=$message."ㄞㄚㄓ".$useinfo[2]."ㄞㄚㄓ".$useinfo[3]."ㄞㄚㄓ".$useinfo[9]."ㄞㄚㄓ".$useinfo[8]."ㄞㄚㄓ".$useinfo[14]."ㄞㄚㄓ".$useinfo[11]."ㄞㄚㄓ".$time."ㄞㄚㄓ".$gip."δεζ";
if($c==dd) //如果是引用回复,加上原文内容
&nb