My Forum source code (vi) _php tutorial

Source: Internet
Author: User
Tags ord
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 id= '" . $id. "'";
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 Id= '". $ Id. "'";
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 id= '". $id. "'";
$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:


























If the text is quoted, it is displayed
The topic you are replying to is: [ ]


". $mess;? >




http://www.bkjia.com/PHPjc/316097.html www.bkjia.com true http://www.bkjia.com/PHPjc/316097.html techarticle repal.php reply to the page, because the reply can not be user, so no user identity check HTML Head title reply to the topic:? echo $zt;? /title Meta Http-equiv=content-type Conte ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.