コード例 #1
0
ファイル: SectionController.php プロジェクト: Deepab23/clinic
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Section('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Section'])) {
         $model->attributes = $_GET['Section'];
     }
     $this->render('admin', array('model' => $model));
 }
コード例 #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin($id_tree)
 {
     if (!Tree::model()->exists('id=:id', array(':id' => $id_tree))) {
         throw new CHttpException(400, "Неверный запрос. Раздел с ИД {$id_tree} не найден!");
     }
     if (!CheckAcccess::checkAccessNode($id_tree)) {
         throw new CHttpException(403, "У вас недостаточно прав для выполнения указанного действия.");
     }
     $model = new Section('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Section'])) {
         $model->attributes = $_GET['Section'];
     }
     $this->render('admin', array('model' => $model));
 }