function vessel_show_table_row($vessel_id, $href_url, $show_species = "NO") { assert(is_numeric($vessel_id)); assert(!empty($href_url)); global $_GALAXY; global $_CONFIG; // Get information $vessel = vessel_get_vessel($vessel_id); $vesseltype = vessel_get_vesseltype($vessel_id); $planet = anomaly_get_anomaly($vessel['planet_id']); $race = user_get_race($vessel['user_id']); $img = "explore.jpg"; $type = "Unknown Type"; if ($vesseltype['type'] == VESSEL_TYPE_EXPLORE) { $img = "explore.jpg"; $type = $vesseltype['name']; } if ($vesseltype['type'] == VESSEL_TYPE_TRADE) { $img = "trade.jpg"; $type = $vesseltype['name']; } if ($vesseltype['type'] == VESSEL_TYPE_BATTLE) { $img = "battle.jpg"; $type = $vesseltype['name']; } $tmp['image'] = $_CONFIG['IMAGE_URL'] . $_GALAXY['image_dir'] . "/ships/" . $img; $tmp['href'] = $href_url . "?cmd=" . encrypt_get_vars("showvid") . "&vid=" . encrypt_get_vars($vessel['id']); $tmp['name'] = $vessel['name']; $tmp['type'] = $type; $tmp['status'] = vessel_get_current_status($vessel_id, true); $tmp['status_nohref'] = vessel_get_current_status($vessel_id, false); $tmp['distance'] = $vessel['distance']; $tmp['angle'] = $vessel['angle']; $tmp['race'] = $race; return $tmp; }
function vessel_show_vessel_details($vessel_id) { assert(is_numeric($vessel_id)); global $_GALAXY; $vessel = vessel_get_vessel($vessel_id); $vesseltype = vessel_get_vesseltype($vessel_id); $status = vessel_get_current_status($vessel_id, "VESSEL_GETSTATUS_SHOW_HYPERLINKS"); print_image($_CONFIG['URL'] . $_CONFIG['URL'] . $_GALAXY['image_dir'] . "/vessels/" . $vesseltype['image'] . ".jpg"); echo "<table align=center border=0>"; echo "<tr class=wb><th colspan=2>Global Information</th></tr>"; echo "<tr class=bl><td> Name </td>"; echo "<td>" . $vessel['name'] . "</td></tr>"; echo "<tr class=bl><td> Impulse / Max </td>"; echo "<td>" . $vessel['impulse'] . " / " . $vesseltype['max_impulse'] . "</td></tr>"; echo "<tr class=bl><td> Warp / Max </td>"; echo "<td>" . number_format($vessel['warp'] / 10, 1) . " / " . number_format($vesseltype['max_warp'] / 10, 1) . "</td></tr>"; echo "<tr class=bl><td> Status </td>"; echo "<td>" . $status . "</td></tr>"; echo "<tr class=bl><td> Location </td>"; echo "<td>" . $vessel['distance'] . "/" . $vessel['angle'] . "</td></tr>"; list($extra_attack, $extra_defense) = vessel_calc_extra_attack_and_defense_points($vessel_id); echo "<tr class=bl><td> A / D / S </td>"; echo "<td>" . $vessel['cur_attack'] . "<sup>(+" . $extra_attack . ")</sup> / " . $vessel['cur_defense'] . "<sup>(+" . $extra_defense . ")</sup> / " . $vessel['cur_strength'] . " (" . $vessel['max_strength'] . ")</td></tr>"; echo "</table>"; // echo "</td></tr>"; // echo "</table>"; echo "<br><br>"; }