本文整理汇总了PHP中set_block函数的典型用法代码示例。如果您正苦于以下问题:PHP set_block函数的具体用法?PHP set_block怎么用?PHP set_block使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_block函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: main_menu
function main_menu()
{
global $TABLE_PREFIX, $CURUSER, $tpl;
$blocks = get_result('SELECT content FROM ' . $TABLE_PREFIX . 'blocks WHERE position="t" AND status=1 AND ' . $CURUSER['id_level'] . '>=minclassview AND ' . $CURUSER['id_level'] . '<=maxclassview ' . ($FORUMLINK == '' || $FORUMLINK == 'internal' || substr($FORUMLINK, 0, 3) == 'smf' || $FORUMLINK == 'ipb' ? '' : ' AND content!="forum"') . ' ORDER BY sortid', true, $CACHE_DURATION);
$return = '';
foreach ($blocks as $entry) {
$return .= get_content(realpath(dirname(__FILE__) . '/..') . '/blocks/' . $entry['content'] . '_block.php');
}
return set_block('', 'justify', $return);
}
开发者ID:Karpec,项目名称:gizd,代码行数:10,代码来源:blocks.php
示例2: set_block
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index->Rules");
break;
/*End mod by losmi rules - mod*/
/*Mod by losmi - faq mod*/
/*End mod by losmi rules - mod*/
/*Mod by losmi - faq mod*/
case 'faq':
require "{$THIS_BASEPATH}/faq.php";
$tpl->set("main_content", set_block($language["MNU_FAQ"], "center", $faqtpl->fetch(load_template("faq.tpl"))));
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index->F.A.Q.");
break;
/*End mod by losmi faq - mod*/
/*End mod by losmi faq - mod*/
case 'moder':
require "{$THIS_BASEPATH}/moder.php";
$tpl->set("main_content", set_block($language["MODERATE_TORRENT"], "center", $torrenttpl->fetch(load_template("admin.moder.tpl"))));
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index->Torrent->Moderate");
break;
case 'index':
case '':
default:
$tpl->set("main_content", center_menu());
break;
}
// controll if client can handle gzip
if ($GZIP_ENABLED) {
if (stristr($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") && extension_loaded('zlib') && ini_get("zlib.output_compression") == 0) {
if (ini_get('output_handler') != 'ob_gzhandler') {
ob_start("ob_gzhandler");
$gzip = 'enabled';
} else {
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:index.php
示例3: set_block
case 'newtopic':
case 'post':
case 'quotepost':
case 'reply':
include "{$FORUM_PATH}/forum.post.php";
$tpl->set("main_content", set_block($block_title, "center", $forumtpl->fetch(load_template("forum.post.tpl"))));
break;
case 'search':
include "{$FORUM_PATH}/forum.search.php";
$tpl->set("main_content", set_block($block_title, "center", $forumtpl->fetch(load_template("forum.search.tpl"))));
break;
case 'viewforum':
include "{$FORUM_PATH}/forum.viewforum.php";
$tpl->set("main_content", set_block($block_title, "center", $forumtpl->fetch(load_template("forum.viewforum.tpl"))));
break;
case 'viewtopic':
include "{$FORUM_PATH}/forum.viewtopic.php";
$tpl->set("main_content", set_block($block_title, "center", $forumtpl->fetch(load_template("forum.viewtopic.tpl"))));
break;
case 'viewunread':
include "{$FORUM_PATH}/forum.unread.php";
$tpl->set("main_content", set_block($block_title, "center", $forumtpl->fetch(load_template("forum.unread.tpl"))));
break;
case 'index':
case '':
default:
include "{$FORUM_PATH}/forum.main.php";
$tpl->set("main_content", set_block($language["FORUM"], "center", $forumtpl->fetch(load_template("forum.main.tpl"))));
break;
}
}
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:forum.index.php
示例4: information_msg
function information_msg($heading = 'Error!', $string, $close = false)
{
global $language, $STYLEPATH, $tpl, $page, $STYLEURL;
if (!isset($tpl) || empty($tpl)) {
die($heading . "<br />" . $string);
}
// just in case not found the language
if (!$language['BACK']) {
$language['BACK'] = 'Back';
}
$err_tpl = new bTemplate();
$err_tpl->set('information_title', $heading);
$err_tpl->set('information_message', $string);
$err_tpl->set('information_image', $STYLEURL . '/images/error.gif');
$err_tpl->set('language', $language);
if ($close) {
$err_tpl->set('information_footer', '<a href="javascript: window.close();">' . $language['CLOSE'] . '</a>');
} else {
$err_tpl->set('information_footer', '<a href="javascript: history.go(-1);">' . $language['BACK'] . '</a>');
}
$tpl->set('main_content', set_block($heading, 'center', $err_tpl->fetch(load_template('information.tpl'))));
stdfoot(true, false);
die;
}
开发者ID:Karpec,项目名称:gizd,代码行数:24,代码来源:functions.php
示例5: unset
for ($i = 0; $i < count($sqlver); $i++) {
$admin["infos"] .= "<tr><td align=\"left\">{$sqlver[$i]}</td></tr>\n";
}
$admin["infos"] .= "\n</table><br />\n";
unset($sqlver);
// check for news on btiteam site (read rss from comunication forum)
include "{$THIS_BASEPATH}/include/class.rssreader.php";
$btit_news = get_cached_version($btit_url_rss);
if (!$btit_news) {
$frss = get_remote_file($btit_url_rss);
if (!$frss) {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px; align:center;\">Unable to contact Btiteam's site</div>";
} else {
$nrss = new rss_reader();
$rss_array = $nrss->rss_to_array($frss);
$btit_news = "<div class=\"blocklist\" style=\"padding:5px;\">";
if (!$rss_array) {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px;\">Unable to contact Btiteam's site</div>";
} else {
foreach ($rss_array[0]["item"] as $id => $rss) {
$btit_news .= date("d M Y", strtotime($rss["pubDate"])) . ": \n<a href=\"" . $rss["guid"] . "\">" . $rss["title"] . "</a><br />\n<br />\n";
$btit_news .= "\n" . $rss["description"] . "<br />\n<hr />\n";
}
}
$btit_news .= "</div>";
}
write_cached_version($btit_url_rss, $btit_news);
}
$admintpl->set("btit_news", set_block("BtiTacker Lastest News", "left", $btit_news));
$admintpl->set("language", $language);
$admintpl->set("admin", $admin);
开发者ID:wilian32,项目名称:xbtit,代码行数:31,代码来源:admin.main.php
示例6: set_block
$tpl->set("main_content", set_block($language["ACP_BAN_IP"], "center", $admintpl->fetch(load_template("admin.banip.tpl"))));
break;
case 'module_config':
include "{$ADMIN_PATH}/admin.module_config.php";
$tpl->set("main_content", set_block($language["ACP_MODULES_CONFIG"], "center", $admintpl->fetch(load_template("admin.module_config.tpl"))));
break;
case 'hacks':
include "{$ADMIN_PATH}/admin.hacks.php";
$tpl->set("main_content", set_block($language["ACP_HACKS_CONFIG"], "center", $admintpl->fetch(load_template("admin.hacks.tpl"))));
break;
case 'users':
include "{$ADMIN_PATH}/admin.users.tools.php";
$tpl->set("main_content", set_block($block_title, "center", $admintpl->fetch(load_template("admin.users.tools.tpl"))));
break;
case 'sanity':
require_once "{$THIS_BASEPATH}/include/sanity.php";
$now = time();
$res = do_sqlquery("SELECT last_time FROM {$TABLE_PREFIX}tasks WHERE task='sanity'");
$row = mysql_fetch_row($res);
if (!$row) {
do_sqlquery("INSERT INTO {$TABLE_PREFIX}tasks (task, last_time) VALUES ('sanity',{$now})");
} else {
$ts = $row[0];
do_sqlquery("UPDATE {$TABLE_PREFIX}tasks SET last_time={$now} WHERE task='sanity' AND last_time = {$ts}");
}
do_sanity();
default:
include "{$ADMIN_PATH}/admin.main.php";
$tpl->set("main_content", set_block($language["WELCOME_ADMINCP"], "center", $admintpl->fetch(load_template("admin.main.tpl"))));
break;
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:admin.index.php
示例7: set_block
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;
case 'rename':
include "{$USER_PATH}/usercp.rename.php";
$tpl->set("main_content", set_block($language["MNU_UCP_RENAME"], "center", $usercptpl->fetch(load_template("usercp.rename.tpl"))));
break;
case 'invite':
include "{$USER_PATH}/usercp.invitations.php";
$tpl->set("main_content", set_block($language["MNU_UCP_INVITATIONS"], "center", $usercptpl->fetch(load_template("usercp.invitations.tpl"))));
break;
default:
include "{$USER_PATH}/usercp.main.php";
$tpl->set("main_content", set_block($language["MNU_UCP_HOME"], "center", $usercptpl->fetch(load_template("usercp.main.tpl"))));
break;
}
// Reverify Mail Hack by Petr1fied - Start --->
// Update the members e-mail account if the validation link checks out
// ==========================================================================================
// If both "do=verify" and "action=changemail" are in the url
if ($do == "verify" && $action == "changemail") {
if ($GLOBALS["FORUMLINK"] == "ipb") {
if (!defined('IPS_ENFORCE_ACCESS')) {
define('IPS_ENFORCE_ACCESS', true);
}
if (!defined('IPB_THIS_SCRIPT')) {
define('IPB_THIS_SCRIPT', 'public');
}
require_once $THIS_BASEPATH . '/ipb/initdata.php';
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:usercp.index.php
示例8: _torrenttable
function _torrenttable($rt, $frame_caption, $speed = false)
{
global $STYLEPATH, $extratpl, $language;
$torrent = array();
$num = 0;
foreach ($rt as $id => $a) {
$num++;
if ($a["leechers"] > 0) {
$r = $a["seeds"] / $a["leechers"];
$ratio = number_format($r, 2);
} else {
$ratio = $language["INFINITE"];
}
$torrent[$num - 1]["rank"] = $num;
if ($GLOBALS["usepopup"]) {
$torrent[$num - 1]["filename"] = "<a href=\"javascript:popdetails('index.php?page=details&id=" . $a['hash'] . "');\">" . unesc($a["name"]) . "</a>";
} else {
$torrent[$num - 1]["filename"] = "<a href=\"index.php?page=details&id=" . $a['hash'] . "\">" . unesc($a["name"]) . "</a>";
}
$torrent[$num - 1]["complete"] = number_format($a["finished"]);
$torrent[$num - 1]["seeds"] = number_format($a["seeds"]);
$torrent[$num - 1]["leechers"] = number_format($a["leechers"]);
$torrent[$num - 1]["peers"] = number_format($a["leechers"] + $a["seeds"]);
$torrent[$num - 1]["ratio"] = $ratio;
if ($speed) {
$torrent[$num - 1]["speed"] = makesize($a["speed"]);
}
}
$extratpl->set("language", $language);
$extratpl->set("torrent", $torrent);
$extratpl->set("DISPLAY_SPEED", $speed, true);
$extratpl->set("DISPLAY_SPEED1", $speed, true);
return set_block($frame_caption, "center", $extratpl->fetch(load_template("extra-stats.torrent.tpl")));
}
开发者ID:wilian32,项目名称:xbtit,代码行数:34,代码来源:extra-stats.php
示例9: set_block
$your_version = set_block("Version", "center", $your_version);
}
// check for news on btiteam site (read rss from comunication forum)
if ($btit_url_rss != "") {
include "{$THIS_BASEPATH}/include/class.rssreader.php";
$btit_news = get_cached_version($btit_url_rss);
if (!$btit_news) {
$frss = get_remote_file($btit_url_rss);
if (!$frss) {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px; align:center;\">Unable to contact Btiteam's site</div>";
} else {
$nrss = new rss_reader();
$rss_array = $nrss->rss_to_array($frss);
$btit_news = "<div class=\"blocklist\" style=\"padding:5px;\">";
if (!$rss_array) {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px;\">Unable to contact Btiteam's site</div>";
} else {
foreach ($rss_array[0]["item"] as $id => $rss) {
$btit_news .= date("d M Y", strtotime($rss["pubDate"])) . ": \n<a href=\"" . $rss["guid"] . "\">" . $rss["title"] . "</a><br />\n<br />\n";
$btit_news .= "\n" . $rss["description"] . "<br />\n<hr />\n";
}
}
$btit_news .= "</div>";
}
write_cached_version($btit_url_rss, $btit_news);
}
} else {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px; align:center;\">Unable to contact Btiteam's site</div>";
}
$btit_news = set_block("Btiteam Latest News", "center", $btit_news);
echo $your_version . $btit_news;
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:admin.get_support_info.php
示例10: set_block
// the main_content for current template is setting within users/index.php
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index->My Panel");
break;
case 'upload':
require "{$THIS_BASEPATH}/upload.php";
$tpl->set("main_content", set_block($language["MNU_UPLOAD"], "center", $uploadtpl->fetch(load_template("{$tplfile}.tpl"))));
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index->Torrent->Upload");
break;
case 'userdetails':
require "{$THIS_BASEPATH}/userdetails.php";
$tpl->set("main_content", set_block($language["USER_DETAILS"], "center", $userdetailtpl->fetch(load_template("userdetails.tpl"))));
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index->Users->Details");
break;
case 'viewnews':
require "{$THIS_BASEPATH}/viewnews.php";
$tpl->set("main_content", set_block($language["LAST_NEWS"], "center", $viewnewstpl->fetch(load_template("viewnews.tpl"))));
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index->News");
break;
case 'index':
case '':
default:
$tpl->set("main_content", center_menu());
break;
}
// controll if client can handle gzip
if ($GZIP_ENABLED) {
if (stristr($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") && extension_loaded('zlib') && ini_get("zlib.output_compression") == 0) {
if (ini_get('output_handler') != 'ob_gzhandler') {
ob_start("ob_gzhandler");
$gzip = 'enabled';
} else {
开发者ID:wilian32,项目名称:xbtit,代码行数:31,代码来源:index.php
示例11: textbbcode
$tpl_comment->set("comment_comment", textbbcode("comment", "comment", htmlspecialchars(unesc($comment))));
if (isset($_POST["info_hash"])) {
if ($_POST["confirm"] == $language["FRM_CONFIRM"]) {
$comment = addslashes($_POST["comment"]);
$user = AddSlashes($CURUSER["username"]);
if ($user == "") {
$user = "Anonymous";
}
if (empty($comment)) {
stderr($language["ERROR"], $language['ERR_COMMENT_EMPTY']);
exit;
} else {
do_sqlquery("INSERT INTO {$TABLE_PREFIX}comments (added,text,ori_text,user,info_hash) VALUES (NOW(),\"{$comment}\",\"{$comment}\",\"{$user}\",\"" . mysql_real_escape_string(StripSlashes($_POST["info_hash"])) . "\")", true);
redirect("index.php?page=torrent-details&id=" . StripSlashes($_POST["info_hash"]) . "#comments");
die;
}
}
# Comment preview by miskotes
#############################
if ($_POST["confirm"] == $language["FRM_PREVIEW"]) {
$tpl_comment->set("PREVIEW", TRUE, TRUE);
$tpl_comment->set("comment_preview", set_block($language["COMMENT_PREVIEW"], "center", format_comment($comment), false));
#####################
# Comment preview end
} else {
redirect("index.php?page=torrent-details&id=" . StripSlashes($_POST["info_hash"]) . "#comments");
die;
}
} else {
$tpl_comment->set("PREVIEW", FALSE, TRUE);
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:comment.php
示例12: set_block
$your_version = set_block("Version", "center", $your_version);
}
// check for news on DiemThuy,s site (read rss from comunication forum)
if ($btit_url_rss != "") {
include "{$THIS_BASEPATH}/include/class.rssreader.php";
$btit_news = get_cached_version($btit_url_rss);
if (!$btit_news) {
$frss = get_remote_file($btit_url_rss);
if (!$frss) {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px; align:center;\">Unable to contact xbtitdeveloping</div>";
} else {
$nrss = new rss_reader();
$rss_array = $nrss->rss_to_array($frss);
$btit_news = "<div class=\"blocklist\" style=\"padding:5px;\">";
if (!$rss_array) {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px;\">Unable to contact xbtitdeveloping</div>";
} else {
foreach ($rss_array[0]["item"] as $id => $rss) {
$btit_news .= date("d M Y", strtotime($rss["pubDate"])) . ": \n<a href=\"" . $rss["guid"] . "\">" . $rss["title"] . "</a><br />\n<br />\n";
$btit_news .= "\n" . $rss["description"] . "<br />\n<hr />\n";
}
}
$btit_news .= "</div>";
}
write_cached_version($btit_url_rss, $btit_news);
}
} else {
$btit_news = "<div class=\"blocklist\" style=\"padding:5px; align:center;\">Unable to contact xbtitdeveloping</div>";
}
$btit_news = set_block("Xbtit Developing Latest News", "center", $btit_news);
echo $your_version . $btit_news;
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:admin.get_support_info.php
示例13: set_block
case 'warn':
require "{$THIS_BASEPATH}/warn.php";
break;
case 'rewarn':
require "{$THIS_BASEPATH}/rewarn.php";
break;
case 'staff':
require "{$THIS_BASEPATH}/staff.php";
$tpl->set("main_content", set_block($SITENAME . " " . $language["STAFF"], "center", $stafftpl->fetch(load_template("staff.tpl"))));
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Staff");
break;
/*Mod by losmi - faq mod*/
/*Mod by losmi - faq mod*/
case 'faq':
require "{$THIS_BASEPATH}/faq.php";
$tpl->set("main_content", set_block($language["MNU_FAQ"], "center", $faqtpl->fetch(load_template("faq.tpl"))));
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "F.A.Q.");
break;
/*End mod by losmi faq - mod*/
/*End mod by losmi faq - mod*/
case 'index':
case '':
default:
$tpl->set("main_content", center_menu());
break;
}
// controll if client can handle gzip
if ($GZIP_ENABLED) {
if (stristr($_SERVER["HTTP_ACCEPT_ENCODING"], "gzip") && extension_loaded('zlib') && ini_get("zlib.output_compression") == 0) {
if (ini_get('output_handler') != 'ob_gzhandler') {
ob_start("ob_gzhandler");
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:index.php
注:本文中的set_block函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论