Jump to content

Module


Aaron

Recommended Posts

I made a module so pilots can add flights to the database. I cleared the errors, but it sid it can't find the class "Auth" or "PilotGroups". Help me please. Here's the relevant code (.php) It is the action for a form that u put the departure and arrival airports etc. I only put the relevant part, below it connects to the database and updates the table where flightnum=$pilotid. Help is appreciated, I searched and fund out the code changes depending on location of the file or something so thats what I'm guessing happened.

<?php
$pilotid = Auth::$userinfo->pilotid;
echo $pilotid;
?>
<?php
if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))
{
?>
<input type="hidden" name="flightnum" value="00<?php echo $pilotid?>" />;
<?php
}
else
{
?>
<input type="hidden" name="flightnum" value="<?php echo $pilotid?>" />;
<?php
}
?>

Link to comment
Share on other sites

  • 2 weeks later...

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