MySQL based forum (2)
Last Update:2017-02-28
Source: Internet
Author: User
#################################
# # apply.php ####################
#################################
<title> Registered Users </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<link rel= "stylesheet" type= "Text/css" href= "Css/index.css" >
<body bgcolor= "#FFFFFF" background= "Image/bg.gif" >
<?php include "header.php";? >
<br>
<div align= "center" > Register New User <br>
</div>
<table width= "90%" border= "1" cellspacing= "0" cellpadding= "0" bordercolorlight= "#336699" bordercolordark= "#FFFFFF "Align=" Center >
<tr>
<TD colspan= "2" >
<div align= "center" >
<textarea name= "temp" wrap= "VIRTUAL" cols= "rows=" "8" > Registration Notice:
Only after registering, can the user have the right to send new posts and reply posts. Non-registered users can only view posts.
In the registered project, the "*" is the item you must fill out, and the others are optional items. However, in order to facilitate contact, it is best to write the information in more detail.
This forum does not welcome the politically sensitive topic, if this causes the dispute, this forum uses the manager to be irresponsible.
After registering, each post, add 5 points, reply to an article, add 3 points, was deleted one, minus 4 points. Integral only for active forum atmosphere, does not represent a certain aspect level of netizen.
Production: Cold Love crazy </textarea>
</div>
</td>
</tr>
<TR valign= "Top" >
<TD colspan= "2" > </td>
</tr>
<tr>
<TD colspan= "2" >
<form method= "POST" action= "adduser.php" >
<table width= "80%" border= "0" cellspacing= "0" cellpadding= "3" align= "Center" >
<tr>
<TD align= "Right" > Username </td>
<td>
<input type= "text" name= "name" maxlength= "style=" FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 ">
* </td>
</tr>
<tr>
<TD align= "Right" > Password </td>
<td>
<input type= "Password" name= "Pwd1" maxlength= "8" style= "FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 "size=" 9 ">
* </td>
</tr>
<tr>
<TD align= "Right" > Repeat password </td>
<td>
<input type= "Password" name= "Pwd2" maxlength= "8" style= "FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 "size=" 9 ">
* </td>
</tr>
<tr>
<TD align= "right" >Email</td>
<td>
<input type= "text" name= "email" style= "FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 ">
</td>
</tr>
<tr>
<TD align= "right" > Sex </td>
<td>
<select name= "Sex" >
<option value= "Secret" selected> secret </option>
<option value= "Men" > Men </option>
<option value= "female" > Female </option>
</select>
</td>
</tr>
<tr>
<TD align= "Right" > Authenticity name </td>
<td>
<input type= "text" name= "realname" size= "" maxlength= "" style= "FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 ">
</td>
</tr>
<tr>
<TD align= "Right" > Address </td>
<td>
<input type= "text" name= "Address" maxlength= "size=" "style=" FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 ">
</td>
</tr>
<tr>
<TD align= "Right" > Telephone </td>
<td>
<input type= "text" name= "Phone" size= "maxlength=" "style=" FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 ">
</td>
</tr>
<tr>
<TD align= "Right" > Home </td>
<td>
<input type= "text" name= "homepage" style= "font-size:9pt"; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 "size=" value= "http://" >
</td>
</tr>
<tr>
<TD align= "right" >OICQ</td>
<td>
<input type= "text" name= "Oicq" maxlength= "style=" FONT-SIZE:9PT; Background-color: #FFFFFF; Color: #FF0000; Border:1 solid #000000 "size=" >
</td>
</tr>
<tr>
<TD align= "Right" > Signature </td>
<td>
<textarea name= "QM" wrap= "VIRTUAL" cols= "M" ></textarea>
</td>
</tr>
<tr>
<TD align= "right" > </td>
<TD align= "center" >
<input type= "Submit" Name= "B1" value= "Registration" >
<input type= "reset" name= "Submit2" value= "clear" >
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br>
<?php include "footer.php";? >
</body>
##########################################
# # chklogin.php #########################
########################################
<?php
Require ("func.php");
$name =trim ($name);
$password =trim ($password);
$sql = "SELECT * from user where name= ' $name '";
$sql _result=mysql_query ($sql);
$sql _row=mysql_fetch_array ($sql _result);
if ($password = = $sql _row[password]) and (!empty ($sql _row[slaveboard])) {
Setcookie ("Jl_forum[board]", $sql _row[slaveboard]);
Setcookie ("Jl_forum[name]", $name);
Setcookie ("Jl_forum[password]", $password);
Redirect2 ("manage_list.php");
}
else {
Show_error (4);
}
?>
###################################
##### config.inc.php ##########
#############################
?
$MYSQL _hostname = "localhost";
$MYSQL _username = "root";
$MYSQL _password = "";
$DATABASE = "forum";
$pagesize = 25;
$copyright = "copyright©2000, by Edincur, all Rights reserved<br>";
$admin _email= "Your_email";
$admin _name= "Your_admin_name"; #论坛管理员名称
$admin _password= "Your_password"; #论坛管理员密码
$remove _score=4; #被删除一篇扣除的分数
$new _topic_score=5; #发表新主题的分数
$re _topic_score=3; #回复一篇的分数
Mysql_connect ($MYSQL _hostname, $MYSQL _username, $MYSQL _password);
mysql_select_db ($DATABASE) or Die (Mysql_error ());
?>
###############################
#