Jump to content

Separate code's for VA and Schedules


PAL0001

Recommended Posts

  • Moderators

If I understood your question correctly, you want your pilots to have a pilot id like "PR002" and your flight routes are like "PAL123". For this you can add an airline in admin center with code "PR" and name "Philippine Airlines" and restrict your pilots to only use the "PR" airline at registration stage. For "PAL" all you need to do is to add your schedules with "PAL" airlines and that should do it. ;)

For restricting your pilots at registration stage open registration_mainform.tpl and find the following:

<dt>Select Airline: *</dt>
<dd>
 <select name="code" id="code">
 <?php
 foreach($allairlines as $airline)
 {
  echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';
 }
 ?>
 </select>
</dd>

Then change it to the following:

<dt>Select Airline: *</dt>
<dd>
 <select name="code" id="code">
 <?php
 foreach($allairlines as $airline)
 {
   if($airline->code == "PR")
   {
          echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';
   }
 }
 ?>
 </select>
</dd>

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