當前位置: 首頁>>代碼示例>>PHP>>正文


PHP page_header函數代碼示例

本文整理匯總了PHP中page_header函數的典型用法代碼示例。如果您正苦於以下問題:PHP page_header函數的具體用法?PHP page_header怎麽用?PHP page_header使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了page_header函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: staminatest_run

function staminatest_run()
{
    global $session;
    page_header("Stamina Testing");
    switch (httpget("op")) {
        case "start":
            output("Testing Testing!");
            break;
        case "add":
            output("Attempting to install an action called Sexins, with these parameters:`n`nStarting and Maximum costs: 500`nMinimum cost: 200`nReps for a Reduction: 20`nReduction: 10`n");
            install_action("Sexins", array("maxcost" => 25000, "mincost" => 10000, "expperrep" => 100, "expforlvl" => 1000, "costreduction" => 10, "dkpct" => 2.5));
            break;
        case "process":
            output("Processing the Sexins action");
            process_action("Sexins");
            break;
        case "newday":
            output("Processing a New Day");
            stamina_process_newday();
            break;
        case "buff":
            output("Applying a stamina buff to Sexins for the current user, for 20 rounds, reducing action cost to half.");
            apply_stamina_buff('ultra-sexy-buff-for-sexins', array("name" => "Ultra Sexy Buff for Sexins", "action" => "Sexins", "costmod" => 0.5, "expmod" => 0.8, "rounds" => 5, "roundmsg" => "Round Message!", "wearoffmsg" => "Wearoff Message!"));
            output("Also applying a Stamina Class buff to all Hunting actions, reducing their cost to half for twenty rounds.");
            apply_stamina_buff('huntclasstest', array("name" => "Hunting Class test buff", "class" => "Hunting", "costmod" => 0.5, "expmod" => 0.8, "rounds" => 20, "roundmsg" => "Round Message!", "wearoffmsg" => "Wearoff Message!"));
            break;
        case "get":
            $thingtodebug = get_player_action("Sexins");
            debug($thingtodebug);
            break;
        case "uninstall":
            output("Uninstalling the Sexins action, deleting all actions entries and associated buffs");
            uninstall_action("Sexins");
            break;
        case "dragonkill":
            output("Processing a Dragon Kill");
            stamina_process_dragonkill();
            break;
        case "calcbuffs":
            output("Calculating Buffs");
            stamina_calculate_buffed_cost("Sexins");
            break;
        case "calcexp":
            output("Calculating Buffed EXP");
            stamina_calculate_buffed_exp("Sexins");
            break;
    }
    addnav("Install an action called Sexins", "runmodule.php?module=staminatest&op=add");
    addnav("Uninstall", "runmodule.php?module=staminatest&op=uninstall");
    addnav("Process the Sexins Action for the current user", "runmodule.php?module=staminatest&op=process");
    addnav("Process newday", "runmodule.php?module=staminatest&op=newday");
    addnav("Add a buff", "runmodule.php?module=staminatest&op=buff");
    addnav("Get Stamina", "runmodule.php?module=staminatest&op=get");
    addnav("Process a Dragon Kill", "runmodule.php?module=staminatest&op=dragonkill");
    addnav("Calculate Buffed Cost", "runmodule.php?module=staminatest&op=calcbuffs");
    addnav("Calculate Buffed exp", "runmodule.php?module=staminatest&op=calcexp");
    addnav("Back to the Grotto", "superuser.php");
    page_footer();
    return true;
}
開發者ID:CavemanJoe,項目名稱:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代碼行數:60,代碼來源:staminatest.php

示例2: 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

示例3: 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();
    }
開發者ID:rampmaster,項目名稱:Ultimate-Points-Extension,代碼行數:28,代碼來源:points_info.php

