示例#1
0
 public function GalaxyRowPlanet($GalaxyRowPlanet)
 {
     global $resource, $USER, $PLANET, $CONF, $LNG;
     if ($PLANET[$resource[42]] > 0 && $GalaxyRowPlanet['userid'] != $USER['id'] && $GalaxyRowPlanet["galaxy"] == $PLANET['galaxy'] && !CheckModule(19)) {
         $PhRange = $this->GetPhalanxRange($PLANET[$resource[42]]);
         $SystemLimitMin = max(1, $PLANET['system'] - $PhRange);
         $SystemLimitMax = $PLANET['system'] + $PhRange;
         $PhalanxTypeLink = $GalaxyRowPlanet['system'] <= $SystemLimitMax && $GalaxyRowPlanet['system'] >= $SystemLimitMin ? $LNG['gl_phalanx'] : false;
     } else {
         $PhalanxTypeLink = false;
     }
     if ($PLANET[$resource[503]] > 0 && $GalaxyRowPlanet['userid'] != $USER['id'] && $GalaxyRowPlanet["galaxy"] == $PLANET['galaxy']) {
         $MiRange = $this->GetMissileRange($USER[$resource[117]]);
         $SystemLimitMin = max(1, $PLANET['system'] - $MiRange);
         $SystemLimitMax = $PLANET['system'] + $MiRange;
         $MissileBtn = $GalaxyRowPlanet['system'] <= $SystemLimitMax && $GalaxyRowPlanet['system'] >= $SystemLimitMin ? true : false;
     } else {
         $MissileBtn = false;
     }
     $Result = array('id' => $GalaxyRowPlanet['id'], 'name' => htmlspecialchars($GalaxyRowPlanet['name'], ENT_QUOTES, "UTF-8"), 'image' => $GalaxyRowPlanet['image'], 'phalax' => $PhalanxTypeLink, 'transport' => $LNG['type_mission'][3], 'spionage' => $GalaxyRowPlanet['userid'] != $USER['id'] ? $LNG['type_mission'][6] : false, 'attack' => $GalaxyRowPlanet['userid'] != $USER['id'] ? $LNG['type_mission'][1] : false, 'missile' => $USER["settings_mis"] == "1" && $MissileBtn === true && $GalaxyRowPlanet['userid'] != $USER['id'] ? $LNG['gl_missile_attack'] : false, 'stay' => $GalaxyRowPlanet['userid'] == $USER['id'] ? $LNG['type_mission'][4] : false, 'stayally' => $GalaxyRowPlanet['userid'] != $USER['id'] ? $LNG['type_mission'][5] : false);
     return $Result;
 }
