Jump to content

ARV187

Members
  • Posts

    260
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by ARV187

  1. 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

  2. Hi, I updated phpvms7 from github, but now I can't bill/unbill flights, server log say:

    Quote

    client denied by server configuration: /home/argavirt/public_html/phpvms7/api, referer: http://argavirtual.com/phpvms7/flights

    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]

     

  3. No errors there, only that marks aren't showing in map, the map is empty:

    VN1yPiY.jpg

     

    And the expected behavior is like the old:

    Plan_800.jpg

     

    The others maps work right as you did with your instructions, but you forgot modify that file and the instructions to this: (url)index.php/pireps/routesmap or the same file /core/templates/profile_myroutesmap.tpl

  4. On 9/12/2018 at 8:07 PM, Heritage1 said:

    Yes I can, we all live in duh same world, DUH world of "FLIGHT" , hehehe, here ya go, you owe me a cup of Coffee for this one. It does work, see the below link if you'd like, its running full blown Leaflet map now, and works great with no holding of any keys to zoom in and out either. Here is the code for those who need it, and the Link to my site also running phpvms acars conversion.

    http://seairtransport.net/crewcenter/index.php/acars

    And as Always, MAKE SURE you make a copy of the flown_routes.php file somewhere before doing this, don't say I didn't warn you .

     

    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?

  5. 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 :D:

    <?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";
    ?>

     

  6. @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).

  7. 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

  8. On 9/6/2018 at 9:15 PM, Junior said:

    yeah, I'm running the phpvms in host/va and unfortunately I got "The remote server returned an error: (404) Not Found", so... do you have any ETA about the fix? Thanks for your work :)

    Check if you have installed phpvms7 in main directory and not subdirectory, acars not work in subdirectories. ex: www.myweb.com not www.myweb.com/myphpvms7subdirectory

  9. We continue with same issue, APVacarsV2 v0.0.0.3 & PHPvms version 7.0.0 (build 180903-c95fe3)

    And we can't configure a charter flight, acars is blocked by default if pilot don't have a bided flight.

     

    zzFq88L.jpg

     

    With kacars for example VA a pilot could make a flight between two airports without that flight being in the database, in that case it was a charter flight, and the administrators did not have to create a specific regular flight for a pilot who wanted to fly an unusual route . Pilot can select a bided flight or can select charter flight check box to fill manual data and start flight.

    aqMbEve.jpg

     

    If this could be implemented, it helped a lot in that the pilots do charter flights without the administrators having to create a route that will only be flown once.

    Thanks Vangelis.

  10. My friend and me can't use acars because I get this error when we do click on start flight:

    Exception no controlled on aplication. Reference to object not stablished as instance of a object, if you click on continue nothing happen.

    vUNQPvc.jpg

    There is a log file to attach here?

    /htdocs/storage/logs:
    ,"planned_distance":"266","source_name":"APVacars2","flight_type":0,"user":"[object] (App\\Models\\User: {\"id\":1,\"name\":\"hidden\",\"email\":\"hidden@domain.com\",\"airline_id\":1,\"rank_id\":3,\"country\":\"es\",\"home_airport_id\":\"LEMG\",\"curr_airport_id\":\"LEBL\",\"last_pirep_id\":null,\"flights\":0,\"flight_time\":0,\"transfer_time\":0,\"avatar\":{\"path\":\"avatars/ARV001.png\"},\"timezone\":\"GMT\",\"status\":0,\"state\":1,\"opt_in\":null,\"active\":null,\"last_ip\":\"90.171.2.22\",\"created_at\":\"2018-08-21 22:27:03\",\"updated_at\":\"2018-08-31 04:01:41\",\"deleted_at\":null})"}
    [2018-09-01 18:42:22] dev.INFO: PIREP PREFILED  
    [2018-09-01 18:42:22] dev.INFO: aHiDDeNe

     

    In web page only its showed this in relation to acars flight:

    ldMlirl.jpg

     

    Open debug:

     

    Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración
    Just-In-Time (JIT) en lugar de a este cuadro de diálogo.

    ************** Texto de la excepción **************
    System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
       en APVacars_V2.Acars.Prefile()
       en APVacars_V2.FrmMain.BtnStartFlight_Click(Object sender, EventArgs e)
       en System.Windows.Forms.Control.OnClick(EventArgs e)
       en System.Windows.Forms.Button.OnClick(EventArgs e)
       en System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       en System.Windows.Forms.Control.WndProc(Message& m)
       en System.Windows.Forms.ButtonBase.WndProc(Message& m)
       en System.Windows.Forms.Button.WndProc(Message& m)
       en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Ensamblados cargados **************
    mscorlib
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.3132.0 built by: NET472REL1LAST
        Código base: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    APVacars V2
        Versión del ensamblado: 0.0.0.1
        Versión Win32: 0.0.0.1
        Código base: file:///C:/Program%20Files%20(x86)/Baggelis.com/APVacars%202/APVacars%20V2.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Versión del ensamblado: 10.0.0.0
        Versión Win32: 14.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.3151.0 built by: NET472REL1LAST_B
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Core
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2670.0 built by: NET471REL1LAST_C
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Windows.Forms
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2612.0 built by: NET471REL1LAST_B
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Runtime.Remoting
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Windows.Forms.resources
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Windows.Forms.resources.dll
    ----------------------------------------
    Accessibility
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    System.Data
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2633.0 built by: NET471REL1LAST_C
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Numerics
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
    ----------------------------------------
    FSUIPCClient
        Versión del ensamblado: 2.4.0.0
        Versión Win32: 2.4.0.0
        Código base: file:///C:/Program%20Files%20(x86)/Baggelis.com/APVacars%202/FSUIPCClient.DLL
    ----------------------------------------
    Newtonsoft.Json
        Versión del ensamblado: 10.0.0.0
        Versión Win32: 10.0.3.21018
        Código base: file:///C:/Program%20Files%20(x86)/Baggelis.com/APVacars%202/Newtonsoft.Json.DLL
    ----------------------------------------
    System.Runtime.Serialization
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.3130.0 built by: NET472REL1LAST_B
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
    ----------------------------------------
    mscorlib.resources
        Versión del ensamblado: 4.0.0.0
        Versión Win32: 4.7.2556.0 built by: NET471REL1
        Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_es_b77a5c561934e089/mscorlib.resources.dll
    ----------------------------------------

    ************** Depuración JIT **************
    Para habilitar la depuración Just In Time (JIT), el archivo de configuración de esta
    aplicación o equipo (machine.config) debe tener el
    valor jitDebugging establecido en la sección system.windows.forms.
    La aplicación también se debe compilar con la depuración
    habilitada

    Por ejemplo:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    Cuando esté habilitada la depuración JIT, cualquier excepción no controlada
    se enviará al depurador JIT registrado en el equipo
    en lugar de controlarlo mediante el cuadro de diálogo.

  11. I know that Nabeel is busy and does most of the work for phpvms7 on github, so I leave this as a suggestion from my VA. If someone else wants to put their suggestions it can be a good post. How are suggestions can be included or not, and may be soon or not.

     

    1. fleet->new aircraft-> (complete all data)-> save (there is no button to go back and add other aircraft) P.S: Doing clicking twice in save return to aircraft menu.

    2. Add a option to edit pilot ID ex:

    ARemTif.jpg

    3. Option (checkbox) to make a return/reverse flight when you create a flight. So you can create a flight and their reverse route without complete all fields again.

    • Like 2
  12. Hi, I uploaded the phpvms folder (version v7.0.0-180820-91a641) to my home directory by ftp, and I'm get this error message:

    Quote

    Parse error: syntax error, unexpected '=' in /home/vol9_1/byethost17.com/b17_19080370/htdocs/phpvms/app/helpers.php on line 60

    My test shared hosting:

    http://spark.byethost17.com/phpvms/

    My php info file:

    http://spark.byethost17.com/phpinfo.php

  13. Hi, Im trying show the top5 landing rating in frontpage_main.tpl but not work (it isn't showing and no error messages) , can anyone help me?

    /public_html/core/common/TouchdownStatsData.class.php

    public function get_stats_by_cur_month5 () { $query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND MONTH(submitdate)=MONTH(now()) AND YEAR(submitdate)=YEAR(now()) ORDER BY landingrate DESC LIMIT 5"; return DB::get_results($query); }

    /public_html/core/modules/TouchdownStats/TouchdownStats.php

    public function top_landing_this_month5 () { $this->set('stats', TouchdownStatsData::get_stats_by_cur_month5()); $this->show('public_html/lib/skins/templatemo_254_agency/frontpage_main.tpl'); }

    /public_html/lib/skins/templatemo_254_agency/frontpage_main.tpl

    <?php MainController::Run('TouchdownStats', 'display_TouchdownStats/top_landing_this_month5'); ?>

     

    Thanks!

×
×
  • Create New...