Example #1
0
 /**
  * 菜单管理主入口
  * 
  * @return void
  */
 public function run()
 {
     $page = intval($this->getInput('page'));
     list($keyword, $fid, $author, $createdTimeStart, $createdTimeEnd, $operator, $operateTimeStart, $operateTimeEnd) = $this->getInput(array('keyword', 'fid', 'author', 'created_time_start', 'created_time_end', 'operator', 'operate_time_start', 'operate_time_end'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     Wind::import('SRV:recycle.vo.PwRecycleThreadSo');
     $so = new PwRecycleThreadSo();
     $so->orderbyCreatedTime(0);
     $url = array();
     if ($keyword) {
         $so->setKeywordOfTitle($keyword);
         $url['keyword'] = $keyword;
     }
     if ($author) {
         $so->setAuthor($author);
         $url['author'] = $author;
     }
     if ($fid) {
         $so->setFid($fid);
         $url['fid'] = $fid;
     }
     if ($createdTimeStart) {
         $so->setCreateTimeStart(Pw::str2time($createdTimeStart));
         $url['created_time_start'] = $createdTimeStart;
     }
     if ($createdTimeEnd) {
         $so->setCreateTimeEnd(Pw::str2time($createdTimeEnd));
         $url['created_time_end'] = $createdTimeEnd;
     }
     if ($operator) {
         $so->setOperator($operator);
         $url['operator'] = $operator;
     }
     if ($operateTimeStart) {
         $so->setOperatorTimeStart(Pw::str2time($operateTimeStart));
         $url['operate_time_start'] = $operateTimeStart;
     }
     if ($operateTimeEnd) {
         $so->setOperatorTimeEnd(Pw::str2time($operateTimeEnd));
         $url['operate_time_end'] = $operateTimeEnd;
     }
     $service = Wekit::load('recycle.PwTopicRecycle');
     $count = $service->countSearchRecord($so);
     $threaddb = $service->searchRecord($so, $limit, $start);
     $this->setOutput($threaddb, 'threaddb');
     $this->setOutput($this->_getFroumService()->getForumList($fid), 'forumList');
     $this->setOutput($this->_getFroumService()->getForumOption($fid), 'option_html');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($url, 'url');
 }
Example #2
0
 /**
  * 菜单管理主入口
  * 
  * @return void
  */
 public function run()
 {
     $page = intval($this->getInput('page'));
     list($keyword, $fid, $author, $createdTimeStart, $createdTimeEnd, $operator, $operateTimeStart, $operateTimeEnd) = $this->getInput(array('keyword', 'fid', 'author', 'created_time_start', 'created_time_end', 'operator', 'operate_time_start', 'operate_time_end'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     Wind::import('SRV:recycle.vo.PwRecycleThreadSo');
     $so = new PwRecycleThreadSo();
     $so->orderbyCreatedTime(0);
     $url = array();
     if ($keyword) {
         $so->setKeywordOfTitle($keyword);
         $url['keyword'] = $keyword;
     }
     if ($author) {
         $so->setAuthor($author);
         $url['author'] = $author;
     }
     if ($fid) {
         $so->setFid($fid);
         $url['fid'] = $fid;
     }
     if ($createdTimeStart) {
         $so->setCreateTimeStart(Pw::str2time($createdTimeStart));
         $url['created_time_start'] = $createdTimeStart;
     }
     if ($createdTimeEnd) {
         $so->setCreateTimeEnd(Pw::str2time($createdTimeEnd));
         $url['created_time_end'] = $createdTimeEnd;
     }
     if ($operator) {
         $so->setOperator($operator);
         $url['operator'] = $operator;
     }
     if ($operateTimeStart) {
         $so->setOperatorTimeStart(Pw::str2time($operateTimeStart));
         $url['operate_time_start'] = $operateTimeStart;
     }
     if ($operateTimeEnd) {
         $so->setOperatorTimeEnd(Pw::str2time($operateTimeEnd));
         $url['operate_time_end'] = $operateTimeEnd;
     }
     $service = Wekit::load('recycle.PwTopicRecycle');
     $count = $service->countSearchRecord($so);
     $threaddb = $service->searchRecord($so, $limit, $start);
     $this->setOutput($threaddb, 'threaddb');
     $this->setOutput(Wekit::load('forum.srv.PwForumService')->getForumOption($fid), 'option_html');
     $this->setOutput(Wekit::load('forum.PwForum')->getForumList(), 'forumname');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($url, 'url');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $seoBo = PwSeoBo::getInstance();
     $lang = Wind::getComponent('i18n');
     $seoBo->setCustomSeo($lang->getMessage('SEO:manage.recycle.run.title'), '', '');
     Wekit::setV('seo', $seoBo);
 }
Example #3
0
 /**
  * 搜索回收站的帖子
  *
  * @param array $param
  * @return array
  */
 public function searchRecord(PwRecycleThreadSo $so, $limit = 20, $offset = 0)
 {
     return $this->_getDao()->searchRecord($so->getData(), $so->getOrderby(), $limit, $offset);
 }