Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by web541

  1. 8 hours ago, ArthurHetem said:

    When a pilot jumpseat via the Fltbook V2 module, the pilot is being sent to "-" not the icao that he choosed

    Was this on the search page or after they have jumpseated? If it's on the search form page, get the pilot to log out and log back in again (or refresh the page). If it's after they have jumpseated then make sure you've uploaded all the files correctly and uploaded the 'fltbook.sql' file to your database correctly.

  2. If it's just a static page then yes it's possible (if it's dynamic, as in it requires a lot of database activity/a lot of methods then it's best put through a controller/module)

    For this, I'll just create a static about page

    1. Go to resources/views/layouts/default (unless you have another layout, then put it in there)

    2. Create a new folder called 'about'

    3. Create a new file inside this folder called 'index.blade.php'

    4. Inside this file place this

    @extends('app')
    @section('title', 'About')
    
    @section('content')
    <!-- Content HTML goes here -->
    <h3>Test</h3>
    @endsection

    Notes:

    The @extends('app') means that this page will be extending off the master template called 'app.blade.php' which is found in the resources/views/layouts/default folder

    The @section('title', 'About') means that (because it is set by the @yield('title') in the master template) this will show up in the <title></title> of the browser tab. In this case we've set it to 'About'.

    The @section('content') is where you put your normal HTML for your page (this is also set in the master template)

    5. Routing

    Go to app/Routes/web.php and find this line (around line 17)

    Route::get('livemap', 'AcarsController@index')->name('livemap.index');

    The ::get means you are submitting a GET HTTP request to the url '/livemap' (note this can be inside a prefix)

    The 'AcarsController@index' means you are targeting the 'index' method (function) of the AcarsController controller

    The  ->name('livemap.index'); is giving this route a unique name (in this case 'livemap.index') and can be referred to in the app via route('livemap.index')

     

    After this line, place this

    Route::get('about', function() {
    	return view('layouts.default.about.index');
    })->name('about_page');

    Where the view file being targeted is located in resources/views/layouts/default/about/index.blade.php (hence the layouts.default.about.index)

    The principles are the same, but it's using a 'Closure' (the function() bit) instead of passing it through a controller, because it is just a static page and there are no other methods being used, this is sufficient.

    6. Go to {http://yourvaurl.com}/about and it should show up.

     

    Final notes:

    I suggest you read the docs over at http://docs.phpvms.net/customizing and also the laravel blade docs over at https://laravel.com/docs/master/blade to get used to the new templating system.

    When updating the phpVMS version you may lose this work, so for that reason I recommend making a module or widget. Most of the principles are the same in terms of the actual templating but the routing won't affect the default files (instead it is put inside the module). Check out the docs here http://docs.phpvms.net/developers/add-ons-and-modules for info about that.

    If there are multiple pages you want added, you could make a module that contains all of them (either by storing the HTML in the database or by routing the templates through a controller) which would be easier than making a module for each page.

  3. Try this

    <?php
    $pilots = DB::get_results("SELECT * FROM ".TABLE_PREFIX."pilots ORDER BY `totalpay` DESC");
    $ranking = 0;
    
    foreach($pilots as $p) {
    	echo '#'.$ranking.' | '.PilotData::getPilotCode($p->code, $p->pilotid).' - $'.$p->totalpay;
    	echo '<br />';
    	$ranking++;
    }
    
    ?>

     

    • Thanks 1
  4. 4 hours ago, jnascar said:

    When you say 5.6+ do you mean up to PHP versions 7.0, 7.1, 7.2 :) And does this make it more secure or up to date than v5? And will most modules work with it?

    I wouldn't consider it more up to date than 5.5.x (it was Nabeel's v2 ported up which was quite old to begin with) but still usable. The intention was to make the current version work with PHP 7.0 so I would assume that it would run fine on that setup (as 5.5.x has never been given the official 'run on PHP 7.0+'). As for security, it's possible that some minor adjustments (for PHP 7.0) here and there have been added but nothing too major should have been impacted (otherwise we would have been notified). The modules depend on the developer, I'd say most would work fine but you might have a few hiccups if they have some deprecated features or otherwise.

    If you already have a working site then I'd personally wait for v7 than to try and mess around with upgrading again.

  5. 2 hours ago, polirom said:

    It's very strange. After doing everything you tell me, the problems continue. Delete lines 27-31 and stay the same.

    Can you send me a link to download the installation file that you use?
    Like the one I have is wrong or damaged

     

    I made a new installation of phpvms, install airports, airplanes and flbook.
    The installation of the table fltbook.sql already works perfectly.
    The rest remains the same.
    Select the A320-01 and it is blocked for the other pilots and neither the route nor the A320-02 plane can be selected since the route is blocked.

    If I change this option to "false" in the local.config.php, then it works. But I think it should not be in "false"

    # If someone places a bid, whether to disable that or not
    Config::Set('DISABLE_SCHED_ON_BID', false);

     

    If I change this option to "false" in the local.config.php, then it works. But I think it should not be in "false".
    What does not work is changing the reservation option in the administration panel. It does not matter whether you put Yes or No, you always

    Oh right I know what the issue is now. In your first post, I took it as the aircraft itself wasn't showing up for each schedule (I have made a setting for that in the admin panel) as it was blocked off, but really it was the schedule that was blocked off instead so therefore the aircraft were also blocked off.

    Yes the DISABLE_SCHED_ON_BID should be set to false, if it is set to true then the app takes it and means "Yes I want to disable the bid if someone else has got one" but if it is set to false then it means "No I don't mind if someone else bids on the same schedule".

    If you want a clean install, then check here.

  6. 8 hours ago, polirom said:

    lxlFD4P.png

    It is in "YES"
    I install it several times and it always happens the same. Does not accept the change of the administration panel

    This is quite odd, if you change the value to 'No', does it update (it could be that the settings table isn't read properly) and does it allow the aircraft to be booked by multiple people? I just tested the module on a fresh install and it worked first time for me.

    In the event that it still doesn't work, you can go into core/templates/fltbook/confirm_bid.php and delete lines 27-31 which should force it to unlock if something is wrong.

  7. On 4/26/2018 at 8:23 AM, polirom said:

    I have it like that

    k1iy2Z2.png

    BaI4Igz.png

     

    0nCNYi8.png

    If you go to the admin panel and to the settings for this module, what is this set to? If you change it, does it work?

    Allow aircraft to be booked if someone else has booked a schedule with that aircraft

     

  8. 4 hours ago, polirom said:

    I have several problems installing FltbookSystem 2 Master.
    1.- When I create the tables with fltbook.sql I have an error:

    Error

    consulta SQL:

    
    
     

    MySQL ha dicho: 

    #1060 - Nombre de columna duplicado 'airline'

    EPcV2Bh.png

    The tables are created equally.

    I create the airplanes:
    A350MDN
    A350-01
    A350-02

    I think several more but for the example is like this

    When I book a route, it lets me choose between the A350-01, A350-02
    I reserve the A350-01, but the plane is blocked for the other pilots.
    It is no longer available to anyone, even though the A350-02 is free.

    pojMLTU.png

     

    vnUydqs.png

     

    Erase the planes, the routes, the company.
    Create everything from the beginning several times and always the same with the same result.
    I think everything comes from the error first when creating the table, but I do not know how to solve it.
    Can you help me?
    Thank you
    phpvms 5.5.x

     

     

     

    The SQL error is because you already have a column name called 'airline' in your 'phpvms_aircraft' table. This could be from another custom module, or from you importing the SQL file more than once. Can you go to phpmyadmin => structure of the the 'phpvms_aircraft' table and screenshot it. Also take one of your aircraft table (only the first row will be fine).

    Also, in your core/local.config.php file, what is this set to?

    DISABLE_SCHED_ON_BID

     

  9. On 4/22/2018 at 7:50 PM, LakerVirtual said:

    Can someone just point out the differences between the various versions of phpVMS?

    What's the latest stable version?

     

    phpVMS Version 2 (https://github.com/nabeelio/phpvms_v2) was the original phpVMS version and still works to some extent, but requires your PHP version to be >5.6.

    phpVMS Version 5.5.x (https://github.com/DavidJClark/phpvms_5.5.x) is the current stable version of phpVMS and can be used on PHP systems (mainly on 5.5.12) of up to 5.6. Some people have made it work on PHP v7 with no errors, but it's different for everyone on their own hosting.

    phpVMS Version 7 (https://github.com/nabeelio/phpvms) is currently in development and is a totally different version of the two listed above. This version will be the newest and most up-to-date version when released but is still somewhere between Alpha and Beta stages (you can test it though, but there will still be bugs and changes that will occur before the official release). This version is made for PHP Versions >7.1.

  10. 1. Try this

    <?php
    $pendingpireps = count(PIREPData::findPIREPS(array('p.accepted' => PIREP_PENDING)));
    $pendingpilots = count(PilotData::findPilots(array('p.confirmed' => PILOT_PENDING)));
    echo ($pendingpireps + $pendingpilots);

    2. smartCARS doesn't report the rawdata on its own. You could modify their web scripts and try and make it work, but this depends if the developer has hardcoded anything on the actual app's side or not.

  11. <?php
    //VAForum Original by:simpilot
    //VAForum Security updates + VAForum 2.0 onwards by: Tom Sterritt
    ?>
    <?php $this->show('forum_nav.tpl'); ?>
    <h3>New Post</h3>
    <script src="/lib/js/ckeditor/ckeditor.js"></script>
    <div style="text-align: left;">
        <form action="<?php echo url('/Forum');?>" method="post" enctype="multipart/form-data">
            <table width="80%" align="left">
                <tr>
                    <td>Posted By:</td>
                    <td align="left"><b><?php echo Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname?></b></td>
                </tr>
                <tr>
                    <td>RE: </td>
                    <td align="left"><?php $topic = ForumData::get_topic_name($topic_id); $name = $topic->topic_title; echo $name; ?></td>
                </tr>
                <tr>
                    <td>New Post</td>
                    <td align="left"><textarea class="ckeditor" rows="10" cols="50" name="message" value=""></textarea></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="hidden" name="topic_id" value="<?php echo $topic_id; ?>" />
                        <input type="hidden" name="forum_id" value="<?php echo $forum_id; ?>" />
                        <input type="hidden" name="pilot_id" value="<?php echo Auth::$userinfo->pilotid; ?>" />
                        <input type="hidden" name="action" value="submit_new_post" />
                        <input type="submit" value="Submit Post">
                    </td>
                </tr>
            </table>
        </form>
    </div>

    Give that a try.

  12. Try this

    	<table width="100%">
    <?php
    echo '<td width="250px" valign="top">'; 
    echo '<table cellspacing="1" cellpadding="1" border="1">';
    echo '<th width="150px"><div align="left">Country Location</div></th>';
    echo '<th width="100px"><div align="center">Pilots</div></th>';
    $country_info = DB::get_results('SELECT COUNT(pilotid) as total, location FROM '.TABLE_PREFIX.'pilots GROUP BY location LIMIT 10');
    foreach($country_info as $country)
    {
    echo '<tr>';
    echo '<td align= "left">';
    echo '<img src="'.Countries::getCountryImage($country->location).'" /> ';
    echo Countries::getCountryName($country->location);
    echo '</td>';
    echo '<td align="center">';
    echo ' ('.$country->total.')';
    echo '</td>';
    echo '</tr>';
    }
    echo '</table>';
    ?>
    </table>

     

  13. 22 hours ago, ATACEO said:

    Hello all,

     

    I am new to this and am having an issue with the add new Airport and am trying to follow this thread.  However in first post it says "1) Go to your local.config.php / app.config.php to change your phpvms_api_server"  I have changed the app.config.php but I do not see anything related to phpvms_api_server in the local.config.php.  That line is it supposed to be added to the local.config.php and if so where should it be added?

     

    Ok UPDATE:

     

    I have added the code to local.config.php and as OzFlyer said it is still not fetching any data when adding New Airport and ICAO code.  Any help would be greatly appreciated.

     

    Thank you for your time and understanding

    The local.config.php doesn't need to be changed too much, but rather a few other files.

    Have you followed the tutorial here? https://www.virtualairlines.eu/index.php/Blog

  14. 33 minutes ago, spkier said:
    
    https://pastebin.com/MYF5RHS2

    i found the errors go to pastebin and see the code i repaired it should fix it but please make a backup

    i have not tested it!

    just replace it with acarsmap.js

    Are you sure that .BoundsBounds and .Bounds are functions in the js Google Maps API? They might be but last time I checked they weren't. And also, there is no need to use an iframe in this circumstance due to the nature of how phpVMS works.

     

    2 minutes ago, flyalaska said:

    didnt work

    Are you running PHP 7.0 at the moment?

  15. 1 hour ago, spkier said:
    
    Config::Set('AIRPORT_LOOKUP_SERVER', 'phpvms');

    Tried the above code into app.config and local.config files in core folder but with no luck 

    when i hit Look up airport

    i'm stuck at getting "Fetching airport info"

    and nothing happens below is a image of what i tried:

    https://imgur.com/a/TLAIq

     

    Website: http://192.3.141.136/dashboard

    running: ubuntu 14.04 php 5.2.0 mysql 5.5 apache2

     

    The 'phpvms' API server is currently down (or at least responds differently to phpvms < 7.0), you can either use this

    or just wait until phpVMS v7.0 is released (I believe you can fiddle with it in alpha at the moment)

    Another option is to manually add each airport from an online source and it should work as normal if you don't have too many to add.

  16. 1 hour ago, latitude24 said:

    Ok. Hopefully they answer soon. If not, something you can point me in the right direction? 

    Inside core/common/AutoAssignData, find all of these

    public function

    change them to this

    public static function

    And that should work. If it doesn't, then it's being called elsewhere and you'll have to wait for a reply considering the module is payware.

    • Thanks 1
  17. 16 hours ago, BraedenD said:

    I am sorry I did not mean the Admin Center. i meant the main phpvms center but I would like to use a Admin Template from elmer for it, much like pilot center 

     

    Ah ok that's much easier then. Have you skinned before? Try this link 

    The template you're using might be slightly different in the way things are displayed and linked, but as long as the phpVMS variables are in there, it should work as normal. If you have tried to skin it, what problems have you had?

     

×
×
  • Create New...