<?php require_once get_file_loc("smr_planet.inc"); // get a planet from the sector where the player is in $planet = new SMR_PLANET($player->sector_id, $player->game_id); // owner of planet if ($planet->owner_id != 0) { $planet_owner = new SMR_PLAYER($planet->owner_id, SmrSession::$game_id); $ownerAllianceID = $planet_owner->alliance_id; } else { $ownerAllianceID = 0; } print_topic("Examine Planet"); print "<table>"; print "<tr><td><b>Planet Name:</b></td><td>{$planet->planet_name}</td></tr>"; print "<tr><td><b>Level:</b></td><td>" . $planet->level() . "</td></tr>"; print "<tr><td><b>Owner:</b></td><td>"; if ($planet->owner_id != 0) { print $planet_owner->player_name; } else { print "Unclaimed"; } print "</td></tr>"; print "<tr><td><b>Alliance:</b></td><td>"; if ($planet->owner_id != 0) { print $planet_owner->alliance_name; } else { print "none"; } print "</td></tr>"; print "</table>";
<?php require_once get_file_loc("smr_planet.inc"); if ($player->land_on_planet == "FALSE") { print_error("You are not on a planet!"); return; } // create planet object $planet = new SMR_PLANET($player->sector_id, $player->game_id); $planet->build(); print_topic("PLANET : {$planet->planet_name} [SECTOR #{$player->sector_id}]"); include get_file_loc('menue.inc'); print_planet_menue(); $curr_time = time(); $lvl = $planet->level(); if ($lvl < 9) { $base = 1.02; } elseif ($lvl < 19) { $base = 1.03; } elseif ($lvl < 29) { $base = 1.06; } elseif ($lvl < 39) { $base = 1.025; } elseif ($lvl < 49) { $base = 1.02; } elseif ($lvl < 59) { $base = 1.015; } elseif ($lvl < 69) { $base = 1.01; } else { $base = 1.009;