Example #1
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Request('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Request'])) {
         $model->attributes = $_GET['Request'];
     }
     $this->render('admin', array('model' => $model));
 }
Example #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     // is current user has the required privilege ?
     if (!Yii::app()->user->checkAccess('request_admin')) {
         throw new CHttpException(403, 'You are not authorized to perform this action.');
     }
     $model = new Request('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Request'])) {
         $model->attributes = $_GET['Request'];
     }
     $this->render('admin', array('model' => $model));
 }