// Show Planet Lists
$planets_query = doquery("SELECT * FROM {{table}} WHERE id_owner='{$user['id']}'", "planets");
$Colone = 1;
$AllPlanets = "<tr>";
while ($UserPlanet = mysql_fetch_array($planets_query)) {
if ($UserPlanet["id"] != $user["current_planet"] && $UserPlanet['planet_type'] != 3) {
$AllPlanets .= "<th>". $UserPlanet['name'] ."<br>";
$AllPlanets .= "<a href=\"?cp=". $UserPlanet['id'] ."&re=0\" title=\"". $UserPlanet['name'] ."\"><img src=\"". $dpath ."planeten/small/s_". $UserPlanet['image'] .".jpg\" height=\"50\" width=\"50\"></a><br>";
$AllPlanets .= "<center>";
// Check Building Queue
if ($UserPlanet['b_building'] != 0) {
UpdatePlanetBatimentQueueList ( $UserPlanet, $user );
if ( $UserPlanet['b_building'] != 0 ) {
$BuildQueue = $UserPlanet['b_building_id'];
$QueueArray = explode ( ";", $BuildQueue );
$CurrentBuild = explode ( ",", $QueueArray[0] );
$BuildElement = $CurrentBuild[0];
$BuildLevel = $CurrentBuild[1];
$BuildRestTime = pretty_time( $CurrentBuild[3] - time() );
$AllPlanets .= '' . $lang['tech'][$BuildElement] . ' (' . $BuildLevel . ')';
$AllPlanets .= "<br><font color=\"#7f7f7f\">(". $BuildRestTime .")</font>";
} else {
CheckPlanetUsedFields ($UserPlanet);
$AllPlanets .= $lang['Free'];
}
} else {
$AllPlanets .= $lang['Free'];
}
$AllPlanets .= "</center></th>";
if ($Colone <= 1) {
$Colone++;
} else {
$AllPlanets .= "</tr><tr>";
$Colone = 1;
}
}
} // End While