コード例 #1
0
ファイル: fleet.php プロジェクト: sp1ke77/playconquest
			<td><b>Name</b></td>
			<td><b>Loc</b></td>
			<td><b>Size</b></td>
			<td><b>Destination</b></td>
			<td><b>Arrival Time</b></td>
			<td><b>Details</b></td>
			<td><b>Delete</b></td>
		</tr>';
$query = "SELECT id,name,loc,isplanet,inport,fuel,destination,destinationtime,combatid FROM fleet{$sid} WHERE ownerid={$id}";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
    echo '<tr>
			<td><a href="./fname.php?id=' . $row[id] . '">' . $row[name] . '</a></td>';
    //Print the planet name if on a planet or traveling if traveling
    if ($row[destination] > 0) {
        if (landFleet($sid, $row[id])) {
            echo '<td><a href="./planetdetails.php?id=' . $row[destination] . '">' . getPlanetStat(name, $sid, $row[destination]) . '</a></td>';
        } else {
            echo '<td>Traveling</td>';
        }
    } else {
        echo '<td><a href="./planetdetails.php?id=' . $row[loc] . '">' . getPlanetStat(name, $sid, $row[loc]) . '</a></td>';
    }
    //Continue printing
    echo '<td>' . fleetSize($sid, $row[id]) . '</td>';
    if (getFleetStat(destination, $sid, $row[id]) > 0) {
        $timeleft = timeLeft($row[destinationtime]);
        echo '<td><a href="./planetdetails.php?id=' . $row[destination] . '">' . getPlanetStat(name, $sid, $row[destination]) . '</a></td>';
        if ($timeleft > 0) {
            echo '<td>' . $timeleft . '</td>';
        } else {
コード例 #2
0
ファイル: landtax.php プロジェクト: sp1ke77/playconquest
<?php

require_once './www.playconquest.com/db_connect.php';
$servercount = getServerNumber();
for ($x = 1; $x < $servercount + 1; $x++) {
    $query = "SELECT id FROM fleet{$x} WHERE destination>0 AND combatid=0";
    $result = @mysql_query($query);
    $sid = $x;
    while ($row = mysql_fetch_array($result)) {
        landFleet($sid, $row[id]);
    }
}