📄 register.php
字号:
<?php
/**
*
* @package wappyCULT: wap community script
* @version 1.00 2006/09/12 21:53:27 wappy
* @copyright (c) 2004-2006 wappyCULT
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
*/
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
print "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<?php
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
$cpw = $_POST["cpw"];
include ("config.php");
include ("core.php");
connectdb();
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
echo "<card id=\"register\" title=\"wappyCULT\">\n";
$ipr = getip();
$uip = explode(".",$ipr);
$bip[0] = 'badip';
$bip[1] = 'badip';
$bip[1] = 'badip';
for($i=0;$i<count($bip);$i++)
{
if($ipr==$bip[$i])
{
echo "<p>";
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if($uip[0]=="frontip"&&$uip[1]=="backip")
{
$phone = "badphone";
$phone2 = "badphone";
$phone3 = "badphone";
if($phone==$ubr||$phone2==$ubr||$phone3==$ubr)
{
echo "<p>";
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
}
if(!canreg())
{
echo "<p>";
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later";
echo "</p>";
}else{
echo "<p>";
?>
<small>
<img src="images/point.gif" alt="!"/>
Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>
<img src="images/point.gif" alt="!"/>
No vulgar words are accepted in UserID<br/>
<img src="images/point.gif" alt="!"/>
UserID and Password must contain at least 4 characters<br/>
<img src="images/point.gif" alt="!"/>
UserID must begin with a letter<br/>
<img src="images/point.gif" alt="!"/>
Birthday must be in this format YYYY-MM-DD<br/><br/>
</small>
<?php
$tolog = false;
if(trim($uid)=="")
{
echo registerform(1);
}else if(trim($pwd)=="")
{
echo registerform(2);
}else if(trim($cpw)=="")
{
echo registerform(3);
}else if(spacesin($uid)||scharin($uid))
{
echo registerform(4);
}else if(spacesin($pwd)||scharin($pwd))
{
echo registerform(5);
}else if($pwd!=$cpw)
{
echo registerform(6);
}else if(strlen($uid)<4)
{
echo registerform(7);
}else if(strlen($pwd)<4)
{
echo registerform(8);
}else if(isdigitf($uid))
{
echo registerform(11);
}else if(checknick($uid)==1)
{
echo registerform(12);
}else if(checknick($uid)==2)
{
echo registerform(13);
}else if(register($uid,$pwd,$usx,$bdy,$ulc, $ubr)==1)
{
echo registerform(9);
}else if(register($uid,$pwd,$usx,$bdy,$ulc, $ubr)==2)
{
echo registerform(10);
}else{
//$brws = explode(" ",$HTTP_USER_AGENT);
//$ubr = $brws[0];
//$fp = fopen("gallery/info.txt","a+");
//fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n");
//fclose($fp);
echo "Registration completed successfully!<br/>";
$tolog = true;
}
echo "</p>";
}
echo "<p align=\"center\">";
if($tolog)
{
echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Login</a>";
}else{
echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
}
echo "</p>";
echo "</card>";
?>
</wml>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -