Exemplo n.º 1
0
 /**
  * 回收站-回复
  */
 public function replyAction()
 {
     $threaddb = $params = array();
     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 = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     Wind::import('SRV:recycle.vo.PwRecycleReplySo');
     $so = new PwRecycleReplySo();
     $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.PwReplyRecycle');
     $count = $service->countSearchRecord($so);
     $threaddb = $service->searchRecord($so);
     $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.reply.title'), '', '');
     Wekit::setV('seo', $seoBo);
 }
Exemplo n.º 2
0
 public function replyAction()
 {
     $threaddb = $params = array();
     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 = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     Wind::import('SRV:recycle.vo.PwRecycleReplySo');
     $so = new PwRecycleReplySo();
     $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.PwReplyRecycle');
     $count = $service->countSearchRecord($so);
     $threaddb = $service->searchRecord($so);
     $this->setOutput($this->_getFroumService()->getForumList($fid), 'forumList');
     $this->setOutput($this->_getFroumService()->getForumOption($fid), 'option_html');
     $this->setOutput($threaddb, 'threaddb');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($url, 'url');
 }