Edwin Posted July 24, 2013 Report Share Posted July 24, 2013 I'm having the problem that when I add a second hub into my VA, all pilots are duplicated, so you see every pilot twice. I looked everywhere on the forum, but can't seem to find the correct search keys to find a solution for this. Basically what I would like to have is that my list is sorted by hub without any duplications from other hubs. Hope someone can help me or guide me into the correct direction. Thanks in advance! (note that i tried several codes found on the forum, but they all duplicate the table, so it must be in something else, but no idea where) Quote Link to comment Share on other sites More sharing options...
Fernando Posted July 24, 2013 Report Share Posted July 24, 2013 Please take a test this on your page scripit Pilots_list.tpl <style type="text/css"> <!-- .style1 {color: #FFFFFF} --> </style> <div class="cufon underline" style="width:auto; padding:5px; margin-top:10px; margin-bottom:10px; border-bottom: 3px solid; font-size: 24px;">Pilots</div> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tbody> </tbody> <td width="9%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Piloto ID</td> <td width="23%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Name</td> <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Rank</td> <td width="7%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Flight</td> <td width="11%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Hours</td> <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Lasted Flight </td> <td width="10%" height="10" align="center" bgcolor="#e97714" class="roster_header style1">Status</td> <?php foreach($allpilots as $pilot) { // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr class="roster_data" style="height: 20px;"> <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php echo $pilot->totalflights?></td> <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php if($pilot->lastpirep == 0) { echo 'None'; } else { $report = PIREPData::GetLastReports($pilot->pilotid, 1); echo date('d/m/Y', strtotime($report->submitdate)); } ?> </td> <td height="10" class="roster_data" align="center" style="border-bottom:1px dotted #CCCCCC"><?php if($pilot->retired == '1') {echo '<font class="inactive">Inactive</font>';} else {echo '<font class="active">Active</font>';} ?></td> <?php } ?> </tr> </table> Quote Link to comment Share on other sites More sharing options...
Edwin Posted July 25, 2013 Author Report Share Posted July 25, 2013 that is working You ok with that I adjust the code a bit to match with my website? Quote Link to comment Share on other sites More sharing options...
Fernando Posted July 28, 2013 Report Share Posted July 28, 2013 You can edit by dreamweaver If you experience any problems tell me the color you want I edit for you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.