This commit is contained in:
2020-02-17 23:43:41 +08:00
parent 259d232d89
commit 5fb45fc57c
73 changed files with 711 additions and 357 deletions
+9 -1
View File
@@ -7,6 +7,7 @@
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
// 应用公共文件
use think\facade\Session;
define("SENTCMS_VERSION", '4.0.20200217');
@@ -14,9 +15,16 @@ define("SENTCMS_VERSION", '4.0.20200217');
*
*/
function is_login() {
return false;
$user = Session::get('userInfo');
return $user['uid'];
}
function is_administrator() {
return true;
}
function hook() {}
/**
* 获取客户端IP地址
* @param integer $type 返回类型 0 返回IP地址 1 返回IPV4地址数字