示例#2
0
 public static function GetAvailableMissions($MissionInfo)
 {
     global $LNG, $db, $UNI;
     $GetInfoPlanet = $db->uniquequery("SELECT `id_owner`, `der_metal`, `der_crystal`, `der_norio` FROM `" . PLANETS . "` WHERE `universe` = '" . $UNI . "' AND `galaxy` = " . $MissionInfo['galaxy'] . " AND `system` = " . $MissionInfo['system'] . " AND `planet` = " . $MissionInfo['planet'] . " AND `planet_type` = '1';");
     $YourPlanet = isset($GetInfoPlanet['id_owner']) && $GetInfoPlanet['id_owner'] == $MissionInfo['CurrentUser']['id'] ? true : false;
     $UsedPlanet = isset($GetInfoPlanet['id_owner']) ? true : false;
     $missiontype = array();
     if ($MissionInfo['planet'] == MAX_PLANET_IN_SYSTEM + 1 && !CheckModule(30)) {
         $missiontype[15] = $LNG['type_mission'][15];
     } elseif ($MissionInfo['planettype'] == 2) {
         if ((isset($MissionInfo['Ship'][209]) || isset($MissionInfo['Ship'][219])) && !CheckModule(32) && !($GetInfoPlanet['der_metal'] == 0 && $GetInfoPlanet['der_crystal'] == 0 && $GetInfoPlanet['der_norio'] == 0)) {
             $missiontype[8] = $LNG['type_mission'][8];
         }
     } else {
         if (!$UsedPlanet) {
             if (isset($MissionInfo['Ship'][208]) && $MissionInfo['planettype'] == 1 && !CheckModule(35)) {
                 $missiontype[7] = $LNG['type_mission'][7];
             }
         } else {
             if (!CheckModule(34)) {
                 $missiontype[3] = $LNG['type_mission'][3];
             }
             if (!$YourPlanet && self::OnlyShipByID($MissionInfo['Ship'], 210) && !CheckModule(24)) {
                 $missiontype[6] = $LNG['type_mission'][6];
             }
             if (!$YourPlanet) {
                 if (!CheckModule(1)) {
                     $missiontype[1] = $LNG['type_mission'][1];
                 }
                 if (!CheckModule(33)) {
                     $missiontype[5] = $LNG['type_mission'][5];
                 }
             } elseif (!CheckModule(36)) {
                 $missiontype[4] = $LNG['type_mission'][4];
             }
             if (!empty($MissionInfo['IsAKS']) && !$YourPlanet && !CheckModule(1)) {
                 $missiontype[2] = $LNG['type_mission'][2];
             }
             if (!$YourPlanet && $MissionInfo['planettype'] == 3 && isset($MissionInfo['Ship'][214]) && !CheckModule(29)) {
                 $missiontype[9] = $LNG['type_mission'][9];
             }
             if ($YourPlanet && $MissionInfo['planettype'] == 3 && self::OnlyShipByID($MissionInfo['Ship'], 220) && !CheckModule(31)) {
                 $missiontype[11] = $LNG['type_mission'][11];
             }
         }
     }
     return $missiontype;
 }
示例#3
0
文件: game.php 项目: sonicmaster/RPG
     if (CheckModule(20)) {
         message($LNG['sys_module_inactive'], "?page=overview", 3, true, true);
     }
     include_once ROOT_PATH . 'includes/pages/ShowPlayerCard.php';
     ShowPlayerCard();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'faq':
     include_once ROOT_PATH . 'includes/pages/ShowFAQ.php';
     ShowFAQPage();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'battlesim':
     if (CheckModule(39)) {
         message($LNG['sys_module_inactive'], "?page=overview", 3, true, true);
     }
     include_once ROOT_PATH . 'includes/pages/ShowBattleSimPage.php';
     ShowBattleSimPage();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'logout':
     include_once ROOT_PATH . 'includes/pages/ShowLogoutPage.php';
     ShowLogoutPage();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'overview':
 default:
