Ejemplo n.º 1
0
    if ($i % 10 == 0 && $oflaeche == 50) {
        echo '</tr>';
    }
    if ($i == 56 && $oflaeche == 24) {
        echo '</tr>';
    }
}
echo '</table>';
echo '<br />';
echo '<h4>Schiffe im Orbit</h4><form action="planet.php?pid=', $planet->id, '" method="post"><table><tr><td>';
$sio = mysql_query("SELECT * FROM schiffe WHERE typ='s' AND orbit=1 AND x='" . $planet->position->x . "' AND y='" . $planet->position->y . "' AND system='" . $planet->position->system->id . "' AND tarnung=0");
if (mysql_num_rows($sio) > 0) {
    echo '<select name="target">';
    while ($ship = mysql_fetch_array($sio)) {
        $tship = new Schiffe($ship["id"]);
        echo '<option value="', $tship->id, '">', $tship->filtername(), ' (', $tship->id, ') Energie: ', $ship["energie"], '/', $ship["maxenergie"], '</option>';
    }
    echo '</select>';
} else {
    echo 'kein Schiff im Orbit';
}
echo '</td><td>';
$bu = new Button("", "Ziel einstellen");
$bu->printme();
echo '</td>';
if ($target != '') {
    // Ziel erfasst)
    $schiff = new Schiffe($target);
    echo '<td>', $schiff->besitzer->id == $_SESSION["Id"] ? '<a href="schiffe.php?sid=' . $schiff->id . '">' : '', '<img src="', $schiff->bild, '" border="0" />', $schiff->besitzer->id == $_SESSION["Id"] ? '</a>' : '', '</td><td>', $schiff->name, '(', $schiff->id, ')</td><td>S:', $schiff->schildstatus == 0 ? '<span>' : '<span style="color:yellow;">', $schiff->schilde, '/', $schiff->maxschilde, '</span></td>';
    echo '<td><a class="button energie" onmouseover="Tip(energ)" onmouseout="UnTip()" href="energie.php?fp=', $planet->id, '&ts=', $schiff->id, '"><span>E</span></a></td>';
    echo '<td><a class="button beamto" onmouseover="Tip(hbeamps)" onmouseout="UnTip()" href="beam.php?modus=1&from=P-', $planet->id, '&to=S-', $schiff->id, '"><span>Be</span></a></td>';