mirror of
https://e.coding.net/circlecloud/MinecraftAccount.git
synced 2024-11-17 00:58:55 +00:00
1e5236aa3e
Signed-off-by: j502647092 <jtb1@163.com>
36 lines
729 B
PHP
36 lines
729 B
PHP
<?php
|
|
|
|
namespace Home\Controller;
|
|
|
|
use Think\Controller;
|
|
|
|
class IndexController extends Controller {
|
|
|
|
public function Index()
|
|
{
|
|
if (!is_login) {
|
|
$this->redirect(U('Index/Login'),3,"尚未登录 3秒后跳转到登录界面!");
|
|
}
|
|
}
|
|
|
|
public function Login($username="", $password="", $verify = null) {
|
|
if(IS_POST){
|
|
$User = A ( 'User' );
|
|
$te = $User->Login ( $username, $password, $verify );
|
|
dump ( $te );
|
|
$this->display ();
|
|
}
|
|
}
|
|
/**
|
|
* 退出登录
|
|
*/
|
|
public function Logout() {
|
|
if (is_login ()) {
|
|
session ( 'user', null );
|
|
session ( '[destroy]' );
|
|
$this->success ( '退出成功!', U ( 'login' ) );
|
|
} else {
|
|
$this->redirect ( 'login' );
|
|
}
|
|
}
|
|
} |