Exemplo n.º 1
0
<?php

#DB connectivity test
include "./db_access/db.php";
connect();
var_dump(getSlot(1, 1));
?>
<html>
	<head>
	</head>
	
	<body>
		
		<form action="./local-map" method="POST">
			<input name="player" type="text" placeholder="Player name"/><br>
			<input name="x" type="text" placeholder="selected x coordinate"/><br>
			<input name="y" type="text" placeholder="selected y coordinate"/><br>
			<button type="submit">Submit</button>
		</form>
	</body>
</html>
Exemplo n.º 2
0
    $betray = true;
}
if (!ctype_digit($fid)) {
    $betray = true;
}
$tmp = mysql_query("SELECT besitzer FROM planeten WHERE id='{$pid}'");
while ($testtmp = mysql_fetch_array($tmp)) {
    if ($_SESSION["Id"] != $testtmp["besitzer"]) {
        $betray = true;
    }
}
if ($betray) {
    echo 'Du bist nicht eingeloggt oder du versucht auf fremde Accounts zuzugreifen...';
} else {
    //CHEATSCHUTZ ENDE
    $slots = getSlot($_SESSION["Id"]);
    if ($slots >= 50) {
        echo 'Dein Schiffslimit ist leider ausgereizt. <br /><br />Du hast ', $slots, ' von 50 SLotpl&auml;tze verbraucht!<br />Frachter und Tanker verbrauchen 1 SLot, Oberth 1 SLot, Miranda 2 Slots, Constitution 3 SLots, Raumstationen 2 Slots!';
    } else {
        if (isset($_POST["pschiff"])) {
            //schiffbau
            $b = new Bauplan_Schiffe(mysql_real_escape_string($_POST["pschiff"]));
            $p = new Planeten($pid);
            //check Waren
            $buildit = true;
            for ($i = 0; $i < sizeof($p->frachtraum->fracht); $i++) {
                if ($p->frachtraum->fracht[$i]->anzahl < $b->kosten->fracht[$i + 1]->anzahl) {
                    $buildit = false;
                }
            }
            if ($buildit && $p->energie >= $b->kosten->fracht[0]->anzahl) {
Exemplo n.º 3
0
        $tt = " ORDER BY x,y ASC";
    }
    if ($order == 'kd') {
        $tt = " ORDER BY x,y DESC";
    }
    if ($order == 'ta') {
        $tt = " ORDER BY klasse ASC";
    }
    if ($order == 'td') {
        $tt = " ORDER BY klasse DESC";
    }
    ?>

    <form action="createflotte.php" method="post">
        <h3>Schiffsauswahl Slots: <?php 
    echo getSlot($_SESSION["Id"]) >= 50 ? '<span style="color:red;">' . getSlot($_SESSION["Id"]) . '</span>' : '<span style="color:green;">' . getSlot($_SESSION["Id"]) . '</span>';
    ?>
/50</h3><table class="liste">
            <tr>
                <th>Display</th>
                <th><a href="schiffchoice.php?order=<?php 
    echo $order == 'ta' ? 'td' : 'ta';
    ?>
">Typ</a></th>
                <th><a href="schiffchoice.php?order=<?php 
    echo $order == 'na' ? 'nd' : 'na';
    ?>
">Name</a></th>
                <th><a href="schiffchoice.php?order=<?php 
    echo $order == 'ka' ? 'kd' : 'ka';
    ?>