Jump to content

Aircraft Type Usage


Jeff

Recommended Posts

My site is near completion; only one remaining problem that I cannot get solved.

In the PILOT CENTER and PILOT PUBLIC PROFILE pages I have this problem:

I am trying to add a table to show Aircraft usage by ICAO code. Once that pilot has flown that aircraft I want it to show in the table, so we can keep track of how many hours a pilot has spent in the plane so they can earn an award for certain aircraft. I was trying to pull out the information from what was showing from the ADMIN CENTER (Aircraft Reports), with no success. Can someone help me with this. I have the table created, but the information I am trying to get will not show. Here is how I have the table:

<table align="center" border="0" width="100%">
<thead>
	<tr>
		<th bgcolor="#05305d" border="1">
			<strong><span style="font-size: 14px;"><span style="color: rgb(255, 255, 255);"><b>Aircraft Flight Information</b></span></span></strong></th>
	</tr>
</thead>
</table>
<table align="center" border="0" width="100%">
<thead>
	<tr>
		<th align="center" bgcolor="#05305d" border="1">
			<strong><font color="#ffffff">Aircraft</font></strong></th>
		<th align="center" bgcolor="#05305d" border="1">
			<strong><font color="#ffffff">Times Flown</font></strong></th>
		<th align="center" bgcolor="#05305d" border="1">
			<strong><font color="#ffffff">Total Distance</font></strong></th>
	</tr>
</thead>
<tbody>
	<tr>
		<td align="center"></td>  // This will show the Aircraft ICAO (EX: A319)
		<td align="center"></td>  // This will show the amount of times the aircraft was flown
		<td align="center"></td>  // This will show the total distance the aircraft was flown
	</tr>
	</tbody>
	</table>

Is there a code that will show this information? Please help me with this if you can.

Link to comment
Share on other sites

Ray, this is just part of the print r output I got out of it (for the A319) but I'm not sure how to read it.

Array ( [0] => stdClass Object ( [id] => 43 [icao] => A319 [name] => A319 [fullname] => Airbus A319 [registration] => AC-A319 [downloadlink] => http://www.virtualflightzone.net/index.php/pages/ac-a319 [imagelink] => http://www.virtualflightzone.net/images/aircraft/AC-A319.jpg [range] => 3600 [weight] => 166000 [cruise] => 0 [maxpax] => 124 [maxcargo] => 0 [minrank] => 4 [ranklevel] => 3 [enabled] => 1 [aircraft] => A319 [routesflown] => 4 [distance] => 4865 [totaltime] => 13:07:00 [averagedistance] => 1216.2500 [averagetime] => 3.0675 )

Mark, I actually looked at the profile_stats.tpl file earlier today, but it doesn't show how the swf is pulling the info:

<h3>Your Stats</h3>

<?php
/*
Added in 2.0!
*/
$chart_width = '700';
$chart_height = '250';

/* Don't need to change anything below this here */
?>
<div align="center" style="width: 100%;">
<div align="center" id="months_data"></div>
</div>
<br />
<div align="center" style="width: 100%;">
<div align="center" id="aircraft_data"></div>
</div>

<script type="text/javascript" src="<?php echo fileurl('/lib/js/ofc/js/swfobject.js')?>"></script>
<script type="text/javascript">
swfobject.embedSWF("<?php echo fileurl('/lib/js/ofc/open-flash-chart.swf');?>", 
"months_data", "<?php echo $chart_width;?>", "<?php echo $chart_height;?>", 
"9.0.0", "expressInstall.swf", 
{"data-file":"<?php echo actionurl('/pilots/statsmonthsdata/'.Auth::$userinfo->pilotid);?>"});


<?php
$chart_width = '700';
$chart_height = '300';

/* Don't need to change anything below this here */
?>
swfobject.embedSWF("<?php echo fileurl('/lib/js/ofc/open-flash-chart.swf');?>", 
"aircraft_data", "<?php echo $chart_width;?>", "<?php echo $chart_height;?>", 
"9.0.0", "expressInstall.swf", 
{"data-file":"<?php echo actionurl('/pilots/statsaircraftdata/'.Auth::$userinfo->pilotid);?>"});
</script>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...