webmain/system/menu/menuAction.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class menuClassAction extends Action
{
public $rows,$alldata;
public function dataAjax()
{
$this->db->update('[Q]menu', '`status`=1' , '`id` in(1,2) and `status`=0');
$this->rows = array();
$type = $this->get('type');
$loadci = (int)$this->get('loadci');
$pid = (int)$this->get('pid','0');
$where = '';
//权限那来的
if($type != ''){
$where = 'and `status`=1 and `ispir`=1 and `type`=0';
if($type=='view')$where = 'and `status`=1 and `type`=0';
}else{
$this->updatepirss();
}
if($pid>0){
$where.=' and (`id`='.$pid.' or `pid`='.$pid.' or `pid` in(select `id` from `[Q]menu` where `pid`='.$pid.'))';
}
$this->alldata = $this->db->getall('select *,(select count(1)from `[Q]menu` where `pid`=a.id '.$where.')stotal from `[Q]menu` a where 1=1 '.$where.' order by `sort`');
$this->getmenu(0, 1, 1);
$pdata = array();
if($loadci==1){
foreach($this->alldata as $k=>$rs){
if($rs['pid']=='0')$pdata[] = array('name'=>$rs['name'],'id'=>$rs['id']);
}
}
echo json_encode(array(
'totalCount'=> 0,
'pdata' => $pdata,
'rows' => $this->rows
));
}
private function getmenu($pid, $oi, $zt)
{
$downid = '';
foreach($this->alldata as $k=>$rs){
if($pid==$rs['pid']){
$downid.=','.$rs['id'].'';
$rs['level'] = $oi;
$zthui = $rs['status'];
if($zt==0){
$rs['ishui']=1;
$zthui = 0;
}
//if($oi>1)$rs['trstyle']='display:none;';
$this->rows[] = $rs;
$len = count($this->rows)-1;
$sidss = $this->getmenu($rs['id'], $oi+1, $zthui);
//if($sidss)$this->rows[$len]['downallid'] = substr($sidss,1);
}
}
return $downid;
后面还有 58 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
