Parse error: syntax error, unexpected $end in /home/oneworld/public_html/lib/skins/crystal-II/frontpage_main.tpl on line 162
Here is the whole code for that page <div id="mainbox">
<h3>Welcome To One World Virtual</h3>
<?php
// Show the News module, call the function ShowNewsFront
// This is in the modules/Frontpage folder
MainController::Run('News', 'ShowNewsFront', 5);
?>
<?php
$flights = PIREPData::getRecentReportsByCount(15);
$string = "";
foreach($flights as $flight)
{
$string = $string.$flight->depicao.'+-+'.$flight->arricao.',+';
}
?>
<table>
<tr>
<th>LAST 15 FLIGHT LEGS</th>
</tr>
<tr>
<td><p align="center"><img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=690x360&PM=pemr:diamond7:red%2b%22%25I%22:red&PC=%230000ff" /><br />
Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L. Swartz</a>.</p></td>
</tr>
</table>
<?php
$count = 5;
$pireps = PIREPData::getRecentReportsByCount($count);
?>
<table>
<thead>
<tr>
<th>Flight #</th>
<th>Departure</th>
<th>Arrival</th>
<th>Duration</th>
<th>Pilot</th>
<th>Landing Rate</th>
</tr>
</thead>
<tbody>
<?php
if(count($pireps) > 0)
{
foreach ($pireps as $pirep)
{
$pilotinfo = PilotData::getPilotData($pirep->pilotid);
$pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
echo "<tr>";
echo "<td>'.$pirep->code.$pirep->flighnum.'</td>";
echo "<td>'.$pirep->depicao.'</td>";
echo "<td>'.$pirep->arricao.'</td>";
echo "<td>'.$pirep->flighttime.'</td>";
echo "<td>'.$pilotid.' '.$pilotinfo->firstname.' '.$pilotinfo->lastname.'</td>";
echo "<td>'.$pirep->landingrate.'</td>";
echo "</tr>";
}
}
else
{
echo "<tr><td>There are no recent flights!</td></tr>";
?>
</tbody>
</table>
</div>
</div>
<div id="sidebar">
<h3>Pilot Center</h3>
<?php
/*
Quick example of how to see if they're logged in or not
Only show this login form if they're logged in */
if(Auth::LoggedIn() == false)
{ ?>
<form name="loginform" action="<?php echo url('/login'); ?>" method="post">
<p>Log in to your pilot center or <a href="<?php echo url('/registration'); ?>">register</a><br />
<input type="text" name="email" value="Email/Pilot ID" onClick="this.value=''" />
</p>
<p>
<input type="password" name="password" value="Password" />
</p>
<p>
<input type="hidden" name="remember" value="on" />
<input type="hidden" name="redir" value="index.php/profile" />
<input type="hidden" name="action" value="login" />
<input type="submit" name="submit" value="Log In" />
</p>
</form>
<p>
<?php
}
/* End the Auth::LoggedIn() if */
else /* else - they're logged in, so show some info about the pilot, and a few links */
{
/* Auth::$userinfo has the information about the user currently logged in
We will use this next line - this gets their full pilot id, formatted properly */
$pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
?>
<strong>Pilot ID: </strong> <?php echo $pilotid ; ?>
<strong>Rank: </strong><?php echo Auth::$userinfo->rank;?><br />
<strong>Total Flights: </strong><?php echo Auth::$userinfo->totalflights?>, <strong>Total Hours: </strong><?php echo Auth::$userinfo->totalhours;?>
<br /><?php
} /* End the else */
?>
</p>
<p>
<?php MainController::Run('Mail', 'checkmail'); ?>
</p>
<h3>Recent Reports</h3>
<?php MainController::Run('PIREPS', 'RecentFrontPage', 5); ?>
<h3>Newest Pilots</h3>
<p>
<?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?>
</p>
<h3>Airline Stats</h3>
<p><strong>Total Schedules: </strong><?php echo StatsData::totalschedules(); ?></p>
<p><strong>Total Aircraft: </strong><?php echo StatsData::TotalAircraftInFleet(); ?></p>
<p><strong>Total Pilots: <?php echo StatsData::PilotCount(); ?></strong></p>
<p><strong>Miles Flown: </strong><?php echo StatsData::TotalMilesFlown(); ?></p>
<p><strong>Total Flights Flown: </strong><?php echo StatsData::TotalFlights(); ?></p>
<p><strong>Total Hours Flown: </strong><?php echo StatsData::TotalHours(); ?></p>
<p><strong>Passengers Carried: </strong><?php echo StatsData::TotalPaxCarried(); ?></p>
<p><strong>Fuel Burned (lbs.): </strong><?php echo StatsData::TotalFuelBurned(); ?></p>
<p><strong>Avg Landing Rate: </strong><?php echo ''.round(TouchdownStatsData::airline_average('airline'), 2); ?></p>
<p><strong>Total Flights Today: </strong><?php echo StatsData::totalflightstoday(); ?></p>
<p><strong>Total Cargo Carried: </strong><?php echo StatsData::TotalCargoCarried(); ?>
<h3>Users Online</h3>
<?php
foreach($usersonline as $pilot)
{
echo "<p>";
echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />';
echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname;
echo "</p>";
}
?>
<br />
Have <?php echo count($usersonline);?> Pilots Online.
<h3 class="style3">Guests Online </h3>
<p class="txt-red10"> Have <?php echo count($guestsonline);?> Guests Online.</div>
</div>