public function thanksNewsletterAction() { $tplVars = ['controller' => $this, 'pageTitle' => $this->page->name, 'contentViewTpl' => '<h1>Signup Successful</h1><p>Your request to sign up for the newsletter has been submitted.</p>', 'page' => $this->page]; if (isset($this->options['content_only']) && $this->options['content_only']) { View::renderString($this->page->content, $tplVars); return; } View::main($this->mainTpl, false, $tplVars); }
public function defaultAction() { $post = NewsPost::createById(@$_GET['id']); $tpl = 'news-view-post.tpl'; $vars = ['post' => $post]; if (isset($this->options['content_only']) && $this->options['content_only']) { View::renderTpl($tpl, $vars); return; } View::main($this->mainTpl, $tpl, $vars); }
public function defaultAction() { $posts = NewsPost::find([], '-date', [0, 10]); $tpl = 'news-recent.tpl'; $vars = ['posts' => $posts]; if (isset($this->options['content_only']) && $this->options['content_only']) { View::renderTpl($tpl, $vars); return; } View::main($this->mainTpl, $tpl, $vars); }
<?php include "mysql.php"; include "defines.php"; define("ADVANCED", true); include "classes/main.php"; $info = $board->getInfo('index'); $array = []; $db->query("SELECT * FROM region WHERE root_id = '0'"); while ($r = mysql_fetch_assoc($db->data)) { $array[] = $r; } $view = View::main(); $view->set('index', true); $view->set('area', $array); $view->render('index');
public function defaultAction() { if (@$this->page->url == '/404') { header('HTTP/1.0 404 Not Found'); } if (isset($this->page->main_tpl)) { $this->mainTpl = $this->page->main_tpl; } $title = @$this->page->title; if (!$title) { $title = @$this->page->name; } $tplVars = ['controller' => $this, 'pageTitle' => $title, 'metaDescription' => @$this->page->meta_description, 'contentViewTpl' => @$this->page->content, 'page' => $this->page]; if (isset($this->options['content_only']) && $this->options['content_only']) { View::renderString(@$this->page->content, $tplVars); return; } View::main($this->mainTpl, false, $tplVars); }