Bluegrass Airlines Roster
This is a public roster. To submit or view PIREPS, you must sign in.
if (isset($HTTP_REFERER)) {
echo "Back";
} else {
echo "back";
}
?>
Pilot# |
Name |
Home |
Flight
Hours |
Position |
Last PIREP |
Status |
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM pilots ORDER BY bga ASC";
$result=mysql_query($query);
$num=mysql_numrows($result);
if ($num==0) {
echo "No Records Found
";
exit();
} else {
for($i=0; $i<$num; ++$i) {
$id=mysql_result($result,$i,"id");
$bganumber=mysql_result($result,$i,"bga");
$bga=strtoupper($bganumber);
$name=mysql_result($result,$i,"name");
$minutes=mysql_result($result,$i,"minutes");
$home=mysql_result($result,$i,"home");
if ($home=="") $home="-";
$lastfile=mysql_result($result,$i,"lastfile");
$hours=round($minutes/60,2);
$is_admin=mysql_result($result,$i,"admin");
//Begin Rank Determination
if ($hours>="1000") {
$rank="ATP Captain";
} else if ($hours>="500") {
$rank="Senior Captain";
} else if($hours>="100") {
$rank="Captain";
} else if($hours>="10") {
$rank="First Officer";
} else {
$rank="Pilot";
}
//End Rank Determination
//Begin Status Check
$now = time();
$expire=$lastfile+(86400*90); // 86400 is number of seconds in a day, *30 means multiply by 30
$lastfiledate=date('M d, Y',$lastfile);
if ($now>$expire) {
$statusflag = 'Inactive';
$statuscolor = 'red';
} else {
$statusflag = 'Active';
$statuscolor = 'green';
}
?>
echo "$bga"; ?> |
echo $name; ?> |
echo $home; ?> |
echo $hours; ?> |
echo $rank; ?> |
echo $lastfiledate; ?> |
echo $statusflag; ?> |
if($bgcolor=="white") {
$bgcolor="silver";
} else {
$bgcolor="white";
}
} }
echo "
";
mysql_close();
?>
Back to Top