本文整理汇总了PHP中page_footer函数的典型用法代码示例。如果您正苦于以下问题:PHP page_footer函数的具体用法?PHP page_footer怎么用?PHP page_footer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page_footer函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: monsterkills_run
function monsterkills_run()
{
page_header("Most Monster Kills");
$acc = db_prefix("accounts");
$mp = db_prefix("module_userprefs");
$sql = "SELECT {$acc}.name AS name,\r\n\t\t{$acc}.acctid AS acctid,\r\n\t\t{$mp}.value AS kills,\r\n\t\t{$mp}.userid FROM {$mp} INNER JOIN {$acc}\r\n\t\tON {$acc}.acctid = {$mp}.userid \r\n\t\tWHERE {$mp}.modulename = 'monsterkills' \r\n\t\tAND {$mp}.setting = 'kills' \r\n\t\tAND {$mp}.value > 0 ORDER BY ({$mp}.value+0)\t\r\n\t\tDESC limit " . get_module_setting("list") . "";
$result = db_query($sql);
$rank = translate_inline("Kills");
$name = translate_inline("Name");
output("`n`b`c`@Most`\$ Monster `@Kills`n`n`c`b");
rawoutput("<table border='0' cellpadding='2' cellspacing='1' align='center'>");
rawoutput("<tr class='trhead'><td align=center>{$name}</td><td align=center>{$rank}</td></tr>");
for ($i = 0; $i < db_num_rows($result); $i++) {
$row = db_fetch_assoc($result);
if ($row['name'] == $session['user']['name']) {
rawoutput("<tr class='trhilight'><td>");
} else {
rawoutput("<tr class='" . ($i % 2 ? "trdark" : "trlight") . "'><td align=left>");
}
output_notl("%s", $row['name']);
rawoutput("</td><td align=right>");
output_notl("%s", $row['kills']);
rawoutput("</td></tr>");
}
rawoutput("</table>");
addnav("Back to HoF", "hof.php");
villagenav();
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:29,代码来源:monsterkills.php
示例2: auth_error
function auth_error($exception = null)
{
global $connection, $adminer, $token;
$session_name = session_name();
$error = "";
if (!$_COOKIE[$session_name] && $_GET[$session_name] && ini_bool("session.use_only_cookies")) {
$error = lang('Session support must be enabled.');
} elseif (isset($_GET["username"])) {
if (($_COOKIE[$session_name] || $_GET[$session_name]) && !$token) {
$error = lang('Session expired, please login again.');
} else {
$password =& get_session("pwds");
if (isset($password)) {
$error = h($exception ? $exception->getMessage() : (is_string($connection) ? $connection : lang('Invalid credentials.')));
$password = null;
}
}
}
page_header(lang('Login'), $error, null);
echo "<form action='' method='post' onclick='eventStop(event);'>\n";
$adminer->loginForm();
echo "<div>";
hidden_fields($_POST, array("driver", "server", "username", "password", "permanent"));
// expired session
echo "</div>\n";
echo "</form>\n";
page_footer("auth");
}
示例3: dwellings_run
function dwellings_run()
{
checkday();
page_header("Dwellings");
global $session;
$op = httpget("op");
$dwid = httpget('dwid');
$type = httpget('type');
debug(get_module_pref("location_saver"));
if ($type == "" && $dwid > 0) {
$sql = "SELECT type FROM " . db_prefix("dwellings") . " WHERE dwid={$dwid}";
$result = db_query($sql);
$row = db_fetch_assoc($result);
$type = $row['type'];
}
$cityid = httpget('cityid');
require_once "modules/dwellings/run/case_{$op}.php";
if ($op != "list" && $op != "") {
addnav("Leave");
addnav("Return to Hamlet", "runmodule.php?module=dwellings");
} else {
addnav("Navigation");
villagenav();
}
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:dwellings.php
示例4: translationconvert_run
function translationconvert_run()
{
global $session;
page_header("Translations Convertor Thing");
output("Outputting all known translations, so that you can do a find-and-replace in the files themselves and we can stop doing this silly translate thing.`n`n");
if (httpget('delete')) {
$del = httpget('delete');
$sql = "UPDATE " . db_prefix("translations") . " SET version='updated' WHERE tid={$del}";
db_query($sql);
}
$sql = "SELECT * FROM " . db_prefix("translations") . " WHERE version='dragonbones' ORDER BY uri";
$result = db_query($sql);
$total = 0;
while ($row = db_fetch_assoc($result)) {
if ($row['intext'] != $row['outtext']) {
$total++;
rawoutput("<a href=\"runmodule.php?module=translationconvert&delete=" . $row['tid'] . "\">MARK</a>");
addnav("", "runmodule.php?module=translationconvert&delete=" . $row['tid']);
output_notl("`n`0`b%s`b:", $row['uri']);
rawoutput("<table width=100%><tr><td width=50% border=1px solid #cccccc>" . $row['intext'] . "</td><td width=50%>" . $row['outtext'] . "</td></tr></table>");
output_notl("`n`n");
}
}
debug($total);
addnav("Back to the Grotto", "superuser.php");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:27,代码来源:translationconvert.php
示例5: cakeordeath_run
function cakeordeath_run()
{
global $session;
page_header("Cake Or Death");
switch (httpget("op")) {
case "examine":
// Tell the player what the deal with Cake Or Death is
$counter = number_format(get_module_setting("counter"));
output("`0A shiny wooden table sits back from the main street. Behind it, a man sits idly reading the Improbable Island Enquirer. Before him, sat on the table, is a large sponge cake. Above him is a banner, displaying the name of his game:`b'`5Cake`0 or `4Death!`0'`b`n`nHe sees you pondering the sign, and calls over to you. `b'`5Cake`0 or `4Death!`0 `b`5Cake`0 or `4Death!`0' he cries. 'Ninety-nine per cent chance of `b`5Cake`0`b!'`n`nIt's not often that an immaculately-dressed gentleman with glowing green eyes offers you a 99% chance of cake. What would you like to do?");
//add navs
addnav("CAKE!", "runmodule.php?module=cakeordeath&op=play");
addnav("Back away slowly", "village.php");
break;
case "play":
$counter = get_module_setting("counter");
addnav("Back to the Outpost", "village.php");
if ($counter > 0) {
output("The green-eyed gentleman hands you a slice of cake, on a paper plate. You thank him, and walk away merrily wolfing down your prize.`n`nYou feel `5Full Of Cake!`0");
set_module_setting("counter", get_module_setting("counter") - 1);
apply_buff('tastycake', array("name" => "`5Full Of Cake`0", "rounds" => 10, "atkmod" => 1.1, "defmod" => 1.1, "roundmsg" => "`5The cake you ate earlier has boosted your energy!`n", "schema" => "module-cakeordeath"));
}
if ($counter <= 0) {
output("The green-eyed gentleman hands you a slice of cake, on a paper plate. You thank him, and walk away merrily wolfing down your prize.`n`nYou feel `5Full Of Cake!`0`n`nMoments later, the slow-acting poison starts to take effect. The world begins to melt in front of you. Grey spots dance on the edges of your vision. Behind you, a green-eyed monster offers you another slice of cake, laughing and pointing.`n`nYou curse your luck as the hallucinations begin to kick in.");
set_module_setting("counter", 100);
apply_buff('failcake', array("name" => "`5Full Of FailCake`0", "rounds" => -1, "regen" => -10, "startmsg" => "`5You are walking on pink icing. The sky is made of jam. Your eyes are two cherries. That cake was awesome.`0`n", "roundmsg" => "`5The poisoned cake saps your strength, and you lose ten hitpoints!`0`n", "schema" => "module-cakeordeath"));
if (is_module_active("medals")) {
require_once "modules/medals.php";
medals_award_medal("failcake", "Failcake Fancier", "This player was unfortunate at the Cake or Death stand...", "medal_failcake.png");
}
}
break;
}
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:cakeordeath.php
示例6: binarypuzzle_run
function binarypuzzle_run()
{
global $session;
page_header("Binary Puzzle Thing!");
addnav("O?Back to the Outpost", "village.php");
switch (httpget('op')) {
case "start":
//first set up the board
$switches = array(1 => array("val" => 1, "status" => 0), 2 => array("val" => 2, "status" => 0), 3 => array("val" => 4, "status" => 0), 4 => array("val" => 8, "status" => 0), 5 => array("val" => 16, "status" => 0), 6 => array("val" => 32, "status" => 0), 7 => array("val" => 64, "status" => 0), 8 => array("val" => 128, "status" => 0));
shuffle($switches);
set_module_pref("switches", serialize($switches));
//Now set up the clues
$clues = array();
for ($i = 1; $i <= 8; $i++) {
$toprange = $i * 32;
$bottomrance = $toprange - 32;
$clues[$i] = e_rand($bottomrange, $toprange);
}
$goal = e_rand(129, 255);
set_module_pref("clues", serialize($clues));
binarypuzzle_show($switches, $goal);
break;
case "switch":
$sw = httpget('switch');
$goal = httpget('goal');
$switches = binarypuzzle_switch($sw);
binarypuzzle_show($switches, $goal);
break;
}
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:binarypuzzle.php
示例7: serverloadperpage_run
function serverloadperpage_run()
{
global $session;
page_header("Server Load by Page Execution Times");
//Show player number table
$sql = "SELECT * FROM " . db_prefix("performancepage") . " ORDER BY totalpages DESC";
$result = db_query($sql);
output("`bAverage Page Generation Times by script request`b`n");
rawoutput("<table border='0' cellpadding='2' cellspacing='1' align='center' width='100%'>");
rawoutput("<tr class='trhead'><td>URL</td><td>Total Count</td><td>Total Time</td><td>Average Time / Page</td></tr>");
for ($i = 0; $i < db_num_rows($result); $i++) {
$row = db_fetch_assoc($result);
if ($row['totalpages'] >= 1) {
$avg = $row['totaltime'] / $row['totalpages'];
$max = 100;
$bwidth = round($avg * 100);
$bnonwidth = $max - $bwidth;
if ($bnonwidth > 0) {
$bar = "<table style='border: solid 1px #000000' width='{$max}' height='7' bgcolor='#333333' cellpadding=0 cellspacing=0><tr><td width='{$bwidth}' bgcolor='#00ff00'></td><td width='{$bnonwidth}'></td></tr></table>";
} else {
$over = $bwidth - $max;
$total = $max + $over;
$bar = "<table style='border: solid 1px #000000' height='7' width='{$total}' cellpadding=0 cellspacing=0><tr><td width='{$max}' bgcolor='#990000'></td><td width='{$over}' bgcolor='#ff0000'></td></tr></table>";
}
rawoutput("<tr class='" . ($i % 2 ? "trdark" : "trlight") . "'>");
rawoutput("<td>" . $row['page'] . "</td><td>" . number_format($row['totalpages']) . "</td><td>" . $row['totaltime'] . "</td><td>" . $bar . round($row['totaltime'] / $row['totalpages'], 4) . "</td></tr>");
}
}
rawoutput("</table>");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:serverloadperpage.php
示例8: worldmapen_editor_real
function worldmapen_editor_real()
{
global $session;
page_header("World Editor");
require_once "lib/superusernav.php";
superusernav();
// initialize the internal static maps
worldmapen_loadMap();
worldmapen_loadTerrainDefs();
$op = httpget("op");
$act = httpget("act");
$subop = httpget("subop");
debug("op={$op}, act={$act}, subop={$subop}");
switch ($subop) {
case "regen":
worldmapen_editor_regen($op, $subop, $act);
break;
case "manual":
worldmapen_editor_manual($op, $subop, $act);
break;
case "terrain":
worldmapen_editor_terrain($op, $subop, $act);
break;
default:
worldmapen_viewmap(false);
break;
}
addnav("Replace Cities", "runmodule.php?module=worldmapen&op=edit&subop=regen");
addnav("Manually Place Cities", "runmodule.php?module=worldmapen&op=edit&subop=manual");
addnav("Edit terrain type", "runmodule.php?module=worldmapen&op=edit&subop=terrain");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:editor.php
示例9: iitems_crates_gypsy_run
function iitems_crates_gypsy_run()
{
global $session;
page_header("Crate Locations");
$cost = get_module_setting("cost", "iitems_crates_gypsy");
if ($cost == 1) {
$p = "Cigarette";
} else {
$p = "Cigarettes";
}
if ($session['user']['gems'] >= $cost) {
$session['user']['gems'] -= $cost;
output("`5You hand over the %s and the old man chuckles. \"`!Aaah, thank ye kindly. Now, here we are! I'd recommend you write these down. And be quick about it - these crates tend to disappear `ifast!`i`5\"`n`nHe reaches under his desk and brings up a chalkboard with all the locations of the Island's crates written upon it, corresponding to the squares on your crudely-drawn World Map and laid out as X and Y co-ordinates. You spend a few minutes studying the board.`n`n", $p);
$crates = unserialize(get_module_setting("crates", "iitemcrates"));
foreach ($crates as $key => $vals) {
output("%s,%s`n", $vals['loc']['x'], $vals['loc']['y']);
}
} else {
output("`5You enthusiastically agree to the price, before realising that you don't actually have that many cigarettes. Whoops.");
}
addnav("Leave");
addnav("Return to the Outpost", "village.php");
page_footer();
return true;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:iitems_crates_gypsy.php
示例10: main
function main()
{
$sql = 'SELECT *
FROM ' . $this->points_values_table;
$result = $this->db->sql_query($sql);
$points_values = $this->db->sql_fetchrow($result);
$this->db->sql_freeresult($result);
// Add part to bar
$this->template->assign_block_vars('navlinks', array('U_VIEW_FORUM' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'info')), 'FORUM_NAME' => sprintf($this->user->lang['POINTS_INFO'], $this->config['points_name'])));
// Read out all the need values
$info_attach = $points_values['points_per_attach'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_attach']) . ' ' . $this->config['points_name']);
$info_addtional_attach = $points_values['points_per_attach_file'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_attach_file']) . ' ' . $this->config['points_name']);
$info_poll = $points_values['points_per_poll'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_poll']) . ' ' . $this->config['points_name']);
$info_poll_option = $points_values['points_per_poll_option'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_poll_option']) . ' ' . $this->config['points_name']);
$info_topic_word = $points_values['points_per_topic_word'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_topic_word']) . ' ' . $this->config['points_name']);
$info_topic_character = $points_values['points_per_topic_character'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_topic_character']) . ' ' . $this->config['points_name']);
$info_post_word = $points_values['points_per_post_word'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_post_word']) . ' ' . $this->config['points_name']);
$info_post_character = $points_values['points_per_post_character'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_post_character']) . ' ' . $this->config['points_name']);
$info_cost_warning = $points_values['points_per_warn'] == 0 ? sprintf($this->user->lang['INFO_NO_COST'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['points_per_warn']) . ' ' . $this->config['points_name']);
$info_reg_bonus = $points_values['reg_points_bonus'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->functions_points->number_format_points($points_values['reg_points_bonus']) . ' ' . $this->config['points_name']);
$info_points_bonus = $points_values['points_bonus_chance'] == 0 ? sprintf($this->user->lang['INFO_NO_POINTS'], $this->config['points_name']) : sprintf($this->user->lang['INFO_BONUS_CHANCE_EXPLAIN'], $this->functions_points->number_format_points($points_values['points_bonus_chance']), $this->functions_points->number_format_points($points_values['points_bonus_min']), $this->functions_points->number_format_points($points_values['points_bonus_max']), $this->config['points_name']);
$this->template->assign_vars(array('USER_POINTS' => sprintf($this->functions_points->number_format_points($this->user->data['user_points'])), 'POINTS_NAME' => $this->config['points_name'], 'LOTTERY_NAME' => $points_values['lottery_name'], 'BANK_NAME' => $points_values['bank_name'], 'POINTS_INFO_DESCRIPTION' => sprintf($this->user->lang['POINTS_INFO_DESCRIPTION'], $this->config['points_name']), 'INFO_ATTACH' => $info_attach, 'INFO_ADD_ATTACH' => $info_addtional_attach, 'INFO_POLL' => $info_poll, 'INFO_POLL_OPTION' => $info_poll_option, 'INFO_TOPIC_WORD' => $info_topic_word, 'INFO_TOPIC_CHARACTER' => $info_topic_character, 'INFO_POST_WORD' => $info_post_word, 'INFO_POST_CHARACTER' => $info_post_character, 'INFO_COST_WARNING' => $info_cost_warning, 'INFO_REG_BONUS' => $info_reg_bonus, 'INFO_POINTS_BONUS' => $info_points_bonus, 'U_TRANSFER_USER' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'transfer_user')), 'U_LOGS' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'logs')), 'U_LOTTERY' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'lottery')), 'U_BANK' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'bank')), 'U_ROBBERY' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'robbery')), 'U_INFO' => $this->helper->route('dmzx_ultimatepoints_controller', array('mode' => 'info')), 'U_USE_TRANSFER' => $this->auth->acl_get('u_use_transfer'), 'U_USE_LOGS' => $this->auth->acl_get('u_use_logs'), 'U_USE_LOTTERY' => $this->auth->acl_get('u_use_lottery'), 'U_USE_BANK' => $this->auth->acl_get('u_use_bank'), 'U_USE_ROBBERY' => $this->auth->acl_get('u_use_robbery')));
// Generate the page
page_header($this->user->lang['POINTS_INFO']);
// Generate the page template
$this->template->set_filenames(array('body' => 'points/points_info.html'));
page_footer();
}
示例11: main
function main($id, $mode)
{
global $config, $db, $user, $table_prefix, $auth, $template, $phpbb_root_path, $phpEx;
define('TABLE_PREFIX', $table_prefix);
require_once 'class_ulogin.php';
$uLogin = new uLogin($db);
if ($config['require_activation'] == USER_ACTIVATION_DISABLE) {
trigger_error('UCP_REGISTER_DISABLE');
}
if (!($user_id = $uLogin->auth())) {
$user_id = $uLogin->register();
}
if ($user_id) {
$session = $user->session_create($user_id, 0, 1);
}
if (!$session) {
page_header($user->lang['LOGIN'], false);
$template->set_filenames(array('body' => 'login_body.html'));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.{$phpEx}"));
page_footer();
exit;
}
$redirect = request_var('redirect', "{$phpbb_root_path}index.{$phpEx}");
$message = $user->lang['LOGIN_REDIRECT'];
$l_redirect = $redirect === "{$phpbb_root_path}index.{$phpEx}" || $redirect === "index.{$phpEx}" ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE'];
$redirect = reapply_sid($redirect);
if (defined('IN_CHECK_BAN') && $session['user_row']['user_type'] != USER_FOUNDER) {
return false;
}
$redirect = meta_refresh(3, $redirect);
trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
}
示例12: oneshotteleporter_run
function oneshotteleporter_run()
{
global $session;
$to = httpget("to");
if ($to == "") {
page_header("The Void");
output("You press the button on your One-Shot Teleporter. One obligatory blinding flash of light and pain later, you find yourself floating around in empty black nothingness!`n`nA flashing red light and an annoying BEEPing noise from your device insists that you select a destination, and quickly, before you find yourself stuck here or imploded.");
$vloc = array();
$vname = getsetting("villagename", LOCATION_FIELDS);
$vloc[$vname] = "village";
$vloc = modulehook("validlocation", $vloc);
ksort($vloc);
reset($vloc);
addnav("Choose a Destination");
foreach ($vloc as $loc => $val) {
addnav(array("Go to %s", $loc), "runmodule.php?module=oneshotteleporter&to=" . htmlentities($loc));
}
} else {
page_header("Back to Reality");
output("You quickly select an outpost from the list. With a sudden jolt, you find yourself standing in the middle of your chosen outpost! You look around for your teleporting device, but realise that it must have only teleported you, not itself. What a piece of junk.");
$session['user']['location'] = $to;
$session['user']['specialinc'] = "";
addnav("Continue");
addnav("Back to the Outpost", "village.php");
}
page_footer();
return true;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:28,代码来源:oneshotteleporter.php
示例13: render
/**
* Automate setting up the page and creating the response object.
*
* @param string $template_file The template handle to render
* @param string $page_title The title of the page to output
* @param int $status_code The status code to be sent to the page header
* @param bool $display_online_list Do we display online users list
*
* @return Response object containing rendered page
*/
public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false)
{
page_header($page_title, $display_online_list);
$this->template->set_filenames(array('body' => $template_file));
page_footer(true, false, false);
return new Response($this->template->assign_display('body'), $status_code);
}
示例14: main
public function main()
{
$topic_id = $this->request->variable('t', 0);
$post_id = $this->request->variable('p', 0);
$forum_id = $this->request->variable('f', 0);
$mode = $this->request->variable('mode', '');
$book_submit = $this->request->variable('book', false);
$viewtopic_url = append_sid("{$this->phpbb_root_path}viewtopic." . $this->php_ext . "", "f={$forum_id}&t={$topic_id}");
$return_link = '<br /><br />' . sprintf($this->user->lang['RETURN_TOPIC'], '<a href="' . $viewtopic_url . '">', '</a>');
$body = 'add_bookmark';
if ($mode == 'delete') {
$sql = 'DELETE FROM ' . $this->postbookmark_table . "\n\t\t\t\tWHERE user_id = {$this->user->data['user_id']}\n\t\t\t\t\tAND post_id = {$post_id}";
$this->db->sql_query($sql);
$message = $this->user->lang['POST_BOOKMARK_REMOVED'];
$this->helper->output_response($message, $return_link, $viewtopic_url);
} else {
if ($mode == 'find') {
$body = 'find_bookmark';
$this->helper->get_bookmarks($mode);
} else {
$bookmark_desc = $this->request->variable('bookmark_desc', '', true);
if ($book_submit) {
$sql = 'INSERT INTO ' . $this->postbookmark_table . ' ' . $this->db->sql_build_array('INSERT', array('user_id' => $this->user->data['user_id'], 'post_id' => $post_id, 'topic_id' => $topic_id, 'bookmark_time' => time(), 'bookmark_desc' => $bookmark_desc));
$this->db->sql_query($sql);
$message = $this->user->lang['POST_BOOKMARK_ADDED'];
$this->helper->output_response($message, $return_link, $viewtopic_url);
}
}
}
$this->template->assign_vars(array('U_POST_ACTION' => append_sid("{$this->phpbb_root_path}postbookmark", "f={$forum_id}&t={$topic_id}&p={$post_id}&mode={$mode}")));
page_header($this->user->lang['POST_BOOKMARK_ADD']);
$this->template->set_filenames(array('body' => $body . '.html'));
page_footer();
return new Response('', 200);
}
示例15: improbablehousing_run
function improbablehousing_run()
{
global $session;
$op = httpget("op");
require_once "modules/improbablehousing/run/{$op}.php";
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:7,代码来源:improbablehousing.php