public function actionAdmin() { $model = new Plan('search'); $model->unsetAttributes(); if (isset($_GET['Plan'])) { $model->setAttributes($_GET['Plan']); } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $this->layout = '//layouts/nocolumn'; $model = new Plan('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Plan'])) { $model->attributes = $_GET['Plan']; } $this->render('admin', array('model' => $model)); }
/** * Lists all models. */ public function actionIndex() { $session = new CHttpSession(); $session->open(); $criteria = new CDbCriteria(); $model = new Plan('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Plan'])) { $model->attributes = $_GET['Plan']; if (!empty($model->anioPlan)) { $criteria->addCondition('anioPlan = "' . $model->anioPlan . '"'); } if (!empty($model->Carrera_id)) { $criteria->addCondition('Carrera_id = "' . $model->Carrera_id . '"'); } if (!empty($model->id)) { $criteria->addCondition('id = "' . $model->id . '"'); } } $session['Plan_records'] = Plan::model()->findAll($criteria); $this->render('index', array('model' => $model)); }
/** * Manages all models. */ public function actionIndex() { $model = new Plan('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Plan'])) { $model->attributes = $_GET['Plan']; } if (!isset($_GET['Plan']['month'])) { $model->month = date('m') - 1; } else { $model->month = intval($_GET['Plan']['month']); } $this->render('admin', array('model' => $model)); }