Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mark1million

  1. HI this is clearly a host issue, i would say to them to sort it or your off. In the mean time download your files and edit then upload.
  2. Gents, I am after modifying this code to be able to use it via an external php page and run as a cron to auto retire a pilot who has not flown an initial flight within 7 days of joining. I am also looking at when removing them from active to changing their email as i have had complaints about every time the maintenance cron is run all inactive pilots keep getting the retired email. This is what i thought, move their existing email to the admin notes field and leaving their mail as blank, that will stop emails then when they want to rejoin all an adminn has to do is update their email from that notes box and move to active. I don't mind paying someone if required. <?php if ($userinfo->lastpirep == '0000-00-00 00:00:00') { echo '<p id="error">You have not yet flown any flights!<br />Please be aware that you must file a pirep within 7 days of joining or your account will be deactivated.</p>'; } else { $datebefore1 = substr($userinfo->lastpirep, 0, 10); $datetoday2 = date("Y-m-d"); $datebefore3 = strtotime($datebefore1); $datetoday4 = strtotime($datetoday2); $newdate = $datetoday4-$datebefore3; $lastpirep = floor($newdate/(60*60*24)); $daysleft = $totaldays-$lastpirep; echo '<p id="success">Your last flight was '; if ($lastpirep == 0) { echo 'today'; } else if ($lastpirep == 1) { echo 'yesterday'; } else { echo $lastpirep . ' day(s) ago.'; } echo '&nbspYou have '; if ($daysleft == 5000) { echo ''; } else { echo $daysleft . '&nbspdays left until you are marked as retired'; } } ?> <?php } ?>
  3. You can display what you want by using a custom sql to display the id of the field.
  4. Don't worry i have decided to run it septate from the core under a php file extension and as a scheduled cron job.
  5. I want to run some manual updates on my pirep table, is it best to use a separate connect out side of the core to execute my queries or base it on the existing maintenance cron?
  6. Im having a blond moment Its not the registration but another script i run that i need to run this on Cheers Tom.
  7. HI i want to refine the registration code to further sanitise against white spaces at the end of the names firstname lastname. I have been looking at the rtrim functions in php, just wondering the best way to add this or even if there is a better function to use in the existing registration array. $data = array( 'firstname' => $this->post->firstname, 'lastname' => $this->post->lastname, Cheers.
  8. Hi I dont really understand why you would want to use this, there is already a manual way of filing a pirep in to phpVMS. You could look at the current form and add validation using JavaScript if you wish, that would be easier than trying to implement that.
  9. I have this code being used on my system and I want to ensure this happens, User input is, john doe acb1234 Convert to, John Doe ABC1234 So first letter in the names are upper case, airline code is capitals. I have been looking at, I already have the variable $pilot_id_full outputting correctly. $pilot_id_full = $fname.' '.$lname.' '.$code; So i was thinking, $pilot_id_full = ucfirst ($fname.' '.$lname).' '.$code; Not tested by the way just is why im after a bit of guidance of the best way to achieve this.
  10. For pireps yes, the code is in the forums here.
  11. You know what i tried everything apart from that....... typical, Many thanks Dave.
  12. Thats not really the point of it, the point is if they do stall or something else happens thats not supposed to i want to be able to highlight it in the log so it jumps out at you.
  13. I dont mean to harp on about this but has anyone else tried, I cant get the if statement to change the display colour, just wondered if any one else has managed to get it to work? Cheers.
  14. Just registered, works OK with me as well.....
  15. Its really simple, if you want it then buy it, the price is the price and if your not willing to pay that then code it your self.
  16. I have been there many times wondering why i still see the old images scratching my head
  17. Do you have a background.png image so the system can generate from?
  18. Looking good Jon, the only thing that stands out to me is you're map size on the view pireps page Clean looking site Easy to navigate A broken link i came across Didn't really have a long poke about though
  19. Try are clear the browser cache, call the page and press Ctrl+F5 a few times
  20. Yes you can just define the size instead of using the config get.
  21. No you can copy that file and use the first insert into but use all the values ending the statement with a ; you should be able to import the lot.
  22. It may not let you do that as the first value is set auto incremental, you could try with and without to see what happens.
  23. Its above there, try and import that and see what error messages you get. http://forum.phpvms.net/topic/6103-phpmyadmin-upload-error/page__view__findpost__p__40975
×
×
  • Create New...