Thomasha Posted December 7, 2017 Report Share Posted December 7, 2017 Hello Guys, I need your help. We would like to disable the Pilot Registration Site if i.E. 300 Pilots are in our VA. When we delete a Pilot and came so bellow 300 again it should be enabled again. Here a snipout of our Website to show the Registration: <li class="b-top-nav__2level_title f-top-nav__2level_title">Register</li> <li class="b-top-nav__2level f-top-nav__2level f-primary"><a href="<?php echo SITE_URL?>/index.php/registration"><i class="fa fa-angle-right"></i>Register</a></li> Thanks in advance for your help! :-) Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted December 8, 2017 Moderators Report Share Posted December 8, 2017 Do you want to count the active pilots of your virtual airlines or the pilots that are includes in your virtual airline's database? Quote Link to comment Share on other sites More sharing options...
Thomasha Posted December 8, 2017 Author Report Share Posted December 8, 2017 (edited) Hi Servetas, we want to count the total Pilots in our Database :-) And.. if its possible... insted of disable the registration when the maximum is reached, just forward the person to a site which says ("sorry our VA is currently full...........") Thanks for your support Edited December 8, 2017 by Thomasha Quote Link to comment Share on other sites More sharing options...
LeonardIGO4036 Posted December 10, 2017 Report Share Posted December 10, 2017 On 08/12/2017 at 8:22 PM, Thomasha said: Hi Servetas, we want to count the total Pilots in our Database :-) And.. if its possible... insted of disable the registration when the maximum is reached, just forward the person to a site which says ("sorry our VA is currently full...........") Thanks for your support 1. To count your total pilots, I guess there's a function for it on StatsData.class.php Just open that file from core > Common and search up for the function. Once you find the right function, call it For example <?php echo StatsData::get_all_pilots(); ?> 2. Okay, I guess I can help with that, Had done this for a VA. It's really simple, once you find the total pilots, write a simple conditional statement, " if($totalpilots > 299) { echo 'We are currently not hiring'; } else { echo 'We are hiring pilots, Register now! } " ^ this is just for an example, if you want a full code of this, please wait till tomorrow, I will reach home and send you. Quote Link to comment Share on other sites More sharing options...
Thomasha Posted December 10, 2017 Author Report Share Posted December 10, 2017 7 hours ago, LeonardIGO4036 said: 1. To count your total pilots, I guess there's a function for it on StatsData.class.php Just open that file from core > Common and search up for the function. Once you find the right function, call it For example <?php echo StatsData::get_all_pilots(); ?> 2. Okay, I guess I can help with that, Had done this for a VA. It's really simple, once you find the total pilots, write a simple conditional statement, " if($totalpilots > 299) { echo 'We are currently not hiring'; } else { echo 'We are hiring pilots, Register now! } " ^ this is just for an example, if you want a full code of this, please wait till tomorrow, I will reach home and send you. Hi, thanks for your reply. 1. Yes to count the total Pilots we use: <?php echo StatsData::PilotCount(); ?> 2. Something in this direction I've also thought, unfortunately I havn't yet managed to implement it. If you can send me your code it would be highly appreciated. Thanks in advance :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.