本文整理汇总了PHP中bTemplate::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP bTemplate::fetch方法的具体用法?PHP bTemplate::fetch怎么用?PHP bTemplate::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bTemplate
的用法示例。
在下文中一共展示了bTemplate::fetch方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: return_error
function return_error($heading = 'Error!', $string)
{
global $language, $STYLEPATH, $page, $STYLEURL;
$THIS_BASEPATH = "..";
require "{$THIS_BASEPATH}/btemplate/bTemplate.php";
// just in case not found the language
if (!$language['BACK']) {
$language['BACK'] = 'Back';
}
$err_tpl = new bTemplate();
$err_tpl->set('error_title', $heading);
$err_tpl->set('error_message', $string);
$err_tpl->set('error_image', $STYLEURL . '/images/error.gif');
$err_tpl->set('language', $language);
$err_tpl->set('error_footer', '<a href="javascript: history.go(-1);">' . $language['BACK'] . '</a>');
return $err_tpl->fetch(load_template('error.tpl'));
}
示例2: textbbcode
function textbbcode($form, $name, $content = '')
{
$tpl_bbcode = new bTemplate();
$tpl_bbcode->set('form_name', $form);
$tpl_bbcode->set('object_name', $name);
$tpl_bbcode->set('content', $content);
$tbbcode = '<table width="100%" cellpadding="1" cellspacing="1">';
global $smilies, $STYLEPATH, $language;
$count = 0;
reset($smilies);
$tbbcode .= '<tr>';
while ((list($code, $url) = each($smilies)) && $count < 16) {
$tbbcode .= "\n<td><a href=\"javascript: SmileIT('" . str_replace("'", "\\'", $code) . "',document.forms.{$form}.{$name});\"><img border=\"0\" src=\"images/smilies/{$url}\" alt=\"{$url}\" /></a></td>";
$count++;
}
$tbbcode .= "\n</tr>\n</table>";
$tpl_bbcode->set('smilies_table', $tbbcode);
$tpl_bbcode->set('language', $language);
return $tpl_bbcode->fetch(load_template('txtbbcode.tpl'));
}
示例3: array
$start = ($page - 1) * $rpp;
if ($pages < 2) {
// only 1 page??? don't need pager ;)
$pagertop = "";
$pagerbottom = "";
}
return array($pagertop, $pagerbottom, "LIMIT {$start},{$rpp}");
}
$FORUM_PATH = dirname(__FILE__);
include load_language("lang_forum.php");
$forumtpl = new bTemplate();
$forumtpl->set("language", $language);
switch ($action) {
case 'editpost':
include "{$FORUM_PATH}/forum.post.php";
$tpl->set("main_content", set_block($block_title, "center", $forumtpl->fetch(load_template("forum.editpost.tpl"))));
break;
case 'catchup':
case 'deletetopic':
case 'movetopic':
case 'setsticky':
case 'rename':
case 'setlocked':
case 'deletepost':
include "{$FORUM_PATH}/forum.actions.php";
break;
case 'newtopic':
case 'post':
case 'quotepost':
case 'reply':
include "{$FORUM_PATH}/forum.post.php";
示例4: load_language
$ADMIN_PATH = dirname(__FILE__);
include load_language("lang_admin.php");
if ($do != "users" && $do != "masspm" && $do != "pruneu" && $do != "searchdiff" && $moderate_user) {
err_msg($language["ERROR"], $language["NOT_ADMIN_CP_ACCESS"]);
stdfoot();
exit;
}
include "{$ADMIN_PATH}/admin.menu.php";
$menutpl = new bTemplate();
$menutpl->set("admin_menu", $admin_menu);
$tpl->set("main_left", set_block($language["ACP_MENU"], "center", $menutpl->fetch(load_template("admin.menu.tpl"))));
$admintpl = new bTemplate();
switch ($do) {
case 'language':
include "{$ADMIN_PATH}/admin.languages.php";
$tpl->set("main_content", set_block($language["LANGUAGE_SETTINGS"], "center", $admintpl->fetch(load_template("admin.languages.tpl"))));
break;
case 'searchdiff':
include "{$ADMIN_PATH}/admin.search_diff.php";
$tpl->set("main_content", set_block($block_title, "center", $admintpl->fetch(load_template("admin.search_diff.tpl"))));
break;
case 'forum':
include "{$ADMIN_PATH}/admin.forums.php";
$tpl->set("main_content", set_block($block_title, "center", $admintpl->fetch(load_template("admin.forums.tpl"))));
break;
case 'masspm':
include "{$ADMIN_PATH}/admin.masspm.php";
$tpl->set("main_content", set_block($block_title, "center", $admintpl->fetch(load_template("admin.masspm.tpl"))));
break;
case 'pruneu':
include "{$ADMIN_PATH}/admin.prune_users.php";
示例5: stdfoot
stdfoot();
exit;
}
}
// --------> modpanel
include "{$ADMIN_PATH}/admin.menu.php";
$menutpl = new bTemplate();
$menutpl->set("admin_menu", $admin_menu);
$tpl->set("main_left", set_block($language["ACP_MENU"], "center", $menutpl->fetch(load_template("admin.menu.tpl"))));
$admintpl = new bTemplate();
switch ($do) {
// --------> modpanel
case 'modpanel':
$admintpl->set("usercode", $CURUSER['random']);
$admintpl->set("userid", $CURUSER['uid']);
$tpl->set("main_content", set_block($language["ACP_MODPANEL"], "center", $admintpl->fetch(load_template("admin.modpanel.tpl"))));
break;
// --------> modpanel
// --------> modpanel
case 'newuser':
include "{$ADMIN_PATH}/admin.users.new.php";
$tpl->set(main_content, set_block($language[ACP_ADD_USER], "center", $admintpl->fetch(load_template("admin.users.new.tpl"))));
break;
case 'read_messages':
include "{$ADMIN_PATH}/admin.read_messages.php";
$tpl->set("main_content", set_block($language["SUPPORT"], "center", $admintpl->fetch(load_template("admin.read_messages.tpl"))));
break;
case 'duplicates_pas':
include "{$ADMIN_PATH}/admin.duplicates_pas.php";
$tpl->set("main_content", set_block($language["DUPLICATES_PAS"], "center", $admintpl->fetch(load_template("admin.duplicates_pas.tpl"))));
break;
示例6: load_language
$ADMIN_PATH = dirname(__FILE__);
include load_language("lang_admin.php");
if ($do != "users" && $do != "masspm" && $do != "pruneu" && $do != "searchdiff" && $moderate_user) {
err_msg($language["ERROR"], $language["NOT_ADMIN_CP_ACCESS"]);
stdfoot();
exit;
}
include "{$ADMIN_PATH}/admin.menu.php";
$menutpl = new bTemplate();
$menutpl->set("admin_menu", $admin_menu);
$tpl->set("main_left", set_block($language["ACP_MENU"], "center", $menutpl->fetch(load_template("admin.menu.tpl"))));
$admintpl = new bTemplate();
switch ($do) {
case 'sticky':
include "{$ADMIN_PATH}/admin.sticky.php";
$tpl->set("main_content", set_block($language["STICKY_SETTINGS"], "center", $admintpl->fetch(load_template("admin.sticky.tpl"))));
break;
case 'invitations':
include "{$ADMIN_PATH}/admin.invitations.php";
$tpl->set("main_content", set_block($block_title, "center", $admintpl->fetch(load_template("admin.invitations.tpl"))));
break;
case 'duplicates':
include "{$ADMIN_PATH}/admin.duplicates.php";
$tpl->set("main_content", set_block($language["DUPLICATES"], "center", $admintpl->fetch(load_template("admin.duplicates.tpl"))));
break;
case 'gold':
include "{$ADMIN_PATH}/admin.gold.php";
$tpl->set("main_content", set_block($language["ACP_GOLD"], "center", $admintpl->fetch(load_template("admin.gold.tpl"))));
break;
case 'visible':
include "{$ADMIN_PATH}/admin.visible.php";
示例7: dirname
$do = "";
}
if (isset($_GET["action"])) {
$action = $_GET["action"];
}
$USER_PATH = dirname(__FILE__);
require_once "{$USER_PATH}/usercp.menu.php";
$menucptpl = new bTemplate();
$menucptpl->set("usercp_menu", $usercp_menu);
$tpl->set("main_left", set_block($language["USER_CP_1"], "center", $menucptpl->fetch(load_template("usercp.menu.tpl"))));
$usercptpl = new bTemplate();
$usercptpl->set("language", $language);
switch ($do) {
case 'avatar':
include "{$USER_PATH}/usercp.avatar.php";
$tpl->set("main_content", set_block($language["MNU_UCP_AVATAR"], "center", $usercptpl->fetch(load_template("usercp.avatar.tpl"))));
break;
case 'subscribe':
include "{$USER_PATH}/usercp.subscribe.php";
$tpl->set("main_content", set_block($language["SUBSCRIBE"], "center", $usercptpl->fetch(load_template("usercp.subscribe.tpl"))));
break;
case 'pm':
include "{$USER_PATH}/usercp.pmbox.php";
$tpl->set("main_content", set_block($language["MNU_UCP_PM"], "center", $usercptpl->fetch(load_template("usercp.pmbox.tpl"))));
break;
case 'ignore':
include "{$USER_PATH}/usercp.ignore.php";
$tpl->set("main_content", set_block($language["IGNORE1"], "center", $usercptpl->fetch(load_template("usercp.ignore.tpl"))));
break;
case 'ign':
include "{$USER_PATH}/usercp.ignchyba.php";
示例8: dirname
$do = "";
}
if (isset($_GET["action"])) {
$action = $_GET["action"];
}
$USER_PATH = dirname(__FILE__);
require_once "{$USER_PATH}/usercp.menu.php";
$menucptpl = new bTemplate();
$menucptpl->set("usercp_menu", $usercp_menu);
$tpl->set("main_left", set_block($language["USER_CP_1"], "center", $menucptpl->fetch(load_template("usercp.menu.tpl"))));
$usercptpl = new bTemplate();
$usercptpl->set("language", $language);
switch ($do) {
case 'pm':
include "{$USER_PATH}/usercp.pmbox.php";
$tpl->set("main_content", set_block($language["MNU_UCP_PM"], "center", $usercptpl->fetch(load_template("usercp.pmbox.tpl"))));
break;
case 'user':
include "{$USER_PATH}/usercp.profile.php";
$tpl->set("main_content", set_block($language["ACCOUNT_EDIT"], "center", $usercptpl->fetch(load_template("usercp.profile.tpl"))));
break;
case 'pwd':
include "{$USER_PATH}/usercp.pass.php";
$tpl->set("main_content", set_block($language["MNU_UCP_CHANGEPWD"], "center", $usercptpl->fetch(load_template("usercp.pass.tpl"))));
break;
case 'pid_c':
include "{$USER_PATH}/usercp.pidchange.php";
$tpl->set("main_content", set_block($language["CHANGE_PID"], "center", $usercptpl->fetch(load_template("usercp.pidchange.tpl"))));
break;
default:
include "{$USER_PATH}/usercp.main.php";
示例9: date
$subforums[$j]["lastpost"] = date("", $subfor["date"]) . "<br />" . "by <a href=\"index.php?page=userdetails&id=" . $subfor["uid"] . "\"><b>" . unesc($subfor["prefixcolor"]) . unesc($subfor["username"]) . unesc($subfor["suffixcolor"]) . "</b></a><br />" . "in <a href=\"index.php?page=forum&action=viewtopic&topicid=" . $subfor["topicid"] . "&msg=" . $subfor["lastpost"] . "#" . $subfor["lastpost"] . "\">" . htmlspecialchars(unesc($subfor["subject"])) . "</a>";
} else {
$subforums[$j]["lastpost"] = date("", $subfor["date"]) . "<br />" . "by " . $language["MEMBER"] . "[" . $subfor["uid"] . "]<br />" . "in <a href=\"index.php?page=forum&action=viewtopic&topicid=" . $subfor["topicid"] . "&msg=" . $subfor["lastpost"] . "#" . $subfor["lastpost"] . "\">" . htmlspecialchars(unesc($subfor["subject"])) . "</a>";
}
} else {
$subforums[$j]["lastpost"] = $language["NA"];
}
$j++;
unset($sub_forums[$id]);
}
}
if ($j > 0) {
$subformtpl->set("language", $language);
$subformtpl->set("forums", $subforums);
$subformtpl->set("parent_forum", htmlspecialchars(unesc($forums_arr["name"])) . "'s " . $language["SUBFORUM"]);
$forums[$i]["subforums"] = $subformtpl->fetch(load_template("forum.subforums.tpl"));
}
$i++;
}
}
$forumtpl->set("NO_FORUMS", false, true);
$forumtpl->set("forums", $forums);
}
//Online Users On Forum By Yupy...
$curtime = time();
$curtime -= 60 * 15;
if (!isset($regusers)) {
$regusers = 0;
}
if (!isset($gueststr)) {
$gueststr = '';
示例10: dirname
<?php
require_once dirname(__FILE__) . '/../plugins/configure.php';
require_once dirname(__FILE__) . '/../license/license.php';
$type = $_GET['type'];
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
ini_set('zlib.output_compression_level', 9);
ob_start("ob_gzhandler");
} else {
ob_start();
}
require_once dirname(__FILE__) . '/../libs/bTemplate.php';
$jstpl = new bTemplate();
$currentHost = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$hostString = substr($currentHost, 0, strripos($currentHost, '/'));
$hostPath = substr($hostString, 0, strripos($hostString, '/'));
echo $jstpl->fetch(dirname(__FILE__) . '/dojo.js.tpl');
$jstpl->set('upath', $hostPath . '/lookup.php');
$jstpl->set('address1_field', ADDRESS1_FIELD);
$jstpl->set('city_field', CITY_FIELD);
$jstpl->set('state_field', STATE_FIELD);
$jstpl->set('zip_field', ZIP_FIELD);
echo $jstpl->fetch(dirname(__FILE__) . '/rusps.js.tpl');
if ($type == 'test') {
$jstpl->set('upath2', $hostPath . '/precheck.php');
$jstpl->set('key', urlencode(RAWSEO_APPHASH));
echo $jstpl->fetch(dirname(__FILE__) . '/precheck.js.tpl');
}