示例#4
0
文件: coins.php 项目: sonicmaster/RPG
# *  (at your option) any later version.                                     #
# *	                                                                         #
# *  This program is distributed in the hope that it will be useful,         #
# *  but WITHOUT ANY WARRANTY; without even the implied warranty of          #
# *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           #
# *  GNU General Public License for more details.                            #
# *                                                                          #
##############################################################################
define('INSIDE', true);
define('INSTALL', false);
define('ROOT_PATH', str_replace('\\', '/', dirname(__FILE__)) . '/');
require_once ROOT_PATH . 'extension.inc';
require_once ROOT_PATH . 'common.' . PHP_EXT;
$page = request_var('page', '');
switch ($page) {
    // ----------------------------------------------------------------------------------------------------------------------------------------------//
    case 'changelog':
        include_once ROOT_PATH . 'includes/pages/ShowChangelogPage.' . PHP_EXT;
        ShowChangelogPage();
        break;
        // ----------------------------------------------------------------------------------------------------------------------------------------------//
    // ----------------------------------------------------------------------------------------------------------------------------------------------//
    case 'galaxy':
        if (CheckModule(11)) {
            message($LNG['sys_module_inactive'], "?page=overview", 3, true, true);
        }
        include_once ROOT_PATH . 'includes/pages/class.ShowGalaxyPage.' . PHP_EXT;
        $ShowGalaxyPage = new ShowGalaxyPage();
        break;
        // ----------------------------------------------------------------------------------------------------------------------------------------------//
}
示例#5
0
    case "stats":
        if (TIMESTAMP >= $CONF['stat_last_update'] + 60 * $CONF['stat_update_time']) {
            update_config('stat_last_update', TIMESTAMP);
            require_once ROOT_PATH . 'includes/classes/class.statbuilder.php';
            $stat = new Statbuilder();
            $result = $stat->MakeStats();
        }
        break;
    case "opdb":
        if (TIMESTAMP >= $CONF['stat_last_db_update'] + 60 * 60 * 24) {
            update_config('stat_last_db_update', TIMESTAMP);
            $prueba = $db->query("SHOW TABLE STATUS from " . DB_NAME . ";");
            $table = "";
            while ($pru = $db->fetch_array($prueba)) {
                $compprefix = explode("_", $pru["Name"]);
                if ($compprefix[0] . "_" == DB_PREFIX) {
                    $table .= "`" . $pru["Name"] . "`, ";
                }
            }
            $db->query("OPTIMIZE TABLE " . substr($table, 0, -2) . ";");
        }
        break;
    case "banner":
        if (!CheckModule(37) && TIMESTAMP >= $CONF['stat_last_banner_update'] + 60 * $CONF['stat_banner_update_time']) {
            update_config('stat_last_banner_update', TIMESTAMP);
            require_once ROOT_PATH . 'includes/classes/class.StatBanner.php';
            $banner = new StatBanner();
            $banner->BuildIMGforAll();
        }
        break;
}
示例#6
0
 function TargetEvent()
 {
     global $db, $OfficerInfo, $LANG;
     $CurrentUser = $db->uniquequery("SELECT `lang`, `spy_tech`, `rpg_espion` FROM " . USERS . " WHERE `id` = '" . $this->_fleet['fleet_owner'] . "';");
     $LNG = $LANG->GetUserLang($CurrentUser['lang'], array('FLEET', 'TECH'));
     $CurrentUserID = $this->_fleet['fleet_owner'];
     $SQL = "SELECT * FROM " . PLANETS . " ";
     $SQL .= "WHERE ";
     $SQL .= "`id` = '" . $this->_fleet['fleet_end_id'] . "';";
     $TargetPlanet = $db->uniquequery($SQL);
     $TargetUserID = $TargetPlanet['id_owner'];
     $CurrentPlanet = $db->uniquequery("SELECT name,system,galaxy,planet FROM " . PLANETS . " WHERE `galaxy` = '" . $this->_fleet['fleet_start_galaxy'] . "' AND `system` = '" . $this->_fleet['fleet_start_system'] . "' AND `planet` = '" . $this->_fleet['fleet_start_planet'] . "';");
     $CurrentSpyLvl = max($CurrentUser['spy_tech'] + $CurrentUser['rpg_espion'] * $OfficerInfo[610]['info'], 1);
     $TargetUser = $db->uniquequery("SELECT * FROM " . USERS . " WHERE `id` = '" . $TargetUserID . "';");
     $TargetSpyLvl = max($TargetUser['spy_tech'] + $TargetUser['rpg_espion'] * $OfficerInfo[610]['info'], 1);
     $fleet = explode(";", $this->_fleet['fleet_array']);
     require_once ROOT_PATH . 'includes/classes/class.PlanetRessUpdate.php';
     $PlanetRess = new ResourceUpdate();
     list($TargetUser, $TargetPlanet) = $PlanetRess->CalcResource($TargetUser, $TargetPlanet, true, $this->_fleet['fleet_start_time']);
     foreach ($fleet as $a => $b) {
         if (empty($b)) {
             continue;
         }
         $a = explode(",", $b);
         if ($a[0] != 210) {
             continue;
         }
         $LS = $a[1];
         break;
     }
     $Diffence = abs($CurrentSpyLvl - $TargetSpyLvl);
     $MinAmount = $CurrentSpyLvl > $TargetSpyLvl ? -1 * pow($Diffence, 2) : pow($Diffence, 2);
     $SpyFleet = $LS >= $MinAmount ? true : false;
     $SpyDef = $LS >= $MinAmount + 1 ? true : false;
     $SpyBuild = $LS >= $MinAmount + 3 ? true : false;
     $SpyTechno = $LS >= $MinAmount + 5 ? true : false;
     $MaterialsInfo = $this->SpyTarget($TargetPlanet, 0, $LNG['sys_mess_head'], $LNG);
     $GetSB = $MaterialsInfo['String'];
     $Array = $MaterialsInfo['Array'];
     $Count = array();
     if ($SpyFleet) {
         $PlanetFleetInfo = $this->SpyTarget($TargetPlanet, 1, $LNG['sys_spy_fleet'], $LNG);
         $GetSB .= $PlanetFleetInfo['String'];
         $Count['Fleet'] = $PlanetFleetInfo['Count'];
         $Array = $Array + $PlanetFleetInfo['Array'];
     }
     if ($SpyDef) {
         $PlanetDefenInfo = $this->SpyTarget($TargetPlanet, 2, $LNG['sys_spy_defenses'], $LNG);
         $GetSB .= $PlanetDefenInfo['String'];
         $Count['Def'] = $PlanetDefenInfo['Count'];
         $Array = $Array + $PlanetDefenInfo['Array'];
     }
     if ($SpyBuild) {
         $PlanetBuildInfo = $this->SpyTarget($TargetPlanet, 3, $LNG['tech'][0], $LNG);
         $GetSB .= $PlanetBuildInfo['String'];
     }
     if ($SpyTechno) {
         $TargetTechnInfo = $this->SpyTarget($TargetUser, 4, $LNG['tech'][100], $LNG);
         $GetSB .= $TargetTechnInfo['String'];
         $Array = $Array + $TargetTechnInfo['Array'];
     }
     foreach ($Array as $ID => $Amount) {
         $string .= "&amp;im[" . $ID . "]=" . $Amount;
     }
     if (array_sum($Count) == 0) {
         $TargetChances = 0;
         $SpyerChances = 1;
     } else {
         $TargetChances = mt_rand(0, min($LS / 4 * ($TargetSpyLvl / $CurrentSpyLvl), 100));
         $SpyerChances = mt_rand(0, 100);
     }
     $DestProba = $TargetChances >= $SpyerChances ? $LNG['sys_mess_spy_destroyed'] : sprintf($LNG['sys_mess_spy_lostproba'], $TargetChances);
     $AttackLink = "<center>";
     $AttackLink .= "<a href=\"game.php?page=fleet&amp;galaxy=" . $this->_fleet['fleet_end_galaxy'] . "&amp;system=" . $this->_fleet['fleet_end_system'] . "";
     $AttackLink .= "&amp;planet=" . $this->_fleet['fleet_end_planet'] . "&amp;planettype=" . $this->_fleet['fleet_end_type'] . "";
     $AttackLink .= "&amp;target_mission=1";
     $AttackLink .= " \">" . $LNG['type_mission'][1];
     $AttackLink .= "</a></center>";
     $MessageEnd = "<center>" . $DestProba . "<br>" . (ENABLE_SIMULATOR_LINK == true && !CheckModule(39) ? "<a href=\"game.php?page=battlesim" . $string . "\">" . $LNG['fl_simulate'] . "</a>" : "") . "</center>";
     $SpyMessage = "<br>" . $GetSB . "<br>" . $AttackLink . $MessageEnd;
     SendSimpleMessage($CurrentUserID, '', $this->_fleet['fleet_start_time'], 0, $LNG['sys_mess_qg'], $LNG['sys_mess_spy_report'], $SpyMessage);
     $LNG = $LANG->GetUserLang($TargetUser['lang']);
     $TargetMessage = $LNG['sys_mess_spy_ennemyfleet'] . " " . $CurrentPlanet['name'];
     if ($this->_fleet['fleet_start_type'] == 3) {
         $TargetMessage .= $LNG['sys_mess_spy_report_moon'] . ' ';
     }
     $TargetMessage .= "<a href=\"game.php?page=galaxy&mode=3&galaxy=" . $CurrentPlanet["galaxy"] . "&system=" . $CurrentPlanet["system"] . "\">";
     $TargetMessage .= "[" . $CurrentPlanet["galaxy"] . ":" . $CurrentPlanet["system"] . ":" . $CurrentPlanet["planet"] . "]</a> ";
     $TargetMessage .= $LNG['sys_mess_spy_seen_at'] . " " . $TargetPlanet['name'];
     $TargetMessage .= " [" . $TargetPlanet["galaxy"] . ":" . $TargetPlanet["system"] . ":" . $TargetPlanet["planet"] . "] " . $LNG['sys_mess_spy_seen_at2'] . ".";
     SendSimpleMessage($TargetUserID, '', $this->_fleet['fleet_start_time'], 0, $LNG['sys_mess_spy_control'], $LNG['sys_mess_spy_activity'], $TargetMessage);
     if ($TargetChances >= $SpyerChances) {
         $Qry = "UPDATE " . PLANETS . " SET ";
         $Qry .= "`der_crystal` = `der_crystal` + '" . $LS * 300 . "' ";
         $Qry .= "WHERE `galaxy` = '" . $TargetPlanet['galaxy'] . "' AND ";
         $Qry .= "`system` = '" . $TargetPlanet['system'] . "' AND ";
         $Qry .= "`planet` = '" . $TargetPlanet['planet'] . "' AND ";
         $Qry .= "`planet_type` = '1';";
         $db->query($Qry);
         $this->KillFleet();
     } else {
         $this->UpdateFleet('fleet_mess', 1);
         $this->SaveFleet();
     }
 }
