/** * third sequence * Method untuk menampilkan manage data member */ public function actionAdmin() { $model = new Member('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Member'])) { $model->id_member = $_GET['Member']['id_member']; } $this->renderPartial('_admin', array('model' => $model, false, true)); }
/** * Lists all models. */ public function actionIndex() { $this->addToolbar(); $model = new Member('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Member'])) { $model->attributes = $_GET['Member']; } $this->render('index', array('model' => $model)); }
public function actionList() { $model=new Member('search'); $model->unsetAttributes(); // clear any default values if(isset($_GET['Member'])) $model->attributes=$_GET['Member']; Yii::app()->session['myurl'] = $this->createUrl('list'); $this->render('list',array( 'model'=>$model, )); }
public function actionIndex() { $model = new Member('Search'); $model->unsetAttributes(); if (!empty($_GET['ajax']) and $_GET['ajax'] === 'member-grid') { if (!empty($_GET['category']) and $_GET['category'] === 'id_member') { $model->id_member = $_GET['keyword']; } elseif (!empty($_GET['category']) and $_GET['category'] === 'member_name') { $model->first_name = $_GET['keyword']; } } $this->render('index', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { // is current user has the required privilege ? if (!Yii::app()->user->checkAccess('member_admin')) { throw new CHttpException(403, 'You are not authorized to perform this action.'); } $model = new Member('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Member'])) { $model->attributes = $_GET['Member']; } $this->render('admin', array('model' => $model)); }
public function actionMember() { if (!Yii::app()->user->checkAccess('Admin')) { throw new CHttpException(403, 'You are not authorized to perform this action.'); } $this->layout = '//layouts/column2'; /*$dataprovider = new CActiveDataProvider('Member', array('sort' => array('defaultOrder' => 'name ASC', )));*/ $model = new Member('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Member'])) { $model->attributes = $_GET['Member']; } $this->render('member', array('model' => $model)); }