function run() { $theme = Settings::getValue('theme'); $module = ($result = explode('/', Request::get('module'))) && sizeof($result) > 1 ? $result[sizeof($result) - 1] : Request::get('module'); $this->template = App::getAppName() . strtoupper(substr($module, 0, 1)) . substr($module, 1) . strtoupper(substr(Request::get('action'), 0, 1)) . substr(Request::get('action'), 1); $this->defaultVar = array('theme_name' => $theme, 'theme_url' => App::getAppUrl() . APP_TEMPLATES_DIR . DS . 'themes' . DS . $theme . DS, 'dir_include_frontend' => APP_DIR . DS . 'connection' . DS . APP_TEMPLATES_DIR . DS . 'frontend' . DS . 'include'); $assign = is_array($result = $this->execute()) ? $result : array(); if ($this->exit) { return; } if ($this->notFound) { $this->setSeoPage('404'); } $seo = connectionSeoModel::create()->getByLocale($this->seoPage, Language::getActiveLanguageISO()); if (empty($this->default['page_title'])) { $this->default['page_title'] = $seo['title']; } if (empty($this->default['page_meta']['description'])) { $this->default['page_meta']['description'] = $seo['description']; } if (empty($this->default['page_meta']['keywords'])) { $this->default['page_meta']['keywords'] = $seo['keywords']; } if ($this->notFound) { $sourceAction = $this->fenom->fetch('themes/' . $theme . '/404.html', array_merge($assign, $this->defaultVar)); } else { $sourceAction = $this->fenom->fetch(Request::get('module') . DS . $this->template . '.html', array_merge($assign, $this->defaultVar)); } if ($this->frame) { $this->fenom->display('themes/' . $theme . '/index.html', array_merge(array('action' => $sourceAction), $this->default, $this->defaultVar)); } else { echo $sourceAction; } }
function execute() { $locale = new Locales('connection'); $list = $locale->getList(); $page = Request::post('page'); $this->smarty->assign('seo', connectionSeoModel::create()->getByPage($page)); $this->smarty->assign('lang', $list); }
function execute() { $data = Request::post('seo'); $model = new connectionSeoModel(); $model->save($data); }