示例4: buildpage

 public function buildpage(viewNavigation $Navigation)
 {
     global $config, $phpbb_root_path, $phpEx, $user, $template;
     $item_id = request_var(URI_ITEM, 0);
     if (!class_exists('\\bbdkp\\controller\\loot\\Loot')) {
         require "{$phpbb_root_path}includes/bbdkp/controller/loot/Loot.{$phpEx}";
     }
     if (!class_exists('\\bbdkp\\controller\\members\\Members')) {
         require "{$phpbb_root_path}includes/bbdkp/controller/members/Members.{$phpEx}";
     }
     if (!class_exists('\\bbdkp\\controller\\raids\\Raids')) {
         require "{$phpbb_root_path}includes/bbdkp/controller/raids/Raids.{$phpEx}";
     }
     $loot = new \bbdkp\controller\loot\Loot($item_id);
     $purchased_items = $loot->Loothistory($loot->item_name);
     $title = $user->lang['ITEM'] . ' : ' . $loot->item_name;
     $sort_order = array(0 => array('item_date desc, item_value desc', 'item_date asc, item_value desc'), 1 => array('member_name asc, item_value desc', 'member_name desc, item_value desc'), 2 => array('item_value desc', 'item_value asc'));
     $current_order = $Navigation->switch_order($sort_order);
     foreach ($purchased_items as $key => $item) {
         $buyer = new \bbdkp\controller\members\Members($item['member_id']);
         $raid = new \bbdkp\controller\raids\Raids($item['raid_id']);
         $template->assign_block_vars('items_row', array('DATE' => !empty($item['item_date']) ? date('d.m.y', $item['item_date']) : ' ', 'CLASS_COLOR' => $buyer->colorcode, 'CLASS_IMAGE' => $buyer->class_image, 'RACE_IMAGE' => $buyer->race_image, 'RACE' => $buyer->member_race, 'BUYER' => $buyer->member_name, 'U_VIEW_BUYER' => append_sid("{$phpbb_root_path}dkp.{$phpEx}", "page=member&" . URI_NAMEID . '=' . $item['member_id'] . '&' . URI_DKPSYS . '=' . $item['dkpid']), 'U_VIEW_RAID' => append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=raid&' . URI_RAID . '=' . $item['raid_id']), 'EVENT_COLOR' => $raid->event_color, 'RAID' => $raid->event_name, 'VALUE' => sprintf("%.2f", $item['item_value']), 'DECAY' => sprintf("%.2f", $item['item_decay']), 'TOTAL' => sprintf("%.2f", $item['item_net'])));
         unset($raid);
         unset($buyer);
     }
     $navlinks_array = array(array('DKPPAGE' => $user->lang['MENU_ITEMVAL'], 'U_DKPPAGE' => append_sid("{$phpbb_root_path}dkp.{$phpEx}", "page=listitems")), array('DKPPAGE' => $user->lang['MENU_VIEWITEM'], 'U_DKPPAGE' => append_sid("{$phpbb_root_path}dkp.{$phpEx}", "page=item&" . URI_ITEM . '=' . $item_id)));
     foreach ($navlinks_array as $name) {
         $template->assign_block_vars('dkpnavlinks', array('DKPPAGE' => $name['DKPPAGE'], 'U_DKPPAGE' => $name['U_DKPPAGE']));
     }
     $template->assign_vars(array('S_SHOWDECAY' => $config['bbdkp_decay'] == '1' ? true : false, 'L_PURCHASE_HISTORY_FOR' => sprintf($user->lang['PURCHASE_HISTORY_FOR'], '<strong>' . $loot->item_name . '</strong>'), 'O_DATE' => $current_order['uri'][0], 'O_BUYER' => $current_order['uri'][1], 'O_VALUE' => $current_order['uri'][2], 'U_VIEW_ITEM' => append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=item&amp;' . URI_ITEM . '=' . $item_id), 'VIEWITEM_FOOTCOUNT' => sprintf($user->lang['VIEWITEM_FOOTCOUNT'], count($purchased_items)), 'S_DISPLAY_VIEWITEM' => true));
     unset($purchased_items);
     // Output page
     page_header($title);
 }
開發者ID:ZerGabriel,項目名稱:bbDKP,代碼行數:34,代碼來源:viewItem.php

示例5: 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}&amp;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}&amp;t={$topic_id}&amp;p={$post_id}&amp;mode={$mode}")));
     page_header($this->user->lang['POST_BOOKMARK_ADD']);
     $this->template->set_filenames(array('body' => $body . '.html'));
     page_footer();
     return new Response('', 200);
 }
開發者ID:AlexSheer,項目名稱:phpbb3.1-PostBookmark,代碼行數:35,代碼來源:postbookmark.php

示例6: 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>'));
 }
