-
Posts
224 -
Joined
-
Last visited
-
Days Won
10
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by CarlosEduardo2409
-
-
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:229Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
-
Have you changed anything in the confirmbid.php file?
-
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>?
-
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>
-
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
-
25 minutes ago, DLH001 said:
if i delete <script src="<?php echo SITE_URL?>/lib/skins/airaustral/crew/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
The ajax phpvms works but my website navigation no.
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?
-
On 23/09/2017 at 2:39 PM, ArthurHetem said:
I have an custom skin for my panel center, but when i will add an bid i got an no route passed error, here go my layout.php:
<!DOCTYPE html> <!-- Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.3.2 Version: 3.7.0 Author: KeenThemes Website: http://www.keenthemes.com/ Contact: support@keenthemes.com Follow: www.twitter.com/keenthemes Like: www.facebook.com/keenthemes Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project. --> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <meta charset="utf-8"/> <title>Avianca Virtual | CrewCenter</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="width=device-width, initial-scale=1" name="viewport"/> <meta content="" name="description"/> <meta content="" name="author"/> <!-- BEGIN GLOBAL MANDATORY STYLES --> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/> <!-- END GLOBAL MANDATORY STYLES --> <!-- BEGIN PAGE LEVEL PLUGIN STYLES --> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/fullcalendar/fullcalendar.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/jqvmap.css" rel="stylesheet" type="text/css"/> <!-- END PAGE LEVEL PLUGIN STYLES --> <!-- BEGIN PAGE STYLES --> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/pages/css/tasks.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/select2/select2.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/pages/css/login3.css" rel="stylesheet" type="text/css"/> <!-- END PAGE STYLES --> <!-- BEGIN THEME STYLES --> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/css/components-md.css" id="style_components" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/css/plugins-md.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/layout/css/layout.css" rel="stylesheet" type="text/css"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/layout/css/themes/darkblue.css" rel="stylesheet" type="text/css" id="style_color"/> <link href="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/layout/css/custom.css" rel="stylesheet" type="text/css"/> <?php echo $page_htmlhead; ?> <!-- END THEME STYLES --> <link rel="shortcut icon" href="favicon.ico"/> </head> <!-- END HEAD --> <!-- BEGIN BODY --> <!-- DOC: Apply "page-header-fixed-mobile" and "page-footer-fixed-mobile" class to body element to force fixed header or footer in mobile devices --> <!-- DOC: Apply "page-sidebar-closed" class to the body and "page-sidebar-menu-closed" class to the sidebar menu element to hide the sidebar by default --> <!-- DOC: Apply "page-sidebar-hide" class to the body to make the sidebar completely hidden on toggle --> <!-- DOC: Apply "page-sidebar-closed-hide-logo" class to the body element to make the logo hidden on sidebar toggle --> <!-- DOC: Apply "page-sidebar-hide" class to body element to completely hide the sidebar on sidebar toggle --> <!-- DOC: Apply "page-sidebar-fixed" class to have fixed sidebar --> <!-- DOC: Apply "page-footer-fixed" class to the body element to have fixed footer --> <!-- DOC: Apply "page-sidebar-reversed" class to put the sidebar on the right side --> <!-- DOC: Apply "page-full-width" class to the body element to have full width page without the sidebar menu --> <body class="page-md page-header-fixed page-quick-sidebar-over-content page-sidebar-closed-hide-logo login"> <?php echo $page_htmlreq; ?> <?php // var_dump($_SERVER['REQUEST_URI']); # Hide the header if the page is not the registration or login page # Bit hacky, don't like doing it this way if (!isset($_SERVER['REQUEST_URI']) || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/login' || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/registration') { if(Auth::LoggedIn()) { Template::Show('app_top.php'); } } ?> <div id="content"> <?php echo $page_content; ?> </div> <?php # Hide the footer if the page is not the registration or login page # Bit hacky, don't like doing it this way if (!isset($_SERVER['REQUEST_URI']) || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/login' || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/registration') { if(Auth::LoggedIn()) { Template::Show('app_bottom.php'); } } ?> <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) --> <!-- BEGIN CORE PLUGINS --> <!--[if lt IE 9]> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/respond.min.js"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/excanvas.min.js"></script> <![endif]--> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script> <!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip --> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script> <!-- END CORE PLUGINS --> <!-- BEGIN PAGE LEVEL PLUGINS --> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/jquery.vmap.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.russia.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.world.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.europe.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.germany.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.usa.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jqvmap/jqvmap/data/jquery.vmap.sampledata.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/flot/jquery.flot.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/flot/jquery.flot.resize.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/flot/jquery.flot.categories.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery.pulsate.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap-daterangepicker/moment.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.js" type="text/javascript"></script> <!-- IMPORTANT! fullcalendar depends on jquery-ui-1.10.3.custom.min.js for drag & drop support --> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/fullcalendar/fullcalendar.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery-easypiechart/jquery.easypiechart.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/jquery.sparkline.min.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/plugins/gritter/js/jquery.gritter.js" type="text/javascript"></script> <!-- END PAGE LEVEL PLUGINS --> <!-- BEGIN PAGE LEVEL SCRIPTS --> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/global/scripts/metronic.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/layout/scripts/layout.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/layout/scripts/quick-sidebar.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/pages/scripts/index.js" type="text/javascript"></script> <script src="<?php echo SITE_URL?>/lib/skins/avianca/assets/admin/pages/scripts/tasks.js" type="text/javascript"></script> <!-- END PAGE LEVEL SCRIPTS --> <script> jQuery(document).ready(function() { Metronic.init(); // init metronic core componets Layout.init(); // init layout QuickSidebar.init() // init quick sidebar Index.init(); Index.initDashboardDaterange(); Index.initJQVMAP(); // init index page's custom scripts Index.initCalendar(); // init index page's custom scripts Index.initCharts(); // init index page's custom scripts Index.initChat(); Index.initMiniCharts(); Tasks.initDashboardWidget(); }); </script> <!-- END JAVASCRIPTS -->
--------------------------------------- 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.
-
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)
-
Try replacing the template's jQuery with
<?php Template::Show('core_htmlhead.php') ?>
-
You can try your luck on this topic:
-
Someone? Sorry for the rush is I need to release my VA from maintenance
-
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.
- 1
-
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
-
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
-
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
-
Someone?
-
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
-
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 } ?>
-
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'); } } ?>
-
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>
-
Yes, send, all emails that have been configured by phpVMS or addon's are sent
-
1 hour ago, servetas said:
I have made a few changes:
core/modules/RouteSubmit/RouteSubmit.php: First of all, the "RouteSubmit.php" file should be placed in a folder titled "RouteSubmit" under the modules section. Replaces its contents with the following:
<?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 ($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($data); } } protected function sendmail($data) { // 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_admin = SITE_NAME.' A pilot has submitted a Route Request'; $email_admin = 'your_email_or_ADMIN_EMAIL'; $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 Essa mensagem automatica, por favor não responder"; if ($_POST['submit']) { Util::SendEmail($email_admin, $subject_admin, $message); // Show the template $this->render('routesubmit/routesubmit_submitted'); } } }
Also, put the template files within a "routesubmit" folder too within the core/templates folder. Also, update the routesubmit_index.php file with this:
<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <body class="hold-transition login-page" style="background-color: #222222;"> <form action="<?php echo url('/routesubmit/submit');?>" method="post"> <div class="login-box"> <div class="login-logo"> <a href="" style="color: white;">Route<b>Submit</b></a> </div> <!-- /.login-logo --> <div class="login-box-body"> <p class="login-box-msg" style="font-size: 13px;">Please complete this form to send your route.</p> <form method="post" action="<?php echo url('/routesubmit/submit');?>"> <div class="form-group" align="center"> <tr> <td><strong>Name:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname.'" />'; } else { ?> <input type="text" name="name" value="" /> <?php } ?> </td> </tr> </div> <div class="form-group" align="center"> <tr> <td width="1%" nowrap><strong>Endereço de E-mail:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->email; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->email.'" />'; } else { ?> <input type="text" name="email" value="" /> <?php } ?> </td> </tr> </div> <div class="form-group"> <input type="text" name="depp" class="form-control" value="<?php echo Vars::POST('lastname');?>" placeholder="Departure ICAO"> <?php if($departure_error == true) echo '<p class="error">Please enter your departure ICAO</p>'; ?> </div> <div class="form-group"> <input type="text" name="arr" class="form-control" placeholder="Arrival ICAO"> <?php if($arrival_error == true) echo '<p class="error">Please enter your arrival ICAO</p>'; ?> </div> <div class="form-group"> <input type="text" name="route" class="form-control" placeholder="Route"> <?php if($route_error == true) echo '<p class="error">Please enter your route</p>'; ?> </div> <div class="form-group"> <select name="Aircraft" class="form-control"> <option value=" ">Select your aircraft</option> <option value="2">Airbus</option> <option>Airbus A318-111</option> <option>Airbus A319-111</option> <option>Airbus A320-211</option> <option>Airbus A321-211</option> <option value="2">Boeing</option> <option>Boeing 737-800/W</option> <option>Boeing 737-900/W</option> <option>Boeing 747-400</option> <option>Boeing 747-400F</option> <option>Boeing 747-800I</option> <option>Boeing 757-200</option> <option>Boeing 767-300</option> <option>Boeing 777-200LR</option> <option>Boeing 777-300ER</option> <option>Boeing 777-200F</option> <option value="3">De Havilland</option> <option>DHC-8-400</option> <option value="4">McDonnell Douglas</option> <option>MD-11</option> <option>MD-11F</option> </select> <?php if($aircraft_error == true) echo '<p class="error">Please enter your aircraft</p>'; ?> </div> <div class="form-group"> <input type="text" name="fl" class="form-control" placeholder="Flight level"> <?php if($flightlevel_error == true) echo '<p class="error">Please enter your flight level</p>'; ?> </div> <div class="form-group"> <input type="text" name="dtime" class="form-control" placeholder="Departure Time"> <?php if($departuretime_error == true) echo '<p class="error">Please enter your departure time</p>'; ?> </div> <div class="form-group"> <input type="text" name="atime" class="form-control" placeholder="Arrival Time"> <?php if($arrivaltime_error == true) echo '<p class="error">Please enter your arrival time</p>'; ?> </div> <div class="form-group"> <input type="text" name="ftime" class="form-control" placeholder="Flight Time"> <?php if($flighttime_error == true) echo '<p class="error">Please enter your flight time</p>'; ?> </div> <input type="hidden" name="loggedin" value="<?php echo (Auth::LoggedIn())?'true':'false'?>" /> <input id="submit" type="submit" class="btn btn-success" class="btn btn-primary btn-block btn-flat" name="submit" value='Submit Route'> </td> <!-- /.col --> </tr> </form> </div> <!-- /.login-box-body --> </div> <!-- /.login-box --> Copyright © <?php echo date(Y); ?> CCBS Virtual Airlines - All Rights Reserved <!-- iCheck --> <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/iCheck/icheck.min.js"></script> <script> $(function () { $('input').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional
Funcionou no meu servidor localhost (não comente os valores ):
Deixe-nos saber se você tiver algum problema.
It did not work for me.
-
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
-
Now I fully updated the codes, and it's still not working, I looked in google, I did everything, but nothing ... (Using Gmail and PhpVMS 5.5 Simpilot)
Aviation Weather V1.0
in Parkho's Addons
Posted · Edited by CarlosEduardo2409
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