Jump to content

RuiMiguel

Members
  • Posts

    109
  • Joined

  • Last visited

Everything posted by RuiMiguel

  1. hello; i have this error Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; RSSFeed has a deprecated constructor in xxxxxx\core\common\RSSFeed.class.php on line 20 Can you help me solve this? Thanks
  2. this error is because on two lines after <? missing php line 66 and 148
  3. Yes, I share. <?php MainController::Run('Pireps', 'routesmap'); ?>
  4. hello, thanks for your help but I think I've already found the solution. thanks
  5. Hello I have a little problem, I want to show the Flown_routes_map in the main profile. Unfortunately this shows all the routes. I'm using this code <?php MainController::Run('RouteMap', 'index'); ?> Can someone help me? Thanks
  6. for it to work I had to put the key script in route_map
  7. Hello, do not understand anything about java, but I tried to do it and it works not very well but it works <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <h3>Route Map</h3> <div class="mapcenter" align="center"> <div id="routemap" style="width:<?php echo Config::Get('MAP_WIDTH');?>; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div> </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; ?> <?php /* This is a small template for information about a navpoint popup Variables available: <%=nav.title%> <%=nav.name%> <%=nav.freq%> <%=nav.lat%> <%=nav.lng%> <%=nav.type%> 2=NDB 3=VOR 4=DME 5=FIX 6=TRACK */ ?> <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 type="text/javascript"> // This example adds an animated symbol to a polyline. function initMap() { var map = new google.maps.Map(document.getElementById('routemap'), { center: {lat: <?php echo $mapdata->deplat?>, lng: <?php echo $mapdata->arrlng;?>}, zoom: 5, mapTypeId: 'terrain' }); // Define the symbol, using one of the predefined paths ('CIRCLE') // supplied by the Google Maps JavaScript API. var lineSymbol = { path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, scale: 4, strokeColor: '#393' }; // Create the polyline and add the symbol to it via the 'icons' property. var line = new google.maps.Polyline({ path: [{lat: <?php echo $mapdata->deplat?>, lng: <?php echo $mapdata->deplng;?>}, {lat: <?php echo $mapdata->arrlat?>, lng: <?php echo $mapdata->arrlng;?>}], icons: [{ icon: lineSymbol, offset: '100%' }], map: map }); animateCircle(line); } // Use the DOM setInterval() function to change the offset of the symbol // at fixed intervals. 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); } var options = { mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("routemap"), options); 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); var depMarker = new google.maps.Marker({ position: dep_location, map: map, icon: depicon, title: "<?php echo $mapdata->depname;?>" }); <?php /* Populate the route */ if(is_array($mapdata->route_details)) { $list = array(); foreach($mapdata->route_details as $route) { if($route->type == NAV_VOR) $icon = fileurl('/lib/images/icon_vor.png'); else $icon = fileurl('/lib/images/icon_fix.png'); /* Build info array for the bubble */ ?> var v<?php echo $route->name?>_info = { freq: "<?php echo $route->freq ?>", name: "<?php echo $route->name ?>", title: "<?php echo $route->title ?>", type: "<?php echo $route->type ?>", lat: "<?php echo $route->lat ?>", lng: "<?php echo $route->lng ?>" }; var v<?php echo $route->name?>_navpoint_info = tmpl("navpoint_bubble", {nav: v<?php echo $route->name?>_info}); var v<?php echo $route->name?>_coords = new google.maps.LatLng(<?php echo $route->lat?>, <?php echo $route->lng?>); var v<?php echo $route->name?>_marker = new google.maps.Marker({ position: v<?php echo $route->name?>_coords, map: map, icon: "<?php echo $icon; ?>", title: "<?php echo $route->title; ?>", infowindow_content: v<?php echo $route->name?>_navpoint_info }) bounds.extend(v<?php echo $route->name?>_coords); google.maps.event.addListener(v<?php echo $route->name?>_marker, 'click', function() { info_window = new google.maps.InfoWindow({ content: this.infowindow_content, position: this.position }); info_window.open(map, this); }); <?php // For the polyline $list[] = "v{$route->name}_coords"; } } ?> var arrMarker = new google.maps.Marker({ position: arr_location, map: map, icon: arricon, title: "<?php echo $mapdata->arrname;?>" }); 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); // Resize the view to fit it all in map.fitBounds(bounds); </script> <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOURKEY&callback=initMap"> </script>
  8. I do not know if this is what you are looking for in core/modules/pireps/pireps.php find this $this->render('route_map.tpl');
  9. RuiMiguel

    ALT&GS data

    <script type="text/javascript"> Highcharts.chart('container', { chart: { type: 'line' }, title: { text: 'Altitude' }, xAxis: { categories: [<?php $res = @unserialize($pirep->rawdata); if (is_array($pirep->rawdata["points"])){ foreach ($pirep->rawdata['points'] as $point) { ?> '<?php echo $altitude = $point['alt'] ?>', <?php } }?>] }, yAxis: { title: { text: 'Altitude' } }, plotOptions: { line: { dataLabels: { enabled: true }, enableMouseTracking: false } }, series: [{ name: 'Altitude', data: [<?php $res = @unserialize($pirep->rawdata); if (is_array($pirep->rawdata["points"])){ foreach ($pirep->rawdata['points'] as $point) { ?> '<?php echo $altitude = $point['alt'] ?>', <?php } }?>] }] }); </script>
  10. RuiMiguel

    ALT&GS data

    Hello works but instead of appearing the altitude appears the numbers of points '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '3', '9', '11', '9', '5', '141', '241', '244', '244', '246', '246', '246', '246', '244', '246', '246', '244', '241', '237', '229', '103', '93', '73', '25', '5', '9', '0', '0', '0', '0', '0',
  11. hello In cpanel change the php version from 7 to 5 or 6
  12. hello, You already have the key? ja foste buscar a key a google?
  13. hello, see this https://github.com/laravelio/portal, I think it's a forum in laravel.
  14. my modulo It works on my va <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full icense text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ class TopPilot extends CodonModule { public $title = 'Top Pilots'; public function __construct() { CodonEvent::addListener('TopPilot', array('pirep_filed')); } public function EventListener($eventinfo) { if($eventinfo[0] == 'pirep_filed') { self::refresh_pilot_stats(); } } public function index() { if(!Auth::LoggedIn()) { $this->set('message', 'Você precisa estar logado para acessar esta função!'); $this->render('core_error.tpl'); return; } if($this->post->action == 'get_old_stats') { $this->get_old_stats(); } else { $start = StatsData::GetStartDate(); $this->set('startmonth', date('m', strtotime($start->submitdate))); $this->set('startyear', date('Y', strtotime($start->submitdate))); $this->set('today', getdate()); $this->render('toppilot/tp_index'); } } public function refresh_pilot_stats() { TopPilotData::clear_table(); $start = StatsData::GetStartDate(); $startmonth = date('m', strtotime($start->submitdate)); $startyear = date('Y', strtotime($start->submitdate)); $today = getdate(); while ($startyear <= $today[year] ) { $pilots = PilotData::getAllPilots(); $month_stats = TopPilotData::get_monthly_stats($startmonth, $startyear); foreach ($pilots as $pilot) { $totaltime=0; $totalflights=0; $totalmiles=0; if(isset($month_stats)) { foreach ($month_stats as $pirep) { if ($pilot->pilotid == $pirep->pilotid /* && $pirep->accepted == 1 */ ) { $totaltime = $totaltime + $pirep->flighttime; $totalflights++; $totalmiles = $totalmiles + $pirep->distance; } } } if($totalflights > 0) { TopPilotData::record_stats($pilot->pilotid, $totalflights, $totaltime, $totalmiles, $startmonth, $startyear); } } if ($startmonth == 12) {$startyear++; $startmonth = 1;} else {$startmonth++;} } } public function get_old_stats() { if(!Auth::LoggedIn()) { $this->set('message', 'Você precisa estar logado para acessar esta função!'); $this->render('core_error.tpl'); return; } $month = $_GET['month']; $year = $_GET['year']; $this->set('month', $month); $this->set('year', $year); $this->set('topflights', TopPilotData::top_pilot_flights($month, $year, 10)); $this->set('tophours', TopPilotData::top_pilot_hours($month, $year, 10)); $this->set('topmiles', TopPilotData::top_pilot_miles($month, $year, 10)); $this->render('toppilot/tp_previous'); } }
  15. On line 53 of the toppilot module foreach ($pilots as $pilot) { $totaltime=0; $totalflights=0; $totalmiles=0; if(isset($month_stats)) { foreach ($month_stats as $pirep) { if ($pilot->pilotid == $pirep->pilotid /* && $pirep->accepted == 1 */ ) { $totaltime = $totaltime + $pirep->flighttime; $totalflights++; $totalmiles = $totalmiles + $pirep->distance; } } }
×
×
  • Create New...