static function generate_select($auth_bit, $array_auth = array(), $array_ranks_default = array(), $idselect = '', $disabled = '', $disabled_advanced_auth = false) { global $Sql, $LANG, $CONFIG, $array_ranks, $Group; $array_ranks = is_array($array_ranks) ? $array_ranks : array('-1' => $LANG['guest'], '0' => $LANG['member'], '1' => $LANG['modo'], '2' => $LANG['admin']); $idselect = (string) $idselect == '' ? $auth_bit : $idselect; $Template = new Template('framework/groups_auth.tpl'); $Template->assign_vars(array('C_NO_ADVANCED_AUTH' => $disabled_advanced_auth ? true : false, 'C_ADVANCED_AUTH' => $disabled_advanced_auth ? false : true, 'THEME' => get_utheme(), 'PATH_TO_ROOT' => TPL_PATH_TO_ROOT, 'IDSELECT' => $idselect, 'DISABLED_SELECT' => empty($disabled) ? 'if (disabled == 0)' : '', 'L_USERS' => $LANG['member_s'], 'L_ADD_USER' => $LANG['add_member'], 'L_REQUIRE_PSEUDO' => addslashes($LANG['require_pseudo']), 'L_RANKS' => $LANG['ranks'], 'L_GROUPS' => $LANG['groups'], 'L_GO' => $LANG['go'], 'L_ADVANCED_AUTHORIZATION' => $LANG['advanced_authorization'], 'L_SELECT_ALL' => $LANG['select_all'], 'L_SELECT_NONE' => $LANG['select_none'], 'L_EXPLAIN_SELECT_MULTIPLE' => $LANG['explain_select_multiple'])); ##### Génération d'une liste à sélection multiple des rangs et membres ##### //Liste des rangs $j = -1; foreach ($array_ranks as $idrank => $group_name) { //Si il s'agit de l'administrateur, il a automatiquement l'autorisation if ($idrank == 2) { $Template->assign_block_vars('ranks_list', array('ID' => $j, 'IDRANK' => $idrank, 'RANK_NAME' => $group_name, 'DISABLED' => '', 'SELECTED' => ' selected="selected"')); } else { $selected = ''; if (array_key_exists('r' . $idrank, $array_auth) && ((int) $array_auth['r' . $idrank] & (int) $auth_bit) !== 0 && empty($disabled)) { $selected = ' selected="selected"'; } $selected = isset($array_ranks_default[$idrank]) && $array_ranks_default[$idrank] === true && empty($disabled) ? 'selected="selected"' : $selected; $Template->assign_block_vars('ranks_list', array('ID' => $j, 'IDRANK' => $idrank, 'RANK_NAME' => $group_name, 'DISABLED' => !empty($disabled) ? 'disabled = "disabled" ' : '', 'SELECTED' => $selected)); } $j++; } foreach ($Group->get_groups_array() as $idgroup => $group_name) { $selected = ''; if (array_key_exists($idgroup, $array_auth) && ((int) $array_auth[$idgroup] & (int) $auth_bit) !== 0 && empty($disabled)) { $selected = ' selected="selected"'; } $Template->assign_block_vars('groups_list', array('IDGROUP' => $idgroup, 'GROUP_NAME' => $group_name, 'DISABLED' => $disabled, 'SELECTED' => $selected)); } ##### Génération du formulaire pour les autorisations membre par membre. ##### $array_auth_members = array(); if (is_array($array_auth)) { foreach ($array_auth as $type => $auth) { if (substr($type, 0, 1) == 'm') { if (array_key_exists($type, $array_auth) && ((int) $array_auth[$type] & (int) $auth_bit) !== 0) { $array_auth_members[$type] = $auth; } } } } $advanced_auth = count($array_auth_members) > 0; $Template->assign_vars(array('ADVANCED_AUTH_STYLE' => $advanced_auth ? 'display:block;' : 'display:none;')); if ($advanced_auth) { $result = $Sql->query_while("SELECT user_id, login\n\t\t\tFROM " . PREFIX . "member\n\t\t\tWHERE user_id IN(" . implode(str_replace('m', '', array_keys($array_auth_members)), ', ') . ")", __LINE__, __FILE__); while ($row = $Sql->fetch_assoc($result)) { $Template->assign_block_vars('members_list', array('USER_ID' => $row['user_id'], 'LOGIN' => $row['login'])); } $Sql->query_close($result); } return $Template->parse(TEMPLATE_STRING_MODE); }
function lateral_menu() { global $LANG, $CONFIG; $tpl = new Template('admin/menus/panel.tpl'); $tpl->assign_vars(array('L_MENUS_MANAGEMENT' => $LANG['menus_management'], 'L_ADD_CONTENT_MENUS' => $LANG['menus_content_add'], 'L_ADD_LINKS_MENUS' => $LANG['menus_links_add'], 'L_ADD_FEED_MENUS' => $LANG['menus_feed_add'], 'L_MANAGE_THEME_COLUMNS' => $LANG['manage_theme_columns'], 'THEME_NAME' => get_utheme())); $tpl->parse(); }
public function displayError() { if (!ini_get('display_errors')) { return; } $messages = explode("\n", $this->message); $messages = array_map('trim', $messages); $messages = array_filter($messages, 'strlen'); $messages = array_values($messages); $param = array("code" => $this->code, "messages" => $messages, "file" => $this->file, "line" => $this->line, "trace" => debug_backtrace()); $template = new Template(); // set template $template->assign_vars($param); // load template if (!self::$template_filename) { self::$template_filename = dirname(__FILE__) . '/../../component/view/Exception.tpl'; } if ($template->load(self::$template_filename)) { $html = $template->get_display_template(true); } else { throw new PMPException('Sysmtem Error ' . __CLASS__ . ' ' . __LINE__); } print $html; exit; }
function display() { global $CONFIG; static $js_inclusion_already_done = false; $template = new Template('framework/mini_calendar.tpl'); $template->assign_vars(array('DEFAULT_DATE' => $this->date->format(DATE_FORMAT_SHORT), 'CALENDAR_ID' => 'calendar_' . $this->num_instance, 'CALENDAR_NUMBER' => (string) $this->num_instance, 'DAY' => $this->date->get_day(), 'MONTH' => $this->date->get_month(), 'YEAR' => $this->date->get_year(), 'FORM_NAME' => $this->form_name, 'CALENDAR_STYLE' => $this->style, 'C_INCLUDE_JS' => !$js_inclusion_already_done)); $js_inclusion_already_done = true; return $template->parse(TEMPLATE_STRING_MODE); }
function display() { $Template = new Template('framework/builder/forms/field_box.tpl'); $Template->assign_vars(array('ID' => $this->field_id, 'FIELD' => $this->field_options, 'L_FIELD_TITLE' => $this->field_title, 'L_EXPLAIN' => $this->field_sub_title, 'L_REQUIRE' => $this->field_required ? '* ' : '')); foreach ($this->field_options as $Option) { $Option->field_name = $this->field_name; $Template->assign_block_vars('field_options', array('OPTION' => $Option->display())); } return $Template->parse(TEMPLATE_STRING_MODE); }
function get_html_results(&$results, &$html_results, &$results_name) { global $CONFIG; $modules = new ModulesDiscoveryService(); $display_all_results = $results_name == 'all' ? true : false; $tpl_results = new Template('search/search_generic_pagination_results.tpl'); $tpl_results->assign_vars(array('RESULTS_NAME' => $results_name, 'C_ALL_RESULTS' => $display_all_results)); $nb_pages = round(count($results) / NB_RESULTS_PER_PAGE) + 1; $nb_results = count($results); if (!$display_all_results) { $module = $modules->get_module(strtolower($results_name)); $results_data = array(); $personnal_parse_results = $module->has_functionality('compute_search_results') && $module->has_functionality('parse_search_result'); if ($personnal_parse_results && $results_name != 'all') { $results_data = $module->functionality('compute_search_results', array('results' => $results)); $nb_results = min($nb_results, count($results_data)); } } for ($num_page = 0; $num_page < $nb_pages; $num_page++) { $tpl_results->assign_block_vars('page', array('NUM_PAGE' => $num_page, 'BLOCK_DISPLAY' => $num_page == 0 ? 'block' : 'none')); for ($i = 0; $i < NB_RESULTS_PER_PAGE; $i++) { $num_item = $num_page * NB_RESULTS_PER_PAGE + $i; if ($num_item >= $nb_results) { break; } if ($display_all_results || !$personnal_parse_results) { $tpl_result = new Template('search/search_generic_results.tpl'); if ($display_all_results) { $module = $modules->get_module($results[$num_item]['module']); $tpl_result->assign_vars(array('C_ALL_RESULTS' => true, 'L_MODULE_NAME' => $module->get_name())); } else { $tpl_result->assign_vars(array('C_ALL_RESULTS' => false, 'L_MODULE_NAME' => $module->get_name())); } $tpl_result->assign_vars(array('TITLE' => $results[$num_item]['title'], 'U_LINK' => url($results[$num_item]['link']))); $tpl_results->assign_block_vars('page.results', array('result' => $tpl_result->parse(TEMPLATE_STRING_MODE))); } else { $tpl_results->assign_block_vars('page.results', array('result' => $module->functionality('parse_search_result', $results_data[$num_item]))); } } } $html_results = $tpl_results->parse(TEMPLATE_STRING_MODE); }
function parse_search_result(&$result_data) { global $Cache, $CONFIG, $LANG, $DOWNLOAD_LANG, $CONFIG_DOWNLOAD; $Cache->load('download'); load_module_lang('download'); $tpl = new Template('download/download_generic_results.tpl'); import('util/date'); $date = new Date(DATE_TIMESTAMP, TIMEZONE_USER, $result_data['timestamp']); import('content/note'); $tpl->assign_vars(array('L_ADDED_ON' => sprintf($DOWNLOAD_LANG['add_on_date'], $date->format(DATE_FORMAT_TINY, TIMEZONE_USER)), 'U_LINK' => url(PATH_TO_ROOT . '/download/download.php?id=' . $result_data['id']), 'U_IMG' => $result_data['image'], 'E_TITLE' => strprotect($result_data['title']), 'TITLE' => $result_data['title'], 'SHORT_DESCRIPTION' => second_parse($result_data['short_contents']), 'L_NB_DOWNLOADS' => $DOWNLOAD_LANG['downloaded'] . ' ' . sprintf($DOWNLOAD_LANG['n_times'], $result_data['count']), 'L_NB_COMMENTS' => $result_data['nbr_com'] > 1 ? sprintf($DOWNLOAD_LANG['num_com'], $result_data['nbr_com']) : sprintf($DOWNLOAD_LANG['num_coms'], $result_data['nbr_com']), 'L_MARK' => $result_data['note'] > 0 ? Note::display_img($result_data['note'], $CONFIG_DOWNLOAD['note_max'], 5) : '<em>' . $LANG['no_note'] . '</em>')); return $tpl->parse(TEMPLATE_STRING_MODE); }
function display_form($Template = false) { global $CONFIG; $this->_save_user(); if (!is_object($Template) || strtolower(get_class($Template)) != 'template') { $Template = new Template('framework/captcha.tpl'); } if ($this->is_available()) { $Template->assign_vars(array('CAPTCHA_INSTANCE' => $this->instance, 'CAPTCHA_WIDTH' => $this->width, 'CAPTCHA_HEIGHT' => $this->height, 'CAPTCHA_FONT' => $this->font, 'CAPTCHA_DIFFICULTY' => $this->difficulty)); return $Template->parse(TEMPLATE_STRING_MODE); } return ''; }
function display() { $Template = new Template('framework/builder/forms/field.tpl'); $field = '<input type="file" '; $field .= !empty($this->field_size) ? 'size="' . $this->field_size . '" ' : ''; $field .= !empty($this->field_name) ? 'name="' . $this->field_name . '" ' : ''; $field .= !empty($this->field_id) ? 'id="' . $this->field_id . '" ' : ''; $field .= !empty($this->field_css_class) ? 'class="' . $this->field_css_class . '" ' : ''; $field .= '/> <input name="max_file_size" value="2000000" type="hidden">'; $Template->assign_vars(array('ID' => $this->field_id, 'FIELD' => $field, 'L_FIELD_TITLE' => $this->field_title, 'L_EXPLAIN' => $this->field_sub_title, 'L_REQUIRE' => $this->field_required ? '* ' : '')); return $Template->parse(TEMPLATE_STRING_MODE); }
function display() { $Template = new Template('framework/builder/forms/field_extended.tpl'); $field = '<textarea type="text" '; $field .= !empty($this->field_rows) ? 'rows="' . $this->field_rows . '" ' : ''; $field .= !empty($this->field_cols) ? 'cols="' . $this->field_cols . '" ' : ''; $field .= !empty($this->field_name) ? 'name="' . $this->field_name . '" ' : ''; $field .= !empty($this->field_id) ? 'id="' . $this->field_id . '" ' : ''; $field .= !empty($this->field_css_class) ? 'class="' . $this->field_css_class . '"> ' : '>'; $field .= !empty($this->field_value) ? $this->field_value : ''; $field .= '</textarea>'; $Template->assign_vars(array('ID' => $this->field_id, 'FIELD' => $field, 'KERNEL_EDITOR' => $this->field_editor ? display_editor($this->field_id, $this->field_forbidden_tags) : '', 'L_FIELD_TITLE' => $this->field_title, 'L_EXPLAIN' => $this->field_sub_title, 'L_REQUIRE' => $this->field_required ? '* ' : '')); return $Template->parse(TEMPLATE_STRING_MODE); }
function display() { $Template = new Template('framework/builder/forms/field.tpl'); $field = '<input type="text" '; $field .= !empty($this->field_size) ? 'size="' . $this->field_size . '" ' : ''; $field .= !empty($this->field_maxlength) ? 'maxlength="' . $this->field_maxlength . '" ' : ''; $field .= !empty($this->field_name) ? 'name="' . $this->field_name . '" ' : ''; $field .= !empty($this->field_id) ? 'id="' . $this->field_id . '" ' : ''; $field .= !empty($this->field_value) ? 'value="' . $this->field_value . '" ' : ''; $field .= !empty($this->field_css_class) ? 'class="' . $this->field_css_class . '" ' : ''; $field .= !empty($this->field_on_blur) ? 'onblur="' . $this->field_on_blur . '" ' : ''; $field .= '/>'; $Template->assign_vars(array('ID' => $this->field_id, 'FIELD' => $field, 'L_FIELD_TITLE' => $this->field_title, 'L_EXPLAIN' => $this->field_sub_title, 'L_REQUIRE' => $this->field_required ? '* ' : '')); return $Template->parse(TEMPLATE_STRING_MODE); }
function display() { $Template = new Template('framework/builder/forms/field_select.tpl'); if ($this->field_multiple) { $field = '<select name="' . $this->field_name . '[]" multiple="multiple">' . $this->field_options . '</select>'; } else { $field = '<select name="' . $this->field_name . '">' . $this->field_options . '</select>'; } $Template->assign_vars(array('ID' => $this->field_id, 'C_SELECT_MULTIPLE' => $this->field_multiple, 'L_FIELD_NAME' => $this->field_name, 'L_FIELD_TITLE' => $this->field_title, 'L_EXPLAIN' => $this->field_sub_title, 'L_REQUIRE' => $this->field_required ? '* ' : '')); foreach ($this->field_options as $Option) { $Option->field_name = $this->field_name; $Template->assign_block_vars('field_options', array('OPTION' => $Option->display())); } return $Template->parse(TEMPLATE_STRING_MODE); }
function display($Template = false) { global $LANG, $Errorh; if (!is_object($Template) || strtolower(get_class($Template)) != 'template') { $Template = new Template('framework/builder/forms/fieldset.tpl'); } $Template->assign_vars(array('C_DISPLAY_WARNING_REQUIRED_FIELDS' => $this->fieldset_display_required, 'L_FORMTITLE' => $this->fieldset_title, 'L_REQUIRED_FIELDS' => $LANG['require'])); foreach ($this->fieldset_errors as $error) { $Template->assign_block_vars('errors', array('ERROR' => $Errorh->display($error['errstr'], $error['errno']))); } foreach ($this->fieldset_fields as $Field) { foreach ($Field->get_errors() as $error) { $Template->assign_block_vars('errors', array('ERROR' => $Errorh->display($error['errstr'], $error['errno']))); } $Template->assign_block_vars('fields', array('FIELD' => $Field->display())); } return $Template->parse(TEMPLATE_STRING_MODE); }
function display($Template = false) { global $LANG; if (!is_object($Template) || strtolower(get_class($Template)) != 'template') { $Template = new Template('framework/builder/forms/form.tpl'); } $Template->assign_vars(array('C_DISPLAY_PREVIEW' => $this->display_preview, 'C_DISPLAY_RESET' => $this->display_reset, 'FORMCLASS' => $this->form_class, 'U_FORMACTION' => $this->form_action, 'L_FORMNAME' => $this->form_name, 'L_FIELD_CONTENT_PREVIEW' => $this->field_identifier_preview, 'L_SUBMIT' => $this->form_submit, 'L_PREVIEW' => $LANG['preview'], 'L_RESET' => $LANG['reset'])); foreach ($this->form_fieldsets as $Fieldset) { foreach ($Fieldset->get_fields() as $Field) { $field_required_alert = $Field->get_required_alert(); if (!empty($field_required_alert)) { $Template->assign_block_vars('check_form', array('FIELD_ID' => $Field->get_id(), 'FIELD_REQUIRED_ALERT' => str_replace('"', '\\"', $field_required_alert))); } } $Template->assign_block_vars('fieldsets', array('FIELDSET' => $Fieldset->display())); } return $Template->parse(TEMPLATE_STRING_MODE); }
<?php require_once '../kernel/begin.php'; load_module_lang('wiki'); include '../wiki/wiki_functions.php'; $article_id = retrieve(GET, 'id', 0); if ($article_id > 0) { $result = $Sql->query_while("SELECT a.id, a.is_cat, a.hits, a.redirect, a.id_cat, a.title, a.encoded_title, a.is_cat, a.defined_status, a.nbr_com, f.id AS id_favorite, a.undefined_status, a.auth, c.menu, c.content\n\tFROM " . PREFIX . "wiki_articles a\n\tLEFT JOIN " . PREFIX . "wiki_contents c ON c.id_contents = a.id_contents\n\tLEFT JOIN " . PREFIX . "wiki_favorites f ON f.id_article = a.id\n\tWHERE a.id = '" . $article_id . "'\n\tGROUP BY a.id", __LINE__, __FILE__); $num_rows = $Sql->num_rows($result, "SELECT COUNT(*) FROM " . PREFIX . "wiki_articles WHERE id = '" . $article_id . "'", __LINE__, __FILE__); $article_infos = $Sql->fetch_assoc($result); $Sql->query_close($result); if (!empty($article_infos['redirect'])) { $id_redirection = $article_infos['id']; $result = $Sql->query_while("SELECT a.id, a.is_cat, a.hits, a.redirect, a.id_cat, a.title, a.encoded_title, a.is_cat, a.nbr_com, a.defined_status, f.id AS id_favorite, a.undefined_status, a.auth, c.menu, c.content\n\t\tFROM " . PREFIX . "wiki_articles a\n\t\tLEFT JOIN " . PREFIX . "wiki_contents c ON c.id_contents = a.id_contents\n\t\tLEFT JOIN " . PREFIX . "wiki_favorites f ON f.id_article = a.id\n\t\tWHERE a.id = '" . $article_infos['redirect'] . "'\n\t\tGROUP BY a.id", __LINE__, __FILE__); $article_infos = $Sql->fetch_assoc($result); $Sql->query_close($result); } } if (empty($article_infos['id'])) { exit; } require_once PATH_TO_ROOT . '/kernel/header_no_display.php'; $template = new Template('framework/content/print.tpl'); $template->assign_vars(array('PAGE_TITLE' => $article_infos['title'] . (!empty($_WIKI_CONFIG['wiki_name']) ? $_WIKI_CONFIG['wiki_name'] : $LANG['wiki']), 'TITLE' => $article_infos['title'], 'L_XML_LANGUAGE' => $LANG['xml_lang'], 'CONTENT' => second_parse($article_infos['content']))); $template->parse(); require_once PATH_TO_ROOT . '/kernel/footer_no_display.php';
array_push($msg_erro,$e->getMessage()); #exit; } } ############################################################################## ############## INDEXA O TEMPLATE ############## ############################################################################## $_nome_programa = basename($_SERVER['PHP_SELF'],'.php'); $theme = "."; $model = new Template($theme); $model->set_filenames(array($_nome_programa => $_nome_programa.'.htm')); $model->assign_vars(array('_NOME_PROGRAMA' => $_nome_programa.".php")); /* PROFESSOR */ $usuario_id = ""; $usuario_nome = ""; $usuario_email = ""; try { if (strlen($_login_professor)>0){ $professor = $sessionFacade->recuperarProfessor($_login_professor); $pesquisa = $sessionFacade->recuperarPesquisaTodos($professor); $fazer_pesquisa = $sessionFacade->recuperarFazerPesquisa($professor); if (count($pesquisa)>0 AND $fazer_pesquisa == 0){ header("Location: ../logout.php?pesquisa=n"); exit;
function parse_search_result(&$result_data) { global $CONFIG, $LANG, $CONFIG_USER; load_module_lang('forum'); $tpl = new Template('forum/forum_generic_results.tpl'); $tpl->assign_vars(array('L_ON' => $LANG['on'], 'L_TOPIC' => $LANG['topic'])); $rewrited_title = $CONFIG['rewrite'] == 1 ? '+' . url_encode_rewrite($result_data['title']) : ''; $tpl->assign_vars(array('USER_ONLINE' => '<img src="' . PATH_TO_ROOT . '/templates/' . get_utheme() . '/images/' . (!empty($result_data['connect']) && $result_data['user_id'] !== -1 ? 'online' : 'offline') . '.png" alt="" class="valign_middle" />', 'U_USER_PROFILE' => !empty($result_data['user_id']) ? PATH_TO_ROOT . '/member/member' . url('.php?id=' . $result_data['user_id'], '-' . $result_data['user_id'] . '.php') : '', 'USER_PSEUDO' => !empty($result_data['login']) ? wordwrap_html($result_data['login'], 13) : $LANG['guest'], 'U_TOPIC' => PATH_TO_ROOT . '/forum/topic' . url('.php?id=' . $result_data['topic_id'], '-' . $result_data['topic_id'] . $rewrited_title . '.php') . '#m' . $result_data['msg_id'], 'TITLE' => ucfirst($result_data['title']), 'DATE' => gmdate_format('d/m/y', $result_data['date']), 'CONTENTS' => second_parse($result_data['contents']), 'USER_AVATAR' => '<img src="' . ($CONFIG_USER['activ_avatar'] == '1' && !empty($result_data['avatar']) ? $result_data['avatar'] : PATH_TO_ROOT . '/templates/' . get_utheme() . '/images/' . $CONFIG_USER['avatar_url']) . '" alt="" />')); return $tpl->parse(TEMPLATE_STRING_MODE); }
<?php require_once '../admin/admin_begin.php'; define('TITLE', $LANG['administration']); require_once '../admin/admin_header.php'; $template = new Template('admin/admin_system_report.tpl'); $template->assign_vars(array('L_YES' => $LANG['yes'], 'L_NO' => $LANG['no'], 'L_UNKNOWN' => $LANG['unknown'], 'L_SYSTEM_REPORT' => $LANG['system_report'], 'L_SERVER' => $LANG['server'], 'L_PHPINFO' => $LANG['phpinfo'], 'L_PHP_VERSION' => $LANG['php_version'], 'L_DBMS_VERSION' => $LANG['dbms_version'], 'L_GD_LIBRARY' => $LANG['dg_library'], 'L_URL_REWRITING' => $LANG['url_rewriting'], 'L_REGISTER_GLOBALS_OPTION' => $LANG['register_globals_option'], 'L_SERVER_URL' => $LANG['serv_name'], 'L_SITE_PATH' => $LANG['serv_path'], 'L_PHPBOOST_CONFIG' => $LANG['phpboost_config'], 'L_KERNEL_VERSION' => $LANG['kernel_version'], 'L_DEFAULT_THEME' => $LANG['default_theme'], 'L_DEFAULT_LANG' => $LANG['default_language'], 'L_DEFAULT_EDITOR' => $LANG['choose_editor'], 'L_START_PAGE' => $LANG['start_page'], 'L_OUTPUT_GZ' => $LANG['output_gz'], 'L_COOKIE_NAME' => $LANG['cookie_name'], 'L_SESSION_LENGTH' => $LANG['session_time'], 'L_SESSION_GUEST_LENGTH' => $LANG['session invit'], 'L_DIRECTORIES_AUTH' => $LANG['directories_auth'], 'L_SUMMERIZATION' => $LANG['system_report_summerization'], 'L_SUMMERIZATION_EXPLAIN' => $LANG['system_report_summerization_explain'])); $temp_var = function_exists('apache_get_modules') ? apache_get_modules() : array(); $server_path = !empty($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); if (!$server_path) { $server_path = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI'); } $server_path = trim(str_replace('/admin', '', dirname($server_path))); $server_name = 'http://' . (!empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : getenv('HTTP_HOST')); $lang_ini_file = load_ini_file('../lang/', get_ulang()); $template_ini_file = load_ini_file('../templates/' . get_utheme() . '/config/', get_ulang()); $directories_summerization = ''; $directories_list = array('/', '/cache', '/cache/backup', '/cache/syndication/', '/cache/tpl', '/images/avatars', '/images/group', '/images/maths', '/images/smileys', '/lang', '/menus', '/templates', '/upload'); foreach ($directories_list as $dir) { $dir_status = is_dir('..' . $dir) && is_writable('..' . $dir); $template->assign_block_vars('directories', array('NAME' => $dir, 'C_AUTH_DIR' => $dir_status)); $directories_summerization .= $dir . str_repeat(' ', 25 - strlen($dir)) . ": " . (int) $dir_status . "\n"; } $summerization = "---------------------------------System report---------------------------------\n-----------------------------generated by PHPBoost-----------------------------\n\nSERVER CONFIGURATION-----------------------------------------------------------\n\nphp version : " . phpversion() . "\ndbms version : " . $Sql->get_dbms_version() . "\ngd library : " . (int) @extension_loaded('gd') . "\nurl rewriting : " . (function_exists('apache_get_modules') ? (int) (!empty($temp_var[5])) : "?") . "\nregister globals : " . (int) (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') . "\nserver url : " . $server_name . "\nsite path : " . $server_path . "\n\nPHPBOOST CONFIGURATION---------------------------------------------------------\n\nphpboost version : " . phpboost_version() . "\nserver url : " . $CONFIG['server_name'] . "\nsite path : " . $CONFIG['server_path'] . "\ndefault theme : " . $template_ini_file['name'] . "\ndefault language : " . get_ulang() . "\ndefault editor : " . $CONFIG['editor'] . "\nstart page : " . $CONFIG['start_page'] . "\nurl rewriting : " . $CONFIG['rewrite'] . "\noutput gz : " . $CONFIG['ob_gzhandler'] . "\nsession cookie name : " . $CONFIG['site_cookie'] . "\nsession length : " . $CONFIG['site_session'] . "\nguest session length : " . $CONFIG['site_session_invit'] . "\n\nDIRECTORIES AUTHORIZATIONS-----------------------------------------------------\n\n" . $directories_summerization; $template->assign_vars(array('PHP_VERSION' => phpversion(), 'DBMS_VERSION' => $Sql->get_dbms_version(), 'C_SERVER_GD_LIBRARY' => @extension_loaded('gd'), 'C_URL_REWRITING_KNOWN' => function_exists('apache_get_modules'), 'C_SERVER_URL_REWRITING' => function_exists('apache_get_modules') ? !empty($temp_var[5]) : false, 'C_REGISTER_GLOBALS' => @ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on', 'SERV_SERV_URL' => $server_name, 'SERV_SITE_PATH' => $server_path, 'KERNEL_VERSION' => phpboost_version(), 'KERNEL_SERV_URL' => $CONFIG['server_name'], 'KERNEL_SITE_PATH' => $CONFIG['server_path'], 'KERNEL_DEFAULT_THEME' => $template_ini_file['name'], 'KERNEL_DEFAULT_LANGUAGE' => $lang_ini_file['name'], 'KERNEL_DEFAULT_EDITOR' => $CONFIG['editor'] == 'tinymce' ? 'TinyMCE' : 'BBCode', 'KERNEL_START_PAGE' => $CONFIG['start_page'], 'C_KERNEL_URL_REWRITING' => (bool) $CONFIG['rewrite'], 'C_KERNEL_OUTPUT_GZ' => (bool) $CONFIG['ob_gzhandler'], 'COOKIE_NAME' => $CONFIG['site_cookie'], 'SESSION_LENGTH' => $CONFIG['site_session'], 'SESSION_LENGTH_GUEST' => $CONFIG['site_session_invit'], 'SUMMERIZATION' => $summerization)); $template->parse(); require_once '../admin/admin_footer.php';
include_once "class/Easy_Mail.class.php"; include_once "class/class.Erro.php"; $theme = "."; $model = new Template($theme); $model->set_filenames(array('cabecalho' => 'cabecalho.htm')); $model->assign_block_vars('sub_titulo', array()); if (isset($layout)){ switch ($layout){ case "inicio": $model->assign_vars(array('SUB_MENU_ATIVO' => "1")); // $model->assign_vars(array('MENU_1' => "current")); // $model->assign_block_vars('sub_titulo.sub_cadastro', array()); break; case "cadastro": $model->assign_vars(array('SUB_MENU_ATIVO' => "2")); // $model->assign_vars(array('MENU_1' => "current")); // $model->assign_block_vars('sub_titulo.sub_cadastro', array()); break; case "movimento": $model->assign_vars(array('SUB_MENU_ATIVO' => "3")); // $model->assign_vars(array('MENU_1' => "current")); // $model->assign_block_vars('sub_titulo.sub_cadastro', array()); break; case "gerencia": $model->assign_vars(array('SUB_MENU_ATIVO' => "4"));
static function get_template($name = '', $block_position = BLOCK_POSITION__LEFT) { $tpl = new Template('framework/menus/feed/feed.tpl'); $tpl->assign_vars(array('NAME' => $name, 'C_NAME' => !empty($name), 'C_VERTICAL_BLOCK' => $block_position == BLOCK_POSITION__LEFT || $block_position == BLOCK_POSITION__RIGHT)); return $tpl; }
/** * It Renders content according to Part['Type'] * * @author Fernando Ontiveros Lira <*****@*****.**> * * @param intPos = 0 * @return void * */ public function RenderContent0($intPos = 0, $showXMLFormName = false) { global $G_FORM; global $G_TABLE; global $G_TMP_TARGET; global $G_OP_MENU; global $G_IMAGE_FILENAME; global $G_IMAGE_PARTS; global $_SESSION; //Changed from $HTTP_SESSION_VARS global $G_OBJGRAPH; //For graphLayout component $this->intPos = $intPos; $Part = $this->Parts[$intPos]; $this->publishType = $Part['Type']; switch ($this->publishType) { case 'externalContent': $G_CONTENT = new Content(); if ($Part['Content'] != "") { $G_CONTENT = G::LoadContent($Part['Content']); } G::LoadTemplateExternal($Part['Template']); break; case 'image': $G_IMAGE_FILENAME = $Part['File']; $G_IMAGE_PARTS = $Part['Data']; break; case 'appform': global $APP_FORM; $G_FORM = $APP_FORM; break; case 'xmlform': case 'dynaform': global $G_FORM; if ($Part['AbsolutePath']) { $sPath = $Part['AbsolutePath']; } else { if ($this->publishType == 'xmlform') { $sPath = PATH_XMLFORM; } else { $sPath = PATH_DYNAFORM; } } //if the xmlform file doesn't exists, then try with the plugins folders if (!is_file($sPath . $Part['File'] . '.xml')) { $aux = explode(PATH_SEP, $Part['File']); //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment if (count($aux) > 2) { //Subfolders $filename = array_pop($aux); $aux0 = implode(PATH_SEP, $aux); $aux = array(); $aux[0] = $aux0; $aux[1] = $filename; } if (count($aux) == 2 && defined('G_PLUGIN_CLASS')) { $oPluginRegistry =& PMPluginRegistry::getSingleton(); if ($response = $oPluginRegistry->isRegisteredFolder($aux[0])) { if ($response !== true) { $sPath = PATH_PLUGINS . $response . PATH_SEP; } else { $sPath = PATH_PLUGINS; } } } } if (!class_exists($Part['Template']) || $Part['Template'] === 'xmlform') { $G_FORM = new Form($Part['File'], $sPath, SYS_LANG, false); } else { eval('$G_FORM = new ' . $Part['Template'] . ' ( $Part[\'File\'] , "' . $sPath . '");'); } if ($this->publishType == 'dynaform' && ($Part['Template'] == 'xmlform' || $Part['Template'] == 'xmlform_preview')) { $dynaformShow = isset($G_FORM->printdynaform) && $G_FORM->printdynaform ? 'gulliver/dynaforms_OptionsPrint' : 'gulliver/dynaforms_Options'; $G_FORM->fields = G::array_merges(array('__DYNAFORM_OPTIONS' => new XmlForm_Field_XmlMenu(new Xml_Node('__DYNAFORM_OPTIONS', 'complete', '', array('type' => 'xmlmenu', 'xmlfile' => $dynaformShow, 'parentFormId' => $G_FORM->id)), SYS_LANG, PATH_XMLFORM, $G_FORM)), $G_FORM->fields); } //Needed to make ajax calls //The action in the form tag. if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') { $G_FORM->action = urlencode(G::encrypt($Part['Target'], URL_KEY)); } else { $G_FORM->action = $Part['Target']; } if (!(isset($Part['ajaxServer']) && $Part['ajaxServer'] !== '')) { if ($this->publishType == 'dynaform') { $Part['ajaxServer'] = '../gulliver/defaultAjaxDynaform'; } else { $Part['ajaxServer'] = '../gulliver/defaultAjax'; } } if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') { $G_FORM->ajaxServer = urlencode(G::encrypt($Part['ajaxServer'], URL_KEY)); } else { $G_FORM->ajaxServer = $Part['ajaxServer']; } $G_FORM->setValues($Part['Data']); $G_FORM->setValues(array('G_FORM_ID' => $G_FORM->id)); //Asegurese de que no entre cuando $Part['Template']=="grid" //de hecho soo deberia usarse cuando $Part['Template']=="xmlform" if ($this->publishType == 'dynaform' && $Part['Template'] == "xmlform" || $Part['Template'] == "xmlform") { $G_FORM->values = G::array_merges(array('__DYNAFORM_OPTIONS' => isset($Part['Data']['__DYNAFORM_OPTIONS']) ? $Part['Data']['__DYNAFORM_OPTIONS'] : ''), $G_FORM->values); if (isset($G_FORM->nextstepsave)) { switch ($G_FORM->nextstepsave) { // this condition validates if the next step link is configured to Save and Go the next step or show a prompt case 'save': // Save and Next only if there are no required fields can submit the form. $G_FORM->values['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'if (document.getElementById("' . $G_FORM->id . '")&&validateForm(document.getElementById(\'DynaformRequiredFields\').value)) {document.getElementById("' . $G_FORM->id . '").submit();}return false;'; break; case 'prompt': // Show Prompt only if there are no required fields can submit the form. $G_FORM->values['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'if (document.getElementById("' . $G_FORM->id . '")&&validateForm(document.getElementById(\'DynaformRequiredFields\').value)) {if(dynaFormChanged(document.getElementsByTagName(\'form\').item(0))) {new leimnud.module.app.confirm().make({label:"@G::LoadTranslation(ID_DYNAFORM_SAVE_CHANGES)", action:function(){document.getElementById("' . $G_FORM->id . '").submit();}.extend(this), cancel:function(){window.location = getField("DYN_FORWARD").href;}.extend(this)});return false;} else {window.location = getField("DYN_FORWARD").href;return false;}}return false;'; break; } } } if (isset($_SESSION)) { $_SESSION[$G_FORM->id] = $G_FORM->values; } // by default load the core template if ($Part['Template'] == 'xmlform_preview') { $Part['Template'] = 'xmlform'; } $template = PATH_CORE . 'templates/' . $Part['Template'] . '.html'; //erik: new feature, now templates such as xmlform.html can be personalized via skins if (defined('SYS_SKIN') && strtolower(SYS_SKIN) != 'classic') { // First, verify if the template exists on Custom skins path if (is_file(PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html')) { $template = PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html'; //Second, verify if the template exists on base skins path } elseif (is_file(G::ExpandPath("skinEngine") . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html')) { $template = G::ExpandPath("skinEngine") . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html'; } } //end new feature if ($Part['Template'] == 'grid') { print '<form class="formDefault">'; } $scriptCode = ''; if ($this->localMode != '') { // @# las modification by erik in 09/06/2008 $G_FORM->mode = $this->localMode; } print $G_FORM->render($template, $scriptCode); if ($Part['Template'] == 'grid') { print '</form>'; } $oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher->addScriptFile($G_FORM->scriptURL); $oHeadPublisher->addScriptCode($scriptCode); /** * We've implemented the conditional show hide fields.. * * @author Erik A. Ortiz <*****@*****.**> * @date Fri Feb 19, 2009 */ if ($this->publishType == 'dynaform') { if (isset($_SESSION['CURRENT_DYN_UID']) || isset($_SESSION['CONDITION_DYN_UID'])) { require_once "classes/model/FieldCondition.php"; $oFieldCondition = new FieldCondition(); //This dynaform has show/hide field conditions if (isset($_SESSION['CURRENT_DYN_UID']) && $_SESSION['CURRENT_DYN_UID'] != '') { $ConditionalShowHideRoutines = $oFieldCondition->getConditionScript($_SESSION["CURRENT_DYN_UID"]); //lsl } else { if (isset($_SESSION['CONDITION_DYN_UID']) && $_SESSION['CONDITION_DYN_UID'] != '') { $ConditionalShowHideRoutines = $oFieldCondition->getConditionScript($_SESSION["CONDITION_DYN_UID"]); //lsl } } } } if (isset($ConditionalShowHideRoutines) && $ConditionalShowHideRoutines) { G::evalJScript($ConditionalShowHideRoutines); } break; case 'pagedtable': global $G_FORM; //if the xmlform file doesn't exists, then try with the plugins folders $sPath = PATH_XMLFORM; if (!is_file($sPath . $Part['File'])) { $aux = explode(PATH_SEP, $Part['File']); if (count($aux) == 2) { $oPluginRegistry =& PMPluginRegistry::getSingleton(); if ($oPluginRegistry->isRegisteredFolder($aux[0])) { $sPath = PATH_PLUGINS; // . $aux[0] . PATH_SEP ; } } } $G_FORM = new Form($Part['File'], $sPath, SYS_LANG, true); if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') { $G_FORM->ajaxServer = urlencode(G::encrypt($Part['ajaxServer'], URL_KEY)); } else { $G_FORM->ajaxServer = $Part['ajaxServer']; } $G_FORM->setValues($Part['Data']); if (isset($_SESSION)) { $_SESSION[$G_FORM->id] = $G_FORM->values; } G::LoadSystem('pagedTable'); $oTable = new pagedTable(); $oTable->template = 'templates/' . $Part['Template'] . '.html'; $G_FORM->xmlform = ''; $G_FORM->xmlform->fileXml = $G_FORM->fileName; $G_FORM->xmlform->home = $G_FORM->home; $G_FORM->xmlform->tree->attribute = $G_FORM->tree->attributes; $G_FORM->values = array_merge($G_FORM->values, $Part['Data']); $oTable->setupFromXmlform($G_FORM); if (isset($Part['ajaxServer']) && $Part['ajaxServer'] !== '') { $oTable->ajaxServer = $Part['ajaxServer']; } /* Start Block: Load user configuration for the pagedTable */ G::LoadClass('configuration'); $objUID = $Part['File']; $conf = new Configurations(); $conf->loadConfig($oTable, 'pagedTable', $objUID, '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '', ''); $oTable->__OBJ_UID = $objUID; /* End Block */ /* Start Block: PagedTable Right Click */ G::LoadClass('popupMenu'); $pm = new popupMenu('gulliver/pagedTable_PopupMenu'); $pm->name = $oTable->id; $fields = array_keys($oTable->fields); foreach ($fields as $f) { switch (strtolower($oTable->fields[$f]['Type'])) { case 'javascript': case 'button': case 'private': case 'hidden': case 'cellmark': break; default: $label = $oTable->fields[$f]['Label'] != '' ? $oTable->fields[$f]['Label'] : $f; $label = str_replace("\n", ' ', $label); $pm->fields[$f] = new XmlForm_Field_popupOption(new Xml_Node($f, 'complete', '', array('label' => $label, 'type' => 'popupOption', 'launch' => $oTable->id . '.showHideField("' . $f . '")'))); $pm->values[$f] = ''; } } $sc = ''; $pm->values['PAGED_TABLE_ID'] = $oTable->id; print $pm->render(PATH_CORE . 'templates/popupMenu.html', $sc); /* End Block */ $oTable->renderTable(); /* Start Block: Load PagedTable Right Click */ print '<script type="text/javascript">'; print $sc; print 'loadPopupMenu_' . $oTable->id . '();'; print '</script>'; /* End Block */ break; case 'propeltable': global $G_FORM; //if the xmlform file doesn't exists, then try with the plugins folders if ($Part['AbsolutePath']) { $sPath = ''; } else { $sPath = PATH_XMLFORM; } if (!is_file($sPath . $Part['File'])) { $aux = explode(PATH_SEP, $Part['File']); //search in PLUGINS folder, probably the file is in plugin if (count($aux) == 2) { $oPluginRegistry =& PMPluginRegistry::getSingleton(); if ($oPluginRegistry->isRegisteredFolder($aux[0])) { $sPath = PATH_PLUGINS; // . $aux[0] . PATH_SEP ; } } //search in PATH_DYNAFORM folder if (!is_file($sPath . PATH_SEP . $Part['File'] . '.xml')) { $sPath = PATH_DYNAFORM; } } //PATH_DATA_PUBLIC ??? if (!file_exists($sPath . PATH_SEP . $Part['File'] . '.xml') && defined('PATH_DATA_PUBLIC')) { $sPath = PATH_DATA_PUBLIC; } $G_FORM = new Form($Part['File'], $sPath, SYS_LANG, true); if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') { $G_FORM->ajaxServer = urlencode(G::encrypt($Part['ajaxServer'], URL_KEY)); } else { $G_FORM->ajaxServer = $Part['ajaxServer']; } if (isset($_SESSION)) { $_SESSION[$G_FORM->id] = $G_FORM->values; } G::LoadClass('propelTable'); $oTable = new propelTable(); $oTable->template = $Part['Template']; $oTable->criteria = $Part['Content']; if (isset($Part['ajaxServer']) && $Part['ajaxServer'] !== '') { $oTable->ajaxServer = $Part['ajaxServer']; } if (!isset($G_FORM->xmlform)) { $G_FORM->xmlform = new stdclass(); } $G_FORM->xmlform->fileXml = $G_FORM->fileName; $G_FORM->xmlform->home = $G_FORM->home; if (!isset($G_FORM->xmlform->tree)) { $G_FORM->xmlform->tree = new stdclass(); } $G_FORM->xmlform->tree->attribute = $G_FORM->tree->attributes; if (is_array($Part['Data'])) { $G_FORM->values = array_merge($G_FORM->values, $Part['Data']); } $oTable->setupFromXmlform($G_FORM); /* Start Block: Load user configuration for the pagedTable */ G::LoadClass('configuration'); $objUID = $Part['File']; $conf = new Configurations($oTable); $conf->loadConfig($oTable, 'pagedTable', $objUID, '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '', ''); $oTable->__OBJ_UID = $objUID; //$oTable->__OBJ_UID = ''; /* End Block */ /* Start Block: PagedTable Right Click */ G::LoadClass('popupMenu'); $pm = new popupMenu('gulliver/pagedTable_PopupMenu'); $sc = $pm->renderPopup($oTable->id, $oTable->fields); /* End Block */ //krumo ( $Part ); if ($this->ROWS_PER_PAGE) { $oTable->rowsPerPage = $this->ROWS_PER_PAGE; } try { if (is_array($Part['Data'])) { $oTable->renderTable('', $Part['Data']); } else { $oTable->renderTable(); } print $sc; } catch (Exception $e) { $aMessage['MESSAGE'] = $e->getMessage(); $this->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage); } break; case 'panel-init': global $mainPanelScript; global $panelName; global $tabCount; //G::LoadThirdParty( 'pear/json', 'class.json' ); //$json = new Services_JSON(); $tabCount = 0; $panelName = $Part['Template']; $data = $Part['File']; if (!is_array($data)) { $data = array(); } $data = G::array_merges(array('title' => '', 'style' => array(), 'left' => 'getAbsoluteLeft(mycontent)', 'top' => 'getAbsoluteTop(mycontent)', 'width' => 700, 'height' => 600, 'drag' => true, 'close' => true, 'modal' => true, 'roll' => false, 'resize' => false, 'tabWidth' => 120, 'tabStep' => 3, 'blinkToFront' => true, 'tabSpace' => 10), $data); $mainPanelScript = 'var ' . $panelName . '={},' . $panelName . 'Tabs=[];' . 'leimnud.event.add(window,"load",function(){' . $panelName . ' = new leimnud.module.panel();' . 'var mycontent=document.getElementById("' . $this->publisherId . '[' . $intPos . ']");' . $panelName . '.options={' . 'size:{w:' . $data['width'] . ',h:' . $data['height'] . '},' . 'position:{x:' . $data['left'] . ',y:' . $data['top'] . '},' . 'title:"' . addcslashes($data['title'], '\\"') . '",' . 'theme:"processmaker",' . 'statusBar:true,' . 'headerBar:true,' . 'control:{' . ' close:' . ($data['close'] ? 'true' : 'false') . ',' . ' roll:' . ($data['roll'] ? 'true' : 'false') . ',' . ' drag:' . ($data['drag'] ? 'true' : 'false') . ',' . ' resize:' . ($data['resize'] ? 'true' : 'false') . '},' . 'fx:{' . ' drag:' . ($data['drag'] ? 'true' : 'false') . ',' . ' modal:' . ($data['modal'] ? 'true' : 'false') . ',' . ' blinkToFront:' . ($data['blinkToFront'] ? 'true' : 'false') . '}' . '};' . $panelName . '.setStyle=' . Bootstrap::json_encode($data['style']) . ';' . $panelName . '.tab={' . 'width:' . ($data['tabWidth'] + $data['tabSpace']) . ',' . 'optWidth:' . $data['tabWidth'] . ',' . 'step :' . $data['tabStep'] . ',' . 'options:[]' . '};'; print ' '; break; case 'panel-tab': global $tabCount; global $mainPanelScript; global $panelName; $onChange = $Part['Content']; $beforeChange = $Part['Data']; if (SYS_LANG == 'es') { $mainPanelScript = str_replace("120", "150", $mainPanelScript); } else { $mainPanelScript = str_replace("150", "120", $mainPanelScript); } $mainPanelScript .= $panelName . 'Tabs[' . $tabCount . ']=' . 'document.getElementById("' . $Part['File'] . '");' . $panelName . '.tab.options[' . $panelName . '.tab.options.length]=' . '{' . 'title :"' . addcslashes($Part['Template'], '\\"') . '",' . 'noClear :true,' . 'content :function(){' . ($beforeChange != '' ? 'if (typeof(' . $beforeChange . ')!=="undefined") {' . $beforeChange . '();}' : '') . $panelName . 'Clear();' . $panelName . 'Tabs[' . $tabCount . '].style.display="";' . ($onChange != '' ? 'if (typeof(' . $onChange . ')!=="undefined") {' . $onChange . '();}' : '') . '}.extend(' . $panelName . '),' . 'selected:' . ($tabCount == 0 ? 'true' : 'false') . '};'; $tabCount++; break; case 'panel-close': global $mainPanelScript; global $panelName; global $tabCount; $mainPanelScript .= $panelName . '.make();'; $mainPanelScript .= 'for(var r=0;r<' . $tabCount . ';r++)' . 'if (' . $panelName . 'Tabs[r])' . $panelName . '.addContent(' . $panelName . 'Tabs[r]);'; $mainPanelScript .= '});'; $mainPanelScript .= 'function ' . $panelName . 'Clear(){'; $mainPanelScript .= 'for(var r=0;r<' . $tabCount . ';r++)' . 'if (' . $panelName . 'Tabs[r])' . $panelName . 'Tabs[r].style.display="none";}'; $oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher->addScriptCode($mainPanelScript); break; case 'blank': print ' '; break; case 'varform': global $G_FORM; $G_FORM = new Form(); G::LoadSystem("varform"); $xml = new varForm(); //$xml->parseFile ( ); $xml->renderForm($G_FORM, $Part['File']); $G_FORM->Values = $Part['Data']; $G_FORM->SetUp($Part['Target']); $G_FORM->width = 500; break; case 'table': $G_TMP_TARGET = $Part['Target']; $G_TABLE = G::LoadRawTable($Part['File'], $this->dbc, $Part['Data']); break; case 'menu': $G_TMP_TARGET = $Part['Target']; $G_OP_MENU = new Menu(); $G_OP_MENU->Load($Part['File']); break; case 'smarty': //To do: Please check it 26/06/07 $template = new Smarty(); $template->compile_dir = PATH_SMARTY_C; $template->cache_dir = PATH_SMARTY_CACHE; $template->config_dir = PATH_THIRDPARTY . 'smarty/configs'; $template->caching = false; $dataArray = $Part['Data']; // verify if there are templates folders registered, template and method folders are the same $folderTemplate = explode('/', $Part['Template']); $oPluginRegistry =& PMPluginRegistry::getSingleton(); if ($oPluginRegistry->isRegisteredFolder($folderTemplate[0])) { $template->templateFile = PATH_PLUGINS . $Part['Template'] . '.html'; } else { $template->templateFile = PATH_TPL . $Part['Template'] . '.html'; } // last change to load the template, maybe absolute path was given if (!is_file($template->templateFile)) { $template->templateFile = strpos($Part['Template'], '.html') !== false ? $Part['Template'] : $Part['Template'] . '.html'; } //assign the variables and use the template $template $template->assign($dataArray); print $template->fetch($template->templateFile); break; case 'template': //To do: Please check it 26/06/07 if (gettype($Part['Data']) == 'array') { G::LoadSystem('template'); //template phpBB $template = new Template(); $template->set_filenames(array('body' => $Part['Template'] . '.html')); $dataArray = $Part['Data']; if (is_array($dataArray)) { foreach ($dataArray as $key => $val) { if (is_array($val)) { foreach ($val as $key_val => $val_array) { $template->assign_block_vars($key, $val_array); } } else { $template->assign_vars(array($key => $val)); } } } $template->pparse('body'); } if (gettype($Part['Data']) == 'object' && strtolower(get_class($Part['Data'])) == 'templatepower') { $Part['Data']->printToScreen(); } return; break; case 'view': case 'content': //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment $aux = explode(PATH_SEP, $Part['Template']); if (count($aux) == 2 && defined('G_PLUGIN_CLASS')) { //if the template doesn't exists, then try it with the plugins folders, after the normal Template $userTemplate = G::ExpandPath('templates') . $Part['Template']; $globalTemplate = PATH_TEMPLATE . $Part['Template']; if (!is_file($userTemplate) && !is_file($globalTemplate)) { $oPluginRegistry =& PMPluginRegistry::getSingleton(); if ($oPluginRegistry->isRegisteredFolder($aux[0])) { $pluginTemplate = PATH_PLUGINS . $Part['Template'] . '.php'; include $pluginTemplate; } } } break; case 'graphLayout': //Added by JHL to render GraphLayout component $G_OBJGRAPH = $Part['Data']; $G_TMP_TARGET = $Part['Target']; $G_TMP_FILE = $Part['File']; break; } //krumo( $Part['Template'] ); //check if this LoadTemplate is used, byOnti 12th Aug 2008 G::LoadTemplate($Part['Template']); $G_TABLE = null; }
if ($a[0]) { $_GET[$a[0]] = urldecode($a[1]); } } } include_once 'class.template.inc'; include_once 'app.inc'; $template = new Template(ME_WWWROOT); $app = new App(); $template->set_filenames(array('page' => 'tpl/me.tpl')); $options = $app->fetchAll('SELECT * FROM `options`'); foreach ($options as $key => $option) { ${$option}['name'] = $option['value']; } $products_per_page = (int) $products_per_page < 1 ? 15 : $products_per_page; $template->assign_vars(array('copyright' => $copyright, 'currency_exchange_rate' => $currency_exchange_rate, 'short_name' => $name, 'full_name' => $long_name, 'address' => $address, 'email_address' => $shop_mail, 'webadmin_email_address' => $web_admin_mail, 'page_bottom_info' => $page_bottom_info, 'test_branch_min' => APP_TEST_BRANCH ? '' : '.min')); function get_url_compatible($text) { return urlencode(preg_replace('/\\s{1,}/', ' ', trim(preg_replace('/\\([^\\)]*?\\)/', '', $text)))); } $html = ''; $menu = array(); // for menu tree $categories = $app->fetchAll("SELECT `id`, `name`, `parent` FROM `categories` WHERE `hidden` = 0 ORDER BY `name`"); // sections of top level for ($i = 0; $i < count($categories); $i++) { $menuNames[$categories[$i]['id']] = $categories[$i]['name']; $menu[$categories[$i]['parent']][$categories[$i]['id']] = $categories[$i]['name']; } // sections of sub level foreach ($menu as $k => $t1) {
function build_select_form($selected_id, $form_id, $form_name, $current_id_cat = 0, $num_auth = 0, $array_auth = array(), $recursion_mode = STOP_BROWSING_IF_A_CATEGORY_DOES_NOT_MATCH, $template = NULL) { global $LANG, $User; $general_auth = false; if (is_null($template) || !is_object($template) || strtolower(get_class($template)) != 'template') { $template = new Template('framework/content/categories_select_form.tpl'); } if ($num_auth != 0) { $general_auth = $User->check_auth($array_auth, $num_auth); } $template->assign_vars(array('FORM_ID' => $form_id, 'FORM_NAME' => $form_name, 'SELECTED_ROOT' => $selected_id == 0 ? ' selected="selected"' : '', 'L_ROOT' => $LANG['root'])); $this->_create_select_row(0, 1, $selected_id, $current_id_cat, $recursion_mode, $num_auth, $general_auth, $template); return $template->parse(TEMPLATE_STRING_MODE); }
if (isset($_SESSION[DROIT_ID]) && (isset($_SESSION[MOD_COMMANDE]) || isset($_SESSION[DROIT_SUPER_ZEYBU]))) { // Inclusion des classes include_once CHEMIN_CLASSES_CONTROLEURS . MOD_COMMANDE . "/MesAchatsControleur.php"; include_once CHEMIN_CLASSES_UTILS . "InfobullesUtils.php"; include_once CHEMIN_CLASSES_UTILS . "Template.php"; include_once CHEMIN_CLASSES_UTILS . "StringUtils.php"; $lControleur = new MesAchatsControleur(); $lPage = $lControleur->getListe(); $lLogger->log("Affichage de la vue MesAchats par le compte de l'Adhérent : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs // Constante de titre de la page define("TITRE", ZEYBUX_TITRE_DEBUT . "Mes Achats - " . ZEYBUX_TITRE_FIN); $lTemplate = new Template(CHEMIN_TEMPLATE); // Entete $lTemplate->set_filenames(array('entete' => COMMUN_TEMPLATE . 'Entete.html')); $lTemplate->assign_vars(array('TITRE' => TITRE)); InfobullesUtils::generer($lTemplate); // Messages d'erreur $lTemplate->assign_var_from_handle('ENTETE', 'entete'); // Menu $lTemplate->set_filenames(array('menu' => COMMUN_TEMPLATE . 'Menu.html')); $lTemplate->assign_vars(array('menu-MesAchats' => "ui-state-active")); $lTemplate->assign_var_from_handle('MENU', 'menu'); // Body $lTemplate->set_filenames(array('body' => MOD_COMMANDE . '/' . 'MesAchats.html')); $lListeAchat = $lPage->getAchats(); if (!is_null($lListeAchat[0]->getOpeId())) { $lTemplate->set_filenames(array('listeAchat' => MOD_COMMANDE . '/' . 'ListeAchat.html')); foreach ($lListeAchat as $lAchat) { $lTemplate->assign_block_vars('achat', array('numero' => $lAchat->getComNumero(), 'dateMarcheDebut' => StringUtils::extractDate($lAchat->getOpeDate()), 'idAchat' => $lAchat->getOpeId())); }
/** * * * @version $Id$ * @copyright 2009 */ require_once 'config.php'; require_once 'common.php'; require_once 'includes/template.php'; require_once 'includes/geshi.php'; connect($DBHost, $DBUser, $DBPass, $DBTable); $template = new Template('themes/' . $DESIGN . '/templates'); /* Declaration du haut et du bas de page, ainsi que de leurs variables */ $template->set_filenames(array('header' => 'header.tpl', 'footer' => 'footer.tpl')); $template->assign_vars(array('TITRE' => $SiteName, 'CSS' => 'themes/' . $DESIGN . '/style.css', 'SUBTITRE' => $Slogan, 'COPYRIGHT' => $Copyright)); /* Affichage du haut de page */ $template->pparse('header'); /* Declaration et affichage du menu, ainsi que de ses variables */ $template->set_filenames(array('menu' => 'menu.tpl')); RecupMenu($template); $template->pparse('menu'); $template->set_filenames(array('index' => 'index.tpl')); /* Affichage du contenu de la page */ if (!empty($_GET['page']) and $_GET['page'] != 'index') { include 'pages/' . $_GET['page'] . '.php'; } else { $template->set_filenames(array('news' => 'news.tpl')); RecupNews($template); $template->assign_var_from_handle('CONTENU', 'news'); }
switch ($update->get_priority()) { case ADMIN_ALERT_VERY_HIGH_PRIORITY: $priority = 'priority_very_high'; break; case ADMIN_ALERT_HIGH_PRIORITY: $priority = 'priority_high'; break; case ADMIN_ALERT_MEDIUM_PRIORITY: $priority = 'priority_medium'; break; default: $priority = 'priority_low'; break; } $short_description = $update->get_description(); $maxlength = 300; $length = strlen($short_description) > $maxlength ? $maxlength + strpos(substr($short_description, $maxlength), ' ') : 0; $length = $length > $maxlength * 1.1 ? $maxlength : $length; $tpl->assign_block_vars('apps', array('type' => $update->get_type(), 'name' => $update->get_name(), 'version' => $update->get_version(), 'short_description' => $length > 0 ? substr($short_description, 0, $length) . '...' : $short_description, 'identifier' => $update->get_identifier(), 'L_PRIORITY' => $LANG[$priority], 'priority_css_class' => 'row_' . $priority, 'download_url' => $update->get_download_url(), 'update_url' => $update->get_update_url())); } if ($updates_availables = count($updates) > 0) { $tpl->assign_vars(array('L_UPDATES_ARE_AVAILABLE' => $LANG['updates_are_available'], 'L_AVAILABLES_UPDATES' => $LANG['availables_updates'], 'L_TYPE' => $LANG['type'], 'L_DESCRIPTION' => $LANG['description'], 'L_PRIORITY' => $LANG['priority'], 'L_UPDATE_DOWNLOAD' => $LANG['app_update__download'], 'L_NAME' => $LANG['name'], 'L_VERSION' => $LANG['version'], 'L_MORE_DETAILS' => $LANG['more_details'], 'L_DETAILS' => $LANG['details'], 'L_DOWNLOAD_PACK' => $LANG['app_update__download_pack'], 'L_DOWNLOAD_THE_COMPLETE_PACK' => $LANG['download_the_complete_pack'], 'L_UPDATE_PACK' => $LANG['app_update__update_pack'], 'L_DOWNLOAD_THE_UPDATE_PACK' => $LANG['download_the_update_pack'], 'C_ALL' => $update_type == '')); } else { $tpl->assign_vars(array('L_NO_AVAILABLES_UPDATES' => $LANG['no_available_update'])); } } else { $tpl->assign_vars(array('L_INCOMPATIBLE_PHP_VERSION' => sprintf($LANG['incompatible_php_version'], PHP_MIN_VERSION_UPDATES), 'C_INCOMPATIBLE_PHP_VERSION' => true)); } $tpl->assign_vars(array('L_WEBSITE_UPDATES' => $LANG['website_updates'], 'L_KERNEL' => $LANG['kernel'], 'L_MODULES' => $LANG['modules'], 'L_THEMES' => $LANG['themes'], 'C_UPDATES' => $updates_availables, 'U_CHECK' => 'updates.php?check=1' . (!empty($update_type) ? '&type=' . $update_type : '') . '&token=' . $Session->get_token(), 'L_CHECK_FOR_UPDATES_NOW' => $LANG['check_for_updates_now'])); $tpl->parse(); require_once PATH_TO_ROOT . '/admin/admin_footer.php';
function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') { global $db, $template, $board_config, $theme, $lang, $phpbb_root_path, $nav_links, $gen_simple_header; global $userdata, $user_ip, $session_length; global $starttime; $sql_store = $sql; // // Get SQL error if we are debugging. Do this as soon as possible to prevent // subsequent queries from overwriting the status of sql_error() // if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) ) { $sql_error = $db->sql_error(); $debug_text = ''; if ( $sql_error['message'] != '' ) { $debug_text .= '<br /><br />SQL Error : ' . $sql_error['code'] . ' ' . $sql_error['message']; } if ( $sql_store != '' ) { $debug_text .= "<br /><br />$sql_store"; } if ( $err_line != '' && $err_file != '' ) { $debug_text .= '</br /><br />Line : ' . $err_line . '<br />File : ' . $err_file; } } if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR ) ) { $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); } // // If the header hasn't been output then do it // if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) { if ( empty($lang) ) { if ( !empty($board_config['default_lang']) ) { include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.php'); } else { include($phpbb_root_path . 'language/lang_english/lang_main.php'); } } if ( empty($template) ) { $template = new Template($phpbb_root_path . 'templates/' . $board_config['board_template']); } if ( empty($theme) ) { $theme = setup_style($board_config['default_style']); } // // Load the Page Header // if ( !defined('IN_ADMIN') ) { include($phpbb_root_path . 'includes/page_header.php'); } else { include($phpbb_root_path . 'admin/page_header_admin.php'); } } switch($msg_code) { case GENERAL_MESSAGE: if ( $msg_title == '' ) { $msg_title = $lang['Information']; } break; case CRITICAL_MESSAGE: if ( $msg_title == '' ) { $msg_title = $lang['Critical_Information']; } break; case GENERAL_ERROR: if ( $msg_text == '' ) { $msg_text = $lang['An_error_occured']; } if ( $msg_title == '' ) { $msg_title = $lang['General_Error']; } break; case CRITICAL_ERROR: // // Critical errors mean we cannot rely on _ANY_ DB information being // available so we're going to dump out a simple echo'd statement // include($phpbb_root_path . 'language/lang_english/lang_main.php'); if ( $msg_text == '' ) { $msg_text = $lang['A_critical_error']; } if ( $msg_title == '' ) { $msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; } // // Add on DEBUG info if we've enabled debug mode and this is an error. This // prevents debug info being output for general messages should DEBUG be // set TRUE by accident (preventing confusion for the end user!) // if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) ) { if ( $debug_text != '' ) { $msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text; } } if ( $msg_code != CRITICAL_ERROR ) { if ( !empty($lang[$msg_text]) ) { $msg_text = $lang[$msg_text]; } if ( !defined('IN_ADMIN') ) { $template->set_filenames(array( 'message_body' => 'message_body.tpl') ); } else { $template->set_filenames(array( 'message_body' => 'admin/admin_message_body.tpl') ); } $template->assign_vars(array( 'MESSAGE_TITLE' => $msg_title, 'MESSAGE_TEXT' => $msg_text) ); $template->pparse('message_body'); if ( !defined('IN_ADMIN') ) { include($phpbb_root_path . 'includes/page_tail.php'); } else { include($phpbb_root_path . 'admin/page_footer_admin.php'); } } else { echo "<html>\n<body>\n" . $msg_title . "\n<br /><br />\n" . $msg_text . "</body>\n</html>"; } exit; }
$description = $titre; if (count($tabMotsCleNettoye) > 0) { $motsCle = ", " . implode(", ", $tabMotsCleNettoye); } } $arrayIdVilleGeneral = array(); if ($session->isInSession('archiIdVilleGeneral') && $session->getFromSession('archiIdVilleGeneral') != '' && $session->getFromSession('archiIdVilleGeneral') != '1') { $arrayIdVilleGeneral['archiIdVilleGeneral'] = $session->getFromSession('archiIdVilleGeneral'); } $listPages = archiPage::getListMenu(LANG); $htmlListPages = ""; foreach ($listPages as $page) { $htmlListPages .= "<li><a href='index.php?archiAffichage=page&idPage=" . $page["id"] . "'>" . $page["title"] . "</a></li>"; } // liens $t->assign_vars(array('listeUtilisateurs' => $config->creerUrl('', 'utilisateurListe'), 'administration' => $config->creerUrl('', 'administration'), 'seDeconnecter' => $config->creerUrl('deconnexion', 'authentification'), 'recherche' => $config->creerUrl('', 'recherche'), 'edito' => $config->creerUrl('', 'edito'), 'quiSommesNous' => $config->creerUrl('', 'quiSommesNous'), 'faq' => $config->creerUrl('', 'faq'), 'inscription' => $config->creerUrl('', 'inscription'), 'listeDossiers' => $config->creerUrl('', 'listeDossiers', $arrayIdVilleGeneral), 'ajoutNouveauDossier' => $config->creerUrl('', 'ajoutNouveauDossier'), "ajoutNouvellePersonne" => $config->creerUrl("", "ajoutNouvelPersonne"), 'contact' => $config->creerUrl('', 'contact'), 'urlMotDePasseOublie' => $config->creerUrl('', 'formulaireMotDePasseOublie'), 'publiciteMedias' => $config->creerUrl('', 'publiciteArticlesPresse'), 'nosSources' => $config->creerUrl('', 'nosSources'), 'faireUnDon' => $config->creerUrl('', 'faireUnDon'), 'ajaxFunctions' => $ajax->getAjaxFunctions(), 'calqueFunctions' => "<script >" . $calque->getJSFunctionContextualHelp() . " " . $i->getJsSetOpacityFunction(array('noBalisesJs' => true)) . "</script>", 'titrePage' => stripslashes($titre), 'descriptionPage' => $description, 'motsCle' => $motsCle, 'urlCheminSite' => $recherche->getHtmlArborescence(), 'titreSite' => $titreSite, 'parcours' => $config->creerUrl('', 'parcours'), 'jsHeader' => $headerJS, "lang" => LANG, "lang_short" => substr(LANG, 0, 2), "listPages" => $htmlListPages, "urlOpendata" => $config->creerUrl('', 'lienOpendata'))); // headerJS = variables contenant le javascript recupéré des fonctions du site que l'on collecte et que l'on place dans la balise header $labelConnexion = _("Connexion"); $imgConnexion = "images/logo_connexion.png"; if ($authentification->estConnecte() !== true) { // utilisateur pas connecté $t->assign_block_vars('utilisateurNonConnecte', array()); if ($authentification->estConnecte()) { $t->assign_vars(array('etatConnexion' => _("Vous êtes connecté!"))); } else { $t->assign_vars(array('etatConnexion' => _("Vous n'êtes pas connecté"))); } $t->assign_vars(array('formulaireConnexion' => $authentification->afficheFormulaireAuthentification('compact'), 'formulaireRecherche' => $recherche->afficheFormulaire(array(), 0, array('noDisplayRechercheAvancee' => false, 'noDisplayCheckBoxResultatsCarte' => false)), 'inscriptionDeconnexion' => _("Inscrivez-vous !"), 'urlInscriptDeconnexion' => $config->creerUrl('', 'inscription'), 'urlAccueil' => $config->creerUrl('', 'afficheAccueil'), 'txtAccueil' => 'Accueil', 'classAuthLinkWrapper' => 'notConnectedAuthLink')); $t->assign_block_vars('linkConnected', array('authLinkOneClass' => ' authLinkOneClass forgetPasswordLabel', 'authLinkUrl' => $config->creerUrl('', 'formulaireMotDePasseOublie'), 'authLinkLabel' => 'Mot de passe oublié ?')); $t->assign_block_vars('linkConnected', array('authLinkOneClass' => 'authLinkTwoClass subscribeLabel', 'authLinkUrl' => $config->creerUrl('', 'inscription'), 'authLinkLabel' => 'Inscrivez-vous !')); } else {
function get_home_page() { global $Sql, $User, $Template, $Cache, $Bread_crumb, $_WIKI_CONFIG, $_WIKI_CATS, $LANG; load_module_lang('wiki'); include_once '../wiki/wiki_functions.php'; $bread_crumb_key = 'wiki'; require_once '../wiki/wiki_bread_crumb.php'; unset($Template); $Template = new Template(); $Template->set_filenames(array('wiki' => 'wiki/wiki.tpl', 'index' => 'wiki/index.tpl')); $Template->assign_vars(array('WIKI_PATH' => $Template->get_module_data_path('wiki'))); if ($_WIKI_CONFIG['last_articles'] > 1) { $result = $Sql->query_while("SELECT a.title, a.encoded_title, a.id\n\t\t\tFROM " . PREFIX . "wiki_articles a\n\t\t\tLEFT JOIN " . PREFIX . "wiki_contents c ON c.id_contents = a.id_contents\n\t\t\tWHERE a.redirect = 0\n\t\t\tORDER BY c.timestamp DESC\n\t\t\tLIMIT 0, " . $_WIKI_CONFIG['last_articles'], __LINE__, __FILE__); $articles_number = $Sql->num_rows($result, "SELECT COUNT(*) FROM " . PREFIX . "wiki_articles WHERE encoded_title = '" . $encoded_title . "'", __LINE__, __FILE__); $Template->assign_block_vars('last_articles', array('L_ARTICLES' => $LANG['wiki_last_articles_list'], 'RSS' => $articles_number > 0 ? '<a href="{PATH_TO_ROOT}/syndication.php?m=wiki"><img src="../templates/' . get_utheme() . '/images/rss.png" alt="RSS" /></a>' : '')); $i = 0; while ($row = $Sql->fetch_assoc($result)) { $Template->assign_block_vars('last_articles.list', array('ARTICLE' => $row['title'], 'TR' => $i > 0 && $i % 2 == 0 ? '</tr><tr>' : '', 'U_ARTICLE' => url('wiki.php?title=' . $row['encoded_title'], $row['encoded_title']))); $i++; } if ($articles_number == 0) { $Template->assign_vars(array('L_NO_ARTICLE' => '<td style="text-align:center;" class="row2">' . $LANG['wiki_no_article'] . '</td>')); } } if ($_WIKI_CONFIG['display_cats'] != 0) { $Template->assign_block_vars('cat_list', array('L_CATS' => $LANG['wiki_cats_list'])); $i = 0; foreach ($_WIKI_CATS as $id => $infos) { if ($infos['id_parent'] == 0) { $Template->assign_block_vars('cat_list.list', array('CAT' => $infos['name'], 'U_CAT' => url('wiki.php?title=' . url_encode_rewrite($infos['name']), url_encode_rewrite($infos['name'])))); $i++; } } if ($i == 0) { $Template->assign_vars(array('L_NO_CAT' => $LANG['wiki_no_cat'])); } } $Template->assign_vars(array('TITLE' => !empty($_WIKI_CONFIG['wiki_name']) ? $_WIKI_CONFIG['wiki_name'] : $LANG['wiki'], 'INDEX_TEXT' => !empty($_WIKI_CONFIG['index_text']) ? second_parse(wiki_no_rewrite($_WIKI_CONFIG['index_text'])) : $LANG['wiki_empty_index'], 'L_EXPLORER' => $LANG['wiki_explorer'], 'U_EXPLORER' => url('explorer.php'), 'WIKI_PATH' => $Template->get_module_data_path('wiki'))); $page_type = 'index'; include '../wiki/wiki_tools.php'; $tmp = $Template->pparse('wiki', TRUE); return $tmp; }
<?php require_once '../kernel/begin.php'; require_once '../kernel/header.php'; $tpl = new Template('member/csrf-attack.tpl'); $tpl->assign_vars(array('L_ATTACK_EXPLAIN' => $LANG['csrf_attack'], 'L_PREVIOUS' => $LANG['previous'])); $tpl->parse(); require_once '../kernel/footer.php';