/** * Manages all models. */ public function actionIndex() { $this->tituloManual = "Lista de pedidos"; $model = new Pedido('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Pedido'])) { $model->attributes = $_GET['Pedido']; } $this->render('index', array('model' => $model, 'arrayStatus' => Status::getArray(), 'arrayFormaPagamento' => CHtml::listData(FormaPagamento::model()->findAll(), 'id', 'nome'))); }
public function actionVerTodos() { $session = new CHttpSession(); $session->open(); $model = new Pedido('search'); $model->unsetAttributes(); if (isset($_GET['Pedido'])) { $model->setAttributes($_GET['Pedido']); } $session['Pedido_model_search'] = $model; $this->render('verTodos', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Pedido('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Pedido'])) { $model->attributes = $_GET['Pedido']; } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { /*$model=new Pedido('search'); $model->unsetAttributes(); // clear any default values if(isset($_GET['Pedido'])) $model->attributes=$_GET['Pedido']; */ if (Yii::app()->user->checkAccess('cliente')) { $model = new Pedido('search2'); } else { $model = new Pedido('search'); } $model->unsetAttributes(); // clear any default values if (isset($_GET['Pedido'])) { $model->attributes = $_GET['Pedido']; } $this->render('admin', array('model' => $model)); }