function savant() { global $content, $sitename; include_once 'Savant3.php'; $tpl = new Savant3(); $tpl->setEscape(); $tpl->title = $sitename; $tpl->content = $content; $tpl->display('index.tpl.php'); }
function partial($template, $data, $debug = false) { global $app; if ($debug) { $tpl = new Savant3(\Slim\Extras\Views\Savant::$savantOptions); echo '<pre>' . $tpl->fetch($template . '.php') . '</pre>'; return ''; } ob_start(); $tpl = new Savant3(\Slim\Extras\Views\Savant::$savantOptions); foreach ($data as $k => $v) { $tpl->{$k} = $v; } $tpl->display($template . '.php'); return ob_get_clean(); }
public static function render($filename, $data = NULL) { if (!$filename) { throw new Exception('A valid template filename is required for the template to be rendered.'); exit; } $tpl = new Savant3(); $tpl->date = date('Y'); $tpl->version = Titanium::VERSION; //$tpl->memory_limit = ini_get('memory_limit'); if (is_array($data)) { foreach ($data as $k => $v) { $tpl->{$k} = $v; } } return $tpl->fetch('templates/' . $filename); }
public function err404($admin = false, $text = '') { global $msg_charset, $html_lang, $msg_script6, $msg_script52, $msg_script54, $SETTINGS; header('HTTP/1.0 404 Not Found'); header('Content-type: text/html; charset=' . $msg_charset); if ($admin) { $f = array('{charset}', '{lang}', '{back}', '{error}', '{oops}'); $r = array($msg_charset, $html_lang, $msg_script54, $text ? $text : $msg_script6, $msg_script52); echo file_exists(PATH . 'templates/system/headers/404.php') ? str_replace($f, $r, file_get_contents(PATH . 'templates/system/headers/404.php')) : '404: Page Not Found'; } else { if (!class_exists('Savant3')) { include PATH . 'control/lib/Savant3.php'; } $tpl = new Savant3(); $tpl->assign('LANG', $html_lang); $tpl->assign('CHARSET', $msg_charset); $tpl->assign('SETTINGS', $SETTINGS); $tpl->assign('TXT', array($msg_script52, $msg_script6, $msg_script54)); $tpl->display('content/' . (defined(MS_TEMPLATE_SET) ? MS_TEMPLATE_SET : '_default_set') . '/headers/404.tpl.php'); } exit; }
<?php /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Script: Maian Support Programmed & Designed by: David Ian Bennett E-Mail: support@maianscriptworld.co.uk Software Website: http://www.maiansupport.com Script Portal: http://www.maianscriptworld.co.uk ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This File: account-suspended.php Description: System File ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ if (!defined('PARENT') || !defined('MS_PERMISSIONS')) { $HEADERS->err403(); } $title = $msg_public_login5; include PATH . 'control/header.php'; $tpl = new Savant3(); $tpl->assign('CHARSET', $msg_charset); $tpl->assign('TITLE', $msg_public_login5); $tpl->assign('TXT', array($msg_public_login5, mswCleanData($LI_ACC->reason))); // Global vars.. include PATH . 'control/lib/global.php'; // Load template.. $tpl->display('content/' . MS_TEMPLATE_SET . '/account-suspended.tpl.php'); include PATH . 'control/footer.php';
public function __construct($config = null) { parent::__construct($config); }
# Constants define("DEBUG", 0); define("M_EXEC", 1); define("ROOT_DIR", realpath("./")); # or dirname(__FILE__); define("LOCALE_DIR", ROOT_DIR . "/locale"); define("DEFAULT_LOCALE", "en"); define("THEME_DIR", "./themes/"); # absulute path didn't work with Savant3 define("DEFAULT_THEME", "blue"); define("RESULTS_LIMIT", 15); # Gettext require_once "./php-gettext/gettext.inc"; # Template engine require_once "savant3/Savant3.php"; $tpl = new Savant3(); # Variables class MV { public function __construct() { # gettext $this->domain = "alfanousMWUI"; $this->encoding = "UTF-8"; $this->locales_list = array("ar", "bs", "en", "fr", "id", "it", "ja", "ms", "pt_BR"); # theme $this->themes_list = array("blue", "std"); # Check GET parameters $this->search = isset($_GET["search"]) ? $_GET["search"] : ""; $this->page = isset($_GET["page"]) ? $_GET["page"] : 1; $this->language = isset($_GET["language"]) ? $_GET["language"] : DEFAULT_LOCALE;
<?php require_once 'savant/Savant3.php'; $tpl = new Savant3(); $content = array(array('title' => 'Photo Gallery', 'text' => 'Badminton Club boasts a year full of events and activities. Browse our photo gallery for a glimpse into the club and view the variety of our events that we offer.</p> <iframe align="center" src="http://www.flickr.com/slideShow/index.gne?user_id=45726881@N03" width="700" height="650" frameBorder="1" scrolling="no"></iframe>')); $tpl->content = $content; $tpl->display('template.php');
<?php include 'class/includes.php'; $view = new Savant3(); $service = Service::getInstance(); $view->setPath('template', array(TPL_PATH)); if (isset($_POST['search_term']) && chkid($_POST['city_id'])) { //TODO avoid search if term is empty(?) $search_term = htmlentities(text_only(trim($_POST['search_term'])), ENT_QUOTES, CONF_ENC); if ($search_term == LANG_SEARCH_TEXT) { $search_term = ''; } else { //TODO check for other criteria and if none dispaly message - no search term } $view->search_term = $search_term; $search_term = mb_strtoupper($search_term, CONF_ENC); $city_id = $_POST['city_id']; if (chkid($_POST['cat_id'])) { $cat_id = $_POST['cat_id']; $field_list = $service->get_searchable_field_list($cat_id); if (count($field_list) > 0) { foreach ($field_list as $key => $value) { switch ($value['type']) { case TYPE_NUMBER: if (isset($_POST[$value['name'] . TYPE_NUMBER_FROM]) && ctype_digit($_POST[$value['name'] . TYPE_NUMBER_FROM]) && $_POST[$value['name'] . TYPE_NUMBER_FROM] >= 0) { $field_list[$key]['from'] = text_only($_POST[$value['name'] . TYPE_NUMBER_FROM]); } if (isset($_POST[$value['name'] . TYPE_NUMBER_TO]) && ctype_digit($_POST[$value['name'] . TYPE_NUMBER_TO]) && $_POST[$value['name'] . TYPE_NUMBER_TO] >= 0) { $field_list[$key]['to'] = text_only($_POST[$value['name'] . TYPE_NUMBER_TO]); } break;
<?php include 'class/includes.php'; $service = Service::getInstance(); $view = new Savant3(); $view->setPath('template', array(TPL_PATH)); if (preg_match('/^([A-Za-z_-]{1,20})$/', $_GET['city_name'])) { $city_id = $service->get_city_id_by_name($_GET['city_name']); setcookie('city_id', $city_id, time() + 60 * 60 * 24 * 365 * 10, '/'); } elseif (isset($_COOKIE['city_id'])) { $city_id = $_COOKIE['city_id']; } if (preg_match('/^([A-Za-z0-9_-]{1,20})$/', $_GET['cat_name'])) { $cat_id = $service->get_cat_id_by_name($_GET['cat_name']); $view->category = $service->get_category_by_id($cat_id); } if (isset($city_id)) { $view->city = $service->get_city_by_id($city_id); } if (!isset($city_id) || isset($_GET['action']) && $_GET['action'] == 'cities') { //cities $view->city_list = $service->get_city_list(); $view->stylesheet = 'category_list.css'; $view->pushToQueue('header.tpl.php'); $view->pushToQueue('city_list.tpl.php'); $view->keywords = LANG_KEYWORDS_CITIES; } elseif (!isset($cat_id)) { //list of categories MAIN SCREEN!!! $view->category_list = $service->get_category_list_with_ad_count($city_id); $view->stylesheet = 'category_list.css'; $view->pushToQueue('header.tpl.php');
<?php include 'class/includes.php'; $purifier = new HTMLPurifier(); $service = Service::getInstance(); session_start(); $view = new Savant3(); $view->setPath('template', array(TPL_PATH)); $view->stylesheet = 'post.css'; if (preg_match('/^([A-Za-z_-]{1,20})$/', $_GET['city_name'])) { $city_id = $service->get_city_id_by_name($_GET['city_name']); $view->city = $service->get_city_by_id($city_id); } if (preg_match('/^([A-Za-z0-9_-]{1,20})$/', $_GET['cat_name'])) { $cat_id = $service->get_cat_id_by_name($_GET['cat_name']); $view->category = $service->get_category_by_id($cat_id); } if (isset($city_id) && ctype_digit($city_id)) { setcookie('city_id', $city_id, time() + 60 * 60 * 24 * 365 * 10, '/'); } else { } $view->title = LANG_POST_BC; $view->pushToQueue('header.tpl.php'); if (isset($_POST['action']) && $_POST['action'] == 'submit' && (chkid($city_id) || isset($_COOKIE['city_id']) && ctype_digit($_COOKIE['city_id']))) { $error = false; $error_messages = array(); $anonymize = htmlentities(text_only(trim($_POST['anonymize'])), ENT_QUOTES, CONF_ENC, false); $subject = htmlentities(text_only(trim($_POST['subject'])), ENT_QUOTES, CONF_ENC, false); //$str = mb_convert_encoding($str, ‘UTF-8', ‘UTF-8'); $location = htmlentities(text_only(trim($_POST['location'])), ENT_QUOTES, CONF_ENC, false); $text = $_POST['text'];
<?php include 'class/includes.php'; session_start(); $view = new Savant3(); $view->setPath('template', array(TPL_PATH)); $service = Service::getInstance(); //sleep(5); if (isset($_POST['action']) && $_POST['action'] == 'submit') { $error = false; $error_messages = array(); if (!isset($_POST['text']) || trim($_POST['text']) == '') { $error = true; $error_messages['text'] = LANG_POST_EM_AD_EMPTY_MSG; } else { if (strlen($_POST['text']) > AD_MSG_TEXT_LIMIT) { $error = true; $error_messages['text'] = sprintf(LANG_POST_EM_AD_MSG_IS_BIG, AD_MSG_TEXT_LIMIT); } } if (isset($_POST['email']) && trim($_POST['email']) != '') { if (!isemail($_POST['email'])) { $error = true; $error_messages['email'] = LANG_POST_EM_NOT_VALID_EMAIL; } } if (!isset($_POST['ad_id']) || trim($_POST['ad_id']) == '' || trim($_POST['ad_id']) == '0' || !chkid($_POST['ad_id'])) { $error = true; $error_messages['ad_id'] = LANG_POST_EM_EMPTY_AD_ID; } include_once 'securimage/securimage.php';
Script: Maian Support Written by: David Ian Bennett E-Mail: support@maianscriptworld.co.uk Software Website: http://www.maiansupport.com Script Portal: http://www.maianscriptworld.co.uk ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This File: footer.php Description: Footer ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ if (!defined('PARENT') || !defined('MS_PERMISSIONS')) { $HEADERS->err404(); } // Footer.. $footer = '<b>' . $msg_script3 . '</b>: <a href="http://www.' . SCRIPT_URL . '" title="' . SCRIPT_NAME . '" onclick="window.open(this);return false">' . SCRIPT_NAME . '</a> '; $footer .= '©2005-' . date('Y', $MSDT->mswTimeStamp()) . ' <a href="http://www.maianscriptworld.co.uk" onclick="window.open(this);return false" title="Maian Script World">Maian Script World</a>. ' . $msg_script12 . '.'; // Commercial version.. if (LICENCE_VER == 'unlocked') { $footer = $SETTINGS->publicFooter; if ($footer == '') { $footer = $msg_script34; } } $tpl = new Savant3(); $tpl->assign('FOOTER', $footer); // Global vars.. include PATH . 'control/lib/global.php'; // Load template.. $tpl->display('content/' . MS_TEMPLATE_SET . '/footer.tpl.php');
<?php // Load the Savant3 class file and create an instance. require_once '../Savant3.php'; session_start(); // initialize template engine $tpl = new Savant3(); $id = $_SESSION['user_id']; $email = $_SESSION['email']; // set search path for templates $tpl->addPath('template', '../template'); // Create a title. $template_path = "../template/"; $resource_path = "../"; $title = "User Listing"; $meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products."; $admin_link = "<div id='admin_menu'>\n\t\t\t\t<a href='../user_profile/?id={$id}'>Profile</a>–\n \t\t<a href='../admin_site/product_form.php'>Add Product </a>–\n\t\t\t\t<a href='../admin_site/user_list.php'>User Listing</a>–\n\t\t\t\t<a href='../admin_site/sitestatus_updateform.php'>Site Status</a>\n\t\t\t</div></br>"; $status_update = '<div class="title_bold"><table border="0"> <tr width="100"> <td width="100">User Id</td> <td width="100">Username</td> <td width="150">Email</td> <td width="100">Date Register</td> <td width="100">Token</td> </tr> </table></div>' . $tpl->fetch($template_path . 'userlist.tpl.php'); $contentContainer = array(array("title" => $title, "content" => $id == 1 ? $admin_link . $status_update : $status_update, "bottom_image" => '')); // Assign values to the Savant instance. $tpl->template_path = $template_path; $tpl->resource_path = $resource_path; $tpl->title = $title;
if (isset($CAT->subcat) && $CAT->subcat > 0) { define('IS_SUB', $CAT->subcat); } $subt = $msg_header8 . ': ' . $CAT->name; } } else { if (isset($_GET['q'])) { $subt = $msg_header8 . ': ' . $msg_pkbase3; } } // Header.. include PATH . 'control/header.php'; // Cookie set.. if (isset($_COOKIE[md5(SECRET_KEY) . COOKIE_NAME])) { $cky = unserialize($_COOKIE[md5(SECRET_KEY) . COOKIE_NAME]); } // Template initialisation.. $tpl = new Savant3(); $tpl->assign('TXT', array($subt, $msg_kbase52, $msg_kbase54, $msg_pkbase18)); $tpl->assign('SCH_TXT', $msg_header4); $tpl->assign('ANSWER', (array) $QUE); $tpl->assign('ANSWER_TXT', $MSPARSER->mswTxtParsingEngine($QUE->answer)); $tpl->assign('MSDT', $MSDT); $tpl->assign('ATTACHMENTS', $FAQ->attachments($SETTINGS)); $tpl->assign('FAQ_COOKIE_SET', in_array($_GET['a'], $cky) ? 'yes' : 'no'); // Global vars.. include PATH . 'control/lib/global.php'; // Load template.. $tpl->display('content/' . MS_TEMPLATE_SET . '/faq-question.tpl.php'); // Footer.. include PATH . 'control/footer.php';
<?php // Load the Savant3 class file and create an instance. require_once '../Savant3.php'; // initialize template engine $tpl = new Savant3(); // set search path for templates $tpl->addPath('template', '../template'); // Create a title. $template_path = "../template/"; $resource_path = "../"; $title = "Registration"; $meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products."; $contentContainer = array(array("title" => $title, "content" => $tpl->regact = $tpl->fetch($template_path . 'register_act.tpl.php'), "bottom_image" => '<div class="location"><img src="../template/template_image/bottom/location.png" alt="pointer"></div>')); // Assign values to the Savant instance. $tpl->template_path = $template_path; $tpl->resource_path = $resource_path; $tpl->title = $title; $tpl->meta_description = $meta_description; $tpl->content_container = $contentContainer; // Display a template using the assigned values. $tpl->login = $tpl->fetch($template_path . 'login.tpl.php'); $tpl->header = $tpl->fetch($template_path . 'header.tpl.php'); $tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php'); $tpl->display($template_path . 'main.tpl.php');
<?php require_once 'lib/Savant3.php'; $tpl = new Savant3(); $tpl->display('tpl/faq.tpl.php');
<?php include_once 'lib/connect.php'; require_once 'lib/functions.php'; require_once 'lib/Savant3.php'; session_start(); $url = explode("/", $_SERVER['REQUEST_URI']); // выбираем коллекцию $images = $db->images; $tpl = new Savant3(); date_default_timezone_set('Asia/Novosibirsk'); // добавление заголовка к фото if (isset($_POST['title']) && isset($_POST['name']) && isset($_SESSION['image_name'])) { $image_title = substr(trim($_POST['title']), 0, 100); $image_name = $_POST['name']; if (strlen($image_title) > 7) { $images->update(array('image' => $image_name), array('$set' => array('title' => $image_title))); echo htmlspecialchars($image_title); } } // Смена фото if (isset($_GET['index']) && isset($_GET['names']) && isset($_SESSION['image_name'])) { // массив имен изображений $image_names = $_GET['names']; // номер изображения $index = $_GET['index']; $image = $images->findOne(array('image' => $image_names[$index])); // определение времени добавления $uploaded = showDate(strtotime($image['date'])); // возвращаем имя изображения и расширение echo json_encode(array('title' => $image['title'], 'name' => $image['image'] . '.' . $image['ext'], 'when_upl' => $uploaded));
E-Mail: support@maianscriptworld.co.uk Software Website: http://www.maiansupport.com Script Portal: http://www.maianscriptworld.co.uk ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This File: account-dashboard.php Description: System File ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ if (!defined('PARENT') || !defined('MS_PERMISSIONS')) { $HEADERS->err403(); } // Check log in.. if (MS_PERMISSIONS == 'guest' || !isset($LI_ACC->id)) { header("Location:index.php?p=login"); exit; } $title = $msg_header3; $tz = $LI_ACC->timezone ? $LI_ACC->timezone : $SETTINGS->timezone; include PATH . 'control/header.php'; // Show.. $tpl = new Savant3(); $tpl->assign('TXT', array($msg_header13, $MSDT->mswDateTimeDisplay(strtotime(date('Y-m-d', $MSDT->mswUTC())), $SETTINGS->dateformat, $tz), $msg_public_dashboard1, $msg_public_dashboard2, $msg_public_dashboard3, $msg_public_dashboard4, $msg_public_dashboard5, str_replace('{name}', mswSpecialChars($LI_ACC->name), $msg_public_dashboard11), $msg_public_dashboard12)); $tpl->assign('TICKETS', $MSTICKET->ticketList(MS_PERMISSIONS, array(0, 99999), false, 'AND `ticketStatus` = \'open\'')); $tpl->assign('DISPUTES', $MSTICKET->disputeList(MS_PERMISSIONS, $LI_ACC->id, array(0, 99999), false, 'AND `ticketStatus` = \'open\'')); // Global vars.. include PATH . 'control/lib/global.php'; // Load template.. $tpl->display('content/' . MS_TEMPLATE_SET . '/account-dashboard.tpl.php'); include PATH . 'control/footer.php';
} } } // Are we searching for anything.. if ($SQL) { $html = $FAQ->questions(0, $limitvalue, $SETTINGS, array($SQL, 'no')); $dataCount = $FAQ->questions(0, $limitvalue, $SETTINGS, array($SQL, 'yes')); } } // Pagination.. if ($dataCount > $SETTINGS->quePerPage) { define('PER_PAGE', $SETTINGS->quePerPage); $PTION = new pagination($dataCount, '?q=' . urlencode($_GET['q']) . mswQueryParams(array('q', 'p', 'next')) . '&next='); $pageNumbers = $PTION->display(); } // Header.. include PATH . 'control/header.php'; // Template initialisation.. $tpl = new Savant3(); $tpl->assign('TXT', array($msg_pkbase, $msg_header4, $msg_kbase53)); $tpl->assign('SCH_TXT', $msg_header4); $tpl->assign('FAQ', $html); $tpl->assign('RESULTS', $dataCount); $tpl->assign('MSDT', $MSDT); $tpl->assign('PAGES', $pageNumbers); // Global vars.. include PATH . 'control/lib/global.php'; // Global vars.. $tpl->display('content/' . MS_TEMPLATE_SET . '/faq-search.tpl.php'); // Footer.. include PATH . 'control/footer.php';
Script: Maian Support Written by: David Ian Bennett E-Mail: support@maianscriptworld.co.uk Software Website: http://www.maiansupport.com Script Portal: http://www.maianscriptworld.co.uk ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This File: header.php Description: Header Parsing File ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ if (!defined('PARENT') || !defined('MS_PERMISSIONS')) { $HEADERS->err404(); } $tpl = new Savant3(); $tpl->assign('CHARSET', $msg_charset); $tpl->assign('LANG', $html_lang); $tpl->assign('DIR', $lang_dir); $tpl->assign('TITLE', ($title ? mswSpecialChars($title) . ': ' : '') . str_replace('{website}', mswSpecialChars($SETTINGS->website), $msg_header) . (LICENCE_VER != 'unlocked' ? ' (' . $msg_script18 . ' ' . $msg_script . ')' : '') . (LICENCE_VER != 'unlocked' ? ' - Free Version' : '') . (mswCheckBetaVersion() == 'yes' ? ' - BETA VERSION' : '')); $tpl->assign('TOP_BAR_TITLE', str_replace('{website}', mswSpecialChars($SETTINGS->website), $msg_header)); $tpl->assign('SCRIPTPATH', $SETTINGS->scriptpath); $tpl->assign('LOGGED_IN', MS_PERMISSIONS != 'guest' ? 'yes' : 'no'); $tpl->assign('TXT', array($msg_header8, $msg_main2, $msg_header3, $msg_header11, $msg_header12, $msg_header2, MS_PERMISSIONS != 'guest' && isset($LI_ACC->name) ? str_replace('{name}', mswSpecialChars($LI_ACC->name), $msg_header6) : '', $msg_header13, $msg_header14, $msg_header15, $msg_header16, $msg_header4)); $tpl->assign('JS_CSS_BLOCK', $MSYS->jsCSSBlockLoader($ms_js_css_loader, $SETTINGS->scriptpath)); $tpl->assign('FAQ_LINKS', $SETTINGS->kbase == 'yes' ? $FAQ->menu() : ''); // Global vars.. include PATH . 'control/lib/global.php'; // Load template.. $tpl->display('content/' . MS_TEMPLATE_SET . '/header.tpl.php');
E-Mail: support@maianscriptworld.co.uk Software Website: http://www.maiansupport.com Script Portal: http://www.maianscriptworld.co.uk ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This File: account-profile.php Description: System File ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ if (!defined('PARENT') || !defined('MS_PERMISSIONS')) { $HEADERS->err403(); } // Check log in.. if (MS_PERMISSIONS == 'guest' || !isset($LI_ACC->id)) { header("Location:index.php?p=login"); exit; } $title = $msg_header15; include PATH . 'control/header.php'; // Show.. $tpl = new Savant3(); $tpl->assign('TXT', array($msg_header3, $msg_public_account, $msg_public_account2, $msg_public_account3, $msg_public_account4, $msg_public_create4, $msg_public_account5, $msg_main3, $msg_public_create3, $msg_public_profile3, $msg_public_profile4, $msg_public_profile6, $msg_public_profile7, $msg_public_profile8, $msg_public_profile9)); $tpl->assign('TIMEZONES', $timezones); $tpl->assign('LANGUAGES', $MSYS->languages()); $tpl->assign('ACCOUNT', (array) $LI_ACC); // Global vars.. include PATH . 'control/lib/global.php'; // Load template.. $tpl->display('content/' . MS_TEMPLATE_SET . '/account-profile.tpl.php'); include PATH . 'control/footer.php';
/** * @inheritdoc */ public function fetch($template) { return $this->savant->fetch($template . self::$TEMPLATE_EXTENSION); }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ include "librerias/Savant3.php"; $plantilla = new Savant3(); $plantilla->display("plantillas/panel.tpl.php");
<?php require_once 'lib/Savant3.php'; $tpl = new Savant3(); $tpl->display('tpl/404.tpl.php');
/** * */ public function &htmlBySchema(&$schema, $template) { $tmpfname = tempnam("/tmp", "template"); $handle = fopen($tmpfname, "w"); fwrite($handle, $template); fclose($handle); $s = new \Savant3(array('template' => $tmpfname, 'template_path' => '')); $s->assign('schema', $schema); $html = $s->getOutput(); unlink($tmpfname); return $html; }
<?php // Load the Savant3 class file and create an instance. require_once '../Savant3.php'; // initialize template engine $tpl = new Savant3(); // set search path for templates $tpl->addPath('template', '../template'); // Create a title. $template_path = "../template/"; $resource_path = "../"; $title = "Buy Tokens"; $meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products."; $contentContainer = array(array("title" => $title, "content" => '<div class="buy_tokens">Choose your package by clicking on the button. Please take note that your payment is processed using Paypal. You will also receive a notification e-mail from CoinCod on this transaction. </div>' . $tpl->fetch($template_path . 'buy_token.tpl.php'), "bottom_image" => '<img class="bottom" src="../template/template_image/bottom/buy_tokens.png" alt="tokens shopping">')); // Assign values to the Savant instance. $tpl->template_path = $template_path; $tpl->resource_path = $resource_path; $tpl->title = $title; $tpl->meta_description = $meta_description; $tpl->content_container = $contentContainer; // Display a template using the assigned values. $tpl->login = $tpl->fetch($template_path . 'login.tpl.php'); $tpl->header = $tpl->fetch($template_path . 'header.tpl.php'); $tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php'); $tpl->display($template_path . 'main.tpl.php');
/** * overrides Savant 3 constructor to set the template path * * @param array $config An associative array of configuration keys for * the Savant3 object. Any, or none, of the keys may be set. * * @return object Savant3 A Savant3 instance. */ public function __construct($config = null) { $config = array('template_path' => LOGBOX_PATH . Options::get('theme_path')); parent::__construct($config); }
<?php // Load the Savant3 class file and create an instance. require_once '../Savant3.php'; session_start(); // initialize template engine $tpl = new Savant3(); $id = $_SESSION['user_id']; $email = $_SESSION['email']; // set search path for templates $tpl->addPath('template', '../template'); // Create a title. $template_path = "../template/"; $resource_path = "../"; $title = "Site Status Update"; $meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products."; $admin_link = "<div id='admin_menu'>\n\t\t\t\t<a href='../user_profile/?id={$id}'>Profile</a>–\n \t\t<a href='../admin_site/product_form.php'>Add Product </a>–\n\t\t\t\t<a href='../admin_site/user_list.php'>User Listing</a>–\n\t\t\t\t<a href='../admin_site/sitestatus_updateform.php'>Site Status</a>\n\t\t\t</div></br>"; $status_update = '<form action="status_updatefunc.php" enctype="multipart/form-data" name="myForm" id="myForm" method="post"> <td> <select id="status" name="status" size="1"> <option value="Well as usual running like charm.">Well as usual running like charm.</option> <option value="Website Maintenance! Temporary Down!">Website Maintenance! Temporary Down!</option> </select> </td> <input type="submit" name="button" class="form_button" value="Update" /> </form>'; $contentContainer = array(array("title" => $title, "content" => $id == 1 ? $admin_link . $status_update : $status_update, "bottom_image" => '')); // Assign values to the Savant instance. $tpl->template_path = $template_path; $tpl->resource_path = $resource_path; $tpl->title = $title;
<?php include 'class/includes.php'; $service = Service::getInstance(); $view = new Savant3(); $view->setPath('template', array(TPL_PATH)); session_start(); $view->pushToQueue('header.tpl.php'); if (chkid($_COOKIE['city_id'])) { $city_id = $_COOKIE['city_id']; $view->city = $service->get_city_by_id($city_id); } $view->post_breadcrumb = LANG_FOOTER_CONTACT_US; $view->pushToQueue('breadcrumbs.tpl.php'); $view->pushToQueue('search.tpl.php'); if (isset($_POST['action']) && $_POST['action'] == 'submit') { //validation $error = false; $error_list = array(); $text = $_POST['text']; if (!isset($text) || trim($text) == '') { $error = true; $error_list['textempty'] = LANG_POST_EM_EMPTY_TEXT; } else { if (mb_strlen($text, CONF_ENC) > AD_TEXT_LIMIT) { $error = true; $error_list['textlimit'] = sprintf(LANG_POST_EM_AD_IS_BIG, AD_TEXT_LIMIT); } } include 'securimage/securimage.php'; //check captcha!