82 lines
1.6 KiB
PHP
82 lines
1.6 KiB
PHP
<HTML><HEAD>
|
|
<TITLE>Frontier II</TITLE>
|
|
</HEAD><BODY BGCOLOR="#000000" TEXT="#f0f0f0">
|
|
|
|
<TABLE ALIGN="CENTER" VALIGN="CENTER" WIDTH="90%" HEIGHT="90%" BORDER="0">
|
|
<TR><TD>
|
|
|
|
<?php
|
|
|
|
session_start();
|
|
require($_SERVER['DOCUMENT_ROOT'].'/include.php');
|
|
|
|
if ($_SESSION['cid'] != '')
|
|
{ // Logged in
|
|
|
|
$cid = $_SESSION['cid'];
|
|
|
|
$sql = "SELECT * FROM `character` WHERE `id` = '$cid'";
|
|
$result = mysqli_query($mysqli, $sql) or die($gameerror . 'S-Q01');
|
|
$row = mysqli_fetch_assoc($result);
|
|
|
|
$cname = $row['name'];
|
|
$time = $row['time'];
|
|
$credits = $row['credits'];
|
|
$star = $row['location'];
|
|
$status = $row['status'];
|
|
|
|
echo "
|
|
<P>$cname
|
|
<BR>Hours: $time
|
|
<BR>Credits: $credits
|
|
<BR>Status: ";
|
|
|
|
if ($status == 1) {
|
|
echo "travelling";
|
|
} elseif ($status == 2) {
|
|
echo "deployed";
|
|
} else {
|
|
echo "idle";
|
|
}
|
|
|
|
$sql = "SELECT * FROM `star` WHERE `id` = '$star'";
|
|
$result = mysqli_query($mysqli, $sql) or die($gameerror . 'S-Q02');
|
|
$row = mysqli_fetch_assoc($result);
|
|
|
|
$sname = $row['name'];
|
|
|
|
echo "
|
|
<BR>Location: $sname
|
|
|
|
<P>Fleets in this sector:";
|
|
|
|
$sql = "SELECT * FROM `character` WHERE `location` = '$star'";
|
|
$result = mysqli_query($mysqli, $sql) or die($gameerror . 'S-Q03');
|
|
|
|
$num = mysqli_num_rows($result);
|
|
|
|
$i = 0;
|
|
|
|
while ($i < $num)
|
|
{ // display others in the region
|
|
|
|
$row = mysqli_fetch_assoc($result);
|
|
$ocname = $row['name'];
|
|
|
|
echo "<BR>$ocname";
|
|
|
|
$i++;
|
|
}
|
|
|
|
} else { echo $gameseserr; } // Not logged in
|
|
|
|
mysqli_close($mysqli);
|
|
|
|
echo "</TD></TR></TABLE>";
|
|
|
|
echo $footer;
|
|
|
|
?>
|
|
|
|
</BODY></HTML>
|