Example #1
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Config('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Config'])) {
         $model->attributes = $_GET['Config'];
     }
     $this->render('admin', array('model' => $model));
 }
Example #2
0
 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     $Config = new Config('search');
     $Config->unsetAttributes();
     // clear any default values
     if (isset($_GET['Config'])) {
         $Config->attributes = $_GET['Config'];
     }
     if (isset($_POST['ConfigData'])) {
         foreach ($_POST['ConfigData'] as $config_loc => $value) {
             $Conf = Config::model()->findByPk($config_loc);
             $Conf->value = $value;
             $Conf->save();
         }
         Yii::app()->user->setFlash('success', 'Settings updated.');
     }
     $this->render('index', array('Config' => $Config));
 }
Example #3
0
 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     $model = new MemberPeriodePoin();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['MemberPeriodePoin'])) {
         $model->attributes = $_POST['MemberPeriodePoin'];
         $model->save();
     }
     $modelConfig = new Config('search');
     $modelConfig->unsetAttributes();
     // clear any default values
     $modelConfig->nama = 'member.';
     $modelIndex = new MemberPeriodePoin('search');
     $modelIndex->unsetAttributes();
     // clear any default values
     if (isset($_GET['MemberPeriodePoin'])) {
         $modelIndex->attributes = $_GET['MemberPeriodePoin'];
     }
     $this->render('index', array('model' => $model, 'modelIndex' => $modelIndex, 'modelConfig' => $modelConfig));
 }