Jump to content

Recommended Posts

Posted

A little snipet that will help you add links for pilots over an amount of logged hours

Example i let people over 80 hours to access charter flights so when they go over 80 hours a link comes up in their profile

Change number 10 to less or more hours accordingly

<?php
$url = "http://www.websiteurl.net/index.php/charter";

$site_title = "Charter Flights";

if((Auth::$userinfo->totalhours + Auth::$userinfo->transferhours)<10)
{
//Dont show anything if hours are less than needed
}
else
{
Echo "<a href=$url>$site_title</a>" ;
}


?>

  • Moderators
Posted

Or a more direct snippet. :) +1 for your code

<?php
$url = "http://www.websiteurl.net/index.php/charter";
$site_title = "Charter Flights";
if((Auth::$userinfo->totalhours + Auth::$userinfo->transferhours)>=10)
{
Echo "<a href=$url>$site_title</a>" ;
}
?>

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