what will be the php code to hide something if a pilot doesnt have enough hours say you dont want something seen by any member or pilot unless they have a minimum of 30 hours ? I have seen this before somewhere but dont remember
what will be the php code to hide something if a pilot doesnt have enough hours say you dont want something seen by any member or pilot unless they have a minimum of 30 hours ? I have seen this before somewhere but dont remember
2 hours ago, vbegin7 said:
what will be the php code to hide something if a pilot doesnt have enough hours say you dont want something seen by any member or pilot unless they have a minimum of 30 hours ? I have seen this before somewhere but dont remember
Hi, see if it works.
if(Auth::$userinfo->totalhours < 30){
echo ‘You do not have permission to access this page. You must have at least 30 hours of flight’;
return;
}
I know it’s somewhere in the free charter module but I don’t know exactly where. It is set for 30 hours I think and I changed it to 10 hours, but can’t remember exact;y! Should be able to figure out how to use that code, maybe
I’ll try it thanks
This should be it. Of course you’ll have to figure out how to use it Should be if they have over 10 hours ( which is what I have my Charter Access set too ) they are granted access to use the Charter Module. Once again you would have to edit for your needs. Above my pay grade at this time! I’ll post what looks to be the enter code, but I could be wrong.
<?php
if ((Auth::$userinfo->totalhours + Auth::$userinfo->transferhours)>10)
{
?>
Entire code for access:
<?php
}
elseif(Auth::LoggedIn())
{
?>
<?php
if ((Auth::$userinfo->totalhours + Auth::$userinfo->transferhours)>10)
{
?>
<?php
$icao = ‘CH’;
$price = Auth::$userinfo->pilotid;
$count = SchedulesData::countCharterSchedules($icao, $price);
if($count < 30)
{
?>
Good luck. Share you code if you figure it out for another purpose