public function action($gpc) { $this->_smarty->config_load('textes.de.conf', 'Image'); $this->_img_textes = $this->_smarty->get_config_vars(); $this->_gpc = $gpc; if (isset($gpc['GET']['img'])) { $this->_initImg($gpc['GET']['img']); } elseif (isset($gpc['GET']['thumb'])) { $this->_initThumb($gpc['GET']['thumb']); } else { $this->_initErrImg($this->_img_textes['no_param']); } }
/** * Liefert der Path der Kategorien aus von der angegebenen Kategorie bis zur Hauptseite. * Das zurückgelieferte Array sieht etwa folgendermassen aus: * array(0 => Hauptseite, 1 => Kategorie 1, 2 => Kategorie 1.1, 3 => ...) * * @param int $cat_ID KategorieID der untersten Kategorie * @param bool[optional] $inc_catID Gibt an, ob die Kategorie mit ID = $cat_ID auch in der Wurzel vorkommen soll * @param bool[optional] $inc_hs Gibt an, ob der Eintrag 'Hauptseite' auch in der Wurzel vorkommen soll * @return array $root_array Path der Kategorien. */ private function _getRoot($cat_ID, $inc_catID = false, $inc_hs = true) { /* Wurzel auslesen */ $tmp_arr = array(); if ($inc_catID == false) { $this->_mysql->query("SELECT `ref_ID` FROM `gallery_categories` WHERE `ID` = '{$cat_ID}' LIMIT 1"); $data = $this->_mysql->fetcharray('assoc'); $tmp_ID = $data['ref_ID']; } else { $tmp_ID = $cat_ID; } for ($i = 0; $tmp_ID != 0; $i++) { $this->_mysql->query("SELECT `ID`,`ref_ID`,`name` FROM `gallery_categories` WHERE `ID` = '{$tmp_ID}' LIMIT 1"); $tmp_arr[$i] = $this->_mysql->fetcharray('assoc'); $tmp_ID = $tmp_arr[$i]['ref_ID']; } if ($inc_hs == true) { /*Hauptseite noch einfügen*/ $this->_smarty->config_load('textes.de.conf', 'Gallery'); $gallery_textes = $this->_smarty->get_config_vars(); $tmp_arr[++$i] = array('ID' => '0', 'name' => $gallery_textes['mainsite']); return array_reverse($tmp_arr); } else { return null; } }
/** * Start des Moduls * * @param array $gpc */ public function action($gpc) { $this->_gpc = $gpc; //Daten laden $this->_smarty->config_load('textes.de.conf', 'Mail'); $this->_config_textes['Mail'] = $this->_smarty->get_config_vars(); $this->_smarty->config_load('textes.de.conf', 'Form_Error'); $this->_config_textes['Error'] = $this->_smarty->get_config_vars(); if (key_exists('hash', $gpc['GET']) && is_string($gpc['GET']['hash'])) { $this->_truemail_send($gpc['GET']['hash']); } elseif (key_exists('nav_id', $gpc['GET']) && is_numeric($gpc['GET']['nav_id'])) { $this->_checkmail_send($gpc['GET']['nav_id']); } else { throw new CMSException(array('mail' => 'invalid_param'), EXCEPTION_MODULE_CODE); } }
/** * Führt die einzelnen Methoden aus, abhängig vom Parameter * * @param array $gpc $_POST- und $_GET-Arrays * @global string dir_smilies Used for the dir where the smilies-gif are saved * @global int gbook_entries_per_page * @return boolean */ public function action($gpc) { //Daten laden $this->_smarty->config_load('textes.de.conf', 'Gbook'); $this->_configvars['Gbook'] = $this->_smarty->get_config_vars(); $this->_smarty->config_load('textes.de.conf', 'Form_Error'); $this->_configvars['Error'] = $this->_smarty->get_config_vars(); $this->_gpc = $gpc; $this->_msbox = new MessageBoxes($this->_mysql, 'gbook', array('ID' => 'gbook_ID', 'ref_ID' => 'gbook_ref_ID', 'content' => 'gbook_content', 'name' => 'gbook_name', 'time' => 'gbook_time', 'email' => 'gbook_email', 'hp' => 'gbook_hp', 'title' => 'gbook_title')); $this->_smilie = new Smilies(SMILIES_DIR); if (isset($this->_gpc['GET']['action'])) { switch ($this->_gpc['GET']['action']) { case 'new': $this->_add(); break; case 'comment': $this->_comment(); break; case 'view': $this->_view(GBOOK_ENTRIES_PER_PAGE); break; case '': $this->_view(GBOOK_ENTRIES_PER_PAGE); break; default: throw new CMSException(array('gbook' => 'invalid_option'), EXCEPTION_MODULE_CODE); } } else { $this->_view(GBOOK_ENTRIES_PER_PAGE); } return true; }
/** * Get smarty template * @return Smarty smarty object */ public static function getSmartyTemplate() { /* if(extension_loaded('ionCube Loader')){ include_once(SMARTY_DIR . "Smarty.class.php"); }else{ include_once(SMARTY_DIR . "Smarty.class.src.php"); } * */ $smarty = new \Smarty(); $useTheme = !defined('OPENBIZ_USE_THEME') ? 0 : OPENBIZ_USE_THEME; if ($useTheme) { $theme = Openbiz::$app->getCurrentTheme(); $themePath = $theme; // Openbiz::$app->getConfiguration()->GetThemePath($theme); if (is_dir(OPENBIZ_THEME_PATH . "/" . $themePath . "/template")) { $templateRoot = OPENBIZ_THEME_PATH . "/" . $themePath . "/template"; } else { $templateRoot = OPENBIZ_THEME_PATH . "/" . $themePath . "/templates"; } $smarty->template_dir = $templateRoot; $smarty->compile_dir = defined('OPENBIZ_SMARTY_CPL_PATH') ? OPENBIZ_SMARTY_CPL_PATH . "/" . $themePath : $templateRoot . "/cpl"; $smarty->config_dir = $templateRoot . "/cfg"; if (!file_exists($smarty->compile_dir)) { @mkdir($smarty->compile_dir, 0777); } // load the config file which has the images and css url defined $smarty->config_load('tpl.conf'); } else { if (defined('SMARTY_TPL_PATH')) { $smarty->template_dir = SMARTY_TPL_PATH; } if (defined('OPENBIZ_SMARTY_CPL_PATH')) { $smarty->compile_dir = OPENBIZ_SMARTY_CPL_PATH . "/" . $themePath; } if (defined('SMARTY_CFG_PATH')) { $smarty->config_dir = SMARTY_CFG_PATH; } } if (!is_dir($smarty->compile_dir)) { mkdir($smarty->compile_dir, 0777); } // load the config file which has the images and css url defined $smarty->assign('app_url', OPENBIZ_APP_URL); $smarty->assign('app_index', OPENBIZ_APP_INDEX_URL); $smarty->assign('js_url', OPENBIZ_JS_URL); $smarty->assign('css_url', OPENBIZ_THEME_URL . "/" . $theme . "/css"); $smarty->assign('resource_url', OPENBIZ_RESOURCE_URL); $smarty->assign('resource_php', OPENBIZ_RESOURCE_PHP); $smarty->assign('theme_js_url', OPENBIZ_THEME_URL . "/" . $theme . "/js"); $smarty->assign('theme_url', OPENBIZ_THEME_URL . "/" . $theme); $smarty->assign('image_url', OPENBIZ_THEME_URL . "/" . $theme . "/images"); $smarty->assign('lang', strtolower(I18n::getCurrentLangCode())); $smarty->assign('lang_name', I18n::getCurrentLangCode()); return $smarty; }
public function render() { $smarty = new Smarty(); $smarty->config_load('server.conf'); $smarty->assign('title', $this->title); $smarty->assign('keywords', implode(',', $this->keywords)); $smarty->assign('description', $this->description); $smarty->assign('content', implode("\n", $this->contents)); $smarty->assign('scripts', $this->scripts); $smarty->assign('styles', $this->styles); $smarty->assign('nav', $this->nav); $smarty->display($this->layout); }
/** * Fuehrt die einzelnen Methoden aus, abhaengig vom parameter * * @param array $parameters POST, GET und COOKIE-Variablen */ public function action($gpc) { //Daten initialisieren $this->_gpc['POST'] = $gpc['POST']; $this->_gpc['GET'] = $gpc['GET']; /* Daten laden */ $section_load = array('Editor', 'Editor-Entry', 'Editor-Error', 'Menu'); foreach ($section_load as $section) { $this->_smarty->config_load('textes.de.conf', $section); $this->_config_textes["{$section}"] = $this->_smarty->get_config_vars(); } $this->_nav_id = $this->_smarty->get_template_vars('local_link'); if (key_exists('ref_ID', $this->_gpc['GET']) && is_numeric($this->_gpc['GET']['ref_ID'])) { $id = (int) $this->_gpc['GET']['ref_ID']; } //Je nach Get-Parameter die zugehörige Anweisung ausfuehren if (key_exists('action', $this->_gpc['GET'])) { switch ($this->_gpc['GET']['action']) { case 'new': $this->_create(); break; case 'edit': $this->_edit($id); break; case 'del': $this->_del($id); break; default: $this->_view(); } return true; } else { $this->_view(); return true; } }
/** * Fuehrt die einzelnen Methoden aus, abhaengig vom parameter * * @param array $parameters POST, GET und COOKIE-Variablen */ public function action($gpc) { //Daten laden $this->_smarty->config_load('textes.de.conf', 'News'); $this->_config_textes['News'] = $this->_smarty->get_config_vars(); $this->_smarty->config_load('textes.de.conf', 'Form_Error'); $this->_config_textes['Error'] = $this->_smarty->get_config_vars(); $this->_gpc = $gpc; $this->_nav_id = $this->_smarty->get_template_vars('local_link'); $this->_msbox = new Messageboxes($this->_mysql, 'news', array('ID' => 'news_ID', 'ref_ID' => 'news_ref_ID', 'content' => 'news_content', 'name' => 'news_name', 'time' => 'news_time', 'email' => 'news_email', 'hp' => 'news_hp', 'title' => 'news_title')); $this->_smilie = new Smilies(SMILIES_DIR); if ($this->_getStatus() == 'off') { $this->_smarty->assign('info', $this->_config_textes['News']['modul_deactivated']); } //Je nach Get-Parameter die zugehörige Anweisung ausfuehren if (key_exists('action', $this->_gpc['GET'])) { switch ($this->_gpc['GET']['action']) { case 'new': $this->_add(); return true; case 'comment': $this->_comment(); return true; case 'edit': $this->_edit(); return true; case 'del': $this->_del(); return true; case 'view': $this->_view(15); return true; case '': $this->_view(15); return true; default: //Falsche Angaben enden im Fehler throw new CMSException(array('news' => 'invalid_url'), EXCEPTION_MODULE_CODE); } } else { //Keine Angabe -> Ausgabe der News $this->_view(15); return true; } }
/** * Führt die einzelnen Methoden aus, abhängig vom Parameter * * @param array $gpc $_POST- und $_GET-Arrays * @return boolean * @uses Smarty als Template-System */ public function action($gpc) { //Daten laden $this->_smarty->config_load('textes.de.conf', 'Gbook'); $this->_configvars['Gbook'] = $this->_smarty->get_config_vars(); $this->_smarty->config_load('textes.de.conf', 'Form_Error'); $this->_configvars['Error'] = $this->_smarty->get_config_vars(); $this->_gpc = $gpc; $this->_nav_id = $this->_smarty->get_template_vars('local_link'); $this->_msbox = new MessageBoxes($this->_mysql, 'gbook', array('ID' => 'gbook_ID', 'ref_ID' => 'gbook_ref_ID', 'content' => 'gbook_content', 'name' => 'gbook_name', 'time' => 'gbook_time', 'email' => 'gbook_email', 'hp' => 'gbook_hp', 'title' => 'gbook_title')); $this->_smilie = new Smilies(SMILIES_DIR); if ($this->_getStatus() == 'off') { $this->_smarty->assign('info', $this->_configvars['Gbook']['modul_deactivated']); } if (key_exists('action', $this->_gpc['GET'])) { switch ($this->_gpc['GET']['action']) { case 'new': $this->_add(); break; case 'comment': $this->_comment(); break; case 'edit': $this->_edit(); break; case 'del': $this->_del(); break; case 'view': $this->_view(5); break; case '': $this->_view(5); break; default: throw new CMSException(array('gbook' => 'invalid_option'), EXCEPTION_MODULE_CODE); } } else { $this->_view(5); } return true; }
unset($tool, $surl); //require_once( '/data/project/xtools/public_html/phptemp/PHPtemp.php' ); //require_once( '/data/project/xtools/public_html/phptemp/Language.php' ); require_once "/data/project/xtools/public_html/Smarty/languages.class.php"; require_once "/data/project/xtools/public_html/Smarty/Smarty.class.php"; require_once '/data/project/xtools/public_html/sitenotice.php'; require_once '/data/project/xtools/public_html/ipcalc/base.php'; //$phptemp = new PHPtemp( '/data/project/xtools/public_html/templates/main.tpl' ); //$content = new PHPtemp( '/data/project/xtools/public_html/ipcalc/templates/ipcalc.tpl' ); $phptemp = new Smarty(); $content = new Smarty(); $language = new Language(array("en")); $lang = $language->getLang(); $langlinks = $language->generateLangLinks(); $phptemp->config_load('../../configs/' . $lang . '.conf', 'main'); $content->config_load('../../configs/' . $lang . '.conf', 'main'); $phptemp->config_load($lang . '.conf', 'ipcalc'); $content->config_load($lang . '.conf', 'ipcalc'); //$phptemp->load_config( '/data/project/xtools/public_html/configs/'.$lang.'.conf', 'main' ); //$phptemp->load_config( '/data/project/xtools/public_html/ipcalc/configs/'.$lang.'.conf', 'ipcalc' ); //$content->load_config( '/data/project/xtools/public_html/ipcalc/configs/'.$lang.'.conf', 'ipcalc' ); $content->assign("form", 'Welcome to X!\'s IP CIDR calculator!<br /><br /> There are two ways to use this tool. <ol> <li>IP range: Enter a CIDR range into the box, in the format 0.0.0.0/0</li> <li>IP list: Enter a list of IPs into the box, separated by newlines.</li> </ol><br /> <form action="//tools.wmflabs.org/xtools/ipcalc/index.php" method="get"> <table> <tr> <td align="center">IP range: <input type="radio" name="type" value="range" ' . ($_GET['type'] == "range" ? 'checked="checked"' : '') . ' /></td>
$Utilisateur = GetUtilisateurInfos($IP); //Gets current user infos //Preferences define('LANG', 'english'); define('THEME', 'default'); //Smarty require '_includes/Smarty/Smarty.class.php'; $smarty = new Smarty(); //TODO : trouver solution plus élégante et compatible Windows $current_dir = dirname(__FILE__); $smarty->template_dir = $current_dir . '/Themes/' . THEME; $smarty->compile_dir = $current_dir . '/cache/compiled'; $smarty->cache_dir = $current_dir . '/cache'; $smarty->config_dir = $current_dir; //Theme preferences $smarty->config_load("Themes/" . THEME . "/theme.conf"); //Language preferences $smarty->config_load("Lang/" . LANG . "/core.conf"); $smarty->config_load("Lang/" . LANG . "/personalize.conf"); //Now, we include correct script switch ($_GET['action']) { case 'new': case 'clone': case 'edit': include 'edit.php'; break; case 'view': include 'view.php'; break; case 'cloud': include 'cloud.php';
if (!isset($tools[$tool])) { WebTool::toDie($phptemp->get_config_vars("invalidtool", $tool)); } $fauxsmarty = new Smarty(); $fauxsmarty->config_load('../../../../..' . $tools[$tool]['uri'] . 'en.conf', $tools[$tool]['name']); if (is_file($tools[$tool]['uri'] . $lang . '.conf')) { $fauxsmarty->config_load('../../../../..' . $tools[$tool]['uri'] . $lang . '.conf', $tools[$tool]['name']); } if ($wgRequest->getSafeVal('action') == 'step1') { //Load Smarty objects $qqqsmarty = new Smarty(); $ensmarty = new Smarty(); $ensmarty->config_load('/data/project/xtools/public_html/configs/en.conf', 'main'); $ensmarty = $ensmarty->get_config_vars(); if (is_file($tools[$tool]['uri'] . 'qqq.conf')) { $qqqsmarty->config_load('../../../../..' . $tools[$tool]['uri'] . 'qqq.conf', $tools[$tool]['name']); } $config_vars = $fauxsmarty->get_config_vars(); foreach ($config_vars as $name => $value) { if (isset($ensmarty[$name]) && $tool != "Global") { unset($config_vars[$name]); continue; } $config_vars[$name] = array('value' => $value, 'qqq' => @$qqqsmarty->get_config_vars($name)); } $content->assign("showvars", true); $content->assign("config_vars", $config_vars); $content->assign("tool", $tool); $content->assign("lang", $lang); } elseif ($wgRequest->getSafeVal('action') == 'step2') { //Connect to SQL DB
/** * Get smarty template * @return Smarty smarty object */ public static function getSmartyTemplate() { include_once SMARTY_DIR . "Smarty.class.php"; $smarty = new Smarty(); $useTheme = !defined('USE_THEME') ? 0 : USE_THEME; if ($useTheme) { $theme = isset($_GET['theme']) ? $_GET['theme'] : THEME_NAME; $themePath = $theme; // BizSystem::configuration()->GetThemePath($theme); if (is_dir(THEME_PATH . "/" . $themePath . "/template")) { $templateRoot = THEME_PATH . "/" . $themePath . "/template"; } else { $templateRoot = THEME_PATH . "/" . $themePath . "/templates"; } $smarty->template_dir = $templateRoot; $smarty->compile_dir = $templateRoot . "/cpl"; $smarty->config_dir = $templateRoot . "/cfg"; // load the config file which has the images and css url defined $smarty->config_load('tpl.conf'); } else { if (defined('SMARTY_TPL_PATH')) { $smarty->template_dir = SMARTY_TPL_PATH; } if (defined('SMARTY_CPL_PATH')) { $smarty->compile_dir = SMARTY_CPL_PATH; } if (defined('SMARTY_CFG_PATH')) { $smarty->config_dir = SMARTY_CFG_PATH; } } // load the config file which has the images and css url defined $smarty->assign('app_url', APP_URL); $smarty->assign('app_index', APP_INDEX); $smarty->assign('js_url', JS_URL); $smarty->assign('css_url', THEME_URL . "/" . THEME_NAME . "/css"); $smarty->assign('theme_js_url', THEME_URL . "/" . THEME_NAME . "/js"); $smarty->assign('theme_url', THEME_URL . "/" . THEME_NAME); $smarty->assign('image_url', THEME_URL . "/" . THEME_NAME . "/images"); $smarty->assign('lang', strtolower(I18n::getInstance()->getCurrentLanguage())); return $smarty; }
/** * Переопределение одноименного метода Smarty * для конфигурационных файлов созданных в теме дизайна. * * @param string $file * @param string $section * @param string $scope */ function config_load($file, $section = null, $scope = 'global') { Smarty::config_load($this->_redefine_template($file), $section, $scope); }
static function addSmartyObj(&$object, $config) { global $curlang; $object = new Smarty(); $object->config_load('../../configs/en.conf', 'main'); $object->config_load('en.conf', $config); if (is_file('../configs/' . $curlang . '.conf')) { $object->config_load('../../configs/' . $curlang . '.conf', 'main'); } if (is_file('configs/' . $curlang . '.conf')) { $object->config_load($curlang . '.conf', $config); } }
if (!empty($_POST)) { $_POST = addslashes_deep($_POST); } $_COOKIE = addslashes_deep($_COOKIE); $_REQUEST = addslashes_deep($_REQUEST); } if (PHP_VERSION >= '5.1' && !empty($timezone)) { date_default_timezone_set($timezone); } require ROOT_PATH . 'includes/cls_mysql.php'; $db = new cls_mysql($db_host, $db_user, $db_password, $db_name); $db_host = $db_user = $db_password = $db_name = NULL; $smarty = new Smarty(); $smarty->debugging = false; $smarty->caching = 2; $smarty->config_load('xjoj.conf'); $login_user = array(); session_start(); ob_start(); if (isset($_COOKIE['user_id']) && !empty($_COOKIE['user_id'])) { $sql = "select * from author where password='******'password']}' and user_id='{$_COOKIE['user_id']}'"; //使用建立缓存的sql查询 $login_user = $db->getRow($sql); if (empty($login_user['user_id'])) { setcookie('user_id', ''); setcookie('password', ''); $login_user = array(); } } $smarty->assign('login_user', $login_user); ?>
public function LoadConfig($file, $section = null, $scope = 'global') { return parent::config_load($file, $section, $scope); }
define('MAIL_HEADER_SEPARATOR', "\n"); // try to use "\r\n" if messages are not sent (see http://php.net/manual/en/function.mail.php) define('IN_INDEX', TRUE); session_start(); include 'config/db_settings.php'; include 'includes/functions.inc.php'; include 'includes/main.inc.php'; require 'modules/smarty/Smarty.class.php'; // requires plugin compiler.defun.php $smarty = new Smarty(); $smarty->template_dir = 'templates'; $smarty->compile_dir = 'templates_c'; $smarty->config_dir = 'lang'; $smarty->config_overwrite = false; $smarty->config_booleanize = false; $smarty->config_load($settings['language_file']); $lang = $smarty->get_config_vars(); define('CHARSET', $lang['charset']); @ini_set('default_charset', $lang['charset']); setlocale(LC_ALL, $lang['locale']); $smarty->assign('settings', $settings); if (isset($_SESSION[$settings['session_prefix'] . 'usersettings'])) { $smarty->assign('usersettings', $_SESSION[$settings['session_prefix'] . 'usersettings']); } $smarty->assign('category', $category); if (isset($categories)) { $smarty->assign('categories', $categories); } $smarty->assign('total_postings', $total_postings); $smarty->assign('total_spam', $total_spam); $smarty->assign('total_threads', $total_threads);
<?php // Theme, Accent & CSS must be defined and refer an existing accent file if (!$_GET['Accent'] || !$_GET['Theme']) { die("Usage: cssloader.php?Theme=<theme name>&Accent=<accent name>&CSS=<css .tpl file>"); } $accent_conf = "Themes/{$_GET['Theme']}/css/Accents/{$_GET['Accent']}.conf"; if (!file_exists($accent_conf)) { die("File not found : {$accent_conf}"); } //Smarty require '_includes/Smarty/Smarty.class.php'; $smarty = new Smarty(); //TODO : trouver solution plus élégante et compatible Windows $current_dir = dirname(__FILE__); $smarty->template_dir = $current_dir . '/Themes/' . $_GET['Theme'] . '/css'; $smarty->compile_dir = $current_dir . '/cache/compiled'; $smarty->cache_dir = $current_dir . '/cache'; $smarty->config_dir = $current_dir; $smarty->config_load($accent_conf); $smarty->display($_GET['CSS'] . '.tpl');
// Check if file is an image $main_smarty->assign("file", $images[0]['file_name']); $main_smarty->assign("ispicture", $images[0]['file_ispicture']); if (strpos($images[0]['file_name'], 'http') === 0) { $filename = $images[0]['file_name']; } else { $filename = $upload_dir . "/" . $images[0]['file_name']; } if (!$images[0]['file_ispicture']) { $images = array(); } } $main_smarty->assign("display", unserialize(get_misc_data('upload_display'))); $main_smarty->assign("images", $images); $main_smarty->assign("submit_id", $_GET['id']); $main_smarty->config_load('../lang.conf'); $main_smarty->display("upload_ajax.tpl"); } elseif ($_GET['delid'] && $_GET['number'] && is_numeric($_GET['delid']) && is_numeric($_GET['number']) && $_SESSION['upload_files'][$_GET['number']]['id']) { $id = $_SESSION['upload_files'][$_GET['number']]['id']; $sql = "SELECT * FROM " . table_prefix . "files WHERE " . ($isadmin ? "" : "file_user_id='{$current_user->user_id}' AND") . " (file_id='{$id}' OR file_orig_id='{$id}')"; if ($files = $db->get_results($sql)) { foreach ($files as $row) { if ($row->file_size == 'orig') { unlink("{$upload_dir}/{$row->file_name}"); } else { unlink("{$thumb_dir}/{$row->file_name}"); } } } $sql = "DELETE FROM " . table_prefix . "files WHERE " . ($isadmin ? "" : "file_user_id='{$current_user->user_id}' AND") . " (file_id='{$id}' OR file_orig_id='{$id}')"; $db->query($sql);
<?php try { require_once "/usr/share/php/smarty/Smarty.class.php"; } catch (Exception $e) { require_once "smarty/Smarty.class.php"; } $fixpath = dirname(__FILE__) . "/../.."; $smarty = new Smarty(); $smarty->template_dir = "{$fixpath}/resources/templates"; $smarty->compile_dir = "{$fixpath}/cache/Smarty/compile"; $smarty->cache_dir = "{$fixpath}/cache/Smarty/cache"; $smarty->config_dir = "{$fixpath}/resources/secure"; $smarty->config_load("config.ini", "Theme"); $smarty->config_load("config.ini", "Libraries"); $smarty->config_load("config.ini", "Logging");
function print_summary($link, $fetch = false) { global $current_user, $the_template; static $comment_counter = 0; static $link_index = 0; // setup smarty include_once 'internal/Smarty.class.php'; $smarty = new Smarty(); $smarty->compile_dir = "cache/"; $smarty->template_dir = "templates/"; $smarty->config_dir = ""; $smarty->assign('pligg_language', pligg_language); $smarty->config_load("/languages/lang_" . pligg_language . ".conf"); // if we can't read the comment, return if (!$this->read) { return; } // counter $comment_counter++; $smarty = $this->fill_smarty($smarty); $smarty->assign('rand', rand(1000000, 100000000)); if ($fetch == false) { $smarty->display($the_template . '/comment_show.tpl'); } else { return $smarty->fetch($the_template . '/comment_show.tpl'); } }
?> '; <?php header("content-type: application/x-javascript"); $include_login = false; // used in config.php include_once '../config.php'; include_once '../Smarty.class.php'; $smarty = new Smarty(); $smarty->config_dir = ''; $smarty->compile_dir = "../cache/templates_c"; $smarty->template_dir = "../templates"; $smarty->config_dir = ".."; $smarty->config_load("/languages/lang_" . pligg_language . ".conf"); $PLIGG_Visual_Vote_Cast = $smarty->get_config_vars('PLIGG_Visual_Vote_Cast'); $PLIGG_Visual_Vote_Report = $smarty->get_config_vars('PLIGG_Visual_Vote_Report'); $PLIGG_Visual_Vote_For_It = $smarty->get_config_vars('PLIGG_Visual_Vote_For_It'); $PLIGG_Visual_Comment_ThankYou_Rating = $smarty->get_config_vars('PLIGG_Visual_Comment_ThankYou_Rating'); ?> dochref = document.location.href.substr(document.location.href.search('/')+2, 1000); if(dochref.search('/') == -1){ $thisurl = document.location.href.substr(0,document.location.href.search('/')+2) + dochref; } else { $thisurl = document.location.href.substr(0,document.location.href.search('/')+2) + dochref.substr(0, dochref.search('/')); } $thisurl = $thisurl + '<?php echo my_pligg_base; ?> ';
<?php header("content-type: application/x-javascript"); include_once '../config.php'; include_once '../Smarty.class.php'; $smarty = new Smarty(); $smarty->config_dir = ''; $smarty->compile_dir = "../templates_c"; $smarty->template_dir = "../templates"; $smarty->config_dir = ".."; $smarty->config_load("/libs/lang.conf"); $PLIGG_Visual_Vote_Cast = $smarty->get_config_vars('PLIGG_Visual_Vote_Cast'); ?> var xmlhttp /*@cc_on @*/ /*@if (@_jscript_version >= 5) try { xmlhttp=new ActiveXObject("Msxml2.XMLHTTP") } catch (e) { try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP") } catch (E) { xmlhttp=false } } @else xmlhttp=false @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
*/ // Last Err: session_start(); require ("paths.php"); require($smarty_path."Smarty.class.php"); include "classes.inc"; $smarty = new Smarty; // Template engine $dbSql = new Bweb(); //$smarty->compile_check = true; //$smarty->debugging = true; $smarty->template_dir = "./templates"; $smarty->compile_dir = "./templates_c"; $smarty->config_dir = "./configs"; $smarty->config_load("bacula.conf"); // Load config file $mode = $smarty->get_config_vars("mode"); // Lite o Extend? require("lang.php"); //Assign dbs if ( count($dbSql->dbs) >1 ) { $smarty->assign("dbs", $dbSql->dbs); $smarty->assign("dbs_now", $_SESSION['DATABASE']); } // generaldata.tpl & last_run_report.tpl (last24bytes) $client = $dbSql->link->query("select count(*) from Client") or die ("Error query: 1"); $totalfiles = $dbSql->link->query("select count(FilenameId) from Filename") or die ("Error query: 2");
$wt = new WebTool('ArticleInfo', 'articleinfo'); /*Update me*/ $wtSource = "//code.google.com/p/soxred93tools/source/browse/trunk/web/articleinfo"; $wtTranslate = true; WebTool::setMemLimit(); //Show form if &article parameter is not set (or empty) if (!$wgRequest->getSafeVal('getBool', 'article')) { $content->assign('form', $curlang); WebTool::assignContent(); } //Now load configs for the graph templates $linegraph = new Smarty(); $sizegraph = new Smarty(); if (is_file('configs/' . $curlang . '.conf')) { $linegraph->config_load($curlang . '.conf', 'articleinfo'); $sizegraph->config_load($curlang . '.conf', 'articleinfo'); } else { $linegraph->config_load('en.conf', 'articleinfo'); $sizegraph->config_load('en.conf', 'articleinfo'); } //Set the article variables $article = trim(str_replace(array(''', '%20'), array('\'', ' '), $wgRequest->getSafeVal('article'))); $article = urldecode($article); //Initialize Peachy try { $pageClass = $site->initPage($article, null, !$wgRequest->getSafeVal('getBool', 'nofollowredir')); } catch (BadTitle $e) { WebTool::toDie($phptemp->get_config_vars('nosuchpage', $e->getTitle())); } catch (Exception $e) { WebTool::toDie($e->getMessage()); }
if (!empty($_REQUEST["type"]) and $_REQUEST["type"] == "bar" and !empty($_REQUEST["stat"]) and !empty($_REQUEST["style"]) and !empty($_REQUEST["data"])) { $data = explode(",", $_REQUEST["data"]); $labels = explode(",", $_REQUEST["labels"]); if (!isset($_REQUEST["height"])) { $_REQUEST["height"] = 200; } if (!isset($_REQUEST["width"])) { $_REQUEST["width"] = 600; } require_once "lib/artichow/BarPlot.class.php"; $smarty = new Smarty(); $smarty->compile_dir = SIMPLE_CACHE . "/smarty"; $smarty->template_dir = "templates"; $smarty->config_dir = "templates"; $smarty->security = true; $smarty->config_load("core_css.conf", $_REQUEST["style"]); $vars_style = $smarty->_config[0]["vars"]; $filename = SIMPLE_CACHE . "/artichow/stats_" . md5($_REQUEST["style"] . "_" . $_REQUEST["stat"] . "_" . $_REQUEST["data"] . "_" . $_REQUEST["labels"] . "_" . $_REQUEST["height"] . "_" . $_REQUEST["width"]) . ".png"; if (!file_exists($filename)) { _stats_build_graph($data, $labels, $filename, $_REQUEST["stat"], $_REQUEST["width"], $_REQUEST["height"], $vars_style); } header("Content-Type: image/png"); readfile($filename); } function _stats_color($col, $transp) { return new Color(hexdec(substr($col, 1, 2)), hexdec(substr($col, 3, 2)), hexdec(substr($col, 5, 2)), $transp); } function _stats_build_graph($data, $labels, $filename, $stat, $width, $height, $vars) { if (file_exists($filename)) {
function print_summary($type = 'full', $fetch = false, $link_summary_template = 'link_summary.tpl') { global $current_user, $globals, $the_template, $smarty, $ranklist; // DB 09/03/08 if (!is_numeric($this->id)) { return false; } /// include_once './Smarty.class.php'; $main_smarty = new Smarty(); $main_smarty->compile_check = false; // enable caching at your own risk. this code is still experimental //$smarty->cache = true; $main_smarty->cache_lifetime = 120; $main_smarty->compile_dir = mnmpath . "cache/templates_c/"; $main_smarty->template_dir = mnmpath . "templates/"; $main_smarty->cache_dir = mnmpath . "cache/"; $main_smarty->config_dir = ""; $main_smarty->assign('pligg_language', pligg_language); $main_smarty->config_load(lang_loc . "/languages/lang_" . pligg_language . ".conf"); if (phpnum() == 4) { $main_smarty->force_compile = true; } $main_smarty = $this->fill_smarty($main_smarty, $type); $main_smarty->assign('use_title_as_link', use_title_as_link); $main_smarty->assign('open_in_new_window', open_in_new_window); $main_smarty->assign('the_template', The_Template); include mnminclude . 'extra_fields_smarty.php'; if ($fetch == false) { $main_smarty->display($the_template . '/' . $link_summary_template, 'story' . $this->id . "|" . $current_user->user_id . "|" . $type); } else { return $main_smarty->fetch($the_template . '/' . $link_summary_template, 'story' . $this->id . "|" . $current_user->user_id . "|" . $type); } }
+-------------------------------------------------------------------------+ */ session_start(); require ("paths.php"); require($smarty_path."Smarty.class.php"); include "classes.inc"; $smarty = new Smarty; //$smarty->compile_check = true; //$smarty->debugging = true; $smarty->template_dir = "./templates"; $smarty->compile_dir = "./templates_c"; $smarty->config_dir = "./configs"; $smarty->config_load("bacula.conf"); require("lang.php"); $dbSql = new Bweb(); if ( $_GET['default'] == 1) { // Default params, 1 month $dbSql->StartDate = strftime("%Y-%m-%d %H:%M:%S",time()-2678400); $dbSql->EndDate = strftime("%Y-%m-%d %H:%M:%S",time()); } else // With params $dbSql->PrepareDate($_GET['StartDateMonth'],$_GET['StartDateDay'],$_GET['StartDateYear'],$_GET['EndDateMonth'],$_GET['EndDateDay'],$_GET['EndDateYear']); $bytes = $dbSql->CalculateBytesPeriod($_GET['server'],$dbSql->StartDate,$dbSql->EndDate); $files = $dbSql->CalculateFilesPeriod($_GET['server'],$dbSql->StartDate,$dbSql->EndDate); $smarty->assign('startperiod',$dbSql->StartDate); $smarty->assign('endperiod',$dbSql->EndDate);