public function actionIndex() { $modelForm = new CetakLabelRakForm(); $profil = new Profil('search'); $profil->unsetAttributes(); // clear any default values if (isset($_GET['Profil'])) { $profil->attributes = $_GET['Profil']; } $rak = new RakBarang('search'); $rak->unsetAttributes(); if (isset($_GET['RakBarang'])) { $rak->attributes = $_GET['RakBarang']; } $labelCetak = new LabelRakCetak('search'); $labelCetak->unsetAttributes(); if (isset($_GET['LabelRakCetak'])) { $labelCetak->attributes = $_GET['LabelRakCetak']; /* simpan ke sesi untuk digunakan cetak label */ Yii::app()->user->setState('labelKategoriId', $_GET['LabelRakCetak']['kategoriId']); } $layoutForm = new CetakLabelRakLayoutForm(); if (isset($_GET['CetakLabelRakLayoutForm'])) { $layoutForm->attributes = $_GET['CetakLabelRakLayoutForm']; $this->labelRakPdf($layoutForm); } $this->render('index', array('modelForm' => $modelForm, 'profil' => $profil, 'rak' => $rak, 'labelCetak' => $labelCetak, 'layoutForm' => $layoutForm)); }
/** * Manages all models. */ public function actionIndex() { $model = new RakBarang('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['RakBarang'])) { $model->attributes = $_GET['RakBarang']; } $this->render('index', array('model' => $model)); }
public function actionIndex() { $this->layout = '//layouts/box_kecil'; $modelForm = new CetakStockOpnameForm(); if (isset($_POST['CetakStockOpnameForm'])) { $modelForm->attributes = $_POST['CetakStockOpnameForm']; if ($modelForm->validate()) { /* Penambahan memory_limit jika file pdf "agak" besar */ ini_set('memory_limit', '256M'); set_time_limit(0); $this->formSoPdf($modelForm, $modelForm->dataForm()); } } $rak = new RakBarang('search'); $rak->unsetAttributes(); if (isset($_GET['RakBarang'])) { $rak->attributes = $_GET['RakBarang']; } $this->render('index', ['modelForm' => $modelForm, 'rak' => $rak]); }