repal.php reply to the page, because the reply can not be user, so no user identification check
<title>Reply topic: <? Echo $zt;? ></title>
Include "linkfox.inc.php"; Include in file
Include "info.inc.php";
function yy ($f)
{
$oldmess = @file ($f); Reference source Processing
for ($i =0; $i {
if (Ord (substr ($oldmess [$i],0,1)) ==161)//first digit whether full-width space
$mess = $mess. $oldmess [$i];
else $mess = $mess. "". Trim ($oldmess [$i]);
}
return $mess;
}
function Mesput ($query, $use, $id)
{
$req =mysql_query ($query);
if ($req)
{
echo "";
echo ";";
echo "If the system does not respond, please click";
}
Else
echo "";
}
function USEHF ($message, $useinfo, $id, $use, $ft, $mess, $c)//user reply directly from the table to bring up user information
{
$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)//If it is a reference reply, add the original content
{
$messages = "". $mess. " ★ Original ... ★ ... REFERENCES ★
". $messages;
}
$FP =fputs ($FO, $messages);
$time =date (y year N month J Day g time I); Subject reply number plus one, overwrite previous reply person and time
$query = "Update Foxbbs set Hfnum=hfnum+1,hfname= '". $ft. "', Hfusename= '". $useinfo [2]. "', hfdate= '". $time. "' Where";
Mesput ($query, $use, $id);
}
Else
{
echo "";
}
}
function gr ($ft, $message, $youname, $youmail, $youoicq, $youweb, $youaddr, $YOUBQ, $id, $use, $mess, $c)//non-registered users
{
if (!uinfo ($youmail, mail) | | Strlen ($youmail) <12)//Verify Mail
{
echo "";
}
else if (!uinfo ($YOUOICQ, OICQ) | | Strlen ($YOUOICQ) >12)//Check OICQ, can only determine whether the number and the number of digits, if there is a better way.
{
echo "";
}
Else
{
if (Uinfo ($youweb, Web) ==ok&&substr ($youweb, 0,3)!=htt) $youweb = "http://". $youweb;
else if (Uinfo ($youweb, Web) ==ok&&substr ($youweb, 0,3) ==htt) $youweb = $youweb;
else $youweb = "Do not tell you";
$time =date (y year N month J Day g time I); Take the current time
$message =str_replace ("<", "<", Str_replace (">", ">", $message));
$message =nl2br ($message);
$gip =getenv ("remote_addr");
$messages = $message. " ㄞㄚㄓ ". $youname." ㄞㄚㄓ ". $youoicq." ㄞㄚㄓ ". $youweb." ㄞㄚㄓ ". $youmail." ㄞㄚㄓ ". $youbq." ㄞㄚㄓ ". $youaddr." ㄞㄚㄓ ". $time." ㄞㄚㄓ ". $gip." Δεζ ";
if ($c ==dd)//If it is a reference reply
{
$messages = "". $mess. " ★ Original ... ★ ... REFERENCES ★
". $messages;
}
$fo =fopen ($ft, "a");
$FP =fputs ($FO, $messages);
$query = "Update Foxbbs set Hfnum=hfnum+1,hfname= '". $ft. "', Hfusename= '". $youname. "', hfdate= '". $time. "' Where";
Mesput ($query, $use, $id);
}
}
?>
$tem = $HTTP _cookie_vars[flyfoxnet];
$temp =explode ("|", $tem);
$cookiem = $temp [0];
$useinfo =cuser ($cookiem, $action);
if (! $useinfo [0]) {$useinfo [2]= "Visitor"; $usename = 1;}
$query = "Select Mesname from Foxbbs where";
$req =mysql_query ($query);
if ($req)
{
$f =mysql_fetch_array ($req);
$mess =yy ($f [0]);
if ($message && $action =add)
{
$ft = "foxbbs/". $f [0]. ". BBS ";
if (Ord (substr ($message, 0,1))!=161) $message = "". $message;
for ($i =0; $i <10; $i + +)
{
if ($BQ [$i]) $YOUBQ = $BQ [$i];
}
if ($usename) GR ($ft, $message, $youname, $youmail, $youoicq, $youweb, $youaddr, $YOUBQ, $id, $use, $mess, $c);
else USEHF ($message, $useinfo, $id, $use, $ft, $mess, $c);
}
}
else echo "";
?>
|
|
|
|
|
|
|
|
|
|
Current Location: Fox network ─> Fox Network Forum ─> reply theme:
|
|
|
|
|
The topic you are replying to is: [ ] |
|
If the text is quoted, it is displayed
". $mess;? > |
|
The above is the introduction of my forum source code six, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.