示例#7
0
 private function footer()
 {
     global $CONF;
     $this->assign_vars(array('cron' => (TIMESTAMP >= $CONF['stat_last_update'] + 60 * $CONF['stat_update_time'] ? "<img src=\"./cronjobs.php?cron=stats\" alt=\"\" height=\"1\" width=\"1\">" : "") . (TIMESTAMP >= $CONF['stat_last_db_update'] + 60 * 60 * 24 ? "<img src=\"./cronjobs.php?cron=opdb\" alt=\"\" height=\"1\" width=\"1\">" : "") . (!CheckModule(37) && TIMESTAMP >= $CONF['stat_last_banner_update'] + 60 * $CONF['stat_banner_update_time'] ? "<img src=\"./cronjobs.php?cron=banner\" alt=\"\" height=\"1\" width=\"1\">" : ""), 'scripts' => $this->jsscript, 'execscript' => implode("\n", $this->script), 'ga_active' => $CONF['ga_active'], 'ga_key' => $CONF['ga_key'], 'debug' => $CONF['debug']));
 }
示例#8
0
} else {
    require_once ROOT_PATH . 'includes/vars.php';
}
$CONF = $db->uniquequery("SELECT HIGH_PRIORITY * FROM `" . CONFIG . "` WHERE `uni` = '" . $UNI . "';");
$CONF['moduls'] = explode(";", $CONF['moduls']);
$LANG->setDefault($CONF['lang']);
if (!defined('CLI') && !defined('LOGIN') && !defined('IN_CRON') && !defined('AJAX')) {
    $SESSION = new Session();
    if (!$SESSION->IsUserLogin()) {
        redirectTo('index.php?code=3');
    }
    $SESSION->UpdateSession();
    if ($CONF['game_disable'] == 0 && $_SESSION['authlevel'] == 0) {
        message($CONF['close_reason']);
    }
    if (!CheckModule(10) && !defined('IN_ADMIN') && request_var('ajax', 0) == 0) {
        require ROOT_PATH . 'includes/FleetHandler.php';
    }
    $USER = $db->uniquequery("SELECT u.*, s.`total_points`, s.`total_rank` FROM " . USERS . " as u LEFT JOIN " . STATPOINTS . " as s ON s.`id_owner` = u.`id` AND s.`stat_type` = '1' WHERE u.`id` = '" . $_SESSION['id'] . "';");
    if (empty($USER)) {
        exit(header('Location: index.php'));
    } elseif (empty($USER['lang'])) {
        $USER['lang'] = $CONF['lang'];
        $db->query("UPDATE " . USERS . " SET `lang` = '" . $USER['lang'] . "' WHERE `id` = '" . $USER['id'] . "';");
    }
    $LANG->setUser($USER['lang']);
    $LANG->includeLang(array('INGAME', 'TECH'));
    $THEME->setUserTheme($USER['dpath']);
    if ($USER['bana'] == 1) {
        message("<font size=\"6px\">" . $LNG['css_account_banned_message'] . "</font><br><br>" . sprintf($LNG['css_account_banned_expire'], date("d. M y H:i", $USER['banaday'])) . "<br><br>" . $LNG['css_goto_homeside']);
        exit;
 public function __construct()
 {
     global $USER, $CONF, $PLANET, $resource, $reslist, $LNG, $db, $ExtraDM, $OfficerInfo, $pricelist;
     $action = request_var('action', '');
     $Offi = request_var('offi', 0);
     $Extra = request_var('extra', 0);
     $PlanetRess = new ResourceUpdate();
     $PlanetRess->CalcResource();
     if ($action == "send" && $USER['urlaubs_modus'] == 0) {
         if (!empty($Offi) && !CheckModule(18)) {
             $this->UpdateOfficier($Offi);
         } elseif (!empty($Extra) && !CheckModule(8)) {
             $this->UpdateExtra($Extra);
         }
     }
     $PlanetRess->SavePlanetToDB();
     $template = new template();
     $template->loadscript('officier.js');
     if (!CheckModule(8)) {
         foreach ($reslist['dmfunc'] as $Element) {
             if ($USER[$resource[$Element]] > TIMESTAMP) {
                 $template->execscript("GetOfficerTime(" . $Element . ", " . ($USER[$resource[$Element]] - TIMESTAMP) . ");");
             }
             $ExtraDMList[] = array('id' => $Element, 'active' => $USER[$resource[$Element]] - TIMESTAMP, 'price' => pretty_number($ExtraDM[$Element]['darkmatter']), 'isok' => $USER['darkmatter'] - $ExtraDM[$Element]['darkmatter'] >= 0 ? true : false, 'time' => pretty_time($ExtraDM[$Element]['time'] * 3600), 'name' => $LNG['tech'][$Element], 'desc' => sprintf($LNG['res']['descriptions'][$Element], $ExtraDM[$Element]['add'] * 100));
         }
     }
     if (!CheckModule(18)) {
         foreach ($reslist['officier'] as $Element) {
             if (($Result = $this->IsOfficierAccessible($Element)) === 0) {
                 continue;
             }
             $description = $OfficerInfo[$Element]['info'] ? sprintf($LNG['info'][$Element]['description'], is_float($OfficerInfo[$Element]['info']) ? $OfficerInfo[$Element]['info'] * 100 : $OfficerInfo[$Element]['info'], $pricelist[$Element]['max']) : sprintf($LNG['info'][$Element]['description'], $pricelist[$Element]['max']);
             $OfficierList[] = array('id' => $Element, 'level' => $USER[$resource[$Element]], 'name' => $LNG['tech'][$Element], 'desc' => $description, 'Result' => $Result);
         }
     }
     $template->assign_vars(array('ExtraDMList' => $ExtraDMList, 'OfficierList' => $OfficierList, 'user_darkmatter' => floor($USER['darkmatter'] / DM_PRO_OFFICIER_LEVEL), 'of_max_lvl' => $LNG['of_max_lvl'], 'of_recruit' => $LNG['of_recruit'], 'of_darkmatter' => sprintf($LNG['of_points_per_thousand_darkmatter'], DM_PRO_OFFICIER_LEVEL, $LNG['Darkmatter']), 'of_available_points' => $LNG['of_available_points'], 'of_lvl' => $LNG['of_lvl'], 'in_dest_durati' => $LNG['in_dest_durati'], 'of_still' => $LNG['of_still'], 'of_active' => $LNG['of_active'], 'of_update' => $LNG['of_update'], 'in_dest_durati' => $LNG['in_dest_durati'], 'of_dm_trade' => sprintf($LNG['of_dm_trade'], $LNG['Darkmatter'])));
     $template->show("officier_overview.tpl");
 }
示例#10
0
文件: game.php 项目: sonicmaster/RPG
     include_once ROOT_PATH . 'includes/pages/class.ShowChatPage.' . PHP_EXT;
     new ShowChatPage();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'support':
     if (CheckModule(27)) {
         message($LNG['sys_module_inactive'], "?page=overview", 3, true, true);
     }
     include_once $xnova_root . 'includes/pages/ShowSupportPage.' . PHP_EXT;
     new ShowSupportPage();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'playercard':
     if (CheckModule(21)) {
         message($LNG['sys_module_inactive'], "?page=overview", 3, true, true);
     }
     include_once ROOT_PATH . 'includes/pages/ShowPlayerCard.' . PHP_EXT;
     ShowPlayerCard();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'faq':
     include_once ROOT_PATH . 'includes/pages/ShowFAQ.' . PHP_EXT;
     ShowFAQPage();
     break;
     // ----------------------------------------------------------------------------------------------------------------------------------------------//
 // ----------------------------------------------------------------------------------------------------------------------------------------------//
 case 'battlesim':
     include_once ROOT_PATH . 'includes/pages/ShowBattleSimPage.' . PHP_EXT;
示例#11
0
 * @copyright 2011 Slaver <*****@*****.**> (Fork/2Moons)
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3 License
 * @version 1.3 (2011-01-21)
 * @link http://code.google.com/p/2moons/
 */
define('INSIDE', true);
define('LOGIN', false);
define('IN_CRON', true);
define('ROOT_PATH', './');
if (!extension_loaded('gd')) {
    redirectTo('index.php');
}
include ROOT_PATH . 'common.php';
error_reporting(E_ALL);
$id = request_var('id', 0);
if (CheckModule(37) || $id == 0) {
    exit;
}
$LANG->GetLangFromBrowser();
$LANG->includeLang(array('BANNER'));
require_once ROOT_PATH . "includes/classes/class.StatBanner.php";
if (!isset($_GET['debug'])) {
    header("Content-type: image/png");
}
$banner = new StatBanner();
$Data = $banner->GetData($id);
if (!isset($Data) || !is_array($Data)) {
    exit;
}
$ETag = md5(implode('', $Data));
header('ETag: ' . $ETag);
示例#12
0
 public static function ShowFleet1Page()
 {
     global $USER, $PLANET, $resource, $pricelist, $reslist, $db, $LNG, $ExtraDM, $OfficerInfo;
     $TargetGalaxy = request_var('galaxy', $PLANET['galaxy']);
     $TargetSystem = request_var('system', $PLANET['system']);
     $TargetPlanet = request_var('planet', $PLANET['planet']);
     $TargetPlanettype = request_var('planet_type', $PLANET['planet_type']);
     $PlanetRess = new ResourceUpdate();
     $PlanetRess->CalcResource();
     $PlanetRess->SavePlanetToDB();
     $template = new template();
     $template->getplanets();
     $template->loadscript('notifybox.js');
     $template->loadscript('flotten.js');
     foreach ($reslist['fleet'] as $id => $ShipID) {
         $amount = min(request_var('ship' . $ShipID, '0') + 0, $PLANET[$resource[$ShipID]] + 0);
         if ($amount <= 0 || $ShipID == 212 || !is_numeric($amount)) {
             continue;
         }
         $Fleet[$ShipID] = $amount;
         $FleetRoom += $pricelist[$ShipID]['capacity'] * $amount;
     }
     if (!is_array($Fleet)) {
         parent::GotoFleetPage();
     }
     $template->execscript('updateVars();FleetTime();window.setInterval("FleetTime()", 1000);');
     $FleetData = array('fleetroom' => floattostring($FleetRoom), 'gamespeed' => parent::GetGameSpeedFactor(), 'fleetspeedfactor' => (TIMESTAMP - $USER[$resource[706]] <= 0 ? 1 - $ExtraDM[706]['add'] : 1) - $OfficerInfo[613]['info'] * $USER['rpg_general'], 'planet' => array('galaxy' => $PLANET['galaxy'], 'system' => $PLANET['system'], 'planet' => $PLANET['planet'], 'planet_type' => $PLANET['planet_type']), 'maxspeed' => parent::GetFleetMaxSpeed($Fleet, $USER), 'ships' => parent::GetFleetShipInfo($Fleet, $USER));
     $template->assign_vars(array('mission' => request_var('target_mission', 0), 'Shoutcutlist' => !CheckModule(40) ? parent::GetUserShotcut($USER) : array(), 'Colonylist' => parent::GetColonyList($template->UserPlanets), 'AKSList' => parent::IsAKS($USER['id']), 'AvailableSpeeds' => parent::GetAvailableSpeeds(), 'fleetarray' => parent::SetFleetArray($Fleet), 'galaxy_post' => $TargetGalaxy, 'system_post' => $TargetSystem, 'planet_post' => $TargetPlanet, 'fleetdata' => json_encode($FleetData), 'options_selector' => array(1 => $LNG['fl_planet'], 2 => $LNG['fl_debris'], 3 => $LNG['fl_moon']), 'options' => $TargetPlanettype, 'fl_send_fleet' => $LNG['fl_send_fleet'], 'fl_destiny' => $LNG['fl_destiny'], 'fl_fleet_speed' => $LNG['fl_fleet_speed'], 'fl_distance' => $LNG['fl_distance'], 'fl_flying_time' => $LNG['fl_flying_time'], 'fl_fuel_consumption' => $LNG['fl_fuel_consumption'], 'fl_max_speed' => $LNG['fl_max_speed'], 'fl_cargo_capacity' => $LNG['fl_cargo_capacity'], 'fl_shortcut' => $LNG['fl_shortcut'], 'fl_shortcut_add_edit' => $LNG['fl_shortcut_add_edit'], 'fl_no_shortcuts' => $LNG['fl_no_shortcuts'], 'fl_planet_shortcut' => $LNG['fl_planet_shortcut'], 'fl_debris_shortcut' => $LNG['fl_debris_shortcut'], 'fl_moon_shortcut' => $LNG['fl_moon_shortcut'], 'fl_my_planets' => $LNG['fl_my_planets'], 'fl_acs_title' => $LNG['fl_acs_title'], 'fl_continue' => $LNG['fl_continue'], 'fl_no_colony' => $LNG['fl_no_colony'], 'fl_flying_arrival' => $LNG['fl_flying_arrival'], 'fl_flying_return' => $LNG['fl_flying_return']));
     $template->show('fleet1_table.tpl');
 }