/** * Manages all models. */ public function actionAdmin($oid = '', $csid = '', $zid = '', $did = '', $mode = '') { //validate that csid is true at the active record if ($csid != '') { $csid = $this->loadCSModel($csid)->primaryKey; } //validate that oid is true at the active record if ($oid != '') { $oid = $this->loadOModel($oid)->primaryKey; } $model = new FRatePrice(); $model->companyService = $csid; $model->origin = $oid; if ($mode == 'district') { $districts = District::getDistrictRatePrice($did); } $zones = Zone::getZoneRatePrice($zid, $did, $mode); $data_render = array('model' => $model, 'zones' => $zones, 'csid' => $csid, 'oid' => $oid, 'zid' => $zid, 'did' => $did, 'mode' => $mode); if ($mode == 'district') { $data_render['district'] = $districts; } $this->render('admin', $data_render); }