My forum source code five

WBOY
Release: 2016-07-29 08:33:42
Original
1225 people have browsed it

okey.php mainly handles user login and publishing information processing
if ($username)                                                                                                                                                                                      ​useinfo,time()+3600);
if ($d==q) setcookie("FlyFoxNet"); //If exiting, set COOKIE to empty
?>
Publish an article

include "linkfox.inc.php";
include "info.inc .php";
function postf($useinfo,$title,$message) //Post information processing
{
$query="select * from foxbbs order by id desc limit 1";
$row=@mysql_query($query ; .
          echo ""; Hours i minutes);
                    $filename=date(YmjGis)                                                 use   with the current time
           . usename,ftbq, title,ftdate,mesname,djnum,hfnum,ip) values ​​('".$useinfo[0]."','".$useinfo[14]."','".$title."','". $time."','".$filename."',1,0,'".$gip."')";
                                                                                           If the writing is successful, add one to the number of posts made by the user and create a content file
          $query="select ftnum from useinfo where usename='".$useinfo[0]."'";
                                                                                       ; "'"; $ REQ =@MySQL_QUERY ($ Query);
$ ft = $ FILENAME;
$ fp = FOPEN ($ ft, "w"); // All the "& lt;", "& gt; Converting "symbols to "<", "&rt;" can remove HTML tags. There seems to be a function that can remove them directly, but I can't remember it, and I didn't find it in the reference manual, so I used a stupid method. A $ message = str_replace ("& lt;", "& lt;", str_replace ("" & gt; "," "& gt;", $ message);
$ message = nl2br ($ message); // Transform line to prevent line breaks from being displayed as characters.P $ f = fputs ($ fp, $ message);
$ fp =@fclose ($ fp);
echo "& lt; script language = 'javascript' & gt; Alert ('". $ Useinfo [2]. I "! Congratulations, your post was successful! '); Can be saved! '); * from useinfo where usename='".$username."'";
$req=mysql_query($query);
$useinfo=mysql_fetch_array($req);
if ($useinfo[0]==$username)
{通过 // If you pass the school inspection, call the information processing function
iF ($ userpass == $ Useinfo [1]) {postf ($ useInfo, $ title, $ message); Return $ useinfo;}
echo {
echo "" ";
                                                                                                       H {
echo "& lt; script language = 'javascript' & gt; alert ('user does not exist, please confirm that it has been registered!'); & Lt;/script & gt; ETA C /html; charset=gb2312" http-equiv=Content-Type>

$tem =$HTTP_COOKIE_VARS[FlyFoxNet];
$temp=explode("|",$tem);
$cookiem=$temp[0];
$useinfo=cuser($cookiem,$action);
if (isset($ message))
{
if($username)
{
$useinfo=userr($username,$userpass,$title,$message);
}
else if($useinfo) {
userr($useinfo[0] ,$useinfo[1],$title,$message);
}
else {echo "";
}
?>









The above introduces my forum source code five, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template