App/Wap/Controller/OrgController.class.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
namespace Wap\Controller;
use Think\Controller;

Class OrgController extends CommonController{
  
  	 public function _initialize() {
        parent::_initialize();
        $this->dbname = 'auth_group';
    }
	
   public function index(){ 
    $list=orgcateTree($pid=0,$level=0,$type=0);
    $this->assign('list',$list);
    $this->display(); 
   }
  
   public function _befor_add(){
     $list=orgcateTree($pid=0,$level=0,$type=0);
	 $this->assign('type',I('get.type'));
     $this->assign('list',$list);
  }
  
  public function _befor_insert($data){
	 $pid = I('pid');
	 if ($pid==0){
	 $data['level']=0;
	 }else{
	 $level=D($this->dbname)->where('id='.$pid.'')->field('level')->limit(1)->select();
     $level=$level[0]['level']+1;
     $data['level']=$level;
	 }
	 return $data;
  }
  
  
  public function _befor_edit(){
     $list=orgcateTree($pid=0,$level=0,$type=0);
	 $this->assign('type',I('get.type'));
     $this->assign('list',$list);
  }
  
    public function _befor_update($data){
	 $pid = I('pid');
	 if ($pid==0){
	 $data['level']=0;
	 }else{
	 $level=D($this->dbname)->where('id='.$pid.'')->field('level')->limit(1)->select();
     $level=$level[0]['level']+1;
     $data['level']=$level;
	 }
	 return $data;
  }
  
  public function EditRule(){ 
  if (IS_POST){
   $data['id']=I('id');
   $data['rules']=implode(',',I('rules'));
   M('auth_group')->data($data)->save();
   $this->mtReturn(200,'权限设置成功',$_REQUEST['navTabId']);  
后面还有 14 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。