Jump to content

CarlosEduardo2409

Members
  • Posts

    224
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by CarlosEduardo2409

  1. This module is for phpVMS 5.5 of Simpilot, you have another version of phpVMS. I recommend that you use phpVMS 5.5. Click Here
  2. I do not think there's anything in my core_htmlhead.php But it is also giving an error in the console that is missing the APIKey, but I do not know where to put. Errors on the chrome console: Uncaught Error: Graph container element not found at d [as constructor] (morris.min.js:6) at d.c [as constructor] (morris.min.js:6) at new d (morris.min.js:6) at HTMLDocument.<anonymous> (dashboard.js:127) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.I (jquery.min.js:2) Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys ZB.j @ util.js:229 Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
  3. Have you changed anything in the confirmbid.php file?
  4. Ohh, thousand pardons, had not seen. Silly questions, did you insert the sql into your database? What version is your php and phpVMS? Are you using Fltbook version 2? Is the file right? Ex: php or tpl Can you take a photo of what is showing up and put your file confirmbid.php here to see? And another silly question, in that code that I spoke up to change you corrected an error that was missing a quote in <script type="text/javascript>?
  5. Thank you, I do not understand a little more I will try to do. Thank you again for the response web541 and LeonardIGO4036 EDIT** I did something wrong, I just do not know what it is, my map is not showing up on the bids page. It occupies the map space, more without the map. http://prntscr.com/h7h9kl My code: <div class="mapcenter" align="center"> <div id="map" style="width:<?php echo Config::Get('MAP_WIDTH');?>; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div> </div> <?php if(isset($bid)) $mapdata = $bid; ?> <div id="map"></div> <script type="text/javascript"> <!-- Start initMap --> function initMap() { var options = { mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('routemap'), { center: {lat: 20.291, lng: 153.027}, zoom: 6, mapTypeId: options }); <!-- Start Line and SymbolAnimation --> var lineSymbol = { path: google.maps.SymbolPath.CIRCLE, scale: 8, strokeColor: '#ffffff' }; var line = new google.maps.Polyline({ path: depMarker, arrMarker, icons: [{ icon: lineSymbol, offset: '100%' }], map: map }); animateCircle(line); } <!-- /.Finish initMap --> function animateCircle(line) { var count = 0; window.setInterval(function() { count = (count + 1) % 200; var icons = line.get('icons'); icons[0].offset = (count / 2) + '%'; line.set('icons', icons); }, 20); } <!-- /.Finish Line and SymbolAnimation --> <!-- Start Location and Bounds --> var dep_location = new google.maps.LatLng(<?php echo $mapdata->deplat?>,<?php echo $mapdata->deplng;?>); var arr_location = new google.maps.LatLng(<?php echo $mapdata->arrlat?>,<?php echo $mapdata->arrlng;?>); var bounds = new google.maps.LatLngBounds(); bounds.extend(dep_location); bounds.extend(arr_location); <!-- /.Finish Location and Bounds --> <!-- Start Makers --> var depMarker = new google.maps.Marker({ position: dep_location, map: map, icon: depicon, title: "<?php echo $mapdata->depicao;?>" }); var arrMarker = new google.maps.Marker({ position: arr_location, map: map, icon: arricon, title: "<?php echo $mapdata->arricao;?>" }); <!-- /.Finish Makers --> <!-- Start FlightPath --> var flightPath = new google.maps.Polyline({ path: [dep_location, <?php if(count($list) > 0) { echo implode(',', $list).','; }?> arr_location], strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }).setMap(map); <!-- /.Finish FlightPath --> // Resize the view to fit it all in map.fitBounds(bounds); </script> <script async defer src="https://maps.googleapis.com/maps/api/js?key=MYKEY&callback=initMap"> </script> Schedule_bids.php code to display the map. <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Flight Map</h3> </div> <div class="box-body" align="center"> <?php $this->show('routemapreport.php'); ?> </div> </div>
  6. @ncd200 Go into core/templates/Fltbook/search_results.php page and find this at the top <script type="text/javascript" src="<?php echo SITE_URL;?>/lib/js/bootstrap.js"></script> And replace it with this (if you already have bootstrap referenced in your master template) <script type="text/javascript> // Clear Modal On Hide // =================== // no cache data loaded to modal popup (by default it's cached) $('body').on('hidden.bs.modal', '.modal', function (event) { $(this).removeData('bs.modal'); }); $(document).on("hidden.bs.modal", function (e) { $(e.target).removeData("bs.modal").find(".modal-content").empty(); }); </script> This answer is here in the topic, in the same topic, just go up
  7. @DLH001 @ArthurHetem 1- "Those paths to the scripts also seem wrong, make sure they're correct. They should be going to lib/js (at least for jquery)" - Nabeel 2- "Give this a try - <script> jQuery.noConflict(); </script> Put it after ALL libraries have been loaded. It would fix the multiple versions of jQuery problems that would result in the error you have." - Magicflyer Do you use the crewcenter of someone or your own? What is your php?
  8. --------------------------------------- PT-BR --------------------------------------- Arthur eu vou te responder em português porque eu sei que você é Brasileiro e eu também sou, então vamos lá... Em seu código eu vi isso: <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script> Tente alterar para isso <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> Não sei se isso vai arrumar seu problema, mas é um bom começo --------------------------------------- EN-US --------------------------------------- Find in your code this: <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script> And change to this: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> I do not know if this will fix your problem, but it's a good start.
  9. I wanted to use Google Maps, and you say the airport variables of the bid? Because if yes is the same as traditional ($bid->depicao / $bid->arricao), and what I'm trying to do is a map of the destination and arrival on the bid page, similar to vAMSYS (https://gyazo.com/f79cba000f48f332d04c1978e889d24d), Just the map and if it is easy I wanted to put that gif of the plane flying on the blue line, without a waypoint, just straight, the same as pirep_viewreport (https://prnt.sc/h71zvw)
  10. Try replacing the template's jQuery with <?php Template::Show('core_htmlhead.php') ?>
  11. You can try your luck on this topic:
  12. Someone? Sorry for the rush is I need to release my VA from maintenance
  13. I'm going to interrupt a little of your conversation ... it's up to you, I program a bit of java, so I have little skill in php, that is, I already know some things, so it's a little easier for me, I recommend, and this helps me a lot is W3schools, School of net, PHP, DevMedia, I also recommend YouTube, obviously you will find several videos of php. I recommend one person, but some are catered for, so I prefer the online course because some are free, but that's in my opinion. The choice is up to you.
  14. A few days ago, I started customizing the bid layout, but I have a question. How can I map the route? (With the starting and ending point the same as the report layout).And if possible I wanted to put a gif of an airplane around the line from the start and finish point. Sorry if I said something wrong because I'm using google translator. Thanks, Carlos
  15. So, look at this image: https://prnt.sc/h5rr2a When you book a flight, where it says "Schedules", it changes to "View my Flights", that is, it takes the flight search page and changes it to the reports
  16. Many thanks, working perfectly. But do you know a way, other than that, that it changes in the dropdown? Ex: When you book a flight, the dropdown changes the link to go to the reservations and changes the name
  17. Is it possible to let all pilots book only one flight? Because, as you may know, pilots can book as many flights as he wants, as far as I know, so let's book only 1 flight? Example: Same as other VAs, when you book a flight, it blocks where you are searching for the flight and switches to my bids - Using Fltbook And I'm also trying to map the route on the bids, how is it possible? Ex: http://prntscr.com/h42z1s Thanks, Carlos
  18. Yes, This is the whole code: <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php $pilotid = Auth::$userinfo->pilotid; $last_location = FltbookData::getLocation($pilotid); $last_name = OperationsData::getAirportInfo($last_location->arricao); if(!$last_location) { FltbookData::updatePilotLocation($pilotid, Auth::$userinfo->hub); } ?> <section class="content-header"> <h1>Schedule Search</h1> </section> <!-- Main content --> <section class="content"> <!-- Main row --> <div class="row"> <div class="col-md-12"> <!-- Left col --> <form id="form" action="<?php echo url('/Fltbook');?>" method="post"> <div class="nav-tabs-custom"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Schedule Search</h3> </div> <div class="tab-content"> <div class="box-body"> <p>Select an airline:</p> <div class="form-group"> <select name="airline" class="form-control"> <option value="">Select All</option> <?php if(!$airlines) $airlines = array(); foreach ($airlines as $airline) { echo '<option value="'.$airline->code.'">'.$airline->name.'</option>'; } ?> </select> </div> <p>Select an aircraft type:</p> <div class="form-group"> <select name="aircraft" class="form-control"> <option value="">Select All</option> <?php $airc = FltbookData::routeaircraft($last_location->arricao); if(!$airc) { echo '<option>No Aircraft Available!</option>'; } else { foreach ($airc as $air) { $ai = FltbookData::getaircraftbyID($air->aircraft); ?> <option value="<?php echo $ai->icao ;?>"><?php echo $ai->name ;?></option> <?php } } ?> </select> </div> <p>Select arrival airfield:</p> <div class="form-group"> <select name="arricao" class="form-control"> <option value="">Select All</option> <?php $airs = FltbookData::arrivalairport($last_location->arricao); if(!$airs) { echo '<option>No Airports Available!</option>'; } else { foreach ($airs as $air) { $nam = OperationsData::getAirportInfo($air->arricao); echo '<option value="'.$air->arricao.'">'.$air->arricao.' - '.$nam->name.'</option>'; } } ?> </select> </div> <div class="box-footer" align="center"> <tr class="form-group"> <td align="center" colspan="2"> <input type="hidden" name="action" value="search" /> <a href="<?php echo url('/Fltbook/bids'); ?>"><input type="button" class="btn btn-flat btn-primary" value="Minhas reservas"></a> <input border="0" type="submit" name="submit" value="Buscar Voos" class="btn btn-flat btn-primary"> </td> </tr> </div> </div> </div> <!-- /.tab-pane --> </div> </div> <!-- /.tab-content --> </div> <!-- nav-tabs-custom --> <!-- /.Left col --> </div> <!-- /.row (main row) --> </section> <!-- /.content --> <!-- Main content --> <section class="content"> <!-- Main row --> <div class="row"> <div class="col-md-12"> <?php if($settings['search_from_current_location'] == 1) { ?> <form action="<?php echo url('/Fltbook/jumpseat');?>" method="post"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Schedule Search</h3> </div> <div class="tab-content"> <div class="box-body"> <p>Destination</p> <div id="errors"></div> <select onchange="calculate_transfer(this.value)" name="depicao" class="form-control"> <option selected disabled>Select a airport</option> <?php foreach($airports as $airport) { if($airport->icao == $last_location->arricao) { continue; } echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>'; } ?> </select> <br> <div class="col-xs-6"> <p>Cost:</p> <div class="input-group"> <input type="text" id="jump_purchase_cost" class="form-control" readonly> <span class="input-group-addon"><i class="fa fa-dollar"></i></span> </div> </div> <div class="col-xs-6"> <p>Distance:</p> <div class="input-group"> <input type="text" id="distance_travelling" class="form-control" readonly> <span class="input-group-addon"><i class="fa fa-star-o"></i></span> </select> </div> </div> </div> <div class="box-footer" align="center"> <button type="submit" id="purchase_button" class="btn btn-flat btn-primary" disabled="disabled" form="jumpseat">Purchase Transfer!</button> </div> </div> <input type="hidden" name="cost"> <input type="hidden" name="airport"> </form> </div> </div> </section> <script type="text/javascript"> function calculate_transfer(arricao) { var distancediv = $('#distance_travelling')[0]; var costdiv = $('#jump_purchase_cost')[0]; var errorsdiv = $('#errors')[0]; errorsdiv.innerHTML = ''; $.ajax({ url: baseurl + "/action.php/Fltbook/get_jumpseat_cost", type: 'POST', data: { depicao: "<?php echo $last_location->arricao; ?>", arricao: arricao, pilotid: "<?php echo Auth::$userinfo->pilotid; ?>" }, success: function(data) { data = $.parseJSON(data); console.log(data); if(data.error) { $("#purchase_button").prop('disabled', true); errorsdiv.innerHTML = "<font color='red'>Not enough funds for this transfer!</font>"; } else { $("#purchase_button").prop('disabled', false); distancediv.innerHTML = data.distance + "nm"; costdiv.innerHTML = "$" + data.total_cost; } }, error: function(e) { console.log(e); } }); } </script> <?php } ?>
  19. This is the my new code: core/modules/RouteSubmit/RouteSubmit.php <?php class RouteSubmit extends CodonModule { public $title = "RouteSubmit Request"; public function index() { if (!Auth::LoggedIn()) { $this->set('error', 'You are not logged in.'); $this->show('core_error'); } else { $this->set('allairlines', OperationsData::GetAllAirlines()); $this->set('allaircraft', OperationsData::GetAllAircraft()); $this->set('allairports', OperationsData::GetAllAirports()); //$this->set('airport_json_list', OperationsData::getAllAirportsJSON()); $this->set('flighttypes', Config::Get('FLIGHT_TYPES')); $this->render('routesubmit/routesubmit_index'); } } public function submit() { if(isset($_POST['submit'])) { if ($this->post->arr == '') { $this->set('error', 'You haven\'t specified a reason for your leaeve of absence.'); $this->render('routesubmit/routesubmit_error'); $this->render('routesubmit/routesubmit_index'); } else { $this->sendmail(); } } } protected function sendmail() { // Form arrays $name = $this->post->name; $from = $this->post->email; $depp = $this->post->depp; $arr = $this->post->arr; $route = $this->post->route; $aircraft = $this->post->Aircraft; $fl = $this->post->fl; $dtime = $this->post->dtime; $atime = $this->post->atime; $ftime = $this->post->ftime; // Send email to admin $subject = SITE_NAME.' A pilot has submitted a Route Request'; $email = 'carlosmfreitas05@gmail.com'; $message = 'From: $name | $from \n Departure: $depp \n Arrival: $arr \n Route: $route \n Aircraft: $aircraft \n Flight level: $fl \n Departure time: $dtime \n Arrival time: $atime \n Flight time: $ftime \n Esta mensagem é automatica, por favor não responder'; $headers = 'From:' . $from; Util::SendEmail($email, $subject, $message. $headers); // Show the template $this->render('routesubmit/routesubmit_submitted'); } } ?>
  20. Hello, I'm trying to customize the JumpSeat of Fltbook from web541. However when I go to select the airport for JumpSeat the price does not appear in the box. http://prntscr.com/gzzgwj (It was to appear where the red place is) This is my code: <div class="col-xs-6"> <p>Cost:</p> <div class="input-group"> <input type="text" id="jump_purchase_cost" class="form-control" readonly> <span class="input-group-addon"><i class="fa fa-dollar"></i></span> </div> </div> Original code: <tr> <td align="center">Cost:</td> <td align="left"><div id="jump_purchase_cost"></div></td> </tr>
  21. Yes, send, all emails that have been configured by phpVMS or addon's are sent
  22. Can you tell me when it works? I'm trying to do everything I can to fix it, too. Thank you. If I do, I'll tell you... Sorry if I wrote something wrong, because I'm using google translate. I am Brazilian
×
×
  • Create New...