public function actionContacts() { if (!self::isAuthAdmin()) { return null; } $this->title = "Админ панель"; $this->meta_desc = "Админ панель"; $this->meta_key = "админ панель"; $head = $this->getHead(array("/css/main.css"), false); $head->add("js", null, true); $head->js = array("/js/main.js", "/js/admin.js"); $admin_menu = new Contactsadmin(); $obj = new ContactsDB(); $obj->load(1); $admin_menu->name = $obj->name; $admin_menu->ind = $obj->ind; $admin_menu->address = $obj->address; $admin_menu->phone = $obj->phone; $admin_menu->email = $obj->email; $admin_menu->inn = $obj->inn; $admin_menu->kpp = $obj->kpp; $admin_menu->bik = $obj->bik; $admin_menu->rs = $obj->rs; $admin_menu->bank = $obj->bank; $admin_menu->ks = $obj->ks; $admin_menu->okpo = $obj->okpo; $admin_menu->okato = $obj->okato; $admin_menu->ogrn = $obj->ogrn; $hornav = new Hornav(); $hornav->addData("Админпанель", URL::get("menu", "admin")); $hornav->addData("Контактная информация и схема проезда"); $this->render($head, $this->renderData(array("hornav" => $hornav, "admin_menu" => $admin_menu), "adminpanel")); }
public function actionAbout() { $key = $this->request->getKeyOnNumber(0); $obj = new ContactsDB(); $obj->load(1); $value = $this->request->{$key}; $obj->{$key} = $value; if ($obj->save()) { echo htmlspecialchars_decode($value); } else { echo "error"; } }
public function actionContacts() { $this->title = "Контакты"; $this->meta_desc = "Контактная информация и схема проезда"; $this->meta_key = "контакты, схем проезда"; $head = $this->getHead(array("/css/main.css"), false); $content = new Contacts(); $obj = new ContactsDB(); $obj->load(1); $content->name = $obj->name; $content->ind = $obj->ind; $content->address = $obj->address; $content->phone = $obj->phone; $content->email = $obj->email; $content->inn = $obj->inn; $content->kpp = $obj->kpp; $content->bik = $obj->bik; $content->rs = $obj->rs; $content->bank = $obj->bank; $content->ks = $obj->ks; $content->okpo = $obj->okpo; $content->okato = $obj->okato; $content->ogrn = $obj->ogrn; $head->add("js", null, true); $head->js = array("/js/main.js"); $hornav = $this->getHornav(); $hornav->addData("Контакты"); $content->hornav = $hornav; $this->render($head, $content); }