/**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new CreditsHistory('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['CreditsHistory'])) {
         $model->attributes = $_GET['CreditsHistory'];
     }
     $this->render('admin', array('model' => $model));
 }
Beispiel #2
0
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $this->layout = '//layouts/column1';
     $id = Yii::app()->user->id;
     //echo Credits::getBalance(1);
     // confirm email
     //Credits::deduct(1, 500, 6);
     $model = $this->loadModel($id);
     $history_model = new CreditsHistory('search');
     $history_model->unsetAttributes();
     // clear any default values
     if (isset($_GET['CreditsHistory'])) {
         $history_model->attributes = $_GET['CreditsHistory'];
     }
     $this->render('index', array('model' => $model, 'history_model' => $history_model));
 }