public function actionTambahIp()
 {
     $return = array('sukses' => false);
     if (isset($_POST['AllowedIp'])) {
         $allowedIp = new AllowedIp();
         $allowedIp->attributes = $_POST['AllowedIp'];
         if ($allowedIp->save()) {
             $return = array('sukses' => true);
         }
     }
     $this->renderJSON($return);
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'ubah' page.
  */
 public function actionTambah()
 {
     $model = new AllowedIp();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['AllowedIp'])) {
         $model->attributes = $_POST['AllowedIp'];
         if ($model->save()) {
             $this->redirect(array('ubah', 'id' => $model->id));
         }
     }
     $this->render('tambah', array('model' => $model));
 }