Jump to content

Schedule template


Imanol

Recommended Posts

Hi everyone,

I would like to know how I can edit the schedule template adding more info, I want them to be shown this way

Flight number + Departure City (ICAO airport) + Arrival City (ICAO Airport)

For example:

AAN1234 Buenos Aires (SAEZ) - New York (KJFK)

Thanks!

Link to comment
Share on other sites

What I did was I went through every single airport and edited them all (over 1000 of them) and then created a table in the schedules_results.tpl

This what you could do.

<table>
   <tr>
       <th>Airline</th>
<th>Departure Airport</th>
<th>Arrival Airport</th>
<th>Aircraft</th>
<th>Bid Flight</th>
   </tr>
</tr>
    <td><?php echo $route->code. '-'. $route->flightnum ?></td>
    <td><font color="#333333" size="1"><?php echo $route->deptime;?></font><br /><font size="1"><strong><?php $departname = OperationsData::getAirportInfo($route->depicao);?><?php echo $departname->name;?></font></strong>/td>
    <td><font color="#333333" size="1"><?php echo $route->arrtime;?></font><br /><font size="1"><strong><?php $arrivename = OperationsData::getAirportInfo($route->arricao);?><?php echo $arrivename->name;?></font></strong></td>
    <td align="center"><font size="1"><?php echo $route->aircraft ?></font></td>
    <td><a id="<?php echo $route->id; ?>" class="addbid" 
			href="<?php echo actionurl('/schedules/addbid');?>">Add to Bid</a>
	<?php
	}
	else
	{
		if(Auth::LoggedIn())
		{
		 ?>
			<a id="<?php echo $route->id; ?>" class="addbid" 
				href="<?php echo url('/schedules/addbid');?>">Add to Bid</a>
		<?php			 
		}
	}		
	?>
</td>
</table>

There is a lot of missing coding in there to save space in this post, but I hope you get where I'm going here.

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...