Exemplo n.º 1
0
            $anzahl = 1;
        }
        if ($_GET["do"] == 7) {
            $richtung = "s";
            $anzahl = 1;
        }
        for ($i = 0; $i < $anzahl; $i++) {
            $foo = $schiff->navigieren($richtung, false, 0);
            echo $schiff->fehler[$foo];
        }
    }
}
$cur_feld = new Weltraum($schiff->position->x, $schiff->position->y, $schiff->position->system->id, $schiff->position->system->id > 0);
//self destruct
if ($_POST["do"] == 100) {
    $schiff->zerstoerung();
    die("Schiff wurde erfolgreich zerst&ouml;rt!");
}
if ($_GET["do"] == 64) {
    if ($schiff->warpkern == 0) {
        echo "Der Warpkern muss erst geladen werden!<br />";
    } else {
        $schiff->warpkernstatus = 1 - $schiff->warpkernstatus;
        mysql_query("UPDATE schiffe SET warpkernstatus=1-warpkernstatus WHERE id='{$schiff->id}'");
        if ($schiff->warpkernstatus == 1) {
            echo "<span class=\"success\">Warpkern wurde aktiviert!</span><br />";
        } else {
            echo "<span class=\"error\">Warpkern wurde deaktiviert!</span><br />";
        }
    }
}