Ejemplo n.º 1
0
function show_stats_ship(Ship $ship, $key)
{
    $weapons = $ship->getWeapons();
    echo "<div>";
    echo "<div style='float:left;'>";
    echo '<h4>[ Name ] : ' . $ship->getName() . '(' . $key . ')' . '</h4>';
    echo '<ul>';
    echo '<li>[ PV ] : ' . $ship->getPv() . '</li>';
    echo '<li>[ Vitesse ] :' . $ship->getCm() . '</li>';
    echo '<li>[ Manoeuvre ] : ' . $ship->getManeuver() . '</li>';
    echo '<li>[ Shield ] : ' . $ship->getShield() . '</li>';
    echo '<li>[ PP ] : ' . $ship->getPp() . '</li>';
    echo '</ul>';
    echo "<div>";
    echo '<h4> Weapons</h4>';
    echo "<ul>";
    show_stats_weapons($weapons);
    echo '</ul>';
    echo "</div>";
    ?>
			<p>
	       <form action="weapon.php" method="POST">
	       <?php 
    echo '<input type="hidden" name="ship" value="' . $key . '"">';
    ?>
	            <select style='width:150px;' name="weapon" id="ID">
					<?php 
    display_weapon_name($weapons);
    ?>
	            </select>
	           <input type='submit' name='submit' value="set_weapon">
	        </form>
	        </p>
		<?php 
    echo "</div>";
    echo "</div>";
}