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();
}
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");
}
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();
}
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();
}
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();
}
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();
}
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();
}
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();
}
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;
}
    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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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']) . '&nbsp;' . $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();
    }
Beispiel #11
0
 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>'));
 }
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;
}
Beispiel #13
0
 /**
  * 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);
 }
 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);
 }
function improbablehousing_run()
{
    global $session;
    $op = httpget("op");
    require_once "modules/improbablehousing/run/{$op}.php";
    page_footer();
}
 /**
  * This listener is run when the KernelEvents::EXCEPTION event is triggered
  *
  * @param GetResponseForExceptionEvent $event
  * @return null
  */
 public function on_kernel_exception(GetResponseForExceptionEvent $event)
 {
     $exception = $event->getException();
     $message = $exception->getMessage();
     if ($exception instanceof \phpbb\exception\exception_interface) {
         $message = $this->language->lang_array($message, $exception->get_parameters());
     }
     if (!$event->getRequest()->isXmlHttpRequest()) {
         page_header($this->language->lang('INFORMATION'));
         $this->template->assign_vars(array('MESSAGE_TITLE' => $this->language->lang('INFORMATION'), 'MESSAGE_TEXT' => $message));
         $this->template->set_filenames(array('body' => 'message_body.html'));
         page_footer(true, false, false);
         $response = new Response($this->template->assign_display('body'), 500);
     } else {
         $data = array();
         if (!empty($message)) {
             $data['message'] = $message;
         }
         if (defined('DEBUG')) {
             $data['trace'] = $exception->getTrace();
         }
         $response = new JsonResponse($data, 500);
     }
     if ($exception instanceof HttpExceptionInterface) {
         $response->setStatusCode($exception->getStatusCode());
         $response->headers->add($exception->getHeaders());
     }
     $event->setResponse($response);
 }
function titans_run()
{
    global $session;
    $titanop = httpget("titanop");
    require_once "modules/titans/run/{$titanop}.php";
    page_footer();
}
Beispiel #18
0
function show_all()
{
    $offset = 0;
    if (array_key_exists('offset', $_REQUEST) && $_REQUEST['offset'] > 0) {
        $offset += max($_REQUEST['offset'], 0);
    }
    $actions = $_SESSION['service']->admin_actions_list($offset);
    if (is_null($actions)) {
        $actions = array();
    }
    $search_limit = $_SESSION['configuration']['max_items_per_page'];
    $count = 0;
    page_header();
    echo '<h1>' . _('Administration Actions Log') . '</h1>';
    echo '<div>';
    echo '<div style="padding: 10px;">';
    if ($offset > 0) {
        echo '<form style="display: inline;">';
        echo '<input type="hidden" name="offset" value="' . ($offset - $search_limit) . '" />';
        echo '<input type="submit" value="Sooner" />';
        echo '</form>';
    }
    if (count($actions) >= $search_limit) {
        echo ' <form style="display: inline;">';
        echo '<input type="hidden" name="offset" value="' . ($offset + count($actions)) . '" />';
        echo '<input type="submit" value="Older" />';
        echo '</form>';
    }
    echo '</div>';
    echo '<table class="main_sub" border="0" cellspacing="1" cellpadding="5">';
    foreach ($actions as $id => $action) {
        $content = 'content' . ($count++ % 2 == 0 ? 1 : 2);
        echo '<tr class="' . $content . '">';
        echo '<td>' . $action['when'] . '</td>';
        echo '<td>' . $action['who'] . '</td>';
        echo '<td>' . $action['where'] . '</td>';
        echo '<td>' . $action['what'] . '</td>';
        echo '<td>' . array2str($action['infos']) . '</td>';
        echo '</tr>';
    }
    echo '</table>';
    echo '<div style="padding: 10px;">';
    if ($offset > 0) {
        echo '<form style="display: inline;">';
        echo '<input type="hidden" name="offset" value="' . ($offset - $search_limit) . '" />';
        echo '<input type="submit" value="Sooner" />';
        echo '</form>';
    }
    if (count($actions) >= $search_limit) {
        echo ' <form style="display: inline;">';
        echo '<input type="hidden" name="offset" value="' . ($offset + count($actions)) . '" />';
        echo '<input type="submit" value="Older" />';
        echo '</form>';
    }
    echo '</div>';
    echo '</div>';
    page_footer();
    die;
}
Beispiel #19
0
 /**
  * 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
  * @param int $item_id Restrict online users to item id
  * @param string $item Restrict online users to a certain session item, e.g. forum for session_forum_id
  * @param bool $send_headers Whether headers should be sent by page_header(). Defaults to false for controllers.
  *
  * @return Response object containing rendered page
  */
 public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = false)
 {
     page_header($page_title, $display_online_list, $item_id, $item, $send_headers);
     $this->template->set_filenames(array('body' => $template_file));
     page_footer(true, false, false);
     $headers = !empty($this->user->data['is_bot']) ? array('X-PHPBB-IS-BOT' => 'yes') : array();
     return new Response($this->template->assign_display('body'), $status_code, $headers);
 }
Beispiel #20
0
function emit_page_article($art)
{
    $pagetitle = $art['title'];
    $params = array('canonical_url' => article_url($art['id']));
    page_header($pagetitle, $params);
    extract($art);
    include "../templates/article.tpl.php";
    page_footer();
}
function template_init()
{
    document_open();
    page_header();
    nav();
    page();
    page_footer();
    document_close();
}
function lights_out_run()
{
    global $session;
    page_header("Lights Out!");
    addnav("O?Back to the Outpost", "village.php");
    //playtesting
    $numlights = 9;
    $lightsperrow = 3;
    $startlights = 5;
    $maxchangesperlight = 4;
    switch (httpget('op')) {
        case "start":
            $lights = array();
            for ($lamp = 1; $lamp <= 9; $lamp++) {
                $lights[$lamp]['status'] = 0;
                $numberofchanges = e_rand(2, 4);
                $lampstochange = array(1 => "1", 2 => "2", 3 => "3", 4 => "4", 5 => "5", 6 => "6", 7 => "7", 8 => "8", 9 => "9");
                unset($lampstochange[$lamp]);
                $switches = array();
                for ($c = 1; $c <= $numberofchanges; $c++) {
                    $sw = array_rand($lampstochange);
                    $switches[] = $sw;
                    unset($lampstochange[$sw]);
                }
                $lights[$lamp]['changes'] = $switches;
            }
            debug($lights);
            //Now randomly poke some lights
            for ($i = 1; $i <= $startlights; $i++) {
                $sw = e_rand(1, $numlights);
                $lights = lights_out_switch($sw, $lights);
            }
            $spref = serialize($lights);
            set_module_pref("lights", $spref);
            $moves = 0;
            $jackpot = 200;
            lights_out_show($lights, $moves, $jackpot);
            break;
        case "switch":
            $moves = httpget('moves');
            $moves++;
            $jackpot = httpget('jackpot');
            output("Current jackpot: %s`n", $jackpot);
            $lights = lights_out_switch(httpget('switch'));
            $jackpot += 5;
            lights_out_show($lights, $moves, $jackpot);
            $lit = lights_out_check($lights);
            if (!$lit) {
                output("Congratulations!  You won %s Req, for your stake of %s!", $jackpot, $moves * 10);
            } else {
                output("There are %s lights left to turn off.  You have made %s moves.`n", $lit, $moves);
            }
            break;
    }
    page_footer();
}
function donationreminder_run()
{
    global $session;
    page_header("Why hello there!");
    output("`0Hello!  My name's CavemanJoe, I'm the admin here at Improbable Island, and I think it's time you and I had a little chat.`n`nOr, you can just click Continue and carry on your merry way!`n`n...still here?`n`nHello?`n`nHello!`n`nSo.  You've downloaded over three thousand pages on Improbable Island!  That's an awful lot of clicking and keypresses!  I really hope you're having a good time.  You might be wondering why I'm interrupting your game like this, so I'll tell you.  There are a couple of reasons.`n`nFirstly - I'd like to hear from you!  We've got an active forum at http://enquirer.improbableisland.com, in which it'd be nice to hear any ideas or suggestions you might have.  Surely in your thousands of page loads you've found something that could be improved upon?`n`nSecondly, you haven't got any Supporter Points!`n`nYes, this is me saying \"stick a couple of bucks in the hat, will you?\" - yeah, you knew it was coming eventually - but I'm hoping to do it in a way that's at least interesting, and shows you a little bit about how running an online game actually works these days.`n`nImprobable Island is still pretty much a one-man show.  I have some awesome moderators who help me out with the day-to-day running of the game so that I can spend my days coding, but the design and programming of the game beyond its original (Legend of the Green Dragon 1.1.1) codebase is single-handed.  In 2009 I took the plunge, crossed my fingers, and quit my day job to work full-time on Improbable Island.`n`nIt's been pretty good so far.  It's meant taking a pay cut, but I'm happier and I get to do something that affects more people, so that's more than balanced out.`n`nStill, it's a demanding job.  I don't know if you've ever tried to make a game before, but if you have then you'll know how much of a pain in the bum it is trying to balance everything out so it's fair and challenging, never mind the actual programming, writing, artwork creation, layout, graphic design and so forth.  When you're talking about a game with several thousand participants, it gets even harder.`n`nIt's especially hard when you consider that if you want to make any sort of real money in online games, you've got to be a complete asshole.`n`nYou've got to splatter flashing banner ads and popups all over your pages.  You've got to set up cynical gameplay mechanics that are designed for nothing more than to keep people coming back (like growing virtual crops that you absolutely have to harvest between 8 and 10 pm tonight or they're wasted).  You've got to encourage your players to sign up for dodgy offers for free iPods.  You've got to charge money for absolutely everything you can, and you've got to make sure that the people with the most money are the people with the highest rankings in the game.  You've got to hit the psychological buttons discovered over decades of research into gaming and the marketing thereof; you've got to create rare items that people want not because they're useful, but because scarcity goes hand-in-hand with perceived value (`#there are only two `4Stinking Buckets of Dead Eels`# on the whole Island!  I've gotta get one!`0).  You've got to have a subscription option rather than one-time payments, because people forget to cancel their subscriptions.  You've got to spam your players' FaceBook pages with all sorts of meaningless drivel so that social obligation keeps them playing long after the game is no longer fun.  Your marketing has to be a cynical grab at the teenage boy market, enabled by the inclusion of preposterously large breasts in every banner ad.  You have to base your game around a pre-established theme, because coming up with new ideas costs time and money.  You have to create mindless, repetitive gameplay and then charge money for items that allow your players to skip over the boring parts.  You have to make your players compete with each other on parameters that they can influence with money, because some of them will go nuts trying to keep up with the Joneses.  You have to make awful, shallow games with the widest possible appeal to the lowest common denominator and attach enormous marketing and artwork budgets because everybody knows that pretty anime-themed games targeted at 17-25 year old males make shedloads of money, especially when you throw in some of the aforementioned preposterously large breasts.  With very few exceptions, you don't get rich in online games by making good games, or even by trying to be a decent bloke.`n`nYou certainly don't get rich by only advertising on webcomic sites that you personally enjoy.  You don't get rich by putting up enormous walls of text right at the start of your game to scare away people who don't enjoy reading.  You sure as hell don't get rich by only trying to attract and retain curious, intelligent, likeable players!  Of which you are clearly one, or you wouldn't have gotten this far!`n`n(see how I transparently flatter you into giving me money?  Hell, it's worth a shot)`n`nSetting up a distributed computing team and generating over a hundred years' worth of humanitarian research is cool, but it doesn't make you any money.  Giving the better part of six grand to Doctors Without Borders doesn't make you any money either (in fact it costs you money!  Who'd have thought it?).  Fair and balanced gameplay doesn't make you money - all the time you spend balancing your game is time you could be spending mining your players' data and habits for interesting tidbits you can sell to spammers and market researchers.  Games based on a post-EMP valve-and-relay future don't make any money - you should go with steampunk instead, it's very lucrative right now.`n`nIf you've got any sort of conscience, you'll end up whittling your options for making money down to two choices.  The first one is to make an excellent game and then not let anybody play it unless they pay you first.  The second one is to make the game free to play, and then after the player's passed a certain threshold, just go right ahead and ask them outright for some money.`n`nBut you should make it clear to them that nothing bad will happen if they don't donate.  It's important that the player reading the request knows that they're not being coerced into anything, and that the game isn't going to come to a grinding halt if they don't give you any money.  You can point out, if you're feeling manipulative, that their enjoyment has cost you money - which is technically true, but you've got to tell the whole truth.  Three thousand pages' worth of data transfer, database storage space and (most crucially) CPU cycles only works out to pennies since you spent all those nights optimizing the codebase, so it's kinda hard to guilt the player into giving you money that way.`n`nIf you want to ask a player for money, you should point out that just under three per cent of players who sign up make a donation at some point.  They're the ones who counter, in their five-and-ten-dollar donations, all the loose change that the non-donating players end up costing.  The player you're asking money from shouldn't feel that if they don't donate, nobody else will, or that if they don't donate, you'll be upset with them, because you won't - it's only pennies after all.`n`nYou should tell them that you're not rich, but that you're not starving either.  Be honest with them.  It's true that your donating players are your only source of income - but if the player you're talking to doesn't donate, then someone else will.`n`nSo, that's what I'm doing with you right now.  Asking you nicely for money using only the truth, rather than trying to lever it out of you via cheap trickery.  And the truth is that Improbable Island could be making a whole hell of a lot more money than it is right now - but it wouldn't be the same place.`n`nImprobable Island became the game that you enjoy today because its players give me just enough money to justify it as a day job.  If they had given me less money, then I'd need to attract more players, meaning I'd have to be less picky about the sort of people I advertise to.`n`nAnd if you're wondering what's in it for you, you should give me money because:`n1) Every time you or somebody else makes a donation, more Supply Crates are dropped on the World Map.`n2) You'll get 100 Supporter Points for every dollar you donate, with which you can get awesome things in the Hunter's Lodge.`n3) Every donation fills up the Extended Play bar a little bit more, and when it's full, everybody gets more Stamina (click on the coin slot to the bottom right to see where it's up to now).`n4) Every dollar you give to me is a one-fingered salute to the makers of FaceBook Friends Alienator, Annual Generic Football Game 2010 Endorsed by Some Guy, and The Free iPod Game.`n5) If you ever meet me in a pub, you'll have already bought me a pint.`n`nSo!  That's why you should donate some money towards Improbable Island's server costs, advertising budget, and my own costs of living.  And if you don't donate, then I hope this message was at least interesting to read.`n`nI'll return you to the game now.  Don't worry, this is a one-time message and nothing bad will happen if you don't donate.`n`nThanks,`n`n-Admin CavemanJoe`n`n");
    set_module_pref("seenmsg", 1, "donationreminder");
    addnav("Back to the game");
    addnav("Continue", "village.php");
    page_footer();
}
Beispiel #24
0
 /**
  * Display Options
  *
  * Output the options available
  */
 function display_options()
 {
     global $template, $user, $phpbb_root_path;
     // This is kinda like the main page
     // Output the main page
     page_header($user->lang['SUPPORT_TOOL_KIT']);
     $template->assign_vars(array('PATH' => append_sid(STK_INDEX, array('c' => 'dev', 't' => 'phpbb'))));
     $template->set_filenames(array('body' => 'tools/events_body.html'));
     page_footer();
 }
Beispiel #25
0
 /**
  * Display Options
  *
  * Output the options available
  */
 function display_options()
 {
     global $template, $user;
     // This is kinda like the main page
     // Output the main page
     page_header($user->lang['SUPPORT_TOOL_KIT']);
     // Category title and desc if available
     $template->assign_vars(array('L_TITLE' => $user->lang['CAT_ERK'], 'L_TITLE_EXPLAIN' => user_lang('CAT_ERK_EXPLAIN', append_sid(STK_ROOT_PATH . 'erk.' . PHP_EXT))));
     $template->set_filenames(array('body' => 'index_body.html'));
     page_footer();
 }
function hunterslodge_healthinsurance_run()
{
    global $session;
    page_header("Hospital Tent");
    output("The mechanic growls at you.  \"`6So you think you've got a certificate that gives you free healing, do you?`0\"  He snatches the certificate out of your hand.  \"`6Well, we'll just see about that, won't we?  RAFAEL!`0\"`n`nThe top drawer of the mechanic's filing cabinet rattles open and a nose peeks out, followed by a pair of bespectacled eyes and an oily black haircut.  The lawyer oozes out of the filing cabinet, scuttles over to the mechanic and takes the certificate.  He sniffs it, then cautiously nibbles on a corner, before pressing his greasy nose to the paper.`n`n\"`7Let's see, here...`0\" he mutters, in an annoying, nasal tone.  \"`7...an agreement between CavemanJoe, hereafter referred to as His Royal Awesomeness, and the bearer's posterior, hereafter referred to as Your Butt...  Hmm, hmm, I see...  agrees to not bend, fold, spindle or mutilate Your Butt...  yes, yes, all very official, all very legal...  valid for a period of one \"Real World\" week after first use...  oh, no.  Oh, dear.`0\"  He looks towards the mechanic, eyes filling with tears.  \"`7It's airtight!  We can't get out of it!`0\"`n`nThe mechanic snatches the certificate back and gives it a once-over.  The colour leavs his face.  \"`6My God,`0\" he whispers, staring into space.`n`nHe turns to you.  \"`6Get on the table,`0\" he mumbles.  \"`6And tell `ino-one`i about this.`0\"`n`nYou have been fully healed!`n`n");
    $session['user']['hitpoints'] = $session['user']['maxhitpoints'];
    use_item("hunterslodge_healthinsurance");
    addnav("Exit");
    addnav("Back to the Jungle", "forest.php");
    page_footer();
}
function iitems_eboy_gypsy_run()
{
    global $session;
    page_header("eBoy's Price Chart");
    require_once "modules/iitems/lib/lib.php";
    $cost = get_module_setting("cost", "iitems_eboy_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.  Now mark my words - these prices fluctuate by the `iminute`i!  That eBoy, he's a crafty bastard, y'see.  He sells things for whatever people are willing to buy them for, and not one penny less!  Even if that means putting his prices up the `isecond`i someone buys something!`5\"`n`nHe reaches under his desk and brings up a clattering rectangular machine made out of wood and brass, about the size of a fat telephone directory.  A radio antenna protrudes from one corner.`n`nTrue to his word, the spinning reels show the prices of every commodity in every outpost.  You spend a few minutes studying the readout.`n`n", $p);
        $sql = "select * from " . db_prefix("cityprefs");
        $result = db_query($sql);
        for ($i = 0; $i < db_num_rows($result); $i++) {
            $row = db_fetch_assoc($result);
            $cid = $row['cityid'];
            $name = $row['cityname'];
            $eboy = unserialize(get_module_objpref("city", $cid, "eboytrades-intelligent", "iitems_eboy_intelligent"));
            output("`b`0%s`b`n", $name);
            rawoutput("<table border=0 cellpadding=3 cellspacing=2><tr class=\"trdark\"><td>Item</td><td>Buying at</td><td>Selling at</td><td>Stock</td></tr>");
            $classcount = 1;
            foreach ($eboy as $key => $details) {
                $itemdetails = iitems_get_item_details($key);
                if ($details['price'] < 10) {
                    $details['price'] = 10;
                }
                $eboy[$key]['price'] = $details['price'];
                if ($details['stock'] < 3) {
                    $buy = round($details['price'] * 0.5);
                } else {
                    $buy = round($details['price'] * 0.7);
                }
                $classcount++;
                $class = $classcount % 2 ? "trdark" : "trlight";
                $dname = $itemdetails['verbosename'];
                $dsell = number_format($details['price']);
                $dbuy = number_format($buy);
                $dstock = number_format($details['stock']);
                rawoutput("<tr class='{$class}'><td>{$dname}</td><td align=\"center\">{$dbuy}</td><td align=\"center\">{$dsell}</td><td align=\"center\">{$dstock}</td></tr>");
            }
            rawoutput("</table>");
            output("`n`n");
        }
    } 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;
}
/**
* Fill smiley templates (or just the variables) with smilies, either in a window or inline
*/
function generate_smilies($mode, $forum_id)
{
    global $auth, $db, $user, $config, $template;
    global $phpEx, $phpbb_root_path;
    if ($mode == 'window') {
        if ($forum_id) {
            $sql = 'SELECT forum_style
				FROM ' . FORUMS_TABLE . "\n\t\t\t\tWHERE forum_id = {$forum_id}";
            $result = $db->sql_query_limit($sql, 1);
            $row = $db->sql_fetchrow($result);
            $db->sql_freeresult($result);
            $user->setup('posting', (int) $row['forum_style']);
        } else {
            $user->setup('posting');
        }
        page_header($user->lang['SMILIES']);
        $template->set_filenames(array('body' => 'posting_smilies.html'));
    }
    $display_link = false;
    if ($mode == 'inline') {
        $sql = 'SELECT smiley_id
			FROM ' . SMILIES_TABLE . '
			WHERE display_on_posting = 0';
        $result = $db->sql_query_limit($sql, 1, 0, 3600);
        if ($row = $db->sql_fetchrow($result)) {
            $display_link = true;
        }
        $db->sql_freeresult($result);
    }
    $last_url = '';
    $sql = 'SELECT *
		FROM ' . SMILIES_TABLE . ($mode == 'inline' ? ' WHERE display_on_posting = 1 ' : '') . '
		ORDER BY smiley_order';
    $result = $db->sql_query($sql, 3600);
    $smilies = array();
    while ($row = $db->sql_fetchrow($result)) {
        if (empty($smilies[$row['smiley_url']])) {
            $smilies[$row['smiley_url']] = $row;
        }
    }
    $db->sql_freeresult($result);
    if (sizeof($smilies)) {
        foreach ($smilies as $row) {
            $template->assign_block_vars('smiley', array('SMILEY_CODE' => $row['code'], 'A_SMILEY_CODE' => addslashes($row['code']), 'SMILEY_IMG' => $phpbb_root_path . $config['smilies_path'] . '/' . $row['smiley_url'], 'SMILEY_WIDTH' => $row['smiley_width'], 'SMILEY_HEIGHT' => $row['smiley_height'], 'SMILEY_DESC' => $row['emotion']));
        }
    }
    if ($mode == 'inline' && $display_link) {
        $template->assign_vars(array('S_SHOW_SMILEY_LINK' => true, 'U_MORE_SMILIES' => append_sid("{$phpbb_root_path}posting.{$phpEx}", 'mode=smilies&amp;f=' . $forum_id)));
    }
    if ($mode == 'window') {
        page_footer();
    }
}
Beispiel #29
0
function batch_footer()
{
    if (require_get("key", false)) {
        // we're running from a web browser
        // include page gen times etc
        page_footer();
    } else {
        // we are running from the CLI
        // we still need to calculate performance metrics
        performance_metrics_page_end();
    }
}
function handle_event($location, $baseLink = false, $needHeader = false)
{
    if ($baseLink === false) {
        global $PHP_SELF;
        $baseLink = substr($PHP_SELF, strrpos($PHP_SELF, "/") + 1) . "?";
    } else {
        //debug("Base link was specified as $baseLink");
        //debug(debug_backtrace());
    }
    global $session, $playermount, $badguy;
    $skipdesc = false;
    tlschema("events");
    $allowinactive = false;
    $eventhandler = httpget('eventhandler');
    if ($session['user']['superuser'] & SU_DEVELOPER && $eventhandler != "") {
        $allowinactive = true;
        $array = preg_split("/[:-]/", $eventhandler);
        if ($array[0] == "module") {
            $session['user']['specialinc'] = "module:" . $array[1];
        } else {
            $session['user']['specialinc'] = "";
        }
    }
    $_POST['i_am_a_hack'] = 'true';
    if ($session['user']['specialinc'] != "") {
        $specialinc = $session['user']['specialinc'];
        $session['user']['specialinc'] = "";
        if ($needHeader !== false) {
            page_header($needHeader);
        }
        output("`^`c`bSomething Special!`c`b`0");
        if (strchr($specialinc, ":")) {
            $array = split(":", $specialinc);
            $starttime = getmicrotime();
            module_do_event($location, $array[1], $allowinactive, $baseLink);
            $endtime = getmicrotime();
            if ($endtime - $starttime >= 1.0 && $session['user']['superuser'] & SU_DEBUG_OUTPUT) {
                debug("Slow Event (" . round($endtime - $starttime, 2) . "s): {$hookname} - {$row['modulename']}`n");
            }
        }
        if (checknavs()) {
            // The page rendered some linkage, so we just want to exit.
            page_footer();
        } else {
            $skipdesc = true;
            $session['user']['specialinc'] = "";
            $session['user']['specialmisc'] = "";
            httpset("op", "");
        }
    }
    tlschema();
    return $skipdesc;
}