app/controller/login.php
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace WY\app\controller;
use WY\app\libs\Controller;
if (!defined('WY_ROOT')) {
exit;
}
class login extends Controller
{
function __construct()
{
parent::__construct();
}
public function index()
{
if ($url = $this->verifyUser->verify()) {
$this->res->redirect($url);
}
$data = array('title' => '用户登录');
$this->put('login.php', $data);
}
public function sigin()
{
$username = $this->req->post('username');
$password = $this->req->post('password');
$chkcode = $this->req->post('chkcode');
$keepLogin = $this->req->post('kl');
if ($username == '' || $password == '' || $chkcode == '') {
$this->put('woodyapp.php', array('msg' => '选项填写不完整'));
exit;
}
if (strtolower($chkcode) != $this->session->get('chkcode')) {
$this->put('woodyapp.php', array('msg' => '验证码错误'));
exit;
}
if (strpos($username, '@')) {
$where = array('fields' => 'email=?', 'values' => array($username));
if (!($userinfo = $this->model()->select('userid')->from('userinfo')->where($where)->fetchRow())) {
$this->put('woodyapp.php', array('msg' => '邮箱账号未注册'));
exit;
}
$user = $this->model()->select()->from('users')->where(array('fields' => 'id=?', 'values' => array($userinfo['userid'])))->fetchRow();
if (!$user || $user['userpass'] != sha1($password)) {
$this->put('woodyapp.php', array('msg' => '邮箱账号或密码错误'));
exit;
}
} else {
$where = array('fields' => 'username=? and userpass=?', 'values' => array($username, sha1($password)));
if (!($user = $this->model()->select()->from('users')->where($where)->fetchRow())) {
$this->put('woodyapp.php', array('msg' => '用户名或密码错误'));
exit;
}
}
if ($user['is_state'] == '2') {
$this->put('woodyapp.php', array('msg' => '账号已被停用,请联系客服。'));
exit;
}
if ($user['is_agent']) {
$this->session->set('login_agentid', $user['id']);
$this->session->set('login_agentname', $user['username']);
后面还有 28 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
