/** * Lists all models. */ public function actionIndex() { $model = new Staff('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Staff'])) { $model->attributes = $_GET['Staff']; } $this->render('index', array('model' => $model)); }
public function actionlist() { $agree = 0; $hire = 0; $model=new Staff('search'); $model->unsetAttributes(); // clear any default values if(isset($_GET['Staff'])) $model->attributes=$_GET['Staff']; if(isset($_POST['agree'])){ $model->agree = $_POST['agree']; $agree = $_POST['agree']; } if(isset($_POST['hire'])){ $model->hire = $_POST['hire']; $hire = $_POST['hire']; } Yii::app()->session['myurl'] = $this->createUrl('list'); $this->render('list',array( 'model'=>$model, 'agree'=>$agree, 'hire'=>$hire, )); }
public function actionAdmin() { $model = new Staff('search'); $model->unsetAttributes(); if (isset($_GET['Staff'])) { $model->attributes = $_GET['Staff']; } $this->render('admin', array('model' => $model)); }