source/index/register.ctrl.php
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class registerControl extends skymvc{
public function __construct(){
parent::__construct();
}
public function onInit(){
if(M("login")->userid){
$this->goAll("账号已经登录,请先退出",1,0,"/index.php");
}
}
public function onDefault(){
$reg_invitecode=0;
if(defined("REG_INVITECODE") && REG_INVITECODE==1){
$reg_invitecode=1;
}
$this->smarty->goAssign(array(
"reg_invitecode"=>$reg_invitecode
));
$this->smarty->display("register/index.html");
}
public function onSendSms(){
$telephone=get_post('telephone','h');
if(!is_tel($telephone)){
$this->goall("请输入正确手机号码",1);
}
if(M("user")->select(array("where"=>"telephone='".$telephone."' "))){
$this->goall("手机已经存在了",1);
}
$t=cache()->get("reg_".$telephone);
if($t){
$this->goall("请过".(60-(time()-$t))."秒再发送",1);
}
$yzm=rand(1111,9999);
$content="【".SMS_QIANMING."】验证码:".$yzm.",请您5分钟内完成注册";
$content=array(
"content"=>$content,
"code"=>$yzm,
"tpl"=>"reg"
);
$key="reg_sms".$telephone.$yzm;
if(SMS_TEST==true){
cache()->set($key,1,300);
$this->goAll("短信已发送".$yzm);
}
$res=M("sms")->sendSms($telephone,$content);
if($res){
cache()->set($key,1,300);
cache()->set("reg_".$telephone,time(),60);
$this->goAll("短信已发送,请在5分钟内验证注册");
}else{
后面还有 92 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。