開發者ID:mike-a-b,項目名稱:crossfit,代碼行數:32,代碼來源:ulogin_register.php

示例7: 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");
}
開發者ID:nishant368,項目名稱:newlifeoffice-new,代碼行數:28,代碼來源:auth.inc.php

示例8: 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

示例9: 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

示例10: rail_peddler_run

function rail_peddler_run()
{
    global $session, $inventory;
    $op = httpget("op");
    $loc = rail_peddler_getloc();
    $hid = $loc["peddlerhid"];
    $rid = $loc["peddlerrid"];
    $price = get_module_setting("peddlerprice");
    if ($op == "buy") {
        $headertext = "Why sure, I'll take one of those!";
    } else {
        $headertext = "Go away, I'm busy.";
    }
    page_header($headertext);
    switch ($op) {
        case "buy":
            output("The scruffy vendor's eyes gleam. Was that a fla`gs`0h of green, or no? \"`2Verra wise, %s. Ye willna be sorry!`0\"`n`n", translate_inline($session['user']['sex'] ? 'lass' : 'lad'));
            give_item("cardcase");
            //			if (!$success){
            //				output("Then -- a frown. \"`2Wait, no, I canna sell t'ye. Ye'd better petition the Big Boss, tell 'im t'see what's gaen wrong wiv all dis.`0\"`n`n");
            //			} else {
            output("You have a fine leather card case. Pleased, you admire its soft texture. What an excellent purchase you have made!`n`n");
            //			}
            $session['user']['gems'] -= $price;
            break;
        case "pass":
            output("\"`2Bleedin' smart-arse.`0\" The scruffy vendor shrugs and goes off to pester someone else.`n`n");
            break;
    }
    addnav("Back to the Concourse", "runmodule.php?module=improbablehousing&op=interior&hid={$hid}&rid={$rid}");
    page_footer();
}
開發者ID:CavemanJoe,項目名稱:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代碼行數:32,代碼來源:rail_peddler.php

示例11: process_form

function process_form()
{
    if ($_POST['xsrf_token'] != $_SESSION['xsrf_token']) {
        trigger_error('XSRF code incorrect', E_USER_ERROR);
    }
    $file = '';
    $name = '';
    if (isset($_GET['Home'])) {
        $file = '../.content/Home.txt';
        $name = 'Home';
    } else {
        if (isset($_GET['Contests'])) {
            $file = '../.content/Contests.txt';
            $name = 'Contests';
        } else {
            trigger_error('Show: Unknown contest', E_USER_ERROR);
        }
    }
    file_put_contents($file, $_POST['text']);
    page_header('Edit Page');
    echo <<<HEREDOC
      <h1>Edit Page</h1>
      
      <div class="alert">The {$name} page was saved successfully&nbsp;&nbsp;(<a href="../{$name}">View</a>)</div>
HEREDOC;
}
開發者ID:lhsmath,項目名稱:lhsmath.org,代碼行數:26,代碼來源:Edit_Page.php

示例12: buildpage

 public function buildpage(viewNavigation $Navigation)
 {
     global $user;
     $this->leaderboard($Navigation);
     $this->dkplisting($Navigation);
     page_header($user->lang['LISTMEMBERS_TITLE']);
 }
開發者ID:ZerGabriel,項目名稱:bbDKP,代碼行數:7,代碼來源:viewStandings.php

示例13: content

function content()
{
    if (!user_logged_in()) {
        return must_log_in();
    }
    $user = fetch_one_or_none('users', 'id', user_logged_in());
    if (!array_key_exists('token', $_GET) || !$_GET['token'] || $_GET['token'] != sha1($user->new_email_address)) {
        $errors[] = 'Invalid reset token';
    }
    # This can happen if two accounts try to change address at similar times.
    if (count($errors) == 0 && count(fetch_all('users', 'email_address', $user->new_email_address))) {
        $errors[] = "A user with this email address already exists";
    }
    if (count($errors) == 0) {
        update_all('users', array('email_address' => $user->new_email_address, 'new_email_address' => null), 'id', user_logged_in());
        ?>
    <h2>Address changed</h2>
    <p>Your email address has been changed to
      <tt><?php 
        esc($user->new_email_address);
        ?>
</tt>.</p>
    <?php 
        return;
    }
    page_header('Address verification failed');
    show_error_list($errors);
}
開發者ID:ras52,項目名稱:geneopedia,代碼行數:28,代碼來源:verify-email.php

