source/index/openlogin.ctrl.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class openloginControl extends skymvc{
public function __construct(){
parent::__construct();
}
public function onDefault(){
}
public function onBind(){
$openToken=get("openToken");
if(!$id=cache()->get($openToken)){
if(isset($_SESSION['ssopenlogin'])){
$id=intval($_SESSION['ssopenlogin']['id']);
}
}
if(!$id){
$this->goAll("暂无权限",1);
}
$ouser=M("openlogin")->selectRow("id=".$id);
$this->smarty->goAssign(array(
"ouser"=>$ouser
));
$this->smarty->display("openlogin/bind.html");
}
public function onSendSms(){
$telephone=get_post('telephone','h');
if(!is_tel($telephone)){
$this->goall("请输入正确手机号码",1);
}
if(!M("user")->selectRow(array("where"=>"telephone='".$telephone."' "))){
$this->goall("手机用户不存在",1);
}
$t=cache()->get("openlogin_binduser_expire_".$telephone);
if($t){
$this->goall("请过".(60-(time()-$t))."秒再发送",1);
}
$yzm=rand(111111,999999);
$content="【".SMS_QIANMING."】验证码:".$yzm.",请您5分钟内完成验证";
$content=array(
"content"=>$content,
"code"=>$yzm,
"tpl"=>"code"
);
$res=M("sms")->sendSms($telephone,$content);
$key="openlogin_binduser".$telephone.$yzm;
if($res){
cache()->set($key,1,300);
cache()->set("openlogin_binduser_expire_".$telephone,time(),60);
$this->goAll("短信已发送,请在5分钟内完成验证");
}else{
$this->goAll("短信发送失败",1);
后面还有 132 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。