/** * 菜单列表 * @author Terry <*****@*****.**> * @date 2013-01-22 */ public function pageList() { $rolenav = D("RoleNav"); $ary_get['pageall'] = $this->_get('pageall', 'htmlspecialchars', 10); $count = $rolenav->where()->count(); $obj_page = new Page($count, $ary_get['pageall']); $obj_page->setConfig("header", "条"); $obj_page->setConfig('theme', '<li class="pageSelect">共%totalRow%%header% %nowPage%/%totalPage%页 %first% %upPage% %prePage% %linkPage% %nextPage% %downPage% %end%</li>'); $page = $obj_page->newshow(); $ary_data = $rolenav->where()->limit($obj_page->firstRow, $obj_page->listRows)->select(); $this->assign("data", $ary_data); $this->assign("filter", $ary_get); $this->assign("page", $page); $this->display(); }
/** * 节点列表 * @author Terry <*****@*****.**> * @date 2013-04-01 */ public function pageList() { $name = $this->getActionName(); $ary_get['pageall'] = $this->_get('pageall', 'htmlspecialchars', 10); $count = D($name)->where()->count(); $obj_page = new Page($count, $ary_get['pageall']); $obj_page->setConfig("header", "条"); $obj_page->setConfig('theme', '<li style="heigth:23px;line-height:23px;padding-top:8px;">共%totalRow%%header% %nowPage%/%totalPage%页 %first% %upPage% %prePage% %linkPage% %nextPage% %downPage% %end%</li>'); $page = $obj_page->newshow(); $ary_data = D($name)->where()->limit($obj_page->firstRow, $obj_page->listRows)->select(); $this->assign("filter", $ary_get); $this->assign("data", $ary_data); $this->assign("page", $page); $this->display(); }
/** * 管理员列表 * @author Terry <*****@*****.**> * @date 2013-01-22 */ public function pageList() { $ary_get = $this->_get(); $ary_get['pageall'] = $this->_get('pageall', 'htmlspecialchars', 10); $admin_access = D('Config')->getCfgByModule('ADMIN_ACCESS'); $admin = M("admin"); $count = $admin->join(C("DB_PREFIX") . "role ON " . C("DB_PREFIX") . "admin.role_id=" . C("DB_PREFIX") . "role.id")->where()->count(); $obj_page = new Page($count, $ary_get['pageall']); $obj_page->setConfig("header", "条"); $obj_page->setConfig('theme', '<li class="pageSelect">共%totalRow%%header% %nowPage%/%totalPage%页 %first% %upPage% %prePage% %linkPage% %nextPage% %downPage% %end%</li>'); $page = $obj_page->newshow(); $ary_data = $admin->join(C("DB_PREFIX") . "role ON " . C("DB_PREFIX") . "admin.role_id=" . C("DB_PREFIX") . "role.id")->where()->limit($obj_page->firstRow, $obj_page->listRows)->select(); $this->assign("data", $ary_data); $this->assign("admin", $admin_access); $this->assign("filter", $ary_get); // echo "<pre>";print_r($admin_access);exit; $this->assign("page", $page); $this->display(); }
/** * 角色列表 * @author Terry <*****@*****.**> * @date 2013-04-14 */ public function pageList() { $name = $this->getActionName(); $action = D($name); $ary_get['pageall'] = $this->_get('pageall', 'htmlspecialchars', 10); $count = $action->where()->count(); $obj_page = new Page($count, $ary_get['pageall']); $obj_page->setConfig("header", "条"); $obj_page->setConfig('theme', '<li class="pageSelect">共%totalRow%%header% %nowPage%/%totalPage%页 %first% %upPage% %prePage% %linkPage% %nextPage% %downPage% %end%</li>'); $page = $obj_page->newshow(); $ary_data = $action->where()->limit($obj_page->firstRow, $obj_page->listRows)->order(array('order' => 'desc'))->select(); // echo $action->getLastSql();exit; if (!empty($ary_data) && is_array($ary_data)) { foreach ($ary_data as $key => $val) { $ary_data[$key]['image_path'] = str_replace("/Public/Lib/ueditor/php/../../../", "", str_replace("//", "/", $val['image_path'])); } } $this->assign("data", $ary_data); $this->assign("page", $page); $this->assign("filter", $ary_get); $this->display(); }
/** * 管理员登陆日志 * @author Terry<*****@*****.**> * @date 2013-3-29 */ public function pageLogList() { $ary_get = $this->_get(); $ary_get['pageall'] = $this->_get('pageall', 'htmlspecialchars', 10); $adminlog = M("AdminLog"); import('ORG.Net.IpLocation'); // 导入IpLocation类 $Ip = new IpLocation(); // 实例化类 $count = $adminlog->where()->count(); $obj_page = new Page($count, $ary_get['pageall']); $obj_page->setConfig("header", "条"); $obj_page->setConfig('theme', '<li style="heigth:23px;line-height:23px;padding-top:8px;">共%totalRow%%header% %nowPage%/%totalPage%页 %first% %upPage% %prePage% %linkPage% %nextPage% %downPage% %end%</li>'); $page = $obj_page->newshow(); $ary_data = $adminlog->where()->limit($obj_page->firstRow, $obj_page->listRows)->order('log_create desc')->select(); if (!empty($ary_data) && is_array($ary_data)) { foreach ($ary_data as $k => $v) { $ary_data[$k]['ip_location'] = $Ip->getlocation($v['log_ip']); } } $this->assign("data", $ary_data); $this->assign("filter", $ary_get); $this->assign("page", $page); $this->display(); }