Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by web541

  1. Yes, this is specifically for the hub module. Check this post Put that in the hubview.tp/.php file
  2. What I've done is made a hook for phpBB a while back (not sure if it still works), but it automatically registers the user into the DB so that they can have an account ready to go, this is a module for phpVMS though, so you register at phpVMS and an account is created at phpBB automatically, not the other way around (like you had asked). It also requires both phpBB and phpVMS to be installed into the same database. Like you wanted above, this is phpVMS-phpBB not the way you suggested so you probably won't make use of it, but I'll link it anyway. As the others have said, logging in with a single login is not easily possible at this stage.
  3. This should already be implemented by default (if I'm not mistaken). The full list ordered by pilot ids are an extra edit which has become available. https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/Pilots/Pilots.php#L28 So unless the author of the CrewCentre has modified the module, then it should work automatically. (ordered by pilot hub)
  4. In case you are in need of inspiration
  5. This might be what you are looking for https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/templates/activity_list.php
  6. Try using this <?php $dep_schedules = SchedulesData::findSchedules(array('depicao' => $hubs->icao)); foreach($dep_schedules as $sched) { echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao; echo '<br />'; } $arr_schedules = SchedulesData::findSchedules(array('arricao' => $hubs->icao)); foreach($arr_schedules as $sched) { echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao; echo '<br />'; } ?> You can then format it how you would like in your template.
  7. Had to dig deep to find this as the code is scattered, but here it is https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/lang/en.lang.php#L84
  8. Has the pilot filed any flights? Try this <?php $allpireps = PIREPData::getLastReports(Auth::$userinfo->pilotid, 5); if(!$allpireps) { echo 'No PIREPS Found For This Pilot!'; } else { foreach($allpireps as $pirep) { echo $pirep->code.$pirep->flightnum.' | '.$pirep->depicao.' - '.$pirep->arricao; echo '<br />'; } } echo '<br />'; echo '<pre>'; print_r($allpireps); echo '</pre>'; ?>
  9. The above does work for example on the profile_main template, where abouts do you want to put this info (what page?), the pilot variable is different in some places.
  10. <?php $allpireps = PIREPData::getLastReports(Auth::$userinfo->pilotid, 5); foreach($allpireps as $pirep) { echo $pirep->code.$pirep->flightnum.' | '.$pirep->depicao.' - '.$pirep->arricao; echo '<br />'; } ?> Did this blind, so I could be wrong.
  11. Try adding this to your local.config.php file date_default_timezone_set('UTC'); If that doesn't work, then there is a setting in your php.ini file which depending on your hosting provider, you might (or might not) be able to change. Contacting them might be the best way to check this.
  12. Try this <style> table, th, td { border: 1px solid black; } </style> <table width="1300"> <thead> <tr> <th>Team Speak</th> <th>Bookings</th> </tr> </thead> <tbody> <tr> <td><div id="ts3viewer_1096623" style=""></div> <script src="https://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script> <script> var ts3v_url_1 = "https://www.tsviewer.com/ts3viewer.php?ID=1096623&text=757575&text_size=12&text_family=1&text_s_color=000000&text_s_weight=normal&text_s_style=normal&text_s_variant=normal&text_s_decoration=none&text_i_color=&text_i_weight=normal&text_i_style=normal&text_i_variant=normal&text_i_decoration=none&text_c_color=&text_c_weight=normal&text_c_style=normal&text_c_variant=normal&text_c_decoration=none&text_u_color=000000&text_u_weight=normal&text_u_style=normal&text_u_variant=normal&text_u_decoration=none&text_s_color_h=&text_s_weight_h=bold&text_s_style_h=normal&text_s_variant_h=normal&text_s_decoration_h=none&text_i_color_h=000000&text_i_weight_h=bold&text_i_style_h=normal&text_i_variant_h=normal&text_i_decoration_h=none&text_c_color_h=&text_c_weight_h=normal&text_c_style_h=normal&text_c_variant_h=normal&text_c_decoration_h=none&text_u_color_h=&text_u_weight_h=bold&text_u_style_h=normal&text_u_variant_h=normal&text_u_decoration_h=none&iconset=default"; ts3v_display.init(ts3v_url_1, 1096623, 100); </script> </td> <td><?php MainController::Run('FrontBids', 'RecentFrontPage', 5); ?></td> </tr> </tbody> </table> Bit of formatting can't hurt.
  13. Looks Great but just one thing, your variable 'message' is spelt like 'messaage' in your post (with an extra 'a'). Must be having a late night
  14. web541

    blueIce

    Add this before the last } in the core/common/StatsData.class.php file. public static function TotalPilotMiles($pilotid) { $key = 'total_miles'; $key .= '_'.$pilotid; $total = CodonCache::read($key); if($total === false) { $total = 0; $sql = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE pilotid='$pilotid' AND accepted=1"; $results = DB::get_results($sql); if($results) { foreach($results as $result) { $total += $result->distance; } } CodonCache::write($key, $total, '15minute'); } return $total; }
  15. Where would you display this info? Like an email? (believe that is already functioning) And are you using a module?
  16. It looks like it might actually be $pilotinfo->hub # Send an email to the admin that a PIREP was submitted $sub = "A PIREP has been submitted by - {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})"; $message = "A PIREP has been submitted by {$pilotcode} " ."({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n" ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n" ."Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n" ."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n" ."Comment: {$comment}\n\n" ."Pilot's Hub: {$pilotinfo->hub}\n\n";
  17. Did you solve your TourCenter issue?
  18. In your core/templates/airport_search .tpl/.php file, find this <tr> <td>Select A Departure Airfield</td> <td> <select class="search" name="depicao"> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> <tr> <td>Select An Arrival Airfield</td> <td> <select class="search" name="arricao"> <option value="">All</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> Replace it with this <tr> <td>Select A Departure Airfield</td> <td> <input type="text" name="depicao" value="" placeholder="Input ICAO Code" /> </td> </tr> <tr> <td>Select An Arrival Airfield</td> <td> <input type="text" name="arricao" value="" placeholder="Input ICAO Code" /> </td> </tr> Or you can try and integrate this yourself http://select2.github.io/examples.html
  19. At the moment, this is not entirely possible for the current version. What I suggest you do is go to this forum and put a post there for a feature request for v3. Ideally an easy way to accomplish this is to make two tables, one called _pilots (main) and one called _pending (temporary), if they get accepted, move their registration to the _pilots table, if they don't, then delete their registration from the _pending table and the _pilots table should have the next number free for the next accepted registration. Of course, this is just one of the ways of doing this and as I said above, this is not doable in the current version without serious modifications.
  20. To do this, you've got a few options Add a few variable checks into the SchedulesData.class.php addbid function to check whether the $aircraftid variable exists for the tour center, this should allow both modules to work side-by-side. Move the SchedulesData.class.php addbid function into the Fltbook module, change a few links around and hope it works. Then get the original SchedulesData.class.php and replace your current one with it. This should also work as it is just the default which the TourCenter is trying to deal with. Merge my module and the TourCenter module to get both bookings to work side-by-side (I will not do this as I don't own it, and the dev. of the TourCenter probably won't either, so your on your own with this one). Test out my fltbook v2 module which should have everything concealed inside the module so that the default SchedulesData.class.php can be put back in and the TourCenter should work properly without interfering with fltbook. Your choice. And what phpVMS version are you on? .tpl or .php.
  21. Can you open up the file core/common/CargoOpsData.class.php and post lines 460-470 so we can see what's going on. Also, what module are you using for this? Is it payware? If so, I suggest you contact the developer first.
  22. Changing the '0's to the relative data should be easy (is this for the pilot's centre or the admin panel and for the whole va or just the pilot?) The boxes is just css, so you should be able to do that.
  23. Try this <?php # Aircraft has already been bidded by another pilot $acbidded = OperationsData::getBidByAircraft($aircrafts->id); if($acbidded) { echo 'Aircraft Free!'; } else { echo 'Aircraft Booked!'; } ?> If that doesn't work, a link to your site and/or an image of the fleet page would help.
  24. <?php $airports = OperationsData::getAllAirports(); /* Above <td> You have to put it */ foreach($airports as $airport) { /* On <td> You can use it to show Name, ICAO and anothers thing from PhpMyAdmin */ echo $airport->name; echo $airport->icao; } ?> Yeah the dev put it the wrong spot to begin with
×
×
  • Create New...