gr8 yw
gr8 yw
Wuhu - Perfect
Thank you so much - really appreciate your help
// Is there a simple way to show some text ( _=_Sorry rank too low) instead of the (now not displayed) “Add Bid” Link ?
Yes, But you’ll need to apply this inside the <td> tag that contains the “Add Bid” link. If you paste that part I can apply it for you.
So that would be somewhere in here ?
<a id="<?php echo $route->id; ?>" class="addbid"
href="<?php echo url('/schedules/addbid');?>"><strong>Book Flight</strong></a>
<?php }?>
</td>
Here it is:
<?php
if(Auth::LoggedIn())
{
if(Config::Get('RESTRICT_AIRCRAFT_RANKS') === true && Auth::LoggedIn())
{
$aircraft = OperationsData::getAircraftByReg($route->registration);
$pilotrank = Auth::$userinfo->ranklevel;
$aircraftrank = $aircraft->ranklevel;
if($aircraftrank > $pilotrank)
{
echo 'Sorry rank too low!';
}
else
{
?>
<a id="<?php echo $route->id; ?>" class="addbid" href="<?php echo url('/schedules/addbid');?>"><strong>Book Flight</strong></a>
<?php
}
?>
I’m not sure why, but i don’t quite get it
This is what my .tpl says, beginning from “if aircraftrank > pilotrank”
Doesn’t it say -> if the aircraftrank is higher than your rank then continue (ignore the rank) ?
if($aircraftrank > $pilotrank)
{
continue;
}
}
$route->daysofweek = str_replace('7', '0', $route->daysofweek);
if(strpos($route->daysofweek, date('w')) === false)
continue;
if(Auth::LoggedIn())
{
$search = array(
'p.pilotid' => Auth::$userinfo->pilotid,
'p.accepted' => PIREP_ACCEPTED
);
$reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED);
if(is_object($reports))
{
# IF the arrival airport doesn't match the departure airport
if($reports->arricao != $route->depicao)
{
continue;
}
}
if(!$reports)
{
if (Auth::$userinfo->hub != $route->depicao)
{
continue;
}
}
}
?>
<a id="<?php echo $route->id; ?>" class="addbid"
href="<?php echo url('/schedules/addbid');?>"><strong>Book Flight</strong></a>
<?php }?>
</td>
</tr>
<?php
/* END OF ONE TABLE ROW */
}}
?>
</tbody>
</table>
<hr>
But then your lines
if($aircraftrank > $pilotrank)
{
echo 'Sorry rank too low!';
}
else
{
say if the aircraftrank is higher than your rank, show “Sorry rank too low”
If not, then go on ?
I tried putting in your code, but i messed up somewhere as i only get a syntax error - “unexpected end blabla”
Send your TPL to my email and I’ll fix it for you.
cheers
Hi at all,
i have want made a restriction not by Rank but by Rating, but all what i do would fail didnt know what i can do!!! anyone here, they want help me to fix that iam a total noob and dont really know what iam doing