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


PHP template::page_footer方法代码示例

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


在下文中一共展示了template::page_footer方法的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: 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

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

示例6: __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

示例7: ShowIndexPage

 private function ShowIndexPage()
 {
     global $LNG, $db, $USER;
     $template = new template();
     $template->page_header();
     $template->page_footer();
     $NotesRAW = $db->query("SELECT * FROM " . NOTES . " WHERE owner = " . $USER['id'] . " ORDER BY time DESC;");
     while ($Note = $db->fetch_array($NotesRAW)) {
         $NoteList[] = array('id' => $Note['id'], 'time' => date("d. M y H:i:s", $Note['time']), 'title' => $Note['title'], 'size' => strlen($Note['text']), 'priority' => $Note['priority']);
     }
     $template->assign_vars(array('NoteList' => $NoteList, 'nt_priority' => $LNG['nt_you_dont_have_notes'], 'nt_size_note' => $LNG['nt_size_note'], 'nt_date_note' => $LNG['nt_date_note'], 'nt_notes' => $LNG['nt_notes'], 'nt_create_new_note' => $LNG['nt_create_new_note'], 'nt_subject_note' => $LNG['nt_subject_note'], 'nt_dlte_note' => $LNG['nt_dlte_note'], 'nt_you_dont_have_notes' => $LNG['nt_you_dont_have_notes']));
     $template->show('notes_body.tpl');
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:13,代码来源:class.ShowNotesPage.php

示例8: ShowSearchPage

function ShowSearchPage()
{
    global $USER, $PLANET, $dpath, $LNG, $db;
    $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();
    $type = request_var('type', '');
    $searchtext = request_var('searchtext', '');
    switch ($type) {
        case 'playername':
            $search = $db->query("SELECT a.id, a.username, a.ally_id, a.ally_name, a.galaxy, a.system, a.planet, b.name, c.total_rank FROM " . USERS . " as a LEFT JOIN " . PLANETS . " as b ON b.id = a.id_planet LEFT JOIN " . STATPOINTS . " as c ON c.stat_type = 1 AND c.id_owner = a.id WHERE a.username LIKE '%" . $db->sql_escape($searchtext, true) . "%' LIMIT 25;");
            while ($s = $db->fetch_array($search)) {
                $SearchResult[] = array('planetname' => $s['name'], 'username' => $s['username'], 'userid' => $s['id'], 'allyname' => $s['ally_name'], 'allyid' => $s['ally_id'], 'galaxy' => $s['galaxy'], 'system' => $s['system'], 'planet' => $s['planet'], 'rank' => $s['total_rank']);
            }
            $db->free_result($search);
            break;
        case 'planetname':
            $search = $db->query("SELECT a.name, a.galaxy, a.planet, a.system, b.ally_name, b.id, b.ally_id, b.username, c.total_rank FROM " . PLANETS . " as a LEFT JOIN " . USERS . " as b ON b.id = a.id_owner LEFT JOIN  " . STATPOINTS . " as c ON c.stat_type = 1 AND c.id_owner = b.id  WHERE a.name LIKE '%" . $db->sql_escape($searchtext, true) . "%' LIMIT 25;");
            while ($s = $db->fetch_array($search)) {
                $SearchResult[] = array('planetname' => $s['name'], 'username' => $s['username'], 'userid' => $s['id'], 'allyname' => $s['ally_name'], 'allyid' => $s['ally_id'], 'galaxy' => $s['galaxy'], 'system' => $s['system'], 'planet' => $s['planet'], 'rank' => $s['total_rank']);
            }
            $db->free_result($search);
            break;
        case "allytag":
            $search = $db->query("SELECT a.ally_name, a.ally_tag, a.ally_members, b.total_points FROM " . ALLIANCE . " as a, " . STATPOINTS . " as b WHERE b.stat_type = 1 AND b.id_owner = a.id AND a.ally_tag LIKE '%" . $db->sql_escape($searchtext, true) . "%' LIMIT 25;");
            while ($s = $db->fetch_array($search)) {
                $SearchResult[] = array('allypoints' => pretty_number($s['total_points']), 'allytag' => $s['ally_tag'], 'allymembers' => $s['ally_members'], 'allyname' => $s['ally_name']);
            }
            $db->free_result($search);
            break;
        case "allyname":
            $search = $db->query("SELECT a.ally_name, a.ally_tag, a.ally_members, b.total_points FROM " . ALLIANCE . " as a, " . STATPOINTS . " as b WHERE b.stat_type = 1 AND b.id_owner = a.id AND a.ally_name LIKE '%" . $db->sql_escape($searchtext, true) . "%' LIMIT 25;");
            while ($s = $db->fetch_array($search)) {
                $SearchResult[] = array('allypoints' => pretty_number($s['total_points']), 'allytag' => $s['ally_tag'], 'allymembers' => $s['ally_members'], 'allyname' => $s['ally_name']);
            }
            $db->free_result($search);
            break;
    }
    $SeachTypes = array("playername" => $LNG['sh_player_name'], "planetname" => $LNG['sh_planet_name'], "allytag" => $LNG['sh_alliance_tag'], "allyname" => $LNG['sh_alliance_name']);
    $template->assign_vars(array('SearchResult' => $SearchResult, 'SeachTypes' => $SeachTypes, 'SeachInput' => $searchtext, 'SeachType' => $type, 'sh_search' => $LNG['sh_search'], 'sh_search_in_the_universe' => $LNG['sh_search_in_the_universe'], 'sh_buddy_request' => $LNG['sh_buddy_request'], 'sh_write_message' => $LNG['sh_write_message'], 'sh_name' => $LNG['sh_name'], 'sh_alliance' => $LNG['sh_alliance'], 'sh_planet' => $LNG['sh_planet'], 'sh_coords' => $LNG['sh_coords'], 'sh_position' => $LNG['sh_position'], 'sh_tag' => $LNG['sh_tag'], 'sh_members' => $LNG['sh_members'], 'sh_points' => $LNG['sh_points']));
    $template->show("search_body.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:48,代码来源:ShowSearchPage.php

示例9: ShowFAQPage

function ShowFAQPage()
{
    global $USER, $PLANET, $LNG;
    $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();
    includeLang('FAQ');
    $template->assign_vars(array('FAQList' => $LNG['faq'], 'faq_overview' => $LNG['faq_overview']));
    $template->show("faq_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:16,代码来源:ShowFAQ.php

示例10: ShowChangelogPage

function ShowChangelogPage()
{
    global $USER, $PLANET, $LNG;
    $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();
    includeLang('CHANGELOG');
    $template->assign_vars(array('ChangelogList' => array_map('makebr', $LNG['changelog']), 'Version' => $LNG['Version'], 'Description' => $LNG['Description']));
    $template->show("changelog_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:16,代码来源:ShowChangelogPage.php

示例11: ShowImperiumPage

function ShowImperiumPage()
{
    global $LNG, $USER, $PLANET, $resource, $reslist, $db;
    $PlanetRess = new ResourceUpdate();
    $PlanetRess->CalcResource();
    $PlanetRess->SavePlanetToDB();
    $template = new template();
    $template->loadscript("trader.js");
    $template->page_topnav();
    $template->page_header();
    $template->page_leftmenu();
    $template->page_planetmenu();
    $template->page_footer();
    $SQLArray = array_merge($reslist['build'], $reslist['fleet'], $reslist['defense']);
    $Query = "";
    foreach ($SQLArray as $id => $gid) {
        $Query .= ",`" . $resource[$gid] . "`";
    }
    if ($USER['planet_sort'] == 0) {
        $Order = "`id` ";
    } elseif ($USER['planet_sort'] == 1) {
        $Order = "`galaxy`, `system`, `planet`, `planet_type` ";
    } elseif ($USER['planet_sort'] == 2) {
        $Order = "`name` ";
    }
    $Order .= $USER['planet_sort_order'] == 1 ? "DESC" : "ASC";
    $PlanetsRAW = $db->query("\r\n\tSELECT `id`,`name`,`galaxy`,`system`,`planet`,`planet_type`,\r\n\t`image`,`field_current`,`field_max`,`metal`,`crystal`,`deuterium`,\r\n\t`energy_used`,`energy_max` " . $Query . " FROM " . PLANETS . " WHERE `id_owner` = '" . $USER['id'] . "' AND `destruyed` = '0' ORDER BY " . $Order . ";");
    while ($Planet = $db->fetch_array($PlanetsRAW)) {
        $InfoList = array('id' => $Planet['id'], 'name' => $Planet['name'], 'image' => $Planet['image'], 'galaxy' => $Planet['galaxy'], 'system' => $Planet['system'], 'planet' => $Planet['planet'], 'field_current' => $Planet['field_current'], 'field_max' => CalculateMaxPlanetFields($Planet), 'metal' => pretty_number($Planet['metal']), 'crystal' => pretty_number($Planet['crystal']), 'deuterium' => pretty_number($Planet['deuterium']), 'energy_used' => pretty_number($Planet['energy_max'] + $Planet['energy_used']), 'energy_max' => pretty_number($Planet['energy_max']));
        foreach ($reslist['build'] as $gid) {
            $BuildsList[$gid] = pretty_number($Planet[$resource[$gid]]);
        }
        foreach ($reslist['fleet'] as $gid) {
            $FleetsList[$gid] = pretty_number($Planet[$resource[$gid]]);
        }
        foreach ($reslist['defense'] as $gid) {
            $DefensesList[$gid] = pretty_number($Planet[$resource[$gid]]);
        }
        $PlanetsList[] = array('InfoList' => $InfoList, 'BuildsList' => $BuildsList, 'FleetsList' => $FleetsList, 'DefensesList' => $DefensesList);
    }
    foreach ($reslist['tech'] as $gid) {
        $ResearchList[$gid] = pretty_number($USER[$resource[$gid]]);
    }
    $template->assign_vars(array('colspan' => count($PlanetsList) + 1, 'PlanetsList' => $PlanetsList, 'ResearchList' => $ResearchList, 'iv_imperium_title' => $LNG['iv_imperium_title'], 'iv_planet' => $LNG['iv_planet'], 'iv_name' => $LNG['iv_name'], 'iv_coords' => $LNG['iv_coords'], 'iv_fields' => $LNG['iv_fields'], 'iv_resources' => $LNG['iv_resources'], 'Metal' => $LNG['Metal'], 'Crystal' => $LNG['Crystal'], 'Deuterium' => $LNG['Deuterium'], 'Energy' => $LNG['Energy'], 'iv_buildings' => $LNG['iv_buildings'], 'iv_technology' => $LNG['iv_technology'], 'iv_ships' => $LNG['iv_ships'], 'iv_defenses' => $LNG['iv_defenses'], 'tech' => $LNG['tech'], 'build' => $reslist['build'], 'fleet' => $reslist['fleet'], 'defense' => $reslist['defense'], 'research' => $reslist['tech']));
    $template->show("empire_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:46,代码来源:ShowImperiumPage.php

示例12: ShowBannedPage

function ShowBannedPage()
{
    global $USER, $PLANET, $LNG, $db;
    $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();
    $query = $db->query("SELECT * FROM " . BANNED . " ORDER BY `id`;");
    while ($u = $db->fetch_array($query)) {
        $PrangerList[] = array('player' => $u['who'], 'theme' => $u['theme'], 'from' => date("d. M Y H:i:s", $u['time']), 'to' => date("d. M Y H:i:s", $u['longer']), 'admin' => $u['author'], 'mail' => $u['email'], 'info' => sprintf($LNG['bn_writemail'], $u['author']));
    }
    $db->free_result($query);
    $template->assign_vars(array('PrangerList' => $PrangerList, 'bn_no_players_banned' => $LNG['bn_no_players_banned'], 'bn_exists' => $LNG['bn_exists'], 'bn_players_banned' => $LNG['bn_players_banned'], 'bn_players_banned_list' => $LNG['bn_players_banned_list'], 'bn_player' => $LNG['bn_player'], 'bn_reason' => $LNG['bn_reason'], 'bn_from' => $LNG['bn_from'], 'bn_until' => $LNG['bn_until'], 'bn_by' => $LNG['bn_by']));
    $template->show("banned_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:20,代码来源:ShowBannedPage.php

示例13: ShowPlayerCard

function ShowPlayerCard()
{
    global $USER, $PLANET, $LNG, $db;
    $template = new template();
    $template->page_header();
    $template->page_footer();
    $playerid = request_var('id', 0);
    $query = $db->uniquequery("SELECT a.wons, a.loos, a.draws, a.kbmetal, a.kbcrystal, a.lostunits, a.desunits, a.ally_id, a.ally_name, a.username, a.galaxy, a.system, a.planet, b.name, c.tech_rank, c.tech_points, c.build_rank, c.build_points, c.defs_rank, c.defs_points, c.fleet_rank, c.fleet_points, c.total_rank, c.total_points FROM " . USERS . " as a, " . PLANETS . " as b, " . STATPOINTS . " as c WHERE a.id = '" . $db->sql_escape($playerid) . "' AND a.id_planet = b.id AND a.id = c.id_owner AND c.stat_type = 1;");
    $totalfights = $query['wons'] + $query['loos'] + $query['draws'];
    if ($totalfights == 0) {
        $siegprozent = 0;
        $loosprozent = 0;
        $drawsprozent = 0;
    } else {
        $siegprozent = 100 / $totalfights * $query['wons'];
        $loosprozent = 100 / $totalfights * $query['loos'];
        $drawsprozent = 100 / $totalfights * $query['draws'];
    }
    $template->assign_vars(array('id' => $playerid, 'name' => $query['username'], 'homeplanet' => $query['name'], 'galaxy' => $query['galaxy'], 'system' => $query['system'], 'planet' => $query['planet'], 'allyid' => $query['ally_id'], 'tech_rank' => pretty_number($query['tech_rank']), 'tech_points' => pretty_number($query['tech_points']), 'build_rank' => pretty_number($query['build_rank']), 'build_points' => pretty_number($query['build_points']), 'defs_rank' => pretty_number($query['defs_rank']), 'defs_points' => pretty_number($query['defs_points']), 'fleet_rank' => pretty_number($query['fleet_rank']), 'fleet_points' => pretty_number($query['fleet_points']), 'total_rank' => pretty_number($query['total_rank']), 'total_points' => pretty_number($query['total_points']), 'allyname' => $query['ally_name'], 'playerdestory' => sprintf($LNG['pl_destroy'], $query['username']), 'wons' => pretty_number($query['wons']), 'loos' => pretty_number($query['loos']), 'draws' => pretty_number($query['draws']), 'kbmetal' => pretty_number($query['kbmetal']), 'kbcrystal' => pretty_number($query['kbcrystal']), 'lostunits' => pretty_number($query['lostunits']), 'desunits' => pretty_number($query['desunits']), 'totalfights' => pretty_number($totalfights), 'siegprozent' => round($siegprozent, 2), 'loosprozent' => round($loosprozent, 2), 'drawsprozent' => round($drawsprozent, 2), 'pl_name' => $LNG['pl_name'], 'pl_overview' => $LNG['pl_overview'], 'pl_ally' => $LNG['pl_ally'], 'pl_message' => $LNG['pl_message'], 'pl_range' => $LNG['pl_range'], 'pl_builds' => $LNG['pl_builds'], 'pl_tech' => $LNG['pl_tech'], 'pl_fleet' => $LNG['pl_fleet'], 'pl_def' => $LNG['pl_def'], 'pl_fightstats' => $LNG['pl_fightstats'], 'pl_fights' => $LNG['pl_fights'], 'pl_fprocent' => $LNG['pl_fprocent'], 'pl_fightstats' => $LNG['pl_fightstats'], 'pl_fights' => $LNG['pl_fights'], 'pl_fprocent' => $LNG['pl_fprocent'], 'pl_fightwon' => $LNG['pl_fightwon'], 'pl_fightdraw' => $LNG['pl_fightdraw'], 'pl_fightlose' => $LNG['pl_fightlose'], 'pl_totalfight' => $LNG['pl_totalfight'], 'pl_unitsshot' => $LNG['pl_unitsshot'], 'pl_unitslose' => $LNG['pl_unitslose'], 'pl_dermetal' => $LNG['pl_dermetal'], 'pl_dercrystal' => $LNG['pl_dercrystal'], 'pl_total' => $LNG['pl_total'], 'pl_buddy' => $LNG['pl_buddy'], 'pl_points' => $LNG['pl_points'], 'pl_homeplanet' => $LNG['pl_homeplanet'], 'pl_etc' => $LNG['pl_etc']));
    $template->show("playercard_overview.tpl");
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:21,代码来源:ShowPlayerCard.php

示例14: __construct

 public function __construct()
 {
     global $CONF, $dpath, $LNG, $db, $USER, $PLANET;
     $mode = request_var('mode', '');
     $msg = request_var('msg', '', true);
     $ctype = request_var('chat_type', '');
     $MessageID = request_var('id', 0);
     switch ($mode) {
         case "delete":
             $this->DelMeassageFromChat($MessageID);
             break;
         case "send":
             $this->SetMeassageInChat($ctype, $msg);
             break;
         case "call":
             $this->GetMessages($ctype);
             break;
         default:
             $template = new template();
             $template->execscript("showMessage();;setInterval(showMessage,10000);");
             $template->loadscript("chat.js");
             $template->page_header();
             $template->page_footer();
             if (empty($ctype)) {
                 $PlanetRess = new ResourceUpdate();
                 $PlanetRess->CalcResource();
                 $PlanetRess->SavePlanetToDB();
                 $template->page_topnav();
                 $template->page_leftmenu();
                 $template->page_planetmenu();
             }
             $template->assign_vars(array('ctype' => $ctype, 'chat_send' => $LNG['chat_send'], 'chat_disc' => $LNG['chat_disc'], 'chat_message' => $LNG['chat_message'], 'chat_bbcode' => $LNG['chat_bbcode'], 'chat_fontcolor' => $LNG['chat_fontcolor'], 'chat_color_white' => $LNG['chat_color_white'], 'chat_color_blue' => $LNG['chat_color_blue'], 'chat_color_yellow' => $LNG['chat_color_yellow'], 'chat_color_green' => $LNG['chat_color_green'], 'chat_color_pink' => $LNG['chat_color_pink'], 'chat_color_red' => $LNG['chat_color_red'], 'chat_color_orange' => $LNG['chat_color_orange']));
             $template->show("chat_overview.tpl");
             break;
     }
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:36,代码来源:class.ShowChatPage.php

示例15: __construct

 public function __construct()
 {
     global $USER, $PLANET, $dpath, $LNG, $resource, $pricelist, $reslist, $CombatCaps, $ProdGrid, $CONF;
     $BuildID = request_var('gid', 0);
     $template = new template();
     $template->page_header();
     $template->page_footer();
     if (in_array($BuildID, $reslist['prod']) && $BuildID != 212) {
         $BuildLevelFactor = 10;
         $BuildTemp = $PLANET['temp_max'];
         $CurrentBuildtLvl = $PLANET[$resource[$BuildID]];
         $BuildEnergy = $USER[$resource[113]];
         $BuildLevel = $CurrentBuildtLvl > 0 ? $CurrentBuildtLvl : 1;
         $Prod[1] = floor(eval($ProdGrid[$BuildID]['formule']['metal']) * $CONF['resource_multiplier']) * (1 + $USER['rpg_geologue'] * GEOLOGUE);
         $Prod[2] = floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * $CONF['resource_multiplier']) * (1 + $USER['rpg_geologue'] * GEOLOGUE);
         $Prod[3] = floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * $CONF['resource_multiplier']) * (1 + $USER['rpg_geologue'] * GEOLOGUE);
         $BuildStartLvl = max($CurrentBuildtLvl - 2, 1);
         if ($BuildID >= 4) {
             $Prod[4] = floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $CONF['resource_multiplier']) * (1 + $USER['rpg_ingenieur'] * INGENIEUR);
         } else {
             $Prod[4] = floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $CONF['resource_multiplier']);
         }
         $ActualProd = floor($Prod[$BuildID]);
         if ($BuildID != 12) {
             $ActualNeed = floor($Prod[4]);
         } else {
             $ActualNeed = floor($Prod[3]);
         }
         $ProdFirst = 0;
         for ($BuildLevel = $BuildStartLvl; $BuildLevel < $BuildStartLvl + 15; $BuildLevel++) {
             $Prod[1] = floor(eval($ProdGrid[$BuildID]['formule']['metal']) * $CONF['resource_multiplier']);
             $Prod[2] = floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * $CONF['resource_multiplier']);
             $Prod[3] = floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * $CONF['resource_multiplier']);
             if ($BuildID >= 4) {
                 $Prod[4] = floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $CONF['resource_multiplier']);
             } else {
                 $Prod[4] = floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $CONF['resource_multiplier']);
             }
             $bloc['build_lvl'] = $CurrentBuildtLvl == $BuildLevel ? "<font color=\"#ff0000\">" . $BuildLevel . "</font>" : $BuildLevel;
             if ($BuildID != 12) {
                 $prod = pretty_number(floor($Prod[$BuildID]));
                 $prod_diff = colorNumber(pretty_number(floor($Prod[$BuildID] - $ActualProd)));
                 $need = colorNumber(pretty_number(floor($Prod[4])));
                 $need_diff = colorNumber(pretty_number(floor($Prod[4] - $ActualNeed)));
             } else {
                 $prod = pretty_number(floor($Prod[4]));
                 $prod_diff = colorNumber(pretty_number(floor($Prod[4] - $ActualProd)));
                 $need = colorNumber(pretty_number(floor($Prod[3])));
                 $need_diff = colorNumber(pretty_number(floor($Prod[3] - $ActualNeed)));
             }
             if ($ProdFirst == 0) {
                 if ($BuildID != 12) {
                     $ProdFirst = floor($Prod[$BuildID]);
                 } else {
                     $ProdFirst = floor($Prod[4]);
                 }
             }
             $ProductionTable[] = array('BuildLevel' => $BuildLevel, 'prod' => $prod, 'prod_diff' => $prod_diff, 'need' => $need, 'need_diff' => $need_diff);
         }
     } elseif (in_array($BuildID, $reslist['fleet'])) {
         for ($Type = 200; $Type < 500; $Type++) {
             if ($CombatCaps[$BuildID]['sd'][$Type] > 1) {
                 $RapidFire['to'][$LNG['tech'][$Type]] = $CombatCaps[$BuildID]['sd'][$Type];
             }
             if ($CombatCaps[$Type]['sd'][$BuildID] > 1) {
                 $RapidFire['from'][$LNG['tech'][$Type]] = $CombatCaps[$Type]['sd'][$BuildID];
             }
         }
         $FleetInfo[$LNG['in_struct_pt']] = pretty_number($pricelist[$BuildID]['metal'] + $pricelist[$BuildID]['crystal']);
         $FleetInfo[$LNG['in_shield_pt']] = pretty_number($CombatCaps[$BuildID]['shield']);
         $FleetInfo[$LNG['in_attack_pt']] = pretty_number($CombatCaps[$BuildID]['attack']);
         $FleetInfo[$LNG['in_capacity']] = pretty_number($pricelist[$BuildID]['capacity']);
         $FleetInfo[$LNG['in_base_speed']][] = pretty_number($pricelist[$BuildID]['speed']);
         $FleetInfo[$LNG['in_consumption']][] = pretty_number($pricelist[$BuildID]['consumption']);
         $FleetInfo[$LNG['in_base_speed']][] = pretty_number($pricelist[$BuildID]['speed2']);
         $FleetInfo[$LNG['in_consumption']][] = pretty_number($pricelist[$BuildID]['consumption2']);
     } elseif (in_array($BuildID, $reslist['defense'])) {
         for ($Type = 200; $Type < 500; $Type++) {
             if ($CombatCaps[$BuildID]['sd'][$Type] > 1) {
                 $RapidFire['to'][$LNG['tech'][$Type]] = $CombatCaps[$BuildID]['sd'][$Type];
             }
             if ($CombatCaps[$Type]['sd'][$BuildID] > 1) {
                 $RapidFire['from'][$LNG['tech'][$Type]] = $CombatCaps[$Type]['sd'][$BuildID];
             }
         }
         $FleetInfo[$LNG['in_struct_pt']] = pretty_number($pricelist[$BuildID]['metal'] + $pricelist[$BuildID]['crystal']);
         $FleetInfo[$LNG['in_shield_pt']] = pretty_number($CombatCaps[$BuildID]['shield']);
         $FleetInfo[$LNG['in_attack_pt']] = pretty_number($CombatCaps[$BuildID]['attack']);
     } elseif ($BuildID == 43 && $PLANET[$resource[43]] > 0) {
         $GateFleetList['jump'] = $this->DoFleetJump();
         $RestString = $this->GetNextJumpWaitTime($PLANET);
         if ($RestString['value'] != 0) {
             include_once ROOT_PATH . 'includes/functions/InsertJavaScriptChronoApplet.' . PHP_EXT;
             $template->assign_vars(array('gate_time_script' => InsertJavaScriptChronoApplet("Gate", "1", $RestString['value'], true), 'gate_script_go' => InsertJavaScriptChronoApplet("Gate", "1", $RestString['value'], false)));
         }
         $GateFleetList['start_link'] = BuildPlanetAdressLink($PLANET);
         $GateFleetList['moons'] = $this->BuildJumpableMoonCombo($USER, $PLANET);
         $GateFleetList['fleets'] = $this->BuildFleetListRows($PLANET);
     }
     $template->assign_vars(array('id' => $BuildID, 'name' => $LNG['info'][$BuildID]['name'], 'image' => $BuildID, 'description' => $LNG['info'][$BuildID]['description'], 'ProductionTable' => $ProductionTable, 'RapidFire' => $RapidFire, 'Level' => $CurrentBuildtLvl, 'FleetInfo' => $FleetInfo, 'GateFleetList' => $GateFleetList, 'in_jump_gate_jump' => $LNG['in_jump_gate_jump'], 'gate_ship_dispo' => $LNG['in_jump_gate_available'], 'in_level' => $LNG['in_level'], 'in_prod_p_hour' => $LNG['in_prod_p_hour'], 'in_difference' => $LNG['in_difference'], 'in_used_energy' => $LNG['in_used_energy'], 'in_prod_energy' => $LNG['in_prod_energy'], 'in_used_deuter' => $LNG['in_used_deuter'], 'in_rf_again' => $LNG['in_rf_again'], 'in_rf_from' => $LNG['in_rf_from'], 'in_jump_gate_select_ships' => $LNG['in_jump_gate_select_ships'], 'in_jump_gate_start_moon' => $LNG['in_jump_gate_start_moon'], 'in_jump_gate_finish_moon' => $LNG['in_jump_gate_finish_moon'], 'in_jump_gate_wait_time' => $LNG['in_jump_gate_wait_time']));
//.........这里部分代码省略.........
开发者ID:sonicmaster,项目名称:RPG,代码行数:101,代码来源:class.ShowInfosPage.php


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