Jump to content

William

Members
  • Posts

    77
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by William

  1. Hey, Great work Vangelis. If I wanted to add PHP to have a drop down menu for DEP and ARR retrieving the ICAO present in the DB how would I write that? I tried to add the code myself but did not succeed. I also saw a JSON line commented out in the module, is that related to it? Appreciate the help guys!
  2. Any news on this one??
  3. Interesting as I have the same exact error. Is it really that we can't come up with a solution or workaround? Always appreciate any input EDIT: Apparently we can't!
  4. Thanks for the response. The problem is not so much the modal setup, it is instead the fact the map link/page sows up blank. And yes, this is a module that shows up in the front end. However it has permissions coded in and also inherits Admin permissions too. I tried copying over the code from Pirep_list, but it still comes up blank. <a id="dialog" class="jqModal" style="font-weight: 400;" href="<?php echo SITE_URL?>admin/action.php/operations/viewmap?type=pirep&id=<?php echo $pirep->pirepid;?>">View Map</a> For the time being, I solved it by pointing to Pirep recap as shown here (it's dark because you're not logged in) http://americanva.org/crew/index.php/pireps/view/310 But ideally I wanted to show the map only and put it on a modal
  5. I would like to show the Map modal (as it show in Pirep Admin) somewhere else (aka the HubOps pirep admin page). I'll post the picture and the code below. I'm missing something in my code as the map link shows a blank page. <?php if(!$pireps) { echo '<p>No reports have been found</p></div>'; } else { ?> <p>There are a total of <?php echo count($pireps);?> flight reports in this category. <a href="<?php echo SITE_URL ?>/<?php echo $mloc ?>.php/HubOps/approveallpireps/<?php echo $hub->icao ?>">Click to approve all PIREPs for this Hub</a></p> <table class="cc_hubadm_tablea"> <tr> <th>Date</th> <th>Flight</th> <th>From</th> <th>To</th> <th>Pilot</th> <th>Aircraft</th> <th>Flighttime</th> <th>Fuel Used</th> <th>Landingrate</th> <th>Finance</th> <th>Log</th> <th>Route</th> <?php if(PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN) || $pilotpermissions->editpireps == '1') { ?> <th>Comments</th> <th>Edit</th> <th>Options</th> <?php } ?> </tr> <?php foreach($pireps as $pirep) { if($pirep->accepted == PIREP_PENDING) $td_class = 'pending'; else $td_class = ''; $error = false; ?> <?php if($pirep->accepted == "0") { ?> <tr class="cc_hubadm_pendingfield"> <?php } elseif($pirep->accepted == "2") { ?> <tr class="cc_hubadm_rejectedfield"> <?php } else { ?> <tr> <?php } ?> <td><?php echo date(DATE_FORMAT, $pirep->submitdate); ?></td> <td><?php echo $pirep->code.$pirep->flightnum; ?><br />ID: <?php echo $pirep->pirepid; ?></td> <td><?php echo $pirep->depicao; ?><br /><?php echo substr($pirep->depname,0,20); ?></td> <td><?php echo $pirep->arricao; ?><br /><?php echo substr($pirep->arrname,0,20); ?></td> <td><?php echo PilotData::GetPilotCode($pirep->pcode, $pirep->pilotid) . '<br />' .$pirep->firstname .' ' . $pirep->lastname;?></td> <td><?php if($pirep->aircraft == '') { $error = true; echo '<span style="color: red">No aircraft! Edit to change</span>'; } else echo $pirep->aircraft. "<br />($pirep->registration)"; ?></td> <td><?php echo $pirep->flighttime_stamp; ?></td> <td><?php echo ($pirep->fuelused!='') ? $pirep->fuelused.Config::Get('LIQUID_UNIT_NAMES', Config::Get('LiquidUnit')) : '-';?></td> <td><?php echo $pirep->landingrate; ?> ft/min</td> <td>Revenue: <?php echo FinanceData::formatMoney($pirep->revenue);?><br /> Pilot Pay: <?php echo FinanceData::formatMoney($pirep->pilotpay);?></td> <td><span id="<?php echo $pirep->pirepid; ?>" class="log cc_hubadm_link_tbl_pir">View Log</span></td> <td><a class="cc_hubadm_link_tbl_pir" href="<?php echo SITE_URL?>/admin/action.php/operations/viewmap?type=pirep&id=<?php echo $pirep->pirepid;?>">View Map</a> </td> <?php if(PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN) || $pilotpermissions->editpireps == '1') { ?> <td><span id="<?php echo $pirep->pirepid; ?>" class="comment cc_hubadm_link_tbl_pir">Comments <span class="hubcommentcount<?php echo $pirep->pirepid; ?>" style="font-size: 12px; margin-top: -3px; font-weight:bold;">(<?php echo PIREPData::getCommentCount($pirep->pirepid); ?>)</span></span></td> <td><span id="<?php echo $pirep->pirepid; ?>" class="editpirep cc_hubadm_link_tbl_pir">Edit</span></td> <td><span id="<?php echo $pirep->pirepid ?>" name="<?php echo $pirep->pilotid; ?>" class="acceptpirep cc_hubadm_greenbutt pirepactions">Accept</span><br /><span id="<?php echo $pirep->pirepid ?>" name="<?php echo $pirep->pilotid; ?>" class="rejectpirep cc_hubadm_redbutt pirepactions">Reject</span><br /><span id="<?php echo $pirep->pirepid ?>" name="<?php echo $pirep->pilotid; ?>" class="deletepirep cc_hubadm_redbutt pirepactions">Delete</span></td> <?php } ?> </tr> <?php } ?> </table> <?php } ?> <div id="pirepinfoscreen"></div>
  6. Ha! Genius. Go figure. That script is already in the Admin header so I never thought of that. Brilliant Works like a charm now, thanks!! I got one more issue (well many really lol) but one particularly if you feel like helping me a little more
  7. Hey, thanks, I really appreciate the help. That is indeed the admin/templates/route_map.php file and yes I copied the code as it seemed the only resource available. Yes the leaflet.js is there and loads up with the page (however I did add the script to admin/lib/layout), but I don't think that's the problem. It seems like it's not meant to work in Admin as you said and variables are missing. And that is way above my pay-grade..... Would be interesting to see if someone had it working on Crewcenter and has the right code.
  8. Absolutely works perfectly everywhere that's the front-end. Permissions are good, scripts are modified, cache is clear. Still no dice. If I put back the Gmap route_map code iin Admin, map shows up. When using OSM route_map it doesn't. Clearly basemap.js is unable to "create map" for some reason. Can't pin my finger on it 🥵 Below Firefox console output
  9. Hey guys, I'm really stuck on this one and need a fresh pair of eyes. Running CrewCenter with OSM Leaflet conversion. On the frontend every Map works fine, Acars, Schedule details, Flown-Routes, Trackflight, etc. In Admin it's a nightmare, I cannot get the Map to display in Pireps, no matter what I try. Layout file is ok, scripts are all there. Pirep is parsing through json but something is preventing the Map from loading altogether. Any ideas? Below is the current route_map code: <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php // SKINNED FOR CREWCENTER - OPTIMISED FOR PIREPVIEW ?> <div align="center"> <h3>My Routes Map</h3> </div> <br /> <div id="routemap" style="width: 100%; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div> <?php /** * * This is the new Google Maps v3 code. Be careful of changing * things here, only do something if you know what you're doing. * * These are some options for the map, you can change here. * * This map is used for schedules and PIREPS * * By default, the zoom level and center are ignored, and the map * will try to fit the all the flights in. If you want to manually set * the zoom level and center, set "autozoom" to false. * * If you want to adjust the size of the map - Look at the above * "routemap" div with the CSS width/height parameters. You can * easily adjust it from there. * * And for reference, you want to tinker: * http://code.google.com/apis/maps/documentation/v3/basics.html */ if(isset($pirep)) $mapdata = $pirep; if(isset($schedule)) $mapdata = $schedule; ?> <script type="text/html" id="navpoint_bubble"> <span style="font-size: 10px; text-align:left; width: 100%" align="left"> <strong>Name: </strong><%=nav.title%> (<%=nav.name%>)<br /> <strong>Type: </strong> <?php /* Show the type of point */ ?> <% if(nav.type == 2) { %> NDB <% } %> <% if(nav.type == 3) { %> VOR <% } %> <% if(nav.type == 4) { %> DME <% } %> <% if(nav.type == 5) { %> FIX <% } %> <% if(nav.type == 6) { %> TRACK <% } %> <br /> <?php /* Only show frequency if it's not a 0*/ ?> <% if(nav.freq != 0) { %> <strong>Frequency: </strong><%=nav.freq%> <% } %> </span> </script> <?php /* Below here is all the javascript for the map. Be careful of what you modify!! */ ?> <script src="<?php echo SITE_URL?>/lib/js/base_map.js"></script> <script src="<?php echo SITE_URL?>/lib/js/acarsmap.js"></script> <script type="text/javascript"> // Write the PIREP data out into JSON // The big reason being we don't need to have PHP writing JS - yuck const flight = JSON.parse('<?php echo json_encode($mapdata); ?>'); console.log(flight); const map = createMap({ render_elem: 'routemap', provider: '<?php echo Config::Get("MAP_TYPE"); ?>', }); const depCoords = L.latLng(flight.deplat, flight.deplng); selDepMarker = L.marker(depCoords, { icon: MapFeatures.icons.departure, }).bindPopup(flight.depname).addTo(map); const arrCoords = L.latLng(flight.arrlat, flight.arrlng); selArrMarker = L.marker(arrCoords, { icon: MapFeatures.icons.arrival, }).bindPopup(flight.arrname).addTo(map); let points = []; points.push(depCoords); // rendering for if there's smartcars data if(flight.rawdata instanceof Object && flight.rawdata.points !== undefined && Array.isArray(flight.rawdata.points) ) { $.each(flight.rawdata.points, function(i, nav) { if(nav.lat === undefined || nav.lng === undefined) { return; } points.push(L.latLng(nav.lat, nav.lng)); }); } else { $.each(flight.route_details, function(i, nav) { const loc = L.latLng(nav.lat, nav.lng); const icon = (nav.type === 3) ? MapFeatures.icons.vor : MapFeatures.icons.fix; points.push(loc); const marker = L.marker(loc, { icon: icon, title: nav.title, }) .bindPopup(tmpl("navpoint_bubble", { nav: nav })) .addTo(map); }); } points.push(arrCoords); const selPointsLayer = L.geodesic([points], { weight: 2, opacity: 0.5, color: 'red', steps: 10 }).addTo(map); map.fitBounds(selPointsLayer.getBounds()); </script> <?php // CLOSING FOR PIREPVIEW ?> </div> </div> </section> </div> </section>
  10. By the way and just for everyone knowledge. Together with George at PHP-Mods we have developed a new module called VMSDispatch which uses the FlightAware API to request any live schedule you may want/need. The module is extra solid with many advanced functions and a lot of attention has gone into saving money while making the API calls! Speaking of money, it's also very well priced and the API calls are fairly cheap if you manage to update 2 or 3 times a year. A typical 30000 result query will result in about 10000 usable schedules and will cost around $15 billed by FlightAware. Just another option to have. we at American Airlines Virtual are super happy with it! Get in touch with George or visit the shop at PHP-Mods if you want to find out more.
  11. I will send you a PM, think that's easier

  12. Hey there, hope you are well. 

     

    We are using CrewCenter exactly like you and it would be a Tremendous help if you could share with me the CSS formatting of the TourModule pages. I love the way yours looks.

    I have it all setup and that would be the last step. You would do me really a huge solid :)

     

    Thanks again

     

    Will  

  13. I'm sorry if this has been discussed previously but I read all the posts and don't think there's an answer to my question. We have the script up and working as it should but my question is as follow: Is there a way to have only the aircraft called by the Bid already selected in the Brief window? For instance if the Bid is AAL200 scheduled with an Airbus A320, I would like to already have the A320 pre-selected instead of the pull down menu with 300 other aircraft. Appreciate it if anyone has any input in regard. Thanks for the great work! Will
  14. Hi Nabeel, thanks for looking into it. I'm on the Beta 3. So I changed PhP on my host to 7.3 and I was able to complete the install without errors. However, now when phpvms loads I am missing the whole CSS. God, I wish I was good enough to find out why by myself 🤪
  15. What happened to this? Has it being discontinued? Any news? Thanks in advance to whoever has some info
  16. Hi Nabeel, I get this error while the installer is trying to setup the DB, any ideas? It's on a shared hosting but all pre-requisites are there before getting to the DB phase Appreciated
  17. Are you still active Max?

  18. Hey guys, I'm looking for somebody that has experience and talent with video production. I'm interested in creating a YouTube video promo for Fly Star Alliance and would like to get some quotes. Thanks Will
  19. Really guys?? I guess nobody wants to make some easy money...... WOW
  20. We need a graphic designer able to take care of some awards for various parts of the website. I will provide sizes, ideas and eventual material needed to have an idea of what I want. We are not maniacs, but if you look at our website it looks nice, clean and professional and we want to keep it that way. I have no problem paying a few dollars more for a job well done instead of being cheap and get quick stuff thrown together. I already work with SimPilot (since a long time), Jeffrey Kobus, Joeri etc. and I'm looking for a long term relationship for all the graphics that I need. If you are interested please contact me at admin@flystaralliance.org or through the forum pm system. Thanks
  21. Can you please share how you solved it because I'm stuck in the exact same situation. Thanks in advance Will
  22. Now.... That being said by Dave, the only question is: When do we start?
  23. Will get in touch with you shortly.... Thanks
  24. Get in touch with SimPilot @ www.simpilotgroup.com. Best in the business!! Cheers
  25. Popups are enabled. Result.tpl is here: http://www.mediafire.com/?zyodc9kx8bnln3c Thanks for the help.
×
×
  • Create New...