repal.php reply to use the page, because the reply can not need to be a user, so did not add user identity verification
<title> Reply topic: 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 in file
Include "info.inc.php";
function yy ($f)
{
$oldmess = @file ($f); Reference to the original processing
for ($i =0; $i <count ($oldmess); $i + +)
{
if (Ord ($oldmess [$i],0,1)) ==161)//First digit is a full-width space (substr)
$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 (' Thank you for your reply! The system will return to the thesis! '); </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." ' > If the system does not respond, please click </a></a> ";
}
Else
echo "<script language= ' JavaScript ' > Alert (' Write Failed! '); </script> ";
}
function USEHF ($message, $useinfo, $id, $use, $ft, $mess, $c)//user reply directly from the table and the 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 the reference reply, plus the original content
{
$messages = "<font color= ' 999999 ' >". $mess. " <div align= ' center ' >★ original ... ★ ... Reference ★</div></font><br> ". $messages;
}
$FP =fputs ($FO, $messages);
$time =date (Y-year-N-month J-th G-time i); Topic reply Number plus one, overwrite last 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 "<script language= ' JavaScript ' > Alert (' Database error: number 104th '); </script> ";
}
}
function gr ($ft, $message, $youname, $youmail, $youoicq, $youweb, $youaddr, $YOUBQ, $id, $use, $mess, $c)//non-registered users
{
if (!uinfo ($youmail, mail) | | Strlen ($youmail) <12)//Check mail
{
echo "<script language= ' JavaScript ' > alert (' Please enter the correct mail address!") '); </script> ";
}
else if (!uinfo ($YOUOICQ, OICQ) | | Strlen ($YOUOICQ) >12)//Check OICQ, can only judge whether the number and digits, if there is a better way.
{
echo "<script language= ' JavaScript ' > alert (' Please enter the correct OICQ number!") '); </script> ";
}
<script language= "JavaScript" >
<!--
var submitcount=0;
function Checksubmit () {
if (Submitcount = = 0) {
submitcount++;
return true;
} else {
if (submitcount>0) {
Alert ("The post has been successfully submitted, don't worry, wait!") ");
return false;
}
}
}
function check_com () {
if (Document.form.youname.value.length ==0) {
submitcount--;
Alert ("Name cannot be empty!") Just fill it in! ");
return false;
}
if (Document.form.youmail.value.length ==0) {
submitcount--;
Alert ("Email cannot be empty!") Just fill it in! ");
return false;
}
if (Document.form.youoicq.value.length ==0) {
submitcount--;
Alert ("Oicq cannot be empty!") Just fill it in! ");
return false;
}
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.