Exemplo n.º 1
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     date_default_timezone_set("Asia/Manila");
     $activity = new Activity();
     $activity->act_desc = 'Viewed Official List';
     $activity->act_datetime = date('Y-m-d G:i:s');
     $activity->act_by = User::model()->findByPK(Yii::app()->user->name)->emp_id;
     $activity->save();
     $model = new Officials('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Officials'])) {
         $model->attributes = $_GET['Officials'];
     }
     $this->render('admin', array('model' => $model));
 }