Exemplo n.º 1
0
 function gtxpg()
 {
     //先给hd设置好些东西,他自身是无法提取的
     import('@.SS.SSAction');
     $ss = new SSAction();
     $ss->setss();
     $x = $_GET['x'];
     //鉴权 如果OK的就正常显示,或者出现查看神马的,否则就呵呵了,query he gtxpg两处
     $mdII = M('md');
     $mdo = $mdII->where("mdmk='Grp'")->find();
     import('@.IDTATH.IdtathAction');
     $Idtath = new IdtathAction();
     $athofn = $Idtath->identify($mdo['mdid'], $x);
     import('@.NTF.NTFAction');
     $ntf = new NTFAction();
     $ntf->setntf();
     import('@.KZMB.KZMBAction');
     $kzmb = new KZMBAction();
     $kzmb->setkzmb($mdo['mdid']);
     if ($x == 'vw') {
         $grpid = $_GET['grpid'];
         $grp = M('grp');
         $mo = $grp->where("grpid=" . $grpid)->find();
         $this->assign('mo', $mo);
         $this->assign('title', '查看');
         $this->assign('theme', '查看详细');
         $this->display('view');
     } else {
         if ($x == 'updt') {
             $grpid = $_GET['id'];
             $grp = M('grp');
             if ($grpid == 0) {
                 $mo['grpid'] = 0;
                 $mo['grppid'] = $_GET['pid'];
                 $mo['grpodr'] = $_GET['odr'];
                 $this->assign('title', '添加');
                 $this->assign('theme', '添加:');
                 $this->assign('btnvl', '添加');
             } else {
                 $mo = $grp->where("grpid=" . $grpid)->find();
                 $this->assign('title', '修改');
                 $this->assign('theme', '修改:');
                 $this->assign('btnvl', '修改');
             }
             $this->assign('mo', $mo);
             $this->display('update');
         } else {
             if ($x == 'edit') {
                 header("Content-Type:text/html; charset=utf-8");
                 import('@.TREE.TreeAction');
                 $tree = new TreeAction();
                 $grp = M('grp');
                 $grpls = $grp->order('grpodr ASC')->select();
                 //在按照这个顺序前提下,总体永远是1在上2在下
                 $str = $tree->unlimitedForListPlus($grpls, 0, 'grpid', 'grpnm', 'grppid', 'grpodr', __URL__, 'Grp');
                 $strpos = $tree->unlimitedForListMv($grpls, 0, 'grpid', 'grpnm', 'grppid', 'grpodr');
                 //p($str);die;
                 //q特殊
                 $this->assign('tree', $str);
                 $this->assign('treepos', $strpos);
                 $this->assign('title', '浏览团队列表(编辑模式)');
                 $this->assign('theme', '团队管理(编辑模式)');
                 $this->display('edit');
             }
         }
     }
 }