示例14: show_manage

function show_manage($profile_id_)
{
    $profiledb = ProfileDB::getInstance();
    $profile = $profiledb->import($profile_id_);
    if (!is_object($profile)) {
        redirect('profiles.php');
    }
    $used_users = $profile->getUsers();
    page_header();
    echo '<div id="profiles_div">';
    echo '<h1>' . sprintf(_("Profile: %s"), $profile->id) . '</h1>';
    echo '<div>';
    echo '<h2>' . _('Server') . '</h2>';
    echo '<a href="servers.php?action=manage&fqdn=' . $profile->server . '"> ' . $profile->server . '</a>';
    echo '</div>';
    echo '<br />';
    echo '<div>';
    echo '<h2>' . _('Used by') . '</h2>';
    echo '<table border="0" cellspacing="1" cellpadding="3">';
    foreach ($used_users as $user) {
        echo '<tr>';
        echo '<td><a href="users.php?action=manage&amp;id=' . $user->getAttribute('login') . '">' . $user->getAttribute('displayname') . '</a></td>';
        echo '</tr>';
    }
    echo '</table>';
    echo '</div>';
    echo '</div>';
    page_footer();
}
開發者ID:skdong,項目名稱:nfs-ovd,代碼行數:29,代碼來源:profiles.php

示例15: specialcomments_run

function specialcomments_run()
{
    global $session;
    page_header("The Hunter's Lodge");
    $config = unserialize($session['user']['donationconfig']);
    if (!is_array($config)) {
        $config = array();
    }
    if (httpget('op') == "buy1") {
        $session['user']['donationspent'] += 25;
        increment_module_pref("commentsleft", 1);
        $config = array_push($config, "spent 25 points for 1 Special Comment in the lodge.");
    }
    if (httpget('op') == "buy5") {
        $session['user']['donationspent'] += 100;
        increment_module_pref("commentsleft", 5);
        $config = array_push($config, "spent 100 points for 5 Special Comments in the lodge.");
    }
    if (httpget('op') == "buy60") {
        $session['user']['donationspent'] += 1000;
        increment_module_pref("commentsleft", 60);
        $config = array_push($config, "spent 1000 points for 60 Special Comments in the lodge.");
    }
    if (httpget('op') == "buy200") {
        $session['user']['donationspent'] += 2000;
        increment_module_pref("commentsleft", 200);
        $config = array_push($config, "spent 2000 points for 200 Special Comments in the lodge.");
    }
    $session['user']['donationconfig'] = $config;
    output("You now have %s Special Comments stored up.  To use them, simply use the /special switch, like this:`n/special Admin CavemanJoe saunters through town, oblivious to the fact that he's stark bollock naked.`n/special A cold wind blows through the Outpost, carrying with it a somewhat chilling sense of foreboding.`n/special The clock at the center of AceHigh strikes thirteen, and the Jokers' eyes flash `4red`0 for a second.`n`nColour codes can be used within Special Comments.`n`n`bA quick note on the etiquette of using Special Comments:`b`nThe cost of posting a Special Comment is deliberately high, to ensure that players think carefully about what they want to say.  By all means, use them for mischief, but keep it playful rather than malicious.  If a group of players is engaging in a roleplaying exercise in a given Outpost, try to avoid stepping on the toes of their plotline.  Special Comments are anonymous, but are subject to the same rules of the rest of the Island (the two rules being \"Dont be a dick\" and \"Don't take it seriously\"), and drama-inducing comments will be deleted without refund.  If in doubt, ask a moderator.  Have fun!`n`n", get_module_pref("commentsleft"));
    addnav("Return to the Lodge", "lodge.php");
    page_footer();
}
開發者ID:CavemanJoe,項目名稱:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代碼行數:33,代碼來源:specialcomments.php


注:本文中的page_header函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。