Example #1
0
 public function actionCreate()
 {
     if (!Webadmins::checkAccess('websettings_edit')) {
         throw new CHttpException(403, "У Вас недостаточно прав");
     }
     $model = new Levels();
     if (isset($_POST['Levels'])) {
         $model->attributes = $_POST['Levels'];
         if ($model->save()) {
             $this->redirect(array('admin'));
         }
     }
     $this->render('create', array('model' => $model));
 }