Jump to content

gio1961

Members
  • Posts

    252
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gio1961

  1. Open file core_htmlhead.php  (core/templates folder)

     

    search for

     

    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
    <script type="text/javascript" src="http://cfva.freehostia.com/lib/js/jquery.form.js"></script>
    <script type="text/javascript" src="http://cfva.freehostia.com/lib/js/phpvms.js"></script>
    <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDNz0LGNP3QqZJwR_Kjm8C5ERKCXrEULsE"type="text/javascript"></script>

     

    to

     

    <script type="text/javascript" src="http://cfva.freehostia.com/lib/js/jquery.form.js"></script>
    <script type="text/javascript" src="http://cfva.freehostia.com/lib/js/phpvms.js"></script>
    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDNz0LGNP3QqZJwR_Kjm8C5ERKCXrEULsE&callback=initMap" type="text/javascript"></script>
    

     

  2. Good morning guys. A question. If I get rid of the old pyreps, it involves something about statistics etc. etc.?
    Thank you

    P.S. however I still haven't figured out where to insert the code

     

    update phpvms_pireps rawdata = '', log = ',' route = '' where submitdate <DATE_SUB (NOW (), INTERVAL 3 MONTH)

  3. 41 minutes ago, Lausitzaircargo said:

    Vam negative to test it use

     

    test://lausitz-aircargo.de

     

    but at the Moment when i use the Ocean Blue skin, its work perfect. So i think are some Problems with the blueIce Skin from 209

     

     

     

    I will be hard to understand but the website ( lausitz-aircargo.de ) was created with VAM and the test site ( test://lausitz-aircargo.de ) does not open.

    However do as Proavia tells you. If it doesn't work with the Crystal skin it is a problem of the module and, if I remember correctly, it is a problem with javascript (javascript conflict of the module with the skins)..

     

  4. 1 hour ago, Lausitzaircargo said:

    Hi Guys,

     

    i have installed a Flight Booking System from https://github.com/web541/phpVMS-FltbookSystem-v2

    Its working fine, but when a Pilot will book a flight, the Pop up will be open and close instantly

     

    All Files are correct installed

     

    Thanks for helps

    To test it by self you can use following Login Details

     

    User: test@lausitz-aircargo.de

    password: 1234567

     

    What does VAM (virtual airline manager) ?

  5. 13 minutes ago, ProAvia said:

    You may be able to get the number of pilots on LoA by getting that "on leave" code from the pilots table of the database. "On leave" will show as a "3" in the retired column of the pilots table. 

     

    You may be able to work out the correct coding by finding the code for pending pireps (or pending registrations, etc) and adapting it to use for pilots on LoA. Let us know how you get along with that and maybe share your code here.

     

    OK thanks

  6. Good morning guys. One question, Is it possible to add a notice of absence of pilots (Leave of Absence) in the administration panel?


    Thank you

     

    leave.jpg

     

    P.S.
    If I was wrong to post in the wrong section, it can be moved to the right section. Thank you

  7. 1 hour ago, Vangelis said:

    Try bellow code 

     

    
    if($this->get->page == 'login' or $this->get->page == 'registration')
    {
    			if(Auth::LoggedIn()) 
    			{
    				Template::Show('app_top.php');
    			}
    			else 
    			{
    	
    	            Template::Show('app_top1.php');
    			}
    }

     

    
    <?php
    		// var_dump($_SERVER['REQUEST_URI']);
    		if($this->get->page == 'login' or $this->get->page == 'registration')
    {
    			if(Auth::LoggedIn()) 
    			{
    				Template::Show('app_top.php');
    			}
    }
    		?>
    
            <div id="content">
                <?php echo $page_content; ?>
            </div>
    
    		<?php
    
    		if($this->get->page == 'login' or $this->get->page == 'registration')
    {
    			if(Auth::LoggedIn()) 
    			{
    				Template::Show('app_bottom.php');
    			}
    }
    		?>

     

     

    Thanks for the reply. I tried this code but unfortunately it doesn't work. The app_top1.php file menu is not displayed

    <?php
    		// var_dump($_SERVER['REQUEST_URI']);
    if($this->get->page == 'login' or $this->get->page == 'registration')
    {
    			if(Auth::LoggedIn()) 
    			{
    				Template::Show('app_top.php');
    			}
    			else 
    			{
    	
    	            Template::Show('app_top1.php');
    			}
    }
    
    		?>
            
            
            
            
            
            
            
    
            <div id="content">
                <?php echo $page_content; ?>
            </div>
    
    		<?php
    
    		if($this->get->page == 'login' or $this->get->page == 'registration')
    {
    			if(Auth::LoggedIn()) 
    			{
    				Template::Show('app_bottom.php');
    			}
    }
    		?>

     

  8. Hi Guys, I have a problem.
    For needs, I have 2 menus, one in app_top.php (for users who log in to the site) and the other app_top1.php (for users who visit the site).
    I use the Crewcenter skin where the underneath code is in the layout.php file, to hide the header / menu on the login and registration pages.

     

    		<?php
    		// var_dump($_SERVER['REQUEST_URI']);
    		if (!isset($_SERVER['REQUEST_URI']) || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/login' || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/registration') {
    			if(Auth::LoggedIn()) {
    				Template::Show('app_top.php');
    			}
    		}
    		?>
    
            <div id="content">
                <?php echo $page_content; ?>
            </div>
    
    		<?php
    
    		if (!isset($_SERVER['REQUEST_URI']) || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/login' || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/registration') {
    			if(Auth::LoggedIn()) {
    				Template::Show('app_bottom.php');
    			}
    		}
    		?>

     

    I tried to insert this code, but the menu of the app_top1.php file is also displayed on the login / registration pages.

     

    		<?php
    		// var_dump($_SERVER['REQUEST_URI']);
    		if (!isset($_SERVER['REQUEST_URI']) || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/login' || ltrim($_SERVER['REQUEST_URI'],'/') !== SITE_URL.'/index.php/registration') {
    			if(Auth::LoggedIn()) {
    				Template::Show('app_top.php');
    			}
    			} else {
    	
    	            Template::Show('app_top1.php');
    		}
    		?>


    I don't understand where the problem is

    Thanks for a possible reply.
    Sincerely

  9. 43 minutes ago, Ither said:

     

    Line 26 is

     

    
    Auth::$userinfo->pilotid = 100;

     

    Also it appears this is still running regardless -- I just made bunch of fake bid's and set date back 5 days -- ran the script and all the bids were wiped out (I have 48 hour hold period).

     

    Guess I'll just ignore it.

     

    I don't know if I understand correctly, however my code is:

     

    Auth::$userinfo->pilotid = 0;

     

  10. I remember making a change to the skin a long time ago, but honestly I don't remember what I changed. If the solution comes to mind.
    However this is my code and as you can see from the image the notice is placed where I wanted.

    <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
    <div class="box-body">
    <div class="block">
    <div class="block-title">
    <h4><i class="fa fa-paper-plane"></i> <strong>File</strong> Manual PIREP</h4>
    </div>
                        <?php
                            if(isset($message))
                                echo '<div class="callout callout-warning">
                                <h4>Error</h4>
                                <p>'.$message.'</p></div>';
                        ?>
                        
                        <form action="<?php echo url('/pireps/mine');?>" method="post">
                            <div class="form-group">
                                <label>Pilot</label>
                                <input type="text" class="form-control" disabled placeholder="<?php echo Auth::$userinfo->firstname . ' ' . Auth::$userinfo->lastname;?>">
                            </div>
                            <div class="form-group">
                                <label>Airline</label>
                                <select name="code" id="code" class="form-control">
                                    <option value="">Select airline</option>
                                    <?php
                                        foreach($allairlines as $airline)
                                        {
                                            $sel = ($_POST['code'] == $airline->code || $bid->code == $airline->code)?'selected':'';
                                            echo '<option value="'.$airline->code.'" '.$sel.'>'.$airline->code.' - '.$airline->name.'</option>';
                                        }
                                    ?>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Flight Number</label>
                                <input type="text" name="flightnum" class="form-control" value="<?php if(isset($bid->flightnum)) { echo $bid->flightnum; }?><?php if(isset($_POST['flightnum'])) { echo $_POST['flightnum'];} ?>">
                            </div>
                            <div class="form-group">
                                <label>Departure Airport</label>
                                <select id="depicao" name="depicao" class="form-control">
                                    <option value="">Select departure airport</option>
                                    <?php
                                        foreach($allairports as $airport)
                                        {
                                            $sel = ($_POST['depicao'] == $airport->icao || $bid->depicao == $airport->icao)?'selected':'';
                                            echo '<option value="'.$airport->icao.'" '.$sel.'>'.$airport->icao . ' - '.$airport->name .'</option>';
                                        }
                                    ?>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Arrival Airport</label>
                                <select name="arricao" id="arricao" class="form-control">
                                    <option value="">Select arrival airport</option>
                                    <?php
                                        foreach($allairports as $airport)
                                        {
                                            $sel = ($_POST['arricao'] == $airport->icao || $bid->arricao == $airport->icao)?'selected':'';
                                            echo '<option value="'.$airport->icao.'" '.$sel.'>'.$airport->icao . ' - '.$airport->name .'</option>';
                                        }
                                    ?>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>Aircraft</label>
                                <select name="aircraft" id="aircraft" class="form-control">
                                    <option value="">Select aircraft</option>
                                    <?php
                                        foreach($allaircraft as $aircraft)
                                        {
                                            /*	Skip any aircraft which have aircraft that the pilot
                                                is not rated to fly (according to RANK) 
                                            */
                                            if(Config::Get('RESTRICT_AIRCRAFT_RANKS') === true)
                                            {
                                                /*	This means the aircraft rank level is higher than
                                                    what the pilot's ranklevel, so just do "continue"
                                                    and move onto the next route in the list 
                                                 */
                                                if($aircraft->ranklevel > Auth::$userinfo->ranklevel)
                                                {
                                                    continue;
                                                }
                                            }
                                            $sel = ($_POST['aircraft'] == $aircraft->name || $bid->registration == $aircraft->registration)?'selected':'';
                                            echo '<option value="'.$aircraft->id.'" '.$sel.'>'.$aircraft->name.' - '.$aircraft->registration.'</option>';
                                        }
                                    ?>
                                </select>
                            </div>
                            
                            <?php
                            // List all of the custom PIREP fields
                            if(!$pirepfields) $pirepfields = array();
                            foreach($pirepfields as $field)
                            {
                            ?>
                            <div class="form-group"></div>
                            <label><?php echo $field->title ?></label>
                            <?php
                            // Determine field by the type
                            if($field->type == '' || $field->type == 'text')
                            {
                            ?>
                                <input type="text" name="<?php echo $field->name ?>" value="<?php echo $_POST[$field->name] ?>" class="form-control" />
                            <?php
                            } 
                            elseif($field->type == 'textarea')
                            {
                                echo '<textarea name="'.$field->name.'" class="form-control">'.$field->values.'</textarea>';
                            }
                            elseif($field->type == 'dropdown')
                            {
                                $values = explode(',', $field->options);
                                echo '<select name="'.$field->name.'" class="form-control">';
                                foreach($values as $value)
                                {
                                    $value = trim($value);
                                    echo '<option value="'.$value.'">'.$value.'</option>';
                                }
                                echo '</select>';		
                            }
                            ?>
                            <?php } ?>
                            
                            <div class="form-group">
                                <label>Fuel Used</label>
                                <input type="text" name="fuelused" class="form-control" placeholder="Enter fuel used in <?php echo Config::Get('LIQUID_UNIT_NAMES', Config::Get('LiquidUnit'))?>" value="<?php echo $_POST['fuelused']; ?>" />
                                <p>This is the fuel used on this flight in <?php echo Config::Get('LIQUID_UNIT_NAMES', Config::Get('LiquidUnit'))?></p>
                            </div>
                            <div class="form-group">
                                <label>Flight Time</label>
                                <input type="text" name="flighttime" class="form-control" placeholder="Enter in format HH.MM (example 3.45 = 3 hours and 45 minutes)" value="<?php echo $_POST['flighttime'] ?>" />
                            </div>
                            <div class="form-group">
                                <label>Route</label>
                                <textarea name="route" class="form-control" style="width: 100%" placeholder="Enter the route flown, or default will be from the schedule"><?php echo (!isset($_POST['route'])) ? $bid->route : $_POST['route']; ?></textarea>
                            </div>
                            <div class="form-group">
                                <label>Comments</label>
                                <textarea name="comment" class="form-control" style="width: 100%"><?php echo $_POST['comment'] ?></textarea>
                            </div>
                            <input type="hidden" name="bid" value="<?php echo $bidid ?>" />
                            <input type="submit" name="submit_pirep" value="Submit" class="btn btn-danger btn-block btn-flat" style="width:120px;" />
                        </form>
    <br />
     
    </div></div>

     

    PIREP.jpg

  11. 2 hours ago, Nascoli said:

    Hi Everyone!

     

    "Houston, I´ve a problem" 😁

    Hello everyone! I have been working on customizing my SKIN using AdminLTE. I have a problem, because I could not change the position that the messages appear. See image!

    I've tried to change the template files: core_message, core_error and core-success, but, nothing happens. Can someone help me?2020-02-26_LI.jpg

     

     

    Hi, same skin. I solved it with a modal window. This is the file (core_message.php) here is my code and it works perfectly. Try it and see if it works. Of course, adapt it to your skin

     

    <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
    
    <script type="text/javascript">
        $(window).load(function(){
            $('#message').modal('show');
        });
    </script>
    <?php
    echo '<div id="message" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
        <div class="modal-dialog">
            <div class="modal-content">
                <!-- Modal Header -->
                <div class="modal-header text-center">
                    <h2 class="modal-title"><i class="fa fa-exclamation"></i> Information</h2>
                </div>
                <!-- END Modal Header -->
                <!-- Modal Body -->
                <div class="modal-body">
                    <center><p>'.$message.'</p></center>
                </div>
                <!-- END Modal Body -->
            </div>
        </div>
    </div>
    ';
    ?>

    try to insert it above the code

     

    <form action="<?php echo url('/pireps/mine');?>" method="post">

     

    <?php
                            if(isset($message))
                                echo '<div class="callout callout-warning">
                                <h4>Error</h4>
                                <p>'.$message.'</p></div>';
                        ?>

  12. 54 minutes ago, servetas said:

    Can you check the code below?

    
    <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { ?>
    <!-- Admin Notifications -->
    <li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle text-muted text-muted  " href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-bell"></i>
    <?php
    $pendingpireps = count(PIREPData::findPIREPS(array('p.accepted' => PIREP_PENDING)));
    $pendingpilots = count(PilotData::findPilots(array('p.confirmed' => PILOT_PENDING)));
    										
    $count = ($pendingpireps + $pendingpilots);
                                            
    if(!$count) {
    echo '';
    } else {
    echo '
    <div class="notify"> 
    <span class="heartbit"></span> 
    <span class="point"></span> 
    </div>';
    }
    ?>
    </a>
    
    <div class="dropdown-menu dropdown-menu-right mailbox animated zoomIn">
      
    <center>
    <br />
    <font color="#f39c12"><b>ADMIN NOTIFICATIONS</b></font>
    
    <hr />
    
    <!-- PILOTS -->
    
    <a href="<?php echo SITE_URL?>/admin/index.php/pilotadmin/pendingpilots">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo count(PilotData::GetPendingPilots()); ?></b></span><br />Pending Registrations</font></a>
                                                    
    <hr />
    <!-- PIREPs -->
    <a href="<?php echo SITE_URL?>/admin/index.php/pirepadmin/viewpending">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo count(PIREPData::GetAllReportsByAccept(PIREP_PENDING)); ?></b></span> <br />Pending PIREPs.</font></a>
      
      <hr />
    <!-- Screenshots -->
    <a href="<?php echo SITE_URL?>/index.php/screenshots/approval_list">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo ScreenshotsData::countpending(); ?></b></span> <br />Pending Screenshots.</font></a>
    <hr />
                     
    <a href="<?php echo SITE_URL?>/admin"><font color="#ffff00">Check all notifications</font></a>
    </center>
    <br />
    </div>
                                
    <!-- End Admin Notifications -->
    <?php } ?>

     

    Thanks George. I also had that code but I didn't enter it, however it worked.
    The code above, however, shows a "flash" next to the notifications only if there are outstanding issues. I don't know if I explained myself

    I have tried to modify these lines of code but I have not succeeded

    ******

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

    if(!$count) { echo ''; }

    else { echo ' <div class="notify">

    <span class="heartbit"></span>

    <span class="point"></span> </div>'; } ?>

     

    ******

  13. Hi guys, I have this code that notifies the administrator of the slopes (Pilots and Pireps) directly from the skin. How can I add code regarding screenshots? (I use the David's ScreenShots Center module)

    not.jpg

     

    ScreenshotsData.class.php file add:

    public static function countpending() {
    $query = "SELECT COUNT(id) AS total FROM phpvms_screenshots WHERE file_approved='0'";
    $check = DB::get_row($query);
    return $check->total;
    }

    on sidebar_dashboard.php file (To display the data in the administration panel)

    <a href="<?php echo SITE_URL?>/index.php/screenshots/approval_list"><?php echo ScreenshotsData::countpending(); ?></strong> ScreenShots Pending</a>

    ********

    Code to be displayed in the skin

     <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { ?>
    <!-- Admin Notifications -->
    <li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle text-muted text-muted  " href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-bell"></i>
    <?php
    $pendingpireps = count(PIREPData::findPIREPS(array('p.accepted' => PIREP_PENDING)));
    $pendingpilots = count(PilotData::findPilots(array('p.confirmed' => PILOT_PENDING)));
    										
    $count = ($pendingpireps + $pendingpilots);
                                            
    if(!$count) {
    echo '';
    } else {
    echo '
    <div class="notify"> 
    <span class="heartbit"></span> 
    <span class="point"></span> 
    </div>';
    }
    ?>
    </a>
    
    <div class="dropdown-menu dropdown-menu-right mailbox animated zoomIn">
      
    <center>
    <br />
    <font color="#f39c12"><b>ADMIN NOTIFICATIONS</b></font>
    
    <hr />
    
    <!-- PILOTS -->
    
    <a href="<?php echo SITE_URL?>/admin/index.php/pilotadmin/pendingpilots">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo count(PilotData::GetPendingPilots()); ?></b></span><br />Pending Registrations</font></a>
                                                    
    <hr />
    <!-- PIREPs -->
    <a href="<?php echo SITE_URL?>/admin/index.php/pirepadmin/viewpending">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo count(PIREPData::GetAllReportsByAccept(PIREP_PENDING)); ?></b></span> <br />Pending PIREPs.</font></a>
    <hr />
                     
    <a href="<?php echo SITE_URL?>/admin"><font color="#ffff00">Check all notifications</font></a>
    </center>
    <br />
    </div>
                                
    <!-- End Admin Notifications -->
    <?php } ?>

     

     


    Thanks for a possible reply

  14. 16 minutes ago, CFVA said:

    Want to add the aircraft being flown in the Live ACARS map page.

    ACARS.PHP says variable     <%=flight.aircraftname%>            Gives the full name

    So I added that in ACARS.PHP:

    So I have

        <tr>
            <td><b>Pilot</b></td>
            <td><b>Flight Number</b></td>
            <td><b>Departure</b></td>
            <td><b>Arrival</b></td>
            <td><b>Aircraft</b></td>
            <td><b>Status</b></td>
            <td><b>Altitude</b></td>
            <td><b>Speed</b></td>
            <td><b>Distance/Time Remain</b></td>
        </tr>
    for the table &

    <script type="text/html" id="acars_map_row">
    <tr class="<%=flight.trclass%>">
    <td><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotid%> - <%=flight.pilotname%></a></td>
    <td><?php echo "CF"?><%=flight.flightnum%></td>
    <td><%=flight.depicao%></td>
    <td><%=flight.arricao%></td>
    <td><<%=flight.aircraftname%></td>
    <td><%=flight.phasedetail%></td>
    <td><%=flight.alt%></td>
    <td><%=flight.gs%></td>
    <td><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%></td>
    </tr>

    acars1.JPG

    All other variables show except aircraft name!

    Using kAcars 1.0.1.5 & PHPVMS 5.5.2

    Thanks in advance

     

    Try changing this code from

    <td><<%=flight.aircraftname%></td>

     

    to <td><%=flight.aircraftname%></td>

    there is "<" more

     

  15. 1 hour ago, MrSandyWilly said:

    Hi,

    I have been trying to get CCFTracker set up with my VA (crew.tcxvirtual.com). I have downloaded and installed the module to /core/modules, but when I login using my pilot ID and password, I get this error: https://ibb.co/rbx8L2W

    For those of you incapable of following links, it says "Login error: the connection to the VA site has timed out!"

    How can I fix this?

    From the software author's forum:
    "" This message is triggered only when a connection to the VA site could not be established. Check again if the URL is correct, there are no white spaces before or after the URL and the URL includes http: // like "http://www.myva.com"

    Furthermore, if different language versions are available on your site, for example let's say that phpvms is on "http://www.myva.com/en", you must enter it ""

    *****

     

    I tried a little while ago the software installation and it works perfectly: I created a folder on the "c" disk of the computer and I installed them the program. Before starting the program, I right-clicked on the executable file and set it to "run as administrator".
    Started the program, logged in, everything ok

  16. 1 hour ago, CSJCB said:

    Hi folks

    Does anybody knows how to change the url in the application ? I have change my VA url and now i'm facing problems to change it.

    I have uninstalled and reinstalled but the application doesnt allow me to change anything on settings, I've got the login screen.

    Its a customized Acars I do believe that is not the problem

    Any tips please, appreciate

    regards

     

    Hi, as far as I know, it is not possible to change the path of your new URL directly from the Kacars software. You should contact the software programmer to modify the url (this must be done, if I remember correctly, in the process of programming). Among other things, the author of the software is no longer available, I think he closed the site and assistance with the software. However try to contact him.

×
×
  • Create New...