Jump to content

Recommended Posts

Posted

The inactive pilot system within phpVMS is atrocious. Honestly. I'm sorry to say it but it really is. I have a pilot who can no longer login. He filed 2 PIREPs recently yet the system says he's inactive. I reset him to active and it went back to inactive. My local.config.php states that inactive pilots should be able to login, yet this doesn't work. I'm getting really annoyed about this and something needs done. I have a bunch of pilots who can't fly because they can't login. This needs fixed - and fast.

Posted

There is nothing to determine admin access or not in the pilot database, how come it affected it? I changed all pilots to 0 in the retired field, and I changed all of the signature backgrounds - that's it!

  • Administrators
Posted

An ID or something must have changed when you were editing it. That's weird - there are no FK relationships for that to cascade.

The retire pilots doesn't work very well, true - any suggestions on what/how to fix it?

Guest lorathon
Posted

I completely changed the "Stable" code to retire pilots. The one thing that I never liked was that if a pilot never logged in the pilot would not be retired.So I change the query to be based on join date not the last log in date.

Here are the 2 queries.

// Retire pilots who have never logged in after x days from joining			
$sql = "SELECT * FROM ".TABLE_PREFIX."pilots
	WHERE DATE_SUB(CURDATE(), INTERVAL  {$days} DAY) > `joindate`  
		AND `totalflights` = 0 
		AND `retired` = 0";		

$results = DB::get_results($sql);

// Retire pilots who have not flown in x days
$sql = "SELECT * FROM ".TABLE_PREFIX."pilots
	WHERE DATE_SUB(CURDATE(), INTERVAL  {$days} DAY) > `lastpirep` 
		AND `totalflights` > 0 AND `lastpirep` != 0
		AND `retired` = 0";

$results2 = DB::get_results($sql);

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