application/admin/logic/AuthModularLogic.php
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* eyoucms
* ============================================================================
* 版权所有 2016-2028 海南赞赞网络科技有限公司,并保留所有权利。
* 网站地址: http://www.eyoucms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
* Author: 小虎哥
* Date: 2018-4-3
*/
namespace app\admin\logic;
use think\Model;
use think\Db;
/**
* 模块逻辑定义
* @package admin\Logic
*/
class AuthModularLogic extends Model
{
/**
* 获得指定分类下的子分类的数组
*
* @access public
* @param int $id 分类的ID
* @param int $selected 当前选中分类的ID
* @param boolean $re_type 返回的类型: 值为真时返回下拉列表,否则返回数组
* @param int $level 限定返回的级数。为0时返回所有级数
* @return mix
*/
public function auth_modular_list($id = 0, $selected = 0, $re_type = true, $level = 0)
{
static $res = NULL;
if ($res === NULL)
{
$data = false;//extra_cache('admin_auth_modular_list_logic');
if ($data === false)
{
$where = array(
'c.status' => 1,
);
$fields = "c.id, c.parent_id, c.name, c.controller, c.action, c.grade, c.url, c.sort_order, c.is_menu, count(s.id) as has_children";
$res = DB::name('auth_modular')
->field($fields)
->alias('c')
->join('__AUTH_MODULAR__ s','s.parent_id = c.id','LEFT')
->where($where)
->group('c.id')
->order('c.parent_id asc, c.sort_order asc, c.id')
->cache(true,EYOUCMS_CACHE_TIME,"auth_modular")
->select();
// extra_cache('admin_auth_modular_list_logic', $res);
}
else
{
后面还有 232 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
