예제 #1
0
 public function run()
 {
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $logSo = new PwLogSo();
     $logSo->setEndTime($this->getInput('end_time'))->setStartTime($this->getInput('start_time'))->setCreatedUsername($this->getInput('created_user'))->setOperatedUsername($this->getInput('operated_user'))->setFid($this->getInput('fid'))->setIp($this->getInput('ip'))->setKeywords($this->getInput('keywords'))->setTypeid($this->getInput('typeid'));
     /* @var $logDs PwLog */
     $logDs = Wekit::load('log.PwLog');
     $count = $logDs->coutSearch($logSo);
     /* @var $logSrv PwLogService */
     $logSrv = Wekit::load('log.srv.PwLogService');
     $list = array();
     if ($count > 0) {
         $page > $count && ($page = $count);
         $totalPage = ceil($count / $this->perpage);
         list($offset, $limit) = Pw::page2limit($page, $this->perpage);
         $list = $logSrv->searchManageLogs($logSo, $limit, $offset);
     }
     $this->setOutput($logSrv->getOperatTypeid(), 'typeids');
     $this->setOutput($logSrv->getOperatTypeTitle(), 'typeTitles');
     $this->setOutput($this->perpage, 'perpage');
     $this->setOutput($list, 'list');
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($logSo->getSearchData(), 'searchData');
     $this->_getForumList();
     $this->setOutput($this->isFounder($this->loginUser->username), 'canClear');
 }
예제 #2
0
 public function run()
 {
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $logSo = new PwLogSo();
     $logSo->setEndTime($this->getInput('end_time'))->setStartTime($this->getInput('start_time'))->setCreatedUsername($this->getInput('created_user'))->setTypeid($this->getInput('typeid'))->setIp($this->getInput('ip'));
     /* @var $logDs PwLogLogin */
     $logDs = Wekit::load('log.PwLogLogin');
     $count = $logDs->coutSearch($logSo);
     $list = array();
     if ($count > 0) {
         $page > $count && ($page = $count);
         $totalPage = ceil($count / $this->perpage);
         list($offset, $limit) = Pw::page2limit($page, $this->perpage);
         $list = $logDs->search($logSo, $limit, $offset);
     }
     $this->setOutput($this->perpage, 'perpage');
     $this->setOutput($list, 'list');
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($logSo->getSearchData(), 'searchData');
     $this->setOutput($this->isFounder($this->adminUser->getUsername()), 'canClear');
     $this->setOutput($this->_getLoginType(), 'types');
     $this->setTemplate('manage_login');
 }
예제 #3
0
 /**
  * 根据条件统计日志
  *
  * @param PwLogSo $so
  * @return int
  */
 public function coutSearch(PwLogSo $so)
 {
     return $this->_getLogDao()->countSearch($so->getCondition());
 }