Jump to content

ARV187

Members
  • Content Count

    244
  • Joined

  • Last visited

  • Days Won

    1

ARV187 last won the day on September 2 2018

ARV187 had the most liked content!

Community Reputation

43 Excellent

7 Followers

About ARV187

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Location
    Spain

Recent Profile Visitors

7018 profile views
  1. v2.1.936 version, I saw that function, but I don't figure that do with that, the function calculate the distance between two points. I can do that in phpmyadmin with a sql sentence, but I do not know how to move it to that in schedule_searchform distances section with the existing form, where the data of the query "between" are those that the user enters in two fields type number. <div id="distance"> <p>Selecciona distancia:</p> <select id="type" name="type"> <option value="greater">Greater than</option> <option value="less">Less than</option> </select> <input type="text" name="distance" value="" /> <input type="submit" name="submit" value="Search flight" /> <br /><br /> <option value="between">Between</option> <?php $sql = "SELECT * FROM `phpvms_schedules` WHERE `distance` BETWEEN $distance1 AND $distance2"; ?> <input type="number" name="distance1" min="1" max="9999" value="" /> > <input type="number" name="distance2" min="1" max="9999" value="" /> <input type="submit" name="submit" value="Search flight" /> </div>
  2. I would like to add an option to allow you to search for a flight that has for example between 200 miles and 300 miles something similar to: search flight where 'distance' between "$distance1" and "$distance2" I have scanned these files: schedule_searchform.tpl core/modules/Schedules/schedules.php but I can not find out what code I need to do this.
  3. Yeah, that is working. Thank you! By default phpvms2 calculate flightime in this way ($schedule->arrtime - $schedule->deptime) don't use flightime database column.
  4. How I check that? In past versions are working, I'm thinking in reinstall again to see if that fix the issue, I need reset the database too or I can restore it?
  5. Hi, actually in my phpvms v2.1.936 I have this code: schedule_briefing.tpl <!-- Flight time Row --> <tr> <td colspan="2"><?php echo $schedule->arrtime - $schedule->deptime ?></td> </tr> But this code not show minutes, only hours, so if I have arr time = 12:59 and dep time = 09:00 the result is 3hours, not 3:59 hours. How can I fix this? Thanks!
  6. I think so, /public_html/phpvms7/config.php # overrides app.php 'app' => [ 'name' => 'phpvms', 'url' => 'https://argavirtual.com/phpvms7',
  7. I think that others web page options work, Do I try something specific? P.S: My phpvms7 is in public_html/phpvms7/ directory, I say this because seems that it's trying find assets in home directory: client denied by server configuration: /home/argavirt/public_html/phpvms7/api, referer: http://argavirtual.com/phpvms7/flights client denied by server configuration: /home/argavirt/public_html/phpvms7/api, referer: http://argavirtual.com/phpvms7/flights File does not exist: /home/argavirt/public_html/api, referer: http://argavirtual.com/phpvms7/livemap File does not exist: /home/argavirt/public_html/assets File does not exist: /home/argavirt/public_html/assets May be this directory? /public_html/phpvms7/public/assets
  8. Hi, I updated phpvms7 from github, but now I can't bill/unbill flights, server log say: What chmod permission type I need and that files? My .htaccess: # Use php7.2 AddHandler application/x-httpd-php72 .php # Disable index view Options -Indexes RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] # Deny all these files/folders RedirectMatch 403 ^/.git/.*?$ RedirectMatch 403 ^/.travis/.*?$ RedirectMatch 403 ^/app/.*?$ RedirectMatch 403 ^/bootstrap/.*?$ RedirectMatch 403 ^/config/.*?$ RedirectMatch 403 ^/modules/.*?$ RedirectMatch 403 ^/node_modules/.*?$ RedirectMatch 403 ^/resources/.*?$ RedirectMatch 403 ^/storage/.*?$ RedirectMatch 403 ^/tests/.*?$ RedirectMatch 403 ^/vendor/.*?$ RedirectMatch 403 ^/.bowerrc$ RedirectMatch 403 ^/artisan$ RedirectMatch 403 ^/composer.json RedirectMatch 403 ^/composer.lock RedirectMatch 403 ^/composer.phar RedirectMatch 403 ^/env.php.*?$ RedirectMatch 403 ^/env.php RedirectMatch 403 ^/env.php$ RedirectMatch 403 ^/Makefile RedirectMatch 403 ^/package.json RedirectMatch 403 ^/package-lock.json RedirectMatch 403 ^/phpunit.xml RedirectMatch 403 ^/webpack.mix.js # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]
  9. Hi, open a issue in github for each bug that you find. The pilotID change is already reported in github.
  10. No errors there, only that marks aren't showing in map, the map is empty: And the expected behavior is like the old: The others maps work right as you did with your instructions, but you forgot modify and the instructions to this index.php/pireps/routesmap or /core/templates/profile_myroutesmap.tpl
  11. In http://argavirtual.com/index.php/pireps/routesmap or /core/templates/profile_myroutesmap.tpl isn't working to me (no marks, only map), I use phpvms v2 and *.tpl files: profile_myroutesmap.tpl <br /> <br /> <div align="center"> <h3>Mi mapa de rutas</h3> </div> <br /> <div class="mapcenter" align="center"> <div id="routemap" style="width: 1100px; height: 640px;"></div><!--Adjustable of course --> </div> <?php ////// Leave remarked out for Leaflet please /////// /** * * 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> Does anyone know what is failing me?
  12. I need this: <?php $datetime = '$flight->deptime'; $tz_from = 'America/New_York'; $tz_to = 'Europe/Madrid'; $format = 'H:i'; $dt = new DateTime($datetime, new DateTimeZone($tz_from)); $dt->setTimeZone(new DateTimeZone($tz_to)); echo $dt->format($format) . "\n"; ?> But with $flight->deptime I get a error, only work with time format (writing the time directly in the code $datetime = '15:25';) but the only thing that I have is $flight->deptime. FIXED : <?php $flight->deptime; ?> <?php $tz_from = 'America/New_York'; $tz_to = 'Europe/Madrid'; $format = 'H:i'; $dt = new DateTime($flight->deptime, new DateTimeZone($tz_from)); ?> <?php $dt->setTimeZone(new DateTimeZone($tz_to)); ?> <?php echo $dt->format($format) . "\n"; ?>
  13. Hi Adam, its actually asked: https://github.com/nabeelio/phpvms/issues/265 I tried change it directly in DB but have strange effects.
  14. @Nabeel Im very noob in programation is this? https://www.w3schools.com/php/func_string_sprintf.asp or this? https://www.w3schools.com/php/php_date.asp (Create a Date From a String With PHP strtotime) Thanks! P.S: I need modify ACARSData.class.php to get UTC or especific zone time not local (server time) because is more hard and dirty, for example we have deptime, arrtime and lastupdate time in acars table, all in local time (server).
  15. Hi, I'm trying this function in a table <?php echo $flight->deptime; ?> But my server have NY time and I want UTC time or +6 hours, then I'm trying this: <?php echo $flight->deptime+'6 hour'; ?> But if for example in NY are the 16:38h I get 22h, not 22:38h I tried with +6, with +06:00:00, etc, but nothing. How I can get deptime in UTC or add 6 hours with minutes? Thanks! P.S: This is the source file (I think) to deptime funtion https://github.com/nabeelio/phpvms_v2/blob/master/core/common/ACARSData.class.php
×
×
  • Create New...