Jump to content

Disable Pilot Registration


Thomasha

Recommended Posts

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! :-)

Link to comment
Share on other sites

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 by Thomasha
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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 :-)

 

Link to comment
Share on other sites

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