My Forum source code (VI)

Source: Internet
Author: User
Tags date current time empty include mail ord reference strlen
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> ";
}

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-th 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 = "<font color= ' 999999 ' >". $mess. " <div align= ' center ' >★ original ... ★ ... Reference ★</div></font><br> ". $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);
}
}
?>

<body bgcolor= "#FFFFFF" >
?
$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);
else USEHF ($message, $useinfo, $id, $use, $ft, $mess, $c);
}
}
else echo ' <script language= ' JavaScript ' > Alert (' Open file Error! Maybe the server is busy, please try again later! '); </script> ";


?>
<table width= "100%" cellpadding= "4" cellspacing= "0" border= "0" >
<tr>
&LT;TD height= ">"
<div align= "right" ></div>
</td>
&LT;TD height= "width=" > </td>
&LT;TD height= "width=" > </td>
&LT;TD height= "width=" > </td>
&LT;TD height= "width=" > </td>
</tr>
<tr>
&LT;TD height= ">"
<div align= "right" ></div>
</td>
&LT;TD height= "width=" 10% ">
<div align= "center" ><a href= "Reguse.php?action=xy" ></a></div>
</td>
&LT;TD height= "width=" 10% ">
<div align= "center" ><a href= "Useinfo.php?action=find" ></a></div>
</td>
&LT;TD height= "width=" 10% "><a href=" Useinfo.php?action=edit "></a></td>
&LT;TD height= "width=" 10% "><a href=" okey.php?d=q "></a></td>
</tr>
<tr>
&LT;TD height= ">"
<div align= "Left" > Current position: <font color= "#0000FF" > Fox net ─> Fox Net forum ─> reply theme: <?echo "<font color= ' ff0000 '" > ". $zt." </font> ";? ></font></div>
</td>
<td> <div align= "center" ><a href= "foxbbs.php" ></a></div>
</td>
&LT;TD height= "width=" 10% ">
<div align= "center" ><a href= "superuse.php" ></a></div>
</td>
&LT;TD height= "width=" 10% ">
<div align= "center" ><a href= "Reguse.php?action=xy" ></a></div>
</td>
&LT;TD height= "width=" 10% ">
<div align= "center" ><a href= ". /index.php "></a></div>
</td> </tr>
</table>

<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;
}


if (Document.form.message.value.length = = 0) {
submitcount--;
Alert ("Content cannot be empty!") ");
return false;
}
return true;
}
-->
</script>

<table width= ' 70% ' border= ' 0 ' cellspacing= ' 0 ' cellpadding= ' 0 ' bgcolor= ' #000000 ' align= ' center ' >
<tr>
<td>
<table width= ' 100% ' border= ' 0 ' cellspacing= ' 0 ' cellpadding= ' 0 ' >
<tr bgcolor= ' #006699 ' >
<td><div align= "center" ><font color= "ffffff" &GT;&LT;? echo "<font color= ' 00ff00 ' >". $useinfo [2]. " </font>?> The topic you are replying to is: [The echo $zt;?>]</font></div></td>
</tr>
<tr bgcolor= ' #eeeeee ' >
<td>
<form name= "form" method= "POST" ><div align= "center" >
?
if ($usename)//is not a registered user, enter the visitor information by displaying the input box.
{
echo "Your name: <input". $youname. "' > ";
echo "Oicq:<input". $youoicq. "' ><br> ";
echo "from Where: <input". $youaddr. "' ><br> ";
echo "Email: <input". $youmail. "' ><br> ";
echo "Personal homepage: <input". $youweb. "' ><br> ";
echo "Expression <br><input type= ' radio ' name= ' bq[0] ' value= ' a ' ><input type= ' radio ' name= ' bq[1] ' value= ' 1 ' > ";
echo "<input type= ' Radio ' name= ' bq[2] ' value= ' 2 ' > <input type= ' Radio ' name= ' bq[3] ' value= ' 3 ' > ';
echo "<input type= ' Radio ' name= ' bq[4] ' value= ' 4 ' > <input type= ' Radio ' name= ' bq[5] ' value= ' 5 ' > ';
echo "<input type= ' Radio ' name= ' bq[6] ' value= ' 6 ' > <input type= ' Radio ' name= ' bq[7] ' value= ' 7 ' > ';
echo "<input type= ' Radio ' name= ' bq[8] ' value= ' 8 ' > <input type= ' Radio ' name= ' bq[9] ' value= ' 9 ' ><br > ";
}
echo "<div align= ' center ' > Reply Content <br>";
echo "<textarea >". $message. " </textarea><br> ";
?>
<input type= "Submit" name= "Submit" value= "OK" >
<input type= "reset" name= "Submit2" value= "rewrite" ></div></div></form>
</td>
</tr>
<tr bgcolor= ' #eeeeee ' >//if it's a quote from the original, show
<td><div align= "center" &GT;&LT;? if ($c ==dd) echo "The original text is as follows <br><div align= ' left ' >". $mess; ></div></td>
</tr>
</table>
</td>
</tr>
</table>

</body>

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.