本文整理汇总了PHP中FileTemplate::display方法的典型用法代码示例。如果您正苦于以下问题:PHP FileTemplate::display方法的具体用法?PHP FileTemplate::display怎么用?PHP FileTemplate::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileTemplate
的用法示例。
在下文中一共展示了FileTemplate::display方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lateral_menu
function lateral_menu()
{
global $LANG;
$tpl = new FileTemplate('admin/menus/panel.tpl');
$tpl->put_all(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']));
$tpl->display();
}
示例2: display_page
private function display_page(View $body_template)
{
$template = new FileTemplate('admin/frame.tpl');
$customization_config = CustomizationConfig::load();
$template->put_all(array('C_FAVICON' => $customization_config->favicon_exists(), 'C_CSS_CACHE_ENABLED' => CSSCacheConfig::load()->is_enabled(), 'FAVICON' => Url::to_rel($customization_config->get_favicon_path()), 'FAVICON_TYPE' => $customization_config->favicon_type(), 'TITLE' => $this->get_seo_meta_data()->get_full_title(), 'MODULES_CSS' => $this->get_modules_css_files_html_code(), 'JS_TOP' => new FileTemplate('js_top.tpl'), 'JS_BOTTOM' => new FileTemplate('js_bottom.tpl'), 'L_XML_LANGUAGE' => self::$lang['xml_lang'], 'BODY' => $body_template));
$template->display();
}
示例3: FileTemplate
function display_page(View $body_template)
{
$template = new FileTemplate('frame.tpl');
$customization_config = CustomizationConfig::load();
$seo_meta_data = $this->get_seo_meta_data();
$description = $seo_meta_data->get_full_description();
$template->put_all(array('C_CSS_CACHE_ENABLED' => CSSCacheConfig::load()->is_enabled(), 'C_FAVICON' => $customization_config->favicon_exists(), 'C_CANONICAL_URL' => $seo_meta_data->canonical_link_exists(), 'C_DESCRIPTION' => !empty($description), 'FAVICON' => Url::to_rel($customization_config->get_favicon_path()), 'FAVICON_TYPE' => $customization_config->favicon_type(), 'TITLE' => $seo_meta_data->get_full_title(), 'SITE_DESCRIPTION' => $description, 'U_CANONICAL' => $seo_meta_data->get_canonical_link(), 'L_XML_LANGUAGE' => self::$main_lang['xml_lang'], 'PHPBOOST_VERSION' => GeneralConfig::load()->get_phpboost_major_version(), 'MODULES_CSS' => $this->get_modules_css_files_html_code(), 'JS_TOP' => new FileTemplate('js_top.tpl'), 'JS_BOTTOM' => new FileTemplate('js_bottom.tpl'), 'BODY' => $body_template));
$template->display(true);
}
示例4: url
} else {
$tpl->put_all(array('L_ALERT' => $LANG['alert_topic'], 'L_BACK_TOPIC' => $LANG['alert_back'], 'URL_TOPIC' => 'topic' . url('.php?id=' . $alert, '-' . $alert . '-' . Url::encode_rewrite($topic_name) . '.php')));
$tpl->assign_block_vars('alert_confirm', array('MSG' => $LANG['alert_topic_already_done']));
}
}
//Si on enregistre une alerte
if (!empty($alert_post)) {
$tpl->put_all(array('L_ALERT' => $LANG['alert_topic'], 'L_BACK_TOPIC' => $LANG['alert_back'], 'URL_TOPIC' => 'topic' . url('.php?id=' . $alert_post, '-' . $alert_post . '-' . Url::encode_rewrite($topic_name) . '.php')));
//On vérifie qu'une alerte sur le même sujet n'ait pas été postée
$nbr_alert = PersistenceContext::get_querier()->count(PREFIX . 'forum_alerts', 'WHERE idtopic=:idtopic AND status = 0', array('idtopic' => $alert_post));
if (empty($nbr_alert)) {
$alert_title = retrieve(POST, 'title', '');
$alert_contents = retrieve(POST, 'contents', '', TSTRING_PARSE);
//Instanciation de la class du forum.
$Forumfct = new Forum();
$Forumfct->Alert_topic($alert_post, $alert_title, $alert_contents);
$tpl->assign_block_vars('alert_confirm', array('MSG' => str_replace('%title', $topic_name, $LANG['alert_success'])));
} else {
$tpl->assign_block_vars('alert_confirm', array('MSG' => $LANG['alert_topic_already_done']));
}
}
//Listes les utilisateurs en lignes.
list($users_list, $total_admin, $total_modo, $total_member, $total_visit, $total_online) = forum_list_user_online("AND s.location_script LIKE '/forum/%'");
$vars_tpl = array('FORUM_NAME' => $config->get_forum_name() . ' : ' . $LANG['alert_topic'], 'DESC' => $topic['subtitle'], 'C_USER_CONNECTED' => AppContext::get_current_user()->check_level(User::MEMBER_LEVEL), 'TOTAL_ONLINE' => $total_online, 'USERS_ONLINE' => $total_online - $total_visit == 0 ? '<em>' . $LANG['no_member_online'] . '</em>' : $users_list, 'ADMIN' => $total_admin, 'MODO' => $total_modo, 'MEMBER' => $total_member, 'GUEST' => $total_visit, 'U_FORUM_CAT' => '<a href="forum' . url('.php?id=' . $topic['idcat'], '-' . $topic['idcat'] . '.php') . '">' . $category->get_name() . '</a>', 'U_TITLE_T' => '<a href="topic' . url('.php?id=' . $topic_id, '-' . $topic_id . '.php') . '">' . stripslashes($topic['title']) . '</a>', 'L_FORUM_INDEX' => $LANG['forum_index'], 'L_SUBMIT' => $LANG['submit'], 'L_PREVIEW' => $LANG['preview'], 'L_RESET' => $LANG['reset'], 'L_USER' => $total_online > 1 ? $LANG['user_s'] : $LANG['user'], 'L_ADMIN' => $total_admin > 1 ? $LANG['admin_s'] : $LANG['admin'], 'L_MODO' => $total_modo > 1 ? $LANG['modo_s'] : $LANG['modo'], 'L_MEMBER' => $total_member > 1 ? $LANG['member_s'] : $LANG['member'], 'L_GUEST' => $total_visit > 1 ? $LANG['guest_s'] : $LANG['guest'], 'L_AND' => $LANG['and'], 'L_ONLINE' => strtolower($LANG['online']));
$tpl->put_all($vars_tpl);
$tpl_top->put_all($vars_tpl);
$tpl_bottom->put_all($vars_tpl);
$tpl->put('forum_top', $tpl_top);
$tpl->put('forum_bottom', $tpl_bottom);
$tpl->display();
include '../kernel/footer.php';
示例5: stripslashes
DispatchManager::redirect($error_controller);
}
$num_rows = !empty($page_infos['title']) ? 1 : 0;
if ($page_infos['redirect'] > 0) {
$redirect_title = stripslashes($page_infos['title']);
$redirect_id = $page_infos['id'];
try {
$page_infos = PersistenceContext::get_querier()->select_single_row(PREFIX . 'pages', array('id', 'title', 'auth', 'is_cat', 'id_cat', 'hits', 'count_hits', 'activ_com', 'redirect', 'contents'), 'WHERE id = :id', array('id' => $page_infos['redirect']));
} catch (RowNotFoundException $e) {
$error_controller = PHPBoostErrors::unexisting_page();
DispatchManager::redirect($error_controller);
}
} else {
$redirect_title = '';
}
//Autorisation particulière ?
$special_auth = !empty($page_infos['auth']);
$array_auth = unserialize($page_infos['auth']);
//Vérification de l'autorisation de voir la page
if ($special_auth && !AppContext::get_current_user()->check_auth($array_auth, READ_PAGE) || !$special_auth && !AppContext::get_current_user()->check_auth($pages_config->get_authorizations(), READ_PAGE)) {
AppContext::get_response()->redirect(HOST . DIR . url('/pages/pages.php?error=e_auth'));
}
}
if (empty($page_infos['id'])) {
exit;
}
require_once PATH_TO_ROOT . '/kernel/header_no_display.php';
$template = new FileTemplate('framework/content/print.tpl');
$template->put_all(array('PAGE_TITLE' => stripslashes($page_infos['title']) . ' - ' . GeneralConfig::load()->get_site_name(), 'TITLE' => stripslashes($page_infos['title']), 'L_XML_LANGUAGE' => $LANG['xml_lang'], 'CONTENT' => FormatingHelper::second_parse($page_infos['contents'])));
$template->display();
require_once PATH_TO_ROOT . '/kernel/footer_no_display.php';
示例6: array
$group_color = User::get_group_color($member['groups'], $member['level']);
$moderation_panel_template->put_all(array('C_MODO_PANEL_USER_BAN' => true, 'C_USER_GROUP_COLOR' => !empty($group_color), 'LOGIN' => $member['display_name'], 'USER_LEVEL_CLASS' => UserService::get_level_class($member['level']), 'USER_GROUP_COLOR' => $group_color, 'KERNEL_EDITOR' => $editor->display(), 'U_PM' => UserUrlBuilder::personnal_message($id_get)->rel(), 'U_ACTION_INFO' => UserUrlBuilder::moderation_panel('ban', $id_get)->rel() . '&token=' . AppContext::get_session()->get_token(), 'U_PROFILE' => UserUrlBuilder::profile($id_get)->rel(), 'L_PM' => $LANG['user_contact_pm'], 'L_LOGIN' => LangLoader::get_message('display_name', 'user-common'), 'L_BAN' => $LANG['ban_user'], 'L_DELAY_BAN' => $LANG['user_ban_delay']));
//Temps de bannissement.
$date_lang = LangLoader::get('date-common');
$array_time = array(0, 60, 300, 900, 1800, 3600, 7200, 86400, 172800, 604800, 1209600, 2419200, 326592000);
$array_sanction = array(LangLoader::get_message('no', 'common'), '1 ' . $date_lang['minute'], '5 ' . $date_lang['minutes'], '15 ' . $date_lang['minutes'], '30 ' . $date_lang['minutes'], '1 ' . $date_lang['hour'], '2 ' . $date_lang['hours'], '1 ' . $date_lang['day'], '2 ' . $date_lang['days'], '1 ' . $date_lang['week'], '2 ' . $date_lang['weeks'], '1 ' . $date_lang['month'], $LANG['illimited']);
$diff = $member['delay_banned'] - time();
$key_sanction = 0;
if ($diff > 0) {
//Retourne la sanction la plus proche correspondant au temp de bannissement.
for ($i = 11; $i >= 0; $i--) {
$avg = ceil(($array_time[$i] + $array_time[$i - 1]) / 2);
if ($diff - $array_time[$i] > $avg) {
$key_sanction = $i + 1;
break;
}
}
}
if ($member['warning_percentage'] == 100) {
$key_sanction = 12;
}
//Affichge des sanctions
foreach ($array_time as $key => $time) {
$selected = $key_sanction == $key ? 'selected="selected"' : '';
$moderation_panel_template->assign_block_vars('select_ban', array('TIME' => '<option value="' . $time . '" ' . $selected . '>' . $array_sanction[$key] . '</option>'));
}
}
}
}
$moderation_panel_template->display();
require_once '../kernel/footer.php';