Jump to content

mseiwald

Members
  • Posts

    435
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mseiwald

  1. it works on my site..... where do you want to have this info? profile_main.tpl?
  2. What about Kyles answer in the 4th post??
  3. michael try to write a </div> at the end of the template.... it looks like you have an open div there somewhere
  4. yeah i`m very interested Kyle that`s a great feature
  5. Hey guys, I have got a problem with the close bids after expire function. The CRON job removes the bid so it`s no longer displayed under the recentbids but as i have disable SCHED on BIDS active it doesn`t show up in my schedules again after the cron job has removed the bid. I have to delete the flight completely from the schedules and add it as a new flight in order to make it show up again. So in the maintenance.php i just find this: if(Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === true) { SchedulesData::deleteExpiredBids(); CronData::set_lastupdate('check_expired_bids'); } but where can i find the code for what actually is happening then so that i can take a look and find out what`s going wrong there. ok i found it in SchedulesData public static function deleteExpiredBids() { $cache_time = Config::Get('BID_EXPIRE_TIME'); if($cache_time == '') { return; } $sql = 'DELETE FROM '.TABLE_PREFIX."bids WHERE `dateadded` + INTERVAL {$cache_time} HOUR < NOW()"; DB::query($sql); } if i get it right it deletes the bid from the _bids table..... but does it also update the bidid column in the schedules table to 0 again?!? i think that is the reason why it doesn`t show up...is that possible?
  6. haha you are right about that
  7. ehm.....looking at that topic with 3 replies i wouldn`t call it as discussed extensively
  8. come on....go to your admin panel...airline operations -> flight schedules & routes.... then click add schedule and add each of the flights seperately. you can not assign different times to only 1 flight number! you`ll have to create a seperate flight for each time you want the route to be served.
  9. mseiwald

    Graphs

    i also don`t get a message
  10. that`s great.... i have added it to my schedules in a bit different way by just displaying an image thank you very much for that.
  11. great! so i can mark that thread as solved
  12. there is nothing else to do... i got into phpMyAdmin and added a column called lastflown at the bottom of the schedules table then the original code inside the SchedulesData.class.php was */ public static function IncrementFlownCount($code, $flightnum) { $schedid = intval($schedid); $code = strtoupper($code); $flightnum = strtoupper($flightnum); $sql = 'UPDATE '.TABLE_PREFIX."schedules SET timesflown=timesflown+1 WHERE code='{$code}' AND flightnum='{$flightnum}'"; $res = DB::query($sql); if(DB::errno() != 0) return false; return true; } i changed that to: public static function IncrementFlownCount($code, $flightnum) { $schedid = intval($schedid); $code = strtoupper($code); $flightnum = strtoupper($flightnum); $today = $today = date("Y-m-d"); $sql = 'UPDATE '.TABLE_PREFIX."schedules SET timesflown=timesflown+1, lastflown='$today' WHERE code='{$code}' AND flightnum='{$flightnum}'"; $res = DB::query($sql); if(DB::errno() != 0) return false; return true; } now the lastflown column is updated whenever a pirep is filed with the actual date and that can be called in the schedule_results.tpl by using $route->lastflown i have the if statement in the schedules_results.tpl like that: $today = date("Y-m-d"); if($route->lastflown == $today) { .................. } and it works just perfect hehe
  13. I got it that works: public static function IncrementFlownCount($code, $flightnum) { $schedid = intval($schedid); $code = strtoupper($code); $flightnum = strtoupper($flightnum); $today = $today = date("Y-m-d"); $sql = 'UPDATE '.TABLE_PREFIX."schedules SET timesflown=timesflown+1, lastflown='$today' WHERE code='{$code}' AND flightnum='{$flightnum}'"; $res = DB::query($sql); if(DB::errno() != 0) return false; return true; }
  14. how would i try it that way you suggested? the reason why the thing with the schedules table came to my mind is because there already is the column "timesflown" in there which actually shows the count how often the route was flown. I was thinking that has to be Incremented by the PIREPData.class when a pirep was submited.... so i thought if that info can be passed into the schedules table it also should be possible to pass the date into another column of the schedules table. or comes the timesflown from the bids which of course would then be inside the SchedulesData.... EDIT: ok i just found it is in the schedules data */ public static function IncrementFlownCount($code, $flightnum) { $schedid = intval($schedid); $code = strtoupper($code); $flightnum = strtoupper($flightnum); $sql = 'UPDATE '.TABLE_PREFIX."schedules SET timesflown=timesflown+1 WHERE code='{$code}' AND flightnum='{$flightnum}'"; $res = DB::query($sql); if(DB::errno() != 0) return false; return true; } however from where does the info come to increment it? .... or wait... wouldn`t it be possible to just add that to this function to populate the lastflown column with the date too? we wouldn`t even need to look for the pirep submitdate...it would be enough if everytime a flight is incremented by 1 also the lastflown column is updated by todays date. that would be enough
  15. <?php $last_location = PIREPData::getLastReports($userinfo->pilotid, 1, PIREP_ACCEPTED); echo "<strong>Your current Location:</strong> {$last_location->arricao}"; ?> this should give you the pilot`s actual location
  16. yeah i know i already came that far by getting it via PIREPData::getRecentReportsByCount(50) inside the schedule_results.tpl. $reports = PIREPData::getRecentReportsByCount(50); foreach($reports as $report) { $pirepdate = date(DATE_FORMAT, strtotime($report->submitdate)) $today = date("Y-m-d"); If($today == $pirepdate && $report->flightnum == $route->flightnum) { echo.......(some images...because what i originally wanted was to have a image displayed if the route was flown and another if it wasn`t flown. } else { echo..... } } this brought up the right image of course but besides the one i wanted to show only for the already flown routes it also was giving out 49 times the other image hehe there is a function missing to get the latest Pirep by code & flightnum.... that would be a way to get it done. So it came to my mind to add the latest submitdate directly into the schedules table......that way you wouldn`t need a second foreach loop. Isn`t it possible to have the column lastflown in the schedules table populated with the submitdate when a pirep is filed?
  17. i think i have found a easy way that allows to hide the already flown flights from the schedules for that day. i have created a new column in the schedules table called "lastflown" now when a pirep is sent it should automatically insert the submitdate into that column. so it will be easy to skip those flights from being displayed by just adding a if statement like if($route->lastflown == $today) { continue; } i already tried to make it work but failed. I don`t get the lastflown column populated with todays date. I was trying to add a update function to the PIREPData.class.php to add the submitdate into the lastflown column where code and flightnumber match schedules<->pirep. it would be amazing if someone could tell me how i can update that table....i just need the submitdate that is sent to the pireps table anyway to also populate the column in the schedules table. I hope that wouldn`t be too difficult. kind regards Manuel
  18. Jap i have the same issue with the greased landings (null)
  19. Hi Daniel, And you obviously did the same to my reply I stated that this is correct....but I`m sure also Aer Lingus uses different flight numbers, different dep/arr times and maybe for some reason even different routings at different times. Yeah of course it only is well known in German Speaking Countries because their website is in German only. Of course we all fly for fun. But what i said was a virtual airline shall be for pilots who fly for fun && want to simulate a realistic airline operation. I call Hellenic Airways a virtual "AIRLINE", not a virtual flying club and not a online logbook for fun flyers or something like that. It is stated several times on my website that " we simulate the operations of real world airlines as close as possible". Also in our Operations Manual which is accessible for the public all reasons for PIREPS being rejected are listed. So everyone has the chance to see how we operate and that we are aiming for a as real as it gets simulation before joining us. I don`t think it will cause a lot of trouble if we do it the way Jeff has proposed. Also when the Flights are disabled for the rest of that day people won`t be able to fly them anymore. So no need to reject any PIREPS for that reason. I thank you for sharing your concerns....however i don`t think that making the VA more realistic will result in pilots not to join us but in fact the opposite. Nobody is forced to use this modification. One can if he wants a more realistic operation but nobody must add it. There are so many VA`s out there....and also thousands of Flightsim enthusiasts. I don`t need 100s of pilots in my VA....it would be enough to just have 30 active people or so who wants to fly realistic airline operations just as i and my staff do.....and if someone wants to fly just for fun he is free to join any of the 1000 other VA`s out there. kind regards
  20. thank you! that would be great. i`ll see if i can get this to work somehow and if i fail I`ll let you know
  21. hmmmm i have no idea how to disable the schedules upon pirep submission and how to write the cron job. i would be really grateful if one of you could help me with that.
  22. oh but i see one problem there....what about the tour flights? they of course should be bookable anytime. That was the reason why i tried to check the pirep date with todays date and based on that just exclude the flights from being displayed on the schedules. Because then it would be possible to exclude all tour flights...in my case all have a T in the flightnumber...so it`s easy to identify them. EDIT: not a problem anymore.... I`ll just add the booking buttons to the tour page directly...so there is no need to have them inside the regular schedules anymore then.
  23. that sounds like a good way. how would i do that? do you have a code for such a cron job? that would be great.
×
×
  • Create New...