function execute() { $locale = new Locales('connection'); $list = $locale->getList(); $pageModel = new connectionPagesModel(); $this->smarty->assign('pages', $pageModel->fetchAll()); $this->smarty->assign('lang', $list); $this->smarty->assign('page_url', Settings::getValue('page_url')); }
function execute() { $page_id = Request::post('page_id'); if (!$page_id) { return 'error'; } $model = new connectionPagesModel(); $model->deletePage((int) $page_id); return 'success'; }
function execute() { $page_id = Request::post('page_id'); if (!$page_id) { exit; } $model = new connectionPagesModel(); $locale = new Locales('connection'); $list = $locale->getList(); $this->smarty->assign('lang', $list); $this->smarty->assign('page', $model->getPage($page_id)); $this->smarty->display(APP_DIR . DS . App::getAppName() . DS . APP_TEMPLATES_DIR . DS . 'backend' . DS . '/include/modal/pageEdite.html'); exit; }
function execute() { $page_url = Request::get('page_url'); $model = new connectionPagesModel(); $page = $model->getPageFromUrl($page_url); if (!$page) { $this->showNotFound(); return; } $provider = new PageProviderFenom(); $this->fenom->addProvider("string", $provider, TEMP_DIR . DS . 'fenom' . DS . 'templates_c'); $page_content = $model->getLocalePage($page['id'], Language::getActiveLanguageISO()); $page_content['content'] = $this->fenom->fetch("string:" . $page['id'], array('theme_name' => Settings::getValue('theme'))); $this->setPageTitle($page_content['title']); $this->setPageMeta('keywords', $page_content['meta']['keywords']); $this->setPageMeta('description', $page_content['meta']['description']); return array('page' => $page_content); }
function execute() { $result = 'success'; $model = new connectionPagesModel(); $page = Request::post('page'); if (!isset($page['name']) || empty($page['name']) || !isset($page['url']) || empty($page['url'])) { return 'error'; } if (!isset($page['id'])) { if ($model->getPageFromUrl($page['url'])) { return 'error'; } $model->insert($page); } else { $page_id = (int) $page['id']; unset($page['id']); $model->where(array('id' => $page_id))->update($page); } return $result; }
public function __construct() { $this->model = connectionPagesModel::create(); }