Пример #1
0
 public function index()
 {
     if ($_REQUEST['sn']) {
         $sn = get_safe_replace($_REQUEST['sn']);
         unset($_REQUEST['sn']);
     }
     import('@.Action.Adminbase');
     $c = new AdminbaseAction();
     if ($this->_userid || $sn) {
         $map['userid'] = intval($this->_userid);
         if ($sn) {
             $map['sn'] = $sn;
         }
         $c->_list(MODULE_NAME, $map);
     }
     $this->display();
 }
Пример #2
0
 public function index()
 {
     if ($_REQUEST['sn']) {
         $sn = get_safe_replace($_REQUEST['sn']);
         unset($_REQUEST['sn']);
     }
     if ($this->_userid || $sn) {
         A('Adminbase');
         $c = new AdminbaseAction();
         $map = array();
         $map['userid'] = intval($this->_userid);
         if ($sn) {
             $map['sn'] = $sn;
         }
         $data = $c->_list(MODULE_NAME, $map);
         $this->assign('page', $data['page']);
         $this->assign('list', $data['list']);
     }
     $this->display();
 }
Пример #3
0
 /**
  * 列表
  *
  */
 public function index()
 {
     if (!$this->_userid) {
         $this->error(L('nologin'));
     }
     if ($this->module[$this->moduleid]['type'] == 1) {
         if ($this->categorys) {
             foreach ($this->categorys as $r) {
                 if ($r['type'] == 1 || !in_array($this->_groupid, explode(',', $r['postgroup']))) {
                     continue;
                 }
                 if ($r['moduleid'] != $this->moduleid || $r['child']) {
                     $arr = explode(",", $r['arrchildid']);
                     $show = 0;
                     foreach ((array) $arr as $rr) {
                         if ($this->categorys[$rr]['moduleid'] == $this->moduleid) {
                             $show = 1;
                         }
                     }
                     if (empty($show)) {
                         continue;
                     }
                     $r['disabled'] = $r['child'] ? ' disabled' : '';
                 } else {
                     $r['disabled'] = '';
                 }
                 $array[] = $r;
             }
             import('@.ORG.Tree');
             $str = "<option value='\$id' \$disabled \$selected>\$spacer \$catname</option>";
             $tree = new Tree($array);
             $select_categorys = $tree->get_tree(0, $str);
             $this->assign('select_categorys', $select_categorys);
             $this->assign('categorys', $this->categorys);
         }
         $this->assign('posids', F('Posid'));
     }
     import('@.Action.Adminbase');
     $c = new AdminbaseAction();
     $module = $this->module[$this->moduleid]['name'];
     $map['userid'] = array('eq', $this->_userid);
     if (APP_LANG) {
         $map['lang'] = array('eq', $this->Lang[LANG_NAME][id]);
     }
     $result = $c->_list($module, $map, "id", false, 15, true);
     $this->assign("list", $result);
     $this->display();
 }