function page() { $user = $this->f3->get("user"); $catID = $this->f3->get("PARAMS['catID']"); $category = models\categories::getInstance()->get($catID); $categories = $this->f3->get("categories"); $c = array(); foreach ($categories as $item) { $c["ID-" . $item['ID']] = $item; } $this->catparents($category, $c); $this->breadcrumb = array_reverse($this->breadcrumb); $parentIDs = array(); foreach ($this->breadcrumb as $item) { $parentIDs[] = $item['ID']; } $category['parentIDs'] = $parentIDs; // test_array($c); $items = array("suggested" => models\items::format(models\items::getInstance()->getAll("catID='{$category['ID']}' AND recommended='1'", "name ASC")), "other" => models\items::format(models\items::getInstance()->getAll("catID='{$category['ID']}' AND recommended='0'", "name ASC"))); $relationships = array(); if ($category['relationship']) { $relationships = models\categories::getInstance()->getAll("dir_categories.ID in ({$category['relationship']}) OR parentID='{$category['ID']}'"); } // test_array($relationships); // test_array($category); // test_array(array("breadcrumbs"=>$this->breadcrumb,"categories"=>$c)); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "categories", "sub_section" => $category['ID'], "template" => "list_category", "meta" => array("title" => "Directory | {$category['category']}"), "css" => "", "js" => ""); $tmpl->breadcrumb = $this->breadcrumb; $tmpl->category = $category; $tmpl->related = $relationships; $tmpl->items = $items; $tmpl->output(); }
function show($view, $loc = null, $title = '') { $template = new template('searchmodule', $view, $loc); $template->assign('loc', $loc); $template->register_permissions(array('administrate', 'configure'), $loc); $template->output(); }
function show($view, $loc = null, $title = '') { if (exponent_permissions_check('administrate', $loc) || exponent_permissions_check('create', $loc) || exponent_permissions_check('edit', $loc) || exponent_permissions_check('delete', $loc)) { $template = new template('HTMLTemplateModule', $view, $loc); $template->assign('noupload', 0); $template->assign('uploadError', ''); if (!defined('SYS_FILES')) { include_once BASE . 'subsystems/files.php'; } $directory = 'files/HTMLTemplateModule/' . $loc->src; if (!file_exists(BASE . $directory)) { $err = exponent_files_makeDirectory($directory); if ($err != SYS_FILES_SUCCESS) { $template->assign('noupload', 1); $template->assign('uploadError', $err); } } global $db; $templates = $db->selectObjects('htmltemplate'); for ($i = 0; $i < count($templates); $i++) { $assocs = $db->selectObjects('htmltemplateassociation', 'template_id=' . $templates[$i]->id); if (count($assocs) == 1 && $assocs[0]->global == 1) { $templates[$i]->global_assoc = 1; } else { $templates[$i]->global_assoc = 0; $templates[$i]->associations = $assocs; } } $template->assign('moduletitle', $title); $template->assign('templates', $templates); $template->register_permissions(array('administrate', 'create', 'edit', 'delete'), exponent_core_makeLocation('HTMLTemplateModule')); $template->output(); } }
function page() { $user = $this->f3->get("user"); //$categories = $this->f3->get("categories"); //$categories = models\categories::format($categories,true); //test_array($categories); $items = models\items::format(models\items::getInstance()->getAll("gps_long!='' AND gps_lat!=''")); $item_json = array(); foreach ($items as $item) { $photo = ""; if ($item['photo']) { $photo = "<img alt='' src='/thumbnail/110/90?crop=false&file=/files/{$item['photo']}' class='img-thumbnail' />"; } $str = ""; if ($item['phone']) { $str = $str . "<em class='dg'>Phone:</em> " . $item['phone'] . "<br>"; } if ($item['website']) { $str = $str . "<em class='dg'>Website:</em> " . $item['website'] . "<br>"; } $item_json[] = array("ID" => $item['ID'], "placeTitle" => $item['name'], "tooltip" => '<div class="scrollFix"><strong>' . $item["name"] . '</strong><br><div> <div class="c" style="margin:10px;">' . $photo . '</div><div>' . $str . '</div></div>', "url" => "/item/{$item['ID']}/{$item['url']}", "lat" => $item['gps_lat'], "lng" => $item['gps_long']); } // test_array($item_json); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "map", "sub_section" => "map", "template" => "map", "meta" => array("title" => "Directory | Map"), "css" => "", "js" => "http://maps.google.com/maps/api/js"); $tmpl->item_json = json_encode($item_json); $tmpl->output(); }
function show($view, $loc = null, $title = '') { $template = new template('LoginModule', $view, $loc); $template->assign('title', $title); if (exponent_sessions_loggedIn()) { global $user, $db; $template->assign('loggedin', 1); $template->assign('user', $user); // Generate display name as username if the first and last name fields are blank. $display_name = $user->firstname . ' ' . $user->lastname; if (trim($display_name) == '') { $display_name = $user->username; } $template->assign('displayname', $display_name); // Need to check for groups and whatnot if ($db->countObjects('groupmembership', 'member_id=' . $user->id . ' AND is_admin=1')) { $template->assign('is_group_admin', 1); } else { $template->assign('is_group_admin', 0); } } else { $template->assign('loggedin', 0); } $template->output($view); }
function page() { $user = $this->f3->get("user"); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "about", "sub_section" => "about", "template" => "about", "meta" => array("title" => "Directory | About Us"), "css" => "", "js" => ""); $tmpl->output(); }
function page() { $user = $this->f3->get("user"); $tmpl = new \template("template.twig", "app/admin/"); $tmpl->page = array("section" => "home", "sub_section" => "home", "template" => "home", "meta" => array("title" => "Directory | Admin | Home"), "css" => "", "js" => ""); $tmpl->output(); }
function page() { $user = $this->f3->get("user"); $tmpl = new \template("template.twig", "app/admin/"); $tmpl->page = array("section" => "items", "sub_section" => "items", "template" => "items", "meta" => array("title" => "Directory | Admin | Items"), "css" => "", "js" => "http://maps.google.com/maps/api/js"); $tmpl->output(); }
function page() { $user = $this->f3->get("user"); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "items", "sub_section" => "items", "template" => "_items", "meta" => array("title" => "Directory | Items"), "css" => "", "js" => ""); $tmpl->items = models\items::format(models\items::getInstance()->getAll()); $tmpl->output(); }
function page() { $user = $this->f3->get("user"); $categories = models\categories::getInstance()->getAll("", "category ASC"); $tmpl = new \template("template.twig", "app/admin/"); $tmpl->page = array("section" => "categories", "sub_section" => "categories", "template" => "categories", "meta" => array("title" => "Directory | Admin | Categories"), "css" => "", "js" => ""); $tmpl->categories = $categories; $tmpl->output(); }
function show($view, $loc = null, $title = "") { $loc = exponent_core_makeLocation('FileManagerModule'); global $db; $collections = $db->selectObjects('file_collection'); $template = new template('FileManagerModule', $view, $loc); $template->assign('collections', $collections); $template->output(); }
function page() { $user = $this->f3->get("user"); $cfg = $this->cfg; $page = isset($_GET['page']) ? $_GET['page'] : '1'; //test_array($articles); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "home", "sub_section" => "home", "template" => "home", "meta" => array("title" => "Home Page"), "css" => "", "js" => ""); $tmpl->output(); }
function send_template_mail($to, $subject, $template, $headers = null) { $this->using('template'); $param =& $this->using('param'); $tpl = new template(); $template = explode('/', $template); $tpl->load(TM_TEMPLATES_DIR . C_TEMPLATE . '/layout/views/' . $template[0] . '/' . $template[1]); $tpl->set($param->get_params(), true); $message = $tpl->output(); $this->send_mail($to, $subject, $message, null, $headers); }
function show($view, $loc = null, $title = '') { $ui_levels = exponent_sessions_get('uilevels'); if (count($ui_levels)) { $template = new template('UISwitchermodule', $view, $loc); $template->assign('levels', $ui_levels); $default = exponent_sessions_isset('uilevel') ? exponent_sessions_get('uilevel') : max(array_keys($ui_levels)); $template->assign('default_level', $default); $template->output(); } }
function show($view, $loc = null, $title = "") { $ui_levels = pathos_sessions_get("uilevels"); if (count($ui_levels)) { $template = new template("uiswitchermodule", $view, $loc); $template->assign("levels", $ui_levels); $default = pathos_sessions_isset("uilevel") ? pathos_sessions_get("uilevel") : max(array_keys($ui_levels)); $template->assign("default_level", $default); $template->output(); } }
function page() { $user = $this->f3->get("user"); $pageID = $this->f3->get("PARAMS['pageID']"); $data = models\pages::getInstance()->get($pageID); //test_array($pageID); $tmpl = new \template("template.twig", "app/admin/"); $tmpl->page = array("section" => "pages", "sub_section" => "page{$pageID}", "template" => "pages", "meta" => array("title" => "Directory | Admin | Pages"), "css" => "", "js" => ""); $tmpl->data = $data; $tmpl->pageID = $pageID; $tmpl->output(); }
function page() { $user = $this->f3->get("user"); $cfg = $this->cfg; $page = isset($_GET['page']) ? $_GET['page'] : '1'; $domain = $this->f3->get("domain"); //test_array($articles); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "contact", "sub_section" => "contact", "template" => "contact", "meta" => array("title" => $domain['domainname'] . " | Contact Us"), "css" => "", "js" => ""); $tmpl->_page = "contact"; $tmpl->output(); }
function show($view, $loc = null, $title = '') { $template = new template('previewmodule', $view, $loc); $level = 99; if (pathos_sessions_isset('uilevel')) { $level = pathos_sessions_get('uilevel'); } $template->assign('editMode', pathos_sessions_loggedIn() && $level != UILEVEL_PREVIEW); $template->assign('title', $title); $template->assign('previewMode', $level == UILEVEL_PREVIEW); $template->output($view); }
function show($view, $loc = null, $title = '') { global $db; $contacts = $db->selectObjects('contact_contact', "location_data='" . serialize($loc) . "'"); $t = new template('ContactModule', '_standard', $loc); $t->register_permissions(array('administrate', 'configure'), $loc); $t->output(); $template = new template('ContactModule', $view, $loc); $template->assign('contacts', $contacts); $template->assign('loc', $loc); $template->assign('numContacts', count($contacts)); $template->assign('moduletitle', $title); $template->register_permissions(array('administrate', 'configure'), $loc); $template->output(); }
function page() { $user = $this->f3->get("user"); $domain = $this->f3->get("domain"); $cfg = $this->cfg; $page = isset($_GET['page']) ? $_GET['page'] : '1'; $articles = $this->api("article/_list?limit=0,10&thumb_width=64&thumb_height=64&pagination=9&page={$page}"); //test_array($articles); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "home", "sub_section" => "home", "template" => "home", "meta" => array("title" => "Welcome to " . $domain['domainname']), "css" => "", "js" => ""); $tmpl->_page = "/"; $tmpl->articles = $articles['data']; $tmpl->pagination = isset($articles['data']['pagination']) ? $articles['data']['pagination'] : false; $tmpl->output(); }
function page() { $user = $this->f3->get("user"); $cfg = $this->cfg; $page = isset($_GET['page']) ? $_GET['page'] : '1'; $domain = $this->f3->get("domain"); $data = $this->api("event/_list?limit=0,100&daterange=monthfuture&orderby=dateStart+ASC"); $data = $data['data']['list']; //test_array($data); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "events", "sub_section" => "list", "template" => "event_list", "meta" => array("title" => $domain['domainname'] . " | Events"), "css" => "", "js" => ""); $tmpl->_page = "events/list"; $tmpl->data = $data; $tmpl->data_orig = $data; $tmpl->output(); }
function show($view, $loc, $title) { global $db, $user; if ($user) { $template = new template('InboxModule', $view, $loc); $read = $db->countObjects('privatemessage', 'recipient=' . $user->id . ' AND unread=0'); $unread = $db->countObjects('privatemessage', 'recipient=' . $user->id . ' AND unread=1'); $template->assign('readMessages', $read); $template->assign('unreadMessages', $unread); $template->assign('totalMessages', $unread + $read); $template->assign('user', $user); $template->assign('moduletitle', $title); $template->register_permissions('administrate', $loc); $template->output(); } }
function page() { $user = $this->f3->get("user"); $ID = $this->f3->get("PARAMS['ID']"); $highlight = isset($_REQUEST['highlight']) ? $_REQUEST['highlight'] : false; $details = models\items::getInstance()->get($ID); $details = models\items::format($details, $highlight); $categories = models\categories::format(models\categories::getInstance()->getAll("dir_items.ID='{$details['ID']}'", "category ASC"), false, $highlight); $title = $details['name']; // test_array($category); // test_array(array("breadcrumbs"=>$this->breadcrumb,"categories"=>$c)); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "details", "sub_section" => "item-" . $details['ID'], "template" => "item_details", "meta" => array("title" => "Directory | {$this->f3->scrub($title)}"), "css" => "", "js" => "http://maps.google.com/maps/api/js"); $tmpl->details = $details; $tmpl->categories = $categories; $tmpl->output(); }
function show($view, $loc = null, $title = "") { global $db; $obj = null; $o = $db->selectObjects('rotator_item', "location_data='" . serialize($loc) . "'"); $num = rand(0, count($o) - 1); if (isset($o[$num])) { $obj = $o[$num]; } else { $obj->text = ''; } $template = new template('rotatormodule', $view, $loc); $template->assign('moduletitle', $title); $template->assign('content', $obj); $template->register_permissions(array('administrate', 'manage'), $loc); $template->output(); }
function show($view, $loc = null, $title = '') { global $db; $template = new template('translatormodule', $view, $loc); $langs = array(); $lloc = pathos_core_makeLocation('translatormodule'); foreach ($db->selectObjects('translation_language') as $lang) { $lloc->int = $lang->id; $lang->permissions = array('administrate' => pathos_permissions_check('administrate', $lloc) ? 1 : 0, 'configure' => pathos_permissions_check('configure', $lloc) ? 1 : 0); $langs[] = $lang; } $template->assign('languages', $langs); $template->assign('dictionaries', translatormodule::dictionaries()); $template->assign('moduletitle', $title); $template->register_permissions(array('administrate', 'configure'), $loc); $template->output(); }
function show($view, $loc = null, $title = '') { global $db; $question = $db->selectObject('poll_question', "is_active = 1 AND location_data='" . serialize($loc) . "'"); $answers = array(); if ($question) { $answers = $db->selectObjects('poll_answer', 'question_id=' . $question->id); } $answers = expSorter::sort(array('array' => $answers, 'sortby' => 'rank', 'order' => 'ASC')); $template = new template('simplepollmodule', $view, $loc); $template->assign('moduletitle', $title); $template->assign('question', $question); $template->assign('answers', $answers); $template->assign('have_answers', count($answers)); $template->register_permissions(array('administrate', 'configure', 'manage_question', 'manage_answer'), $loc); $template->output(); }
function show($view, $loc = null, $title = '') { $template = new template('SharedCoreModule', $view); global $db; $cores = array(); foreach ($db->selectObjects('sharedcore_core') as $c) { if (file_exists($c->path . 'exponent_version.php')) { $c->version = (include $c->path . 'exponent_version.php'); $c->linked = $db->selectObjects('sharedcore_site', 'core_id=' . $c->id); $cores[] = $c; } } $template->assign('cores', $cores); $template->assign('moduletitle', $title); $template->register_permissions(array('administrate', 'manage'), $loc); $template->output(); }
function page() { $user = $this->f3->get("user"); $cfg = $this->cfg; $page = isset($_GET['page']) ? $_GET['page'] : '1'; $domain = $this->f3->get("domain"); $article = $this->api("article/_details?ID=" . $this->f3->get("PARAMS['ID']")); $article = $article['data']; if ($article['ID'] == '') { $this->f3->error("404"); } //test_array($articles); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "articles", "sub_section" => $article['category']['url'], "template" => "article_details", "meta" => array("title" => $domain['domainname'] . " | " . $article['heading']), "css" => "", "js" => ""); $tmpl->article = $article; $tmpl->_page = "articles/" . $article['category']['url']; $tmpl->output(); }
function page() { $user = $this->f3->get("user"); $recent = models\items::format(models\items::getInstance()->getAll("", 'datein DESC', '0,5')); $items = models\items::format(models\items::getInstance()->getAll("recommended='1' and dir_items.photo != ''")); $rand = array_rand($items, 10); $n = array(); foreach ($rand as $i) { $n[] = $items[$i]; } $suggested = $n; //test_array(($n)); //test_array($suggested); $tmpl = new \template("template.twig"); $tmpl->page = array("section" => "home", "sub_section" => "home", "template" => "home", "meta" => array("title" => "Directory | Home"), "css" => "", "js" => ""); $tmpl->suggested = $suggested; $tmpl->recent = $recent; $tmpl->output(); }
function show($view, $loc = null, $title = '') { global $db; $question = $db->selectObject('poll_question', "is_active = 1 AND location_data='" . serialize($loc) . "'"); $answers = array(); if ($question) { $answers = $db->selectObjects('poll_answer', 'question_id=' . $question->id); } if (!defined('SYS_SORTING')) { require_once BASE . 'subsystems/sorting.php'; } usort($answers, 'pathos_sorting_byRankAscending'); $template = new template('simplepollmodule', $view, $loc); $template->assign('question', $question); $template->assign('answers', $answers); $template->assign('have_answers', count($answers)); $template->register_permissions(array('administrate', 'configure', 'manage_question', 'manage_answer'), $loc); $template->output(); }