コード例 #1
0
ファイル: planet.php プロジェクト: kagetenshi/xenoberage
<div class="tablecell content both-border">
	<div class="pad">
<?php 
bigtitle();
// Get the Player Info
$playerinfo = $sql_manager->playerinfo($user_ship_id, "");
// Empty out Planet and Ship vars
$planetinfo = null;
// Check if planet_id is valid.
if ($planet_id <= 0) {
    echo "Invalid Planet<br/><br/>";
    text_GOTOMAIN();
    include "footer.php";
    die;
}
$sectorinfo = $sql_manager->universeinfo($playerinfo['sector'], "");
# Load Sector Information
$planetinfo = $sql_manager->planetinfo($planet_id, "");
# Load Planet Information
$are_you_real = $sql_manager->real_planet($planet_id);
// Check to see if it returned valid planet info.
if ($are_you_real < 1 || is_bool($planetinfo) && $planetinfo == false) {
    echo "Invalid Planet<br/><br/>";
    text_GOTOMAIN();
    die;
}
if (!is_bool($planetinfo) && $planetinfo != false) {
    if ($playerinfo['sector'] != $planetinfo['sector_id']) {
        if ($playerinfo['on_planet'] == 'Y') {
            /*User not in the sector, most likely the ship was destroyed when a player attacked the planet they where parked on*/
            $resx = $db->Execute("UPDATE {$db->prefix}ships SET on_planet='N' WHERE ship_id={$playerinfo['ship_id']}");