Hi all,
I am trying to show cutom filed in Pending PIREPS,
using the following code, any help in foreach code ?
I got one issue where to put this and correct way to add it :
<?php
foreach($pilot_list as $pilot)
{
?>
<?php
}
?>
Because in pending PIREPs i call for : foreach ( pireps as pirep !
Thank you
<tbody>
<?php
foreach($pireps as $pirep)
{
if($pirep->accepted == PIREP_PENDING)
$td_class = 'pending';
else
$td_class = '';
$error = false;
?>
<tr class="<?php echo $class?> pirep_list" id="row<?php echo $pirep->pirepid;?>">
<td align="center" valign="top" nowrap="nowrap" style="width: 27px;" class="<?php echo $td_class;?>">
<img height="25px" width="25px" src="<?php echo PilotData::GetPilotAvatar($pirep->pilotid);?>" align="left" />
</td>
<td align="left" valign="top" nowrap class="<?php echo $td_class;?>">
<strong><a href="<?php echo SITE_URL?>/admin/index.php/pilotadmin/viewpilots?action=viewoptions&pilotid=<?php echo $pirep->pilotid;?>">
<?php echo PilotData::GetPilotCode($pirep->pcode, $pirep->pilotid) . ' - ' .$pirep->firstname .' ' . $pirep->lastname;?></a>
<!-- Here i would like to show VATSIM or IVAO ID using the following code -->
l <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM CID or IVAO VID'); ?>
</strong>
<strong>Flight:</strong> <?php echo $pirep->code . $pirep->flightnum; ?></div>
<strong>Dep/Arr: </strong><?php echo $pirep->depicao; ?>/<?php echo $pirep->arricao; ?>
<strong>Flight Time: </strong><?php echo $pirep->flighttime; ?> <br />
<strong>Submit Date: </strong><?php echo date(DATE_FORMAT, $pirep->submitdate); ?>
<strong>Current Status: </strong> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM CID or IVAO VID');?>
<?php
if($pirep->accepted == PIREP_ACCEPTED)
echo 'Accepted';
elseif($pirep->accepted == PIREP_REJECTED)
echo 'Rejected';
elseif($pirep->accepted == PIREP_PENDING)
echo 'Approval Pending';
?>
<?php
# If there was an error, don't allow the PIREP to go through
if($pirep->aircraft == '')
{
$error = true;
}
?>
<table width="100%" style="border: none;">