public function actionDescription($gallError = "") { $this->firmId = (int) Yii::app()->request->getParam("fid", 0); $id = (int) Yii::app()->request->getParam("id", 0); // Если не указан ID фирмы, то берем ID из описания тура if ($id > 0 && $this->firmId == 0) { $tourModel = CatalogTours::fetch($id); if ($tourModel->id > 0 && $tourModel->firm_id && $tourModel->firm_id->id > 0) { $this->firmId = $tourModel->firm_id->id; } } if ($this->firmId == 0) { die("id==0"); $this->redirect(SiteHelper::createUrl("/user/firms")); } $firmModel = CatalogFirms::fetch($this->firmId); if ($firmModel->id == 0) { die("id==not correct"); $this->redirect(SiteHelper::createUrl("/user/firms")); } parent::init(); $this->addModel = "CatalogToursAdd"; $this->tableName = "catalog_tours"; $this->name = Yii::t("user", "туры"); $_POST["CatalogToursAdd"]["firm_id"] = $this->firmId; $_POST["CatalogToursAdd"]["user_id"] = Yii::app()->user->getId(); parent::actionDescription(); }
public function init() { parent::init(); $this->addModel = "CatalogKurortsAdd"; $this->tableName = "catalog_kurorts"; $this->name = Yii::t("user", "зоны отдыха/дачи"); }
public function init() { parent::init(); $this->addModel = "CatalogFirmsItemsAdd2"; $this->tableName = "catalog_firms_items"; $this->name = Yii::t("user", "скидки и акции"); }
public function init() { parent::init(); $this->addModel = "CatalogFirmsAdd"; $this->tableName = "catalog_firms"; $this->name = Yii::t("user", "фирмы"); }
public function init() { parent::init(); $this->addModel = "CatalogHotelsAdd"; $this->tableName = "catalog_hotels"; $this->name = Yii::t("user", "отели"); }
public function init() { parent::init(); $this->addModel = "Notifications"; $this->tableName = "Notifications"; $this->name = Yii::t("user", "Сообщения"); $this->firmId = (int) Yii::app()->request->getParam("fid", 0); $id = (int) Yii::app()->request->getParam("id", 0); $return = false; }
public function init() { parent::init(); $this->addModel = "CatalogItemsAdd"; $this->tableName = "catalog_items"; $this->name = Yii::t("user", "Частные объявления"); $this->firmId = (int) Yii::app()->request->getParam("fid", 0); $id = (int) Yii::app()->request->getParam("id", 0); $return = false; }
public function init() { parent::init(); $this->addModel = "CatalogWorkResumeAdd"; $this->tableName = "catalog_work"; $this->name = Yii::t("user", "Мои резюме"); $this->dopSQL = " AND type_id=1"; $this->firmId = (int) Yii::app()->request->getParam("fid", 0); $id = (int) Yii::app()->request->getParam("id", 0); $return = false; }
public function __construct() { switch (strtolower(@$_POST['action'])) { case "user": UserController::init(); break; case "publicar": PublicacaoController::init(); break; } }
public function init() { parent::init(); $this->addModel = "CatalogFirmsServiceAdd"; $this->tableName = "catalog_firms_service"; $this->name = Yii::t("user", "Услуги компании"); $this->firmId = (int) Yii::app()->request->getParam("fid", 0); $id = (int) Yii::app()->request->getParam("id", 0); $return = false; // Если не указан ID фирмы, то берем ID из описания тура if ($id > 0 && $this->firmId == 0) { $class = $this->addModel; $tourModel = $class::fetch($id); if ($tourModel->id > 0 && $tourModel->firm_id && $tourModel->firm_id->id > 0) { $this->firmId = $tourModel->firm_id->id; } else { $return = true; } } if ($return == true) { $this->redirect(SiteHelper::createUrl("/user/firms")); } }