piuozorio
Members-
Posts
41 -
Joined
-
Last visited
Profile Information
-
Gender
Male
-
Location
LPPT - Portugal
-
Interests
https://www.flightsimulatorportugal.com
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
piuozorio's Achievements
-
Hello all, i'm trying to minify the html output but no success, i use phpvms v2. example: <!DOCTYPE HTML> <html lang="pt-PT"> <head> <meta charset="utf-8"> ... to be <!DOCTYPE HTML><html lang="pt-PT"><head><meta charset="utf-8">... I´m trying to use this code on top of layout.tpl function sanitize_output($buffer) { $search = array( '/\>[^\S ]+/s', // strip whitespaces after tags, except space '/[^\S ]+\</s', // strip whitespaces before tags, except space '/(\s)+/s', // shorten multiple whitespace sequences '/<!--(.|\s)*?-->/' // Remove HTML comments ); $replace = array( '>', '<', '\\1', '' ); $buffer = preg_replace($search, $replace, $buffer); return $buffer; } ob_start("sanitize_output"); when i see the source code nothing change, someone know how to do it? Thank you
-
Hello, i found an alternative using this https://github.com/combatwombat/marker-animate Now all markers moves correctly but only if i change the coord in var pos =... to an old position My question is how can i get the current position of all markers that are in the map? Because var newPosition is now the real target position using the same coord as var pos. Something like if start first time, marker not created var pos =new google.maps.LatLng(data[i].lat, data[i].lng); //position from database else var pos = current position in map, maybe the moving marker This is the code now I´m using the old version of phpvms, include the script markerAnimate.js after Google Maps js call in core_htmlhead.tpl in acarsmap.js find the marker var pos = new google.maps.LatLng(data[i].lat, data[i].lng); flightMarkers[flightMarkers.length] = new google.maps.Marker({ position: pos, map: map, icon: planeSymbol, flightdetails: data[i], infowindow_content: detailed_bubble }); after add // or with callback and options for easing and duration in milliseconds. Needs jQuery Easing Plugin. var newPosition = new google.maps.LatLng(data[i].lat, data[i].lng); flightMarkers[flightMarkers.length-1].animateTo(newPosition , { easing: "linear", duration: 10000, complete: function() { alert("animation complete"); } }); Hope you undestand. Thank you for any help
-
Hello all, (sorry my english) i’m trying to make the flightMarkers keep moving (with or without click marker) but no success. When i try, from multiple markers only one moves or all blink and jump to new position. Whem the marker moves and arrives to next destination/point and the map refresh, the marker go back and start again. Need to continue to next new position. This is the code i’m trying to adapt with speed: http://jsfiddle.net/HYuRR/2/ Can someone help to implement the code? Thank you This is the original acarsmap.js var flightMarkers = []; var routeMarkers = []; var flightPath = null; var depMarker = null, arrMarker = null; var info_window= null; var run_once = false; var defaultOptions = { autozoom: true, zoom: 4, center: new google.maps.LatLng(-25.363882,131.044922), mapTypeId: google.maps.MapTypeId.TERRAIN, refreshTime: 12000, autorefresh: true }; var options = $.extend({}, defaultOptions, acars_map_defaults); var map = new google.maps.Map(document.getElementById("acarsmap"), options); // They clicked the map google.maps.event.addListener(map, 'click', function() { //clearPreviousMarkers(); }); liveRefresh(); if(options.autorefresh == true) { setInterval(function () { liveRefresh(); }, options.refreshTime); } function liveRefresh() { $.ajax({ type: "GET", url: url + "/action.php/acars/data", dataType: "json", cache: false, success: function(data) { populateMap(data); } }); }; function populateMap(data) { clearMap(); $("#pilotlist").html(""); if (data.length == 0) { return false; } var lat, lng; var details, row, pilotlink; var bounds = new google.maps.LatLngBounds(); for (var i = 0; i < data.length; i++) { if(data[i] == null || data[i].lat == null || data[i].lng == null || data[i].lat == "" || data[i].lng == "") { continue; } lat = data[i].lat; lng = data[i].lng; if(i%2 == 0) data[i].trclass = "even"; else data[i].trclass = "odd"; // Pull ze templates! var map_row = tmpl("acars_map_row", {flight: data[i]}); var detailed_bubble = tmpl("acars_map_bubble", {flight: data[i]}); $('#pilotlist').append(map_row); var pos = new google.maps.LatLng(lat, lng); flightMarkers[flightMarkers.length] = new google.maps.Marker({ position: pos, map: map, icon: url+"/lib/images/inair/"+data[i].heading+".png", flightdetails: data[i], infowindow_content: detailed_bubble }); bounds.extend(pos); google.maps.event.addListener(flightMarkers[flightMarkers.length - 1], 'click', function() { clearPreviousMarkers(); var focus_bounds = new google.maps.LatLngBounds(); // Flight details info window info_window = new google.maps.InfoWindow({ content: this.infowindow_content, position: this.position }); info_window.open(map, this); // Add polyline, and start/end points var dep_location = new google.maps.LatLng(this.flightdetails.deplat, this.flightdetails.deplng); var arr_location = new google.maps.LatLng(this.flightdetails.arrlat, this.flightdetails.arrlng); depMarker = new google.maps.Marker({ position: dep_location, map: map, icon: depicon, title: this.flightdetails.depname, zIndex: 100 }); arrMarker = new google.maps.Marker({ position: arr_location, map: map, icon: arricon, title: this.flightdetails.arrname, zIndex: 100 }); // Now the flight path, if it exists var path = new Array(); path[path.length] = dep_location; focus_bounds.extend(dep_location); if(this.flightdetails.route_details.length > 0) { $.each(this.flightdetails.route_details, function(i, nav) { var loc = new google.maps.LatLng(nav.lat, nav.lng); if(nav.type == 3) icon = "icon_vor.png"; else icon = "icon_fix.png"; var navpoint_info = tmpl("navpoint_bubble", {nav: nav}); routeMarkers[routeMarkers.length] = new google.maps.Marker({ position: loc, map: map, icon: url + "/lib/images/"+icon, title: nav.title, zIndex: 100, infowindow_content: navpoint_info }); google.maps.event.addListener(routeMarkers[routeMarkers.length - 1], 'click', function() { info_window = new google.maps.InfoWindow({ content: this.infowindow_content, position: this.position }); info_window.open(map, this); }); path[path.length] = loc; focus_bounds.extend(loc); }); } path[path.length] = arr_location; focus_bounds.extend(this.position); focus_bounds.extend(arr_location); flightPath = new google.maps.Polyline({ path: path, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }); map.fitBounds(focus_bounds); flightPath.setMap(map); }); } // If they selected autozoom, only do the zoom first time if(options.autozoom == true && run_once == false) { map.fitBounds(bounds); run_once = true; } } function clearPreviousMarkers() { if(info_window) { info_window.close(); info_window = null; } if(depMarker != null) { depMarker.setMap(null); depMarker = null; } if(arrMarker != null) { arrMarker.setMap(null); arrMarker = null; } if(routeMarkers.length > 0) { for(var i = 0; i < routeMarkers.length; i++) { routeMarkers[i].setMap(null); } } routeMarkers.length = 0; if(flightPath != null) { flightPath.setMap(null); flightPath = null; } } function clearMap() { if(flightMarkers.length > 0) { for(var i = 0; i < flightMarkers.length; i++) { flightMarkers[i].setMap(null); } } flightMarkers.length = 0; if(routeMarkers.length > 0) { for(var i = 0; i < routeMarkers.length; i++) { routeMarkers[i].setMap(null); } } routeMarkers.length = 0; }
-
Thank you for your reply and help. I know you point me in the right direction but i dont understand arrays or is dificult for me, big arrays or arrays inside arrays. I tested with some examples in that link and changed for my results but nothing show, allways empty. Do you know how to do and post the right code for me? All i found is the request and nothing about the response in separate variables, all stops in echo $result; or var_dump($result); Sorry my english and thank you
-
Hello, i'm trying to use google flight search api but dont know how to "decode" the result. The search is ok, i'm using this code with (solutions => "1") i put 1 just for tests, but want more <?php $data = array ( "request" => array( "passengers" => array( adultCount => 1 ), "slice" => array( array( origin => "LIS", destination => "OPO", date => "2015-05-09"), ), solutions => "1" ), ); $data_string = json_encode($data);$ch = curl_init('https://www.googleap...ch?key=MyAPIKey'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $result = curl_exec($ch);curl_close($ch); /* then I echo the result for testing purposes */ echo $result; ?> The echo result show this { "kind": "qpxExpress#tripsSearch", "trips": { "kind": "qpxexpress#tripOptions", "requestId": "0wbdK1I8oibR6DGxe0Lr9f", "data": { "kind": "qpxexpress#data", "airport": [ { "kind": "qpxexpress#airportData", "code": "LIS", "city": "LIS", "name": "Lisbon" }, { "kind": "qpxexpress#airportData", "code": "OPO", "city": "OPO", "name": "Porto Francisco Sa Carneiro" } ], "city": [ { "kind": "qpxexpress#cityData", "code": "LIS", "name": "Lisbon" }, { "kind": "qpxexpress#cityData", "code": "OPO", "name": "Porto" } ], "aircraft": [ { "kind": "qpxexpress#aircraftData", "code": "319", "name": "Airbus A319" } ], "tax": [ { "kind": "qpxexpress#taxData", "id": "YP_003", "name": "Portugal Passenger Service Charge" }, { "kind": "qpxexpress#taxData", "id": "PT_001", "name": "Portugal Security Tax" }, { "kind": "qpxexpress#taxData", "id": "WA_001", "name": "Portugal VAT" }, { "kind": "qpxexpress#taxData", "id": "YQ", "name": "TP YQ surcharge" } ], "carrier": [ { "kind": "qpxexpress#carrierData", "code": "TP", "name": "TAP Portugal" } ] }, "tripOption": [ { "kind": "qpxexpress#tripOption", "saleTotal": "EUR62.72", "id": "6QG2bBg243IUGhiWMnGBu0001", "slice": [ { "kind": "qpxexpress#sliceInfo", "duration": 55, "segment": [ { "kind": "qpxexpress#segmentInfo", "duration": 55, "flight": { "carrier": "TP", "number": "1944" }, "id": "GajwbwJfUhmW4VVm", "cabin": "COACH", "bookingCode": "T", "bookingCodeCount": 9, "marriedSegmentGroup": "0", "leg": [ { "kind": "qpxexpress#legInfo", "id": "LZub2a5ZWG9fzNrA", "aircraft": "319", "arrivalTime": "2015-05-10T00:50+01:00", "departureTime": "2015-05-09T23:55+01:00", "origin": "LIS", "destination": "OPO", "originTerminal": "1", "duration": 55, "mileage": 171, "meal": "Refreshments" } ] } ] } ], "pricing": [ { "kind": "qpxexpress#pricingInfo", "fare": [ { "kind": "qpxexpress#fareInfo", "id": "Apo/c6mAuCr7AQaaRm1wQQ2vypSTnyqzYNW5EG6D196qP", "carrier": "TP", "origin": "LIS", "destination": "OPO", "basisCode": "TFLYOWD" } ], "segmentPricing": [ { "kind": "qpxexpress#segmentPricing", "fareId": "Apo/c6mAuCr7AQaaRm1wQQ2vypSTnyqzYNW5EG6D196qP", "segmentId": "GajwbwJfUhmW4VVm", "freeBaggageOption": [ { "kind": "qpxexpress#freeBaggageAllowance", "bagDescriptor": [ { "kind": "qpxexpress#bagDescriptor", "commercialName": "UPTO50LB 23KG AND62LI 158LCM", "count": 1, "description": [ "Up to 50 lb/23 kg", "Up to 62 li/158 lcm" ], "subcode": "0GO" } ], "pieces": 1 } ] } ], "baseFareTotal": "EUR21.00", "saleFareTotal": "EUR21.00", "saleTaxTotal": "EUR41.72", "saleTotal": "EUR62.72", "passengers": { "kind": "qpxexpress#passengerCounts", "adultCount": 1 }, "tax": [ { "kind": "qpxexpress#taxInfo", "id": "WA_001", "chargeType": "GOVERNMENT", "code": "WA", "country": "PT", "salePrice": "EUR1.26" }, { "kind": "qpxexpress#taxInfo", "id": "PT_001", "chargeType": "GOVERNMENT", "code": "PT", "country": "PT", "salePrice": "EUR4.03" }, { "kind": "qpxexpress#taxInfo", "id": "YP_003", "chargeType": "GOVERNMENT", "code": "YP", "country": "PT", "salePrice": "EUR9.93" }, { "kind": "qpxexpress#taxInfo", "id": "YQ", "chargeType": "CARRIER_SURCHARGE", "code": "YQ", "salePrice": "EUR25.00" }, { "kind": "qpxexpress#taxInfo", "id": "WA_001", "chargeType": "GOVERNMENT", "code": "WA", "country": "PT", "salePrice": "EUR1.50" } ], "fareCalculation": "LIS TP OPO 21.00TFLYOWD EUR 21.00 END XT 4.03PT 2.76WA 9.93YP 25.00YQ", "latestTicketingTime": "2015-04-03T17:19-04:00", "ptc": "ADT" } ] } ] } } 1 Now i want tho "decode" and put the result in variables like foreach ........... $aircraft = ..... //code or name $depicao = .... //get iata $arricao = ...... //get iata and so on Thank you for your help
-
Hello, a few days ago i was having problem with my recaptcha in registration, i (think/thought) that was because i moved from http to https and stop working. I made a search and found some links, at least for the registration starts working again. In recaptchalib.php Find this line and //comment: define("RECAPTCHA_API_SECURE_SERVER", "http://api-secure.recaptcha.net"); After add: define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api"); For me it works, hope works for you Sorry my english
-
phpvms logs me out, session doesn't stay alive
piuozorio replied to mischka's topic in Support Forum
Hi, recently i changed my phpvms skin and have the "same" problem, my problem was the "remember me" on login code. If i close the browser the login was lost, then i fix the "remember" part the login keeps alive all the time. Hope that helps -
Hello all, is possible to compress phpvms with something like this? if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); I have tried but allways get errors and css problems. My homepage(root) isn't phpvms and is compressed, the foruns phpbb3(root/phpbb3) is compressed too. The phpvms is in root/folder/phpvms but can´t compress. To do the tests i used this website http://www.gidnetwor...s/gzip-test.php Anyone ever tried? Thank you
-
Hello, here is what i use, simple <script src="http://snow-effect.googlecode.com/files/snow.js" type="text/javascript"></script>
-
Yes thats it.
-
Hello again, i forgot to add the other function to work. Add to schedulesData.class.php public function getSchedulesBidsExpired() { $cache_time = Config::Get('BID_EXPIRE_TIME'); if($cache_time == '') { return; } $sql = 'SELECT * FROM '.TABLE_PREFIX."bids WHERE `dateadded` + INTERVAL {$cache_time} HOUR < NOW()"; $row = DB::get_results($sql); return $row; } Hope it works now NOTE: I saw the other thread and is the "same code" all in one I think i have edited the table bids to save date/time, not only date, because if is only date dont work properlly. Lets say you have configured expire after 24 hours You bid at 13:00 30/10/2012 and hope expired at 13:00 31/10/2012 Without the hours in database it expires (start) at 00:00 31/10/2012 and with the date only, yeh 30/10/2012 to 31/10/2012 is 24h so with the hour it calculates well, only after 13:00 31/10/2012 I dont know if you understand what im saying, sorry my english The "eficiência" was created with a help of a friend. Just a php code that reads each line of log when "send pirep" and "before" enter in database. Now in each line , i use this line code http://www.php.net/m...tion.substr.php to get the bold values, [11:43] - Flaps to position 2 at 3169ft, hdg 3 and 200kts It makes the "send pirep" time slower to read all code first and then get the "pirep filed".
-
Hello all and sorry my english, i think Felipe is right the problem is when cron job do the work is not setting the scheduled bid (bidid) to 0 in schedules table. You can check that, in your table and if is that the problem here is my code so you can try. I´m not a pro coder, just works for me, maybe the function already exists or other faster way so here it is. In your SchedulesData.class.php add the function public function ResetSchedulesBidsExpired() { $bids = self::getSchedulesBidsExpired(true); if(!$bids) return true; foreach($bids as $bid) { $sql = 'UPDATE '.TABLE_PREFIX.'schedules SET `bidid`=0 WHERE `id`='.$bid->routeid; DB::query($sql); } } now in your admin/maintenance.php after SchedulesData::deleteExpiredBids(); add SchedulesData::ResetSchedulesBidsExpired(); Hope it works for you
-
[Solved] How to import navdata.sql - csv included
piuozorio replied to mischka's topic in Support Forum
Hello all, for sure your mysql is limited to not import more than X MB. You can change the value, i think somewhere related with mysql or in php.ini, not sure. You have another option, i used in past one or two times and worked perfectly, take a look BIGDUMP http://www.ozerov.de/bigdump/ , this is more for very large .sql files like backups. Hope it helps -
Hello, today i tryed to send with success, thank you.
-
Problem with sending qued pireps to vacentral
piuozorio replied to Strider's topic in General & Support
Hello all, same happened here. This is not the first time that happened, i think the pireps are exported but just returned a error message. Nabeel will see this topic and fix the problem we just need to be patient. Here is a old topic with the same "error" http://forum.phpvms.net/topic/6010-unable-to-upload-pireps-to-the-vacentral-server/page__hl__%20send%20%20pirep%20%20vacentral