public function actionIndex() { if (isset($_POST['limit'])) { $limit = $_POST['limit']; } else { $limit = 20; } if (isset($_POST['start'])) { $start = $_POST['start']; } else { $start = 0; } //$model = new MtSys('search'); //$model->unsetAttributes(); $criteria = new CDbCriteria(); // $criteria->limit = $limit; // $criteria->offset = $start; $model = MtSys::model()->findAll($criteria); $total = MtSys::model()->count($criteria); if (isset($_GET['MtSys'])) { $model->attributes = $_GET['MtSys']; } if (isset($_GET['output']) && $_GET['output'] == 'json') { $this->renderJson($model, $total); } else { $model = new MtSys('search'); $model->unsetAttributes(); $this->render('admin', array('model' => $model)); } }
static function TypePendapatanAct() { $model = MtSys::model()->findByPk('type_pendapatan_act'); return $model->value; }