Jump to content

Accepting PIREPS


Colin

Recommended Posts

  • Moderators

Open pireps_list.tpl in admin/templates and look for the following button:

<?php
   # If there was an error, don't allow the PIREP to go through
   if($error == false)
   {

   ?>
       <button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="approvepirep"
       id="<?php echo $pirep->pirepid;?>" class="pirepaction {button:{icons:{primary:'ui-icon-check'}}}">Accept</button>

       <?php

   }
   ?>

Now you need to add an if statement to it like this:

<?php
# If there was an error, don't allow the PIREP to go through
if($error == false)
{
if($pirep->pilotid != Auth::$userinfo->pilotid)
{
?>
<button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="approvepirep"
id="<?php echo $pirep->pirepid;?>" class="pirepaction {button:{icons:{primary:'ui-icon-check'}}}">Accept</button>

<?php
}
}
?>

This will remove the "accept" button if the pirep belongs to the staff. ;):D

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