Ejemplo n.º 1
0
 /**
  * 资讯列表
  */
 public function indexAction()
 {
     $aParam = array();
     $aParam['iNewsID'] = $this->getParam('iNewsID');
     $aParam['iCategoryID'] = $this->getParam('iCategoryID');
     $aParam['iPublishStatus'] = $this->getParam('iPublishStatus');
     $aParam['sTitle'] = $this->getParam('sTitle');
     $aParam['sAuthor'] = $this->getParam('sAuthor');
     $aParam['sOrder'] = $this->getParam('sOrder');
     $aParam['iSTime'] = $this->getParam('iSTime');
     $aParam['iETime'] = $this->getParam('iETime');
     $aParam['sLoupanName'] = $this->getParam('sLoupanName');
     $aParam['sTagName'] = $this->getParam('sTagName');
     $aParam['iTagID'] = $this->getParam('iTagID') && !empty($aParam['sTagName']) ? $this->getParam('iTagID') : 0;
     $aParam['iAuthorID'] = $this->getParam('iAuthorID') && !empty($aParam['sAuthor']) ? $this->getParam('iAuthorID') : 0;
     $aParam['iLoupanID'] = $this->getParam('iLoupanID') && !empty($aParam['sLoupanName']) ? $this->getParam('iLoupanID') : 0;
     $aParam['iCityID'] = $this->_getCityID();
     $aParam['iTypeID'] = $this->_getTypeID();
     $iPage = intval($this->getParam('page'));
     $sOrder = 'iUpdateTime DESC';
     if (!empty($aParam['sOrder'])) {
         $sOrder = $aParam['sOrder'];
     }
     $aParam['sOrder'] = $sOrder;
     $aList = Model_News::getPageList($aParam, $iPage, $sOrder);
     $aParam['iSTime'] = strtotime($aParam['iSTime']);
     $aParam['iETime'] = strtotime($aParam['iETime']);
     $this->assign('iTypeID', $this->_getTypeID());
     $this->assign('iCityID', $this->_getCityID());
     $this->assign('aParam', $aParam);
     $this->assign('aList', $aList);
     $this->assign('aCityCode', Model_City::getPair(array('where' => array('iCityID' => $this->_getCityID(), 'iShow' => 1, 'iStatus' => 1)), 'iCityID', 'sFullPinyin'));
     $aCategory = Model_Category::getPairCategorys($this->_getTypeCategory());
     $this->assign('aCategory', $aCategory);
 }