📄 register.php
字号:
<?
require_once("include/config.inc.php");
require_once('include/functions.inc.php');
if($SS_User['USERID']!=0) back("Log out first");
if($action=="post"){
if(empty($username)) back($lang['Uname'].$lang['Noinput']);
if(strlen($username)>20||strlen($username)<3) back($lang['Unamelenthlimit']);
if($username!=str_replace(" ","",web2db($username))) back($lang['Uname'].$lang['Hasforbbidenchar']);
if(empty($password)) back($lang['Pwd'].$lang['Noinput']);
if($password!=web2db($password)) back($lang['Pwd'].$lang['Hasforbbidenchar']);
if($password!=$repassword) back($lang['Different2pwd']);
if(empty($secretemail)) back($lang['Secret']."Email".$lang['Noinput']);
$introduction=web2db($introduction);
$password=md5($password);
$qq=intval($qq);
$query="insert into ".__TAB_USER__." (username,password,secretemail,introduction,qq,email,homepage,groupid,priv) values ('$username','$password','$secretemail','$introduction','$qq','$email','$homepage','2','3')";
if($objDBConn->sql_query($query)) {
$url="loginForm.php";
$title=$lang['Reg'].$lang['Success'];
$msg=$lang['Reg'].$lang['Success']."<br><br><a href=$url>Jump</a>!";
redirect($url,$title,$msg);
}else {
$sql_error=$objDBConn->sql_error();
if($sql_error[code]==1062) back($lang['Existname']);
else back("sql error!");
}
}elseif($action=="empire") {
back($lang['Freeempired']);
}
require_once('include/header.php');
?>
<form name="frmregister" method="post" action="register.php">
<table width="755" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#000000" >
<tr bgcolor="#a0c484" >
<td colspan="2"><font color="#000000"><b>*<?=$lang['Plzinputdetail']?></b></font></td>
</tr>
<tr bgcolor="#ebf3e6" >
<td width="172" ><?=$lang['Plzinputname']?>: </td>
<td width="413" > <input type=text size=20 maxlength=20 name="username" style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'">
* <?=$lang['Namerule']?> </td>
</tr>
<tr bgcolor="#EBEEDB" >
<td width="172"><?=$lang['Inputpwd']?>: </td>
<td width="413"> <input type=password size=20 maxlength=30 name="password" style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'">
* </td>
</tr>
<tr bgcolor="#ebf3e6" >
<td width="172"><?=$lang['Inputpwd2']?>: </td>
<td width="413"> <input type=password size=20 maxlength=30 name="repassword" style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'">
* ( :) ) </td>
</tr>
<tr bgcolor="#EBEEDB" >
<td><?=$lang['Secret']?>E-MAIL: </td>
<td><input type=text size=20 maxlength=30 name=secretemail style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'" >
* </td>
</tr>
<tr bgcolor="#ebf3e6" >
<td width="172"><?=$lang['Pub']?>E-MAIL: </td>
<td width="413"> <input type=text size=20 maxlength=30 name=email style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'" >
</td>
</tr>
<tr bgcolor="#EBEEDB" >
<td width="172">QQ</td>
<td width="413"> <input name="qq" type=text onKeyPress="javascript:return KeyFilter('number')" size=20 maxlength=20 style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'" >
</td>
</tr>
<tr bgcolor="#ebf3e6" >
<td width="172"><?=$lang['Homepage']?>: </td>
<td width="413"> <input type=text size=20 maxlength=30 name="homepage" style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'" >
</td>
</tr>
<tr bgcolor="#EBEEDB" >
<td width="172"><?=$lang['Selfintro']?>: </td>
<td width="413"> <textarea name=introduction rows=4 cols=50 style="background-color:#FFFFFF; color:#000000; border: 1 double #000000" onMouseOver = "javascript: this.style.backgroundColor = '#ebf3e6'" onMouseOut = "javascript: this.style.backgroundColor = '#FFFFFF'"></textarea>
</td>
</tr>
<tr bgcolor="#EBEEDB" >
<td colspan="2"> <div align="center">
<input type=submit value="<?=$lang['Ensure']?>" name="submit" style="height:20px;background-color:#a0c484; color:#000000; border:1 solid #000000" onMouseOver ="javascript: this.style.backgroundColor='#ebf3e6'" onMouseOut ="javascript: this.style.backgroundColor='#a0c484'" >
<input type=reset value="<?=$lang['Reset']?>" name="reset" style="height:20px;background-color:#a0c484; color:#000000; border:1 solid #000000" onMouseOver ="javascript: this.style.backgroundColor='#ebf3e6'" onMouseOut ="javascript: this.style.backgroundColor='#a0c484'" >
<input type="hidden" name="action" value="post">
</div></td>
</tr>
</table>
</form>
<?php include('include/footer.php')?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -