当前位置: 首页>>代码示例>>PHP>>正文


PHP template::page_header方法代码示例

本文整理汇总了PHP中template::page_header方法的典型用法代码示例。如果您正苦于以下问题:PHP template::page_header方法的具体用法?PHP template::page_header怎么用?PHP template::page_header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在template的用法示例。


在下文中一共展示了template::page_header方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ShowTopKB

function ShowTopKB()
{
    global $USER, $PLANET, $LNG, $db;
    $mode = request_var('mode', '');
    $template = new template();
    switch ($mode) {
        case "showkb":
            $template->page_header();
            $template->page_footer();
            includeLang('FLEET');
            $ReportID = request_var('rid', '');
            if (file_exists(ROOT_PATH . 'raports/topkb_' . $ReportID . '.php')) {
                require_once ROOT_PATH . 'raports/topkb_' . $ReportID . '.php';
                $RaportRAW = $db->uniquequery("SELECT `angreifer`, `defender` FROM " . TOPKB . " WHERE `rid` = '" . $db->sql_escape($ReportID) . "';");
            } else {
                $RaportRAW = $db->uniquequery("SELECT * FROM " . TOPKB . " WHERE `rid` = '" . $db->sql_escape($ReportID) . "';");
                $raport = stripslashes($RaportRAW['raport']);
                foreach ($LNG['tech_rc'] as $id => $s_name) {
                    $str_replace1 = array("[ship[" . $id . "]]");
                    $str_replace2 = array($s_name);
                    $raport = str_replace($str_replace1, $str_replace2, $raport);
                }
            }
            foreach ($LNG['tech_rc'] as $id => $s_name) {
                $ship[] = "[ship[" . $id . "]]";
                $shipname[] = $s_name;
            }
            $template->assign_vars(array('attacker' => $RaportRAW['angreifer'], 'defender' => $RaportRAW['defender'], 'report' => $raport));
            $template->show("topkb_report.tpl");
            break;
        default:
            $PlanetRess = new ResourceUpdate();
            $PlanetRess->CalcResource();
            $PlanetRess->SavePlanetToDB();
            $template->page_header();
            $template->page_topnav();
            $template->page_leftmenu();
            $template->page_planetmenu();
            $template->page_footer();
            $top = $db->query("SELECT * FROM " . TOPKB . " ORDER BY gesamtunits DESC LIMIT 100;");
            while ($data = $db->fetch_array($top)) {
                $TopKBList[] = array('result' => $data['fleetresult'], 'time' => date("D d M H:i:s", $data['time']), 'units' => pretty_number($data['gesamtunits']), 'rid' => $data['rid'], 'attacker' => $data['angreifer'], 'defender' => $data['defender'], 'result' => $data['fleetresult']);
            }
            $db->free_result($top);
            $template->assign_vars(array('tkb_units' => $LNG['tkb_units'], 'tkb_datum' => $LNG['tkb_datum'], 'tkb_owners' => $LNG['tkb_owners'], 'tkb_platz' => $LNG['tkb_platz'], 'tkb_top' => $LNG['tkb_top'], 'tkb_gratz' => $LNG['tkb_gratz'], 'tkb_legende' => $LNG['tkb_legende'], 'tkb_gewinner' => $LNG['tkb_gewinner'], 'tkb_verlierer' => $LNG['tkb_verlierer'], 'TopKBList' => $TopKBList));
            $template->show("topkb_overview.tpl");
            break;
    }
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:49,代码来源:ShowTopKB.php

示例2: ShowTechTreePage

function ShowTechTreePage()
{
    global $resource, $requeriments, $LNG, $reslist, $USER, $PLANET;
    $PlanetRess = new ResourceUpdate();
    $PlanetRess->CalcResource();
    $PlanetRess->SavePlanetToDB();
    $template = new template();
    $template->page_header();
    $template->page_topnav();
    $template->page_leftmenu();
    $template->page_planetmenu();
    $template->page_footer();
    $RequeriList = array();
    foreach ($LNG['tech'] as $Element => $ElementName) {
        if (in_array($Element, $reslist['dmfunc'])) {
            continue;
        }
        if (!isset($resource[$Element])) {
            $TechTreeList[] = $ElementName;
        } else {
            if (isset($requeriments[$Element])) {
                foreach ($requeriments[$Element] as $RegID => $RedCount) {
                    $RequeriList[$Element][] = array('id' => $RegID, 'count' => $RedCount, 'own' => isset($PLANET[$resource[$RegID]]) ? $PLANET[$resource[$RegID]] : $USER[$resource[$RegID]]);
                }
            }
            $TechTreeList[] = array('id' => $Element, 'name' => $ElementName, 'need' => $RequeriList);
        }
    }
    $template->assign_vars(array('TechTreeList' => $TechTreeList, 'tt_requirements' => $LNG['tt_requirements'], 'LNG' => $LNG['tech'], 'tt_lvl' => $LNG['tt_lvl']));
    $template->show("techtree_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:31,代码来源:ShowTechTreePage.php

示例3: ShowRecordsPage

function ShowRecordsPage()
{
    global $USER, $PLANET, $LNG, $resource, $db, $CONF;
    require_once ROOT_PATH . "cache/CacheRecords.php";
    $PlanetRess = new ResourceUpdate();
    $PlanetRess->CalcResource();
    $PlanetRess->SavePlanetToDB();
    $template = new template();
    $template->page_header();
    $template->page_topnav();
    $template->page_leftmenu();
    $template->page_planetmenu();
    $template->page_footer();
    foreach ($RecordsArray as $ElementID => $ElementIDArray) {
        if ($ElementID >= 1 && $ElementID <= 39 || $ElementID == 44) {
            $Builds[$LNG['tech'][$ElementID]] = array('winner' => $ElementIDArray['maxlvl'] != 0 ? $ElementIDArray['username'] : $LNG['rec_rien'], 'count' => $ElementIDArray['maxlvl'] != 0 ? pretty_number($ElementIDArray['maxlvl']) : $LNG['rec_rien']);
        } elseif ($ElementID >= 41 && $ElementID <= 99 && $ElementID != 44) {
            $MoonsBuilds[$LNG['tech'][$ElementID]] = array('winner' => $ElementIDArray['maxlvl'] != 0 ? $ElementIDArray['username'] : $LNG['rec_rien'], 'count' => $ElementIDArray['maxlvl'] != 0 ? pretty_number($ElementIDArray['maxlvl']) : $LNG['rec_rien']);
        } elseif ($ElementID >= 101 && $ElementID <= 199) {
            $Techno[$LNG['tech'][$ElementID]] = array('winner' => $ElementIDArray['maxlvl'] != 0 ? $ElementIDArray['username'] : $LNG['rec_rien'], 'count' => $ElementIDArray['maxlvl'] != 0 ? pretty_number($ElementIDArray['maxlvl']) : $LNG['rec_rien']);
        } elseif ($ElementID >= 201 && $ElementID <= 399) {
            $Fleet[$LNG['tech'][$ElementID]] = array('winner' => $ElementIDArray['maxlvl'] != 0 ? $ElementIDArray['username'] : $LNG['rec_rien'], 'count' => $ElementIDArray['maxlvl'] != 0 ? pretty_number($ElementIDArray['maxlvl']) : $LNG['rec_rien']);
        } elseif ($ElementID >= 401 && $ElementID <= 599) {
            $Defense[$LNG['tech'][$ElementID]] = array('winner' => $ElementIDArray['maxlvl'] != 0 ? $ElementIDArray['username'] : $LNG['rec_rien'], 'count' => $ElementIDArray['maxlvl'] != 0 ? pretty_number($ElementIDArray['maxlvl']) : $LNG['rec_rien']);
        }
    }
    $Records = array($LNG['rec_build'] => $Builds, $LNG['rec_specb'] => $MoonsBuilds, $LNG['rec_techn'] => $Techno, $LNG['rec_fleet'] => $Fleet, $LNG['rec_defes'] => $Defense);
    $template->assign_vars(array('Records' => $Records, 'update' => sprintf($LNG['rec_last_update_on'], date("d. M Y, H:i:s", $CONF['stat_last_update'])), 'level' => $LNG['rec_level'], 'player' => $LNG['rec_playe']));
    $template->show("records_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:30,代码来源:ShowRecordsPage.php

示例4: ShowTeamspeakPage

function ShowTeamspeakPage()
{
    global $CONF, $LNG;
    if ($_POST) {
        if (isset($_POST['ts_on']) && $_POST['ts_on'] == 'on') {
            $CONF['ts_modon'] = 1;
        } else {
            $CONF['ts_modon'] = 0;
        }
        $CONF['ts_server'] = request_var('ts_ip', '');
        $CONF['ts_tcpport'] = request_var('ts_tcp', 0);
        $CONF['ts_udpport'] = request_var('ts_udp', 0);
        $CONF['ts_timeout'] = request_var('ts_to', 0);
        $CONF['ts_version'] = request_var('ts_v', 0);
        update_config('ts_timeout', $CONF['ts_timeout']);
        update_config('ts_modon', $CONF['ts_modon']);
        update_config('ts_server', $CONF['ts_server']);
        update_config('ts_tcpport', $CONF['ts_tcpport']);
        update_config('ts_udpport', $CONF['ts_udpport']);
        update_config('ts_version', $CONF['ts_version']);
    }
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('se_save_parameters' => $LNG['se_save_parameters'], 'ts_tcpport' => $LNG['ts_tcpport'], 'ts_serverip' => $LNG['ts_serverip'], 'ts_version' => $LNG['ts_version'], 'ts_active' => $LNG['ts_active'], 'ts_settings' => $LNG['ts_settings'], 'ts_udpport' => $LNG['ts_udpport'], 'ts_timeout' => $LNG['ts_timeout'], 'ts_server_query' => $LNG['ts_server_query'], 'ts_server_id' => $LNG['ts_server_id'], 'ts_to' => $CONF['ts_timeout'], 'ts_on' => $CONF['ts_modon'], 'ts_ip' => $CONF['ts_server'], 'ts_tcp' => $CONF['ts_tcpport'], 'ts_udp' => $CONF['ts_udpport'], 'ts_v' => $CONF['ts_version']));
    $template->show('adm/TeamspeakPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:26,代码来源:ShowTeamspeakPage.php

示例5: ShowSendMessagesPage

function ShowSendMessagesPage()
{
    global $USER, $LNG, $db;
    if ($_GET['mode'] == 'send') {
        switch ($USER['authlevel']) {
            case AUTH_MOD:
                $color = 'yellow';
                break;
            case AUTH_OPS:
                $color = 'skyblue';
                break;
            case AUTH_ADM:
                $color = 'red';
                break;
        }
        $Subject = makebr(request_var('subject', '', true));
        $Message = makebr(request_var('text', '', true));
        if (!empty($Message) && !empty($Subject)) {
            $Time = TIMESTAMP;
            $From = '<span style="color:' . $color . ';">' . $LNG['user_level'][$USER['authlevel']] . ' ' . $USER['username'] . '</span>';
            $Subject = '<span style="color:' . $color . ';">' . $Subject . '</span>';
            $Message = '<span style="color:' . $color . ';font-weight:bold;">' . $Message . '</span>';
            SendSimpleMessage(0, $USER['id'], TIMESTAMP, 50, $From, $Subject, $Message, 0);
            $db->query("UPDATE " . USERS . " SET `new_gmessage` = `new_gmessage` + '1';");
            exit($LNG['ma_message_sended']);
        } else {
            exit($LNG['ma_subject_needed']);
        }
    }
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('mg_empty_text' => $LNG['mg_empty_text'], 'ma_subject' => $LNG['ma_subject'], 'ma_none' => $LNG['ma_none'], 'ma_message' => $LNG['ma_message'], 'ma_send_global_message' => $LNG['ma_send_global_message'], 'ma_characters' => $LNG['ma_characters'], 'button_submit' => $LNG['button_submit']));
    $template->show('adm/SendMessagesPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:34,代码来源:ShowSendMessagesPage.php

示例6: ShowNewsPage

function ShowNewsPage()
{
    global $LNG, $db, $USER;
    if ($_GET['action'] == 'send') {
        $edit_id = request_var('id', 0);
        $title = $db->sql_escape(request_var('title', '', true));
        $text = $db->sql_escape(request_var('text', '', true));
        $query = $_GET['mode'] == 2 ? "INSERT INTO " . NEWS . " (`id` ,`user` ,`date` ,`title` ,`text`) VALUES ( NULL , '" . $USER['username'] . "', '" . TIMESTAMP . "', '" . $title . "', '" . $text . "');" : "UPDATE " . NEWS . " SET `title` = '" . $title . "', `text` = '" . $text . "', `date` = '" . TIMESTAMP . "' WHERE `id` = '" . $edit_id . "' LIMIT 1;";
        $db->query($query);
    } elseif ($_GET['action'] == 'delete' && isset($_GET['id'])) {
        $db->query("DELETE FROM " . NEWS . " WHERE `id` = '" . request_var('id', 0) . "';");
    }
    $query = $db->query("SELECT * FROM " . NEWS . " ORDER BY id ASC");
    while ($u = $db->fetch_array($query)) {
        $NewsList[] = array('id' => $u['id'], 'title' => $u['title'], 'date' => date("d.m.Y H:i:s", $u['date']), 'user' => $u['user'], 'confirm' => sprintf($LNG['nws_confirm'], $u['title']));
    }
    $template = new template();
    $template->page_header();
    if ($_GET['action'] == 'edit' && isset($_GET['id'])) {
        $News = $db->uniquequery("SELECT id, title, text FROM " . NEWS . " WHERE id = '" . $db->sql_escape($_GET['id']) . "';");
        $template->assign_vars(array('mode' => 1, 'nws_head' => sprintf($LNG['nws_head_edit'], $News['title']), 'news_id' => $News['id'], 'news_title' => $News['title'], 'news_text' => $News['text']));
    } elseif ($_GET['action'] == 'create') {
        $template->assign_vars(array('mode' => 2, 'nws_head' => $LNG['nws_head_create']));
    }
    $template->assign_vars(array('NewsList' => $NewsList, 'button_submit' => $LNG['button_submit'], 'nws_total' => sprintf($LNG['nws_total'], count($NewsList)), 'nws_news' => $LNG['nws_news'], 'nws_id' => $LNG['nws_id'], 'nws_title' => $LNG['nws_title'], 'nws_date' => $LNG['nws_date'], 'nws_from' => $LNG['nws_from'], 'nws_del' => $LNG['nws_del'], 'nws_create' => $LNG['nws_create'], 'nws_content' => $LNG['nws_content']));
    $template->show('adm/NewsPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:27,代码来源:ShowNewsPage.php

示例7: ShowModVersionPage

function ShowModVersionPage()
{
    global $LNG, $USER;
    $MVC = array();
    $Files = scandir(ROOT_PATH . 'includes/functions/mvc/');
    foreach ($Files as $File) {
        if (substr($File, 0, 4) == 'mvc_') {
            require ROOT_PATH . 'includes/functions/mvc/' . $File;
        }
    }
    foreach ($MVC as &$Mod) {
        $Mod['description'] = $Mod['description'][$USER['lang']];
        $Update = @simplexml_load_file($Mod['update']);
        $Update = $Update->{$Mod}['tag'];
        if (version_compare($Mod['version'], $Update->version, '<')) {
            $Mod['update'] = colorRed($LNG['mvc_update_yes']);
            $Mod['udetails'] = array('version' => $Update->version, 'date' => $Update->date, 'download' => $Update->download, 'announcement' => $Update->announcement);
        } else {
            $Mod['update'] = colorGreen($LNG['mvc_update_no']);
            $Mod['udetails'] = false;
        }
    }
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('MVC' => $MVC, 'mvc_title' => $LNG['mvc_title'], 'mvc_author' => $LNG['mvc_author'], 'mvc_version' => $LNG['mvc_version'], 'mvc_link' => $LNG['mvc_link'], 'mvc_update_version' => $LNG['mvc_update_version'], 'mvc_update_date' => $LNG['mvc_update_date'], 'mvc_announcement' => $LNG['mvc_announcement'], 'mvc_download' => $LNG['mvc_download'], 'mvc_desc' => $LNG['mvc_desc']));
    $template->show('adm/ModVersionPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:27,代码来源:ShowModVersionPage.php

示例8: ShowMenuPage

function ShowMenuPage()
{
    global $USER, $LNG;
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('rights' => $USER['rights'], 'mu_game_info' => $LNG['mu_game_info'], 'mu_settings' => $LNG['mu_settings'], 'mu_ts_options' => $LNG['mu_ts_options'], 'mu_fb_options' => $LNG['mu_fb_options'], 'mu_module' => $LNG['mu_module'], 'mu_user_logs' => $LNG['mu_user_logs'], 'mu_optimize_db' => $LNG['mu_optimize_db'], 'mu_stats_options' => $LNG['mu_stats_options'], 'mu_chat' => $LNG['mu_chat'], 'mu_update' => $LNG['mu_update'], 'mu_general' => $LNG['mu_general'], 'new_creator_title' => $LNG['new_creator_title'], 'mu_add_delete_resources' => $LNG['mu_add_delete_resources'], 'mu_ban_options' => $LNG['mu_ban_options'], 'mu_users_settings' => $LNG['mu_users_settings'], 'mu_tools' => $LNG['mu_tools'], 'mu_manual_points_update' => $LNG['mu_manual_points_update'], 'mu_global_message' => $LNG['mu_global_message'], 'mu_md5_encripter' => $LNG['mu_md5_encripter'], 'mu_mpu_confirmation' => $LNG['mu_mpu_confirmation'], 'mu_observation' => $LNG['mu_observation'], 'mu_connected' => $LNG['mu_connected'], 'mu_support' => $LNG['mu_support'], 'mu_vaild_users' => $LNG['mu_vaild_users'], 'mu_active_planets' => $LNG['mu_active_planets'], 'mu_flying_fleets' => $LNG['mu_flying_fleets'], 'mu_news' => $LNG['mu_news'], 'mu_user_list' => $LNG['mu_user_list'], 'mu_planet_list' => $LNG['mu_planet_list'], 'mu_moon_list' => $LNG['mu_moon_list'], 'mu_mess_list' => $LNG['mu_mess_list'], 'mu_info_account_page' => $LNG['mu_info_account_page'], 'mu_search_page' => $LNG['mu_search_page'], 'mu_mod_update' => $LNG['mu_mod_update'], 'mu_clear_cache' => $LNG['mu_clear_cache']));
    $template->show('adm/ShowMenuPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:8,代码来源:ShowMenuPage.php

示例9: ShowTopnavPage

function ShowTopnavPage()
{
    global $LNG, $USER;
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('ad_authlevel_title' => $LNG['ad_authlevel_title'], 're_reset_universe' => $LNG['re_reset_universe'], 'mu_moderation_page' => $LNG['mu_moderation_page'], 'adm_cp_title' => $LNG['adm_cp_title'], 'adm_cp_index' => $LNG['adm_cp_index'], 'adm_cp_logout' => $LNG['adm_cp_logout'], 'sid' => session_id(), 'id' => $USER['id'], 'authlevel' => $USER['authlevel']));
    $template->show('adm/ShowTopnavPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:8,代码来源:ShowTopnavPage.php

示例10: ShowInformationPage

function ShowInformationPage()
{
    global $db, $LNG;
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('info_information' => $LNG['info_information'], 'info' => $_SERVER['SERVER_SOFTWARE'], 'vPHP' => PHP_VERSION, 'vAPI' => PHP_SAPI, 'vGame' => VERSION, 'vMySQLc' => $db->getVersion(), 'vMySQLs' => $db->getServerVersion(), 'root' => $_SERVER['SERVER_NAME'], 'gameroot' => $_SERVER['SERVER_NAME'] . str_replace('/admin.php', '', $_SERVER['PHP_SELF']), 'json' => function_exists('json_encode') ? 'Ja' : 'Nein', 'browser' => $_SERVER['HTTP_USER_AGENT']));
    $template->show('adm/ShowInformationPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:8,代码来源:ShowInformationPage.php

示例11: ShowPassEncripterPage

function ShowPassEncripterPage()
{
    global $LNG;
    $Password = request_var('md5q', '', true);
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('md5_md5' => $Password, 'md5_enc' => md5($Password), 'et_md5_encripter' => $LNG['et_md5_encripter'], 'et_encript' => $LNG['et_encript'], 'et_result' => $LNG['et_result'], 'et_pass' => $LNG['et_pass']));
    $template->show('adm/PassEncripterPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:9,代码来源:ShowPassEncripterPage.php

示例12: ShowFleetShortcuts

function ShowFleetShortcuts()
{
    global $USER, $LNG, $db;
    $a = request_var('a', '');
    $mode = request_var('mode', '');
    $template = new template();
    $template->page_header();
    $template->page_footer();
    if ($mode == "add") {
        if ($_POST) {
            $name = request_var('n', $LNG['fl_anonymous']);
            $gala = request_var('g', 0);
            $sys = request_var('s', 0);
            $plan = request_var('p', 0);
            $type = request_var('t', 0);
            $USER['fleet_shortcut'] .= $name . ',' . $gala . ',' . $sys . ',' . $plan . ',' . $type . "\r\n";
            $db->query("UPDATE " . USERS . " SET `fleet_shortcut` = '" . $USER['fleet_shortcut'] . "' WHERE `id` = '" . $USER['id'] . "';");
            redirectTo("game." . PHP_EXT . "?page=shortcuts");
        }
        $template->assign_vars(array('fl_shortcut_add_title' => $LNG['fl_shortcut_add_title'], 'fl_clean' => $LNG['fl_clean'], 'fl_register_shorcut' => $LNG['fl_register_shorcut'], 'fl_back' => $LNG['fl_back'], 'typeselector' => array(1 => $LNG['fl_planet'], 2 => $LNG['fl_debris'], 3 => $LNG['fl_moon'])));
        $template->show("fleet_shortcuts_add.tpl");
    } elseif (is_numeric($a)) {
        $scarray = explode("\r\n", $USER['fleet_shortcut']);
        $r = explode(",", $scarray[$a]);
        if ($_POST) {
            if ($_POST['delete']) {
                unset($scarray[$a]);
            } else {
                $r[0] = request_var('n', '');
                $r[1] = request_var('g', 0);
                $r[2] = request_var('s', 0);
                $r[3] = request_var('p', 0);
                $r[4] = request_var('t', 0);
                $scarray[$a] = implode(",", $r);
            }
            $USER['fleet_shortcut'] = implode("\r\n", $scarray);
            $db->query("UPDATE " . USERS . " SET fleet_shortcut='" . $USER['fleet_shortcut'] . "' WHERE id=" . $USER['id'] . ";");
            exit(redirectTo("game." . PHP_EXT . "?page=shortcuts"));
        }
        if (empty($USER['fleet_shortcut'])) {
            redirectTo("game." . PHP_EXT . "?page=shortcuts");
        }
        $template->assign_vars(array('fl_back' => $LNG['fl_back'], 'fl_shortcut_edition' => $LNG['fl_shortcut_edition'], 'fl_reset_shortcut' => $LNG['fl_reset_shortcut'], 'fl_register_shorcut' => $LNG['fl_register_shorcut'], 'fl_dlte_shortcut' => $LNG['fl_dlte_shortcut'], 'typeselector' => array(1 => $LNG['fl_planet'], 2 => $LNG['fl_debris'], 3 => $LNG['fl_moon']), 'name' => $r[0], 'galaxy' => $r[1], 'system' => $r[2], 'planet' => $r[3], 'type' => $r[4], 'id' => $a));
        $template->show("fleet_shortcuts_edit.tpl");
    } else {
        $scarray = explode("\r\n", $USER['fleet_shortcut']);
        foreach ($scarray as $b) {
            if (empty($b)) {
                continue;
            }
            $c = explode(',', $b);
            $ShortCuts[] = array('name' => $c[0], 'galaxy' => $c[1], 'system' => $c[2], 'planet' => $c[3], 'type' => $c[4]);
        }
        $template->assign_vars(array('ShortCuts' => $ShortCuts, 'fl_back' => $LNG['fl_back'], 'fl_planet_shortcut' => $LNG['fl_planet_shortcut'], 'fl_moon_shortcut' => $LNG['fl_moon_shortcut'], 'fl_debris_shortcut' => $LNG['fl_debris_shortcut'], 'fl_no_shortcuts' => $LNG['fl_no_shortcuts'], 'fl_shortcuts' => $LNG['fl_shortcuts'], 'fl_shortcut_add' => $LNG['fl_shortcut_add']));
        $template->show("fleet_shortcuts.tpl");
    }
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:57,代码来源:ShowFleetShortcuts.php

示例13: ShowLogoutPage

function ShowLogoutPage()
{
    global $LNG, $SESSION;
    $SESSION->DestroySession();
    $template = new template();
    $template->page_header();
    $template->page_footer();
    $template->assign_vars(array('lo_title' => $LNG['lo_title'], 'lo_logout' => $LNG['lo_logout'], 'lo_redirect' => $LNG['lo_redirect'], 'lo_notify' => $LNG['lo_notify'], 'lo_continue' => $LNG['lo_continue']));
    $template->show("logout_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:10,代码来源:ShowLogoutPage.php

示例14: __construct

 public function __construct()
 {
     global $USER, $PLANET, $dpath, $resource, $LNG, $db, $reslist;
     $template = new template();
     $template->page_header();
     $template->page_topnav();
     $template->page_leftmenu();
     $template->page_planetmenu();
     $template->page_footer();
     $template->loadscript('galaxy.js');
     $maxfleet = $db->num_rows($db->query("SELECT fleet_id FROM " . FLEETS . " WHERE `fleet_owner` = '" . $USER['id'] . "' AND `fleet_mission` != 10;"));
     $mode = request_var('mode', 0);
     $galaxyLeft = request_var('galaxyLeft', '');
     $galaxyRight = request_var('galaxyRight', '');
     $systemLeft = request_var('systemLeft', '');
     $systemRight = request_var('systemRight', '');
     $galaxy = min(max(abs(request_var('galaxy', $PLANET['galaxy'])), 1), MAX_GALAXY_IN_WORLD);
     $system = min(max(abs(request_var('system', $PLANET['system'])), 1), MAX_SYSTEM_IN_GALAXY);
     $planet = min(max(abs(request_var('planet', $PLANET['planet'])), 1), MAX_PLANET_IN_SYSTEM);
     $current = request_var('current', 0);
     if ($mode == 1) {
         if (!empty($galaxyLeft)) {
             $galaxy = max($galaxy - 1, 1);
         } elseif (!empty($galaxyRight)) {
             $galaxy = min($galaxy + 1, MAX_GALAXY_IN_WORLD);
         }
         if (!empty($systemLeft)) {
             $system = max($system - 1, 1);
         } elseif (!empty($systemRight)) {
             $system = min($system + 1, MAX_SYSTEM_IN_GALAXY);
         }
     }
     if (!($galaxy == $PLANET['galaxy'] && $system == $PLANET['system']) && $mode != 0) {
         if ($PLANET['deuterium'] < 10) {
             $template->message($LNG['gl_no_deuterium_to_view_galaxy'], "game.php?page=galaxy&mode=0", 2);
             exit;
         } else {
             $PLANET['deuterium'] -= 10;
         }
     }
     $PlanetRess = new ResourceUpdate();
     $PlanetRess->CalcResource();
     $PlanetRess->SavePlanetToDB();
     unset($reslist['defense'][array_search(502, $reslist['defense'])]);
     $MissleSelector[0] = $LNG['gl_all_defenses'];
     foreach ($reslist['defense'] as $Element) {
         $MissleSelector[$Element] = $LNG['tech'][$Element];
     }
     $Result = $this->ShowGalaxyRows($galaxy, $system);
     $template->assign_vars(array('GalaxyRows' => $Result['Result'], 'planetcount' => sprintf($LNG['gl_populed_planets'], $Result['planetcount']), 'mode' => $mode, 'galaxy' => $galaxy, 'system' => $system, 'planet' => $planet, 'current' => $current, 'currentmip' => pretty_number($PLANET[$resource[503]]), 'maxfleetcount' => $maxfleet, 'fleetmax' => $USER['computer_tech'] + 1 + $USER['rpg_commandant'] * COMMANDANT, 'grecyclers' => pretty_number($PLANET[$resource[219]]), 'recyclers' => pretty_number($PLANET[$resource[209]]), 'spyprobes' => pretty_number($PLANET[$resource[210]]), 'missile_count' => sprintf($LNG['gl_missil_to_launch'], $PLANET[$resource[503]]), 'spio_anz' => $USER['spio_anz'], 'settings_fleetactions' => $USER['settings_fleetactions'], 'current_galaxy' => $PLANET['galaxy'], 'current_system' => $PLANET['system'], 'current_planet' => $PLANET['planet'], 'planet_type' => $PLANET['planet_type'], 'MissleSelector' => $MissleSelector, 'gl_solar_system' => $LNG['gl_solar_system'], 'gl_galaxy' => $LNG['gl_galaxy'], 'gl_missil_launch_action' => $LNG['gl_missil_launch_action'], 'gl_objective' => $LNG['gl_objective'], 'gl_missil_launch' => $LNG['gl_missil_launch'], 'gl_pos' => $LNG['gl_pos'], 'gl_planet' => $LNG['gl_planet'], 'gl_alliance' => $LNG['gl_alliance'], 'gl_actions' => $LNG['gl_actions'], 'gl_name_activity' => $LNG['gl_name_activity'], 'gl_player_estate' => $LNG['gl_player_estate'], 'gl_debris' => $LNG['gl_debris'], 'gl_moon' => $LNG['gl_moon'], 'gl_show' => $LNG['gl_show'], 'gl_out_space' => $LNG['gl_out_space'], 'gl_legend' => $LNG['gl_legend'], 'gl_strong_player' => $LNG['gl_strong_player'], 'gl_s' => $LNG['gl_s'], 'gl_week_player' => $LNG['gl_week_player'], 'gl_w' => $LNG['gl_w'], 'gl_vacation' => $LNG['gl_vacation'], 'gl_v' => $LNG['gl_v'], 'gl_banned' => $LNG['gl_banned'], 'gl_b' => $LNG['gl_b'], 'gl_inactive_seven' => $LNG['gl_inactive_seven'], 'gl_i' => $LNG['gl_i'], 'gl_inactive_twentyeight' => $LNG['gl_inactive_twentyeight'], 'gl_I' => $LNG['gl_I'], 'gl_avaible_grecyclers' => $LNG['gl_avaible_grecyclers'], 'gl_avaible_recyclers' => $LNG['gl_avaible_recyclers'], 'gl_avaible_spyprobes' => $LNG['gl_avaible_spyprobes'], 'gl_fleets' => $LNG['gl_fleets'], 'gl_avaible_missiles' => $LNG['gl_avaible_missiles'], 'gl_moon' => $LNG['gl_moon'], 'gl_diameter' => $LNG['gl_diameter'], 'gl_features' => $LNG['gl_features'], 'gl_temperature' => $LNG['gl_temperature'], 'gl_actions' => $LNG['gl_actions'], 'gl_debris_field' => $LNG['gl_debris_field'], 'gl_resources' => $LNG['gl_resources'], 'gl_collect' => $LNG['gl_collect'], 'gl_with' => $LNG['gl_with'], 'gl_alliance_page' => $LNG['gl_alliance_page'], 'gl_see_on_stats' => $LNG['gl_see_on_stats'], 'gl_alliance_web_page' => $LNG['gl_alliance_web_page'], 'gl_spy' => $LNG['gl_spy'], 'gl_buddy_request' => $LNG['gl_buddy_request'], 'gl_missile_attack' => $LNG['gl_missile_attack'], 'gl_player' => $LNG['gl_player'], 'gl_playercard' => $LNG['gl_playercard'], 'gl_phalanx' => $LNG['gl_phalanx'], 'gl_points' => $LNG['gl_points'], 'gl_ajax_status_ok' => $LNG['gl_ajax_status_ok'], 'gl_ajax_status_fail' => $LNG['gl_ajax_status_fail'], 'write_message' => $LNG['write_message']));
     $template->show('galaxy_overview.tpl');
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:52,代码来源:class.ShowGalaxyPage.php

示例15: ShowFlyingFleetPage

function ShowFlyingFleetPage()
{
    global $LNG, $db;
    $id = request_var('id', 0);
    if (!empty($id)) {
        $db->query("UPDATE " . FLEETS . " SET `fleet_busy` = '" . request_var('lock', 0) . "' WHERE `fleet_id` = '" . $id . "';");
    }
    $FlyingFleetsTable = new FlyingFleetsTable();
    $template = new template();
    $template->page_header();
    $template->assign_vars(array('FleetList' => $FlyingFleetsTable->BuildFlyingFleetTable(), 'ff_id' => $LNG['ff_id'], 'ff_ammount' => $LNG['ff_ammount'], 'ff_mission' => $LNG['ff_mission'], 'ff_beginning' => $LNG['ff_beginning'], 'ff_departure' => $LNG['ff_departure'], 'ff_departure_hour' => $LNG['ff_departure_hour'], 'ff_objective' => $LNG['ff_objective'], 'ff_arrival' => $LNG['ff_arrival'], 'ff_arrival_hour' => $LNG['ff_arrival_hour'], 'ff_hold_position' => $LNG['ff_hold_position'], 'ff_lock' => $LNG['ff_lock'], 'ff_no_fleets' => $LNG['ff_no_fleets']));
    $template->show('adm/FlyingFleetPage.tpl');
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:13,代码来源:ShowFlyingFleetPage.php


注:本文中的template::page_header方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。