public function loadModel()
 {
     if ($this->_model === null) {
         $this->_model = DocumentContent::model()->findByAttributes(array('did' => $_GET['tid']));
         if ($this->_model === null) {
             //echo $_GET['tid'];
             throw new CHttpException(404, 'The requested page does not exist.');
         }
     }
     return $this->_model;
 }
 public function loadModel()
 {
     $tid = $_GET['tid'];
     $this->islink = $_GET['islink'];
     $criteria = new CDbCriteria(array('order' => 'did DESC'));
     if ($this->islink) {
         $this->_model = DocumentContent::model()->findByAttributes(array('did' => $_GET['tid']));
         if ($this->_model === null) {
             throw new CHttpException(404, 'The requested page does not exist.');
         }
     } else {
         $this->_model = Document::model()->findAllByAttributes(array('tid' => $_GET['tid']), $criteria);
     }
     return $this->_model;
 }