Jump to content

Yash

Members
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Yash

  1. 14 hours ago, Shadesb181 said:

    Thank you, I noticed that after posting it...I PM Vangelis directly. I am hoping he can assist me. Thanks again.

    phpVMS Auto PIREP Validator/Points & Pay System

    Moderator edit: OP should Google search the above item to see if it meets your needs. Yash shouldn't post links to his payware stuff here.

  2. 1 hour ago, ProAvia said:

    While this might prevent regular users (pilots) from using the manual PIREP form, how will admins be able to now enter the pilots ID to input the PIREP data for a specific pilot?

     

    Go to pirep_new.php in core/templates and replace this

    <dt>Pilot:</dt>
    	<dd><strong><?php echo Auth::$pilot->firstname . ' ' . Auth::$pilot->lastname;?></strong></dd>

    with

    <dt>Pilot:</dt>
    <dd>
      <select name="pilotid">
        <?php
        $pilots = PilotData::getAllPilots();
        foreach($pilots as $pilot){
          echo '<option value="'.$pilot->pilotid.'">'.$pilot->firstname.' '.$pilot->lastname.'</option>';
        }
        ?>
      </select>
    </dd>

    Now go to core/modules/PIREPS/PIREPS.php

    Search for this

    protected function SubmitPIREP() {

    Below this line replace 

    $pilotid = Auth::$pilot->pilotid;

    with

    $pilotid = $this->post->pilotid;

     

    That's it now select your Pilot and File a PIREP for him ;)

     

  3. Go to phpvms_install_dir/core/templates/pirep_new.php

    At the start of file enter this:

    <?php
    if(!PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) {
        Debug::showCritical('Unauthorized access');
        return;
    }
    ?>

     

    Regards

  4. 5 hours ago, Shadesb181 said:

    I am using this code on my version of crewcenter now. I am wondering if I can limit the search results. At the moment even if I type KJFK as dep airport, results comeback from the whole database. Any help would be appreciated. Thanks

    Hello there, you may use the datatables to paginate your results into seperate pages of a table.

    Here it is :
    https://datatables.net/

  5. 7 hours ago, ProAvia said:

    Really?? - /admin/lib/layout/layout.php only has references to "http" in the comments section. Could you be more specific as to exactly where you are referring to?

    Yes, you may check the core_htmlhead.php file in admin layout.

    Change http:// to https:// if using SSL

  6. Hello guys,

    I am proud to represent the VA System by vCrew Sys.

     

    • What it does?
      It helps you to host a VA in no time with a highly customised skin! 
       
    • What is the base of this System?
      Ofcourse, phpVMS.
       
    • How will the VA be hosted on my personal host?
      Oops! It's not hosted on your personal host but on the host of vCrewSys. 
      But don't worry, you will get a private subdomain of yours! What does that mean?

      You just need to redirect your homepage to our link!
      Also you have an option to opt for subdomain of your choice from Hosting Dashboard.
       
    • What are the features available to me?
      Well the features depend on which plan you choose. Just visit our website and see all the available plans.
      Note that plans price is in INR (Indian Rupee)

    List of Modules in the System:

    • Advanced UI for all basic Modules
    • Fascinating Dashboard
    • Points System (Based on Flight Log)
    • Pay System (Based on Flight Log)
    • Events Center
    • Tours Center
    • Advanced PIREP Details ( Including TakeOff / Landing / Block IN / Block OUT Time )
    • Flight Tracker
    • Weather Finder

    Note: We can add extra modules as well based on your requests and the pricing will be decided accordingly!

    I hope you guys like it! 

     

  7. Set the Jumpseat cost to 0 from the Admin Panel

    4 hours ago, Highskies said:

    Hello, I am wonder if some one would have the a code to allow me to issue pilots free jumpseats to work along side the fltbook V2 booking system.

     

     

     

  8. 2 hours ago, FlightDeckES said:

    hello thanks for the help, for some reason is not working

    public function routesmap() {
            
            if (!Auth::LoggedIn()) {
                $this->set('message', 'You must be logged in to access this feature!');
                $this->render('core_error.tpl');
                return;
            }
    
            $this->title = 'My Flight Map';
    
            $pireps = PIREPData::findPIREPS(array(
                'p.pilotid' => Auth::$pilot->pilotid
            ), 10);
    
            if (!$pireps) {
                $this->set('message', 'There are no PIREPs for this pilot!!');
                $this->render('core_error.tpl');
                return;
            }
    
            $this->set('allschedules', $pireps); #deprecated
            $this->set('pirep_list', $pireps);
            $this->render('flown_routes_map.tpl');
        }

    Try this!

  9. 4 hours ago, FlightDeckES said:

    Hello thanks for the information, I have edited the flown_routes_map.php
    but I don't know how to limit the last 10 flight registration.

    https://ibb.co/5RYwHGc

    Modules/pireps

        public function routesmap (){
            
            if (!Auth::LoggedIn()) {
                $this->set('message', '<div class="alert alert-danger alert-dismissable">You must be logged in to access this feature!</div>');
                $this->render('core_error.tpl');
                return;
            }

            $this->title = 'My Flight Map';
            


            $pireps = PIREPData::findPIREPS(array('p.pilotid' => Auth::$pilot->pilotid ));
            
            if (!$pireps) {
            $this->set('message', '<div class="alert alert-danger alert-dismissable"><center>No hay vuelos archivados todavia</center></div>');

                $this->render('core_error.tpl');
                return;
            }

            $this->set('allschedules', $pireps); #deprecated

            $this->set('pirep_pilots', $pireps);

            $this->render('flown_routes_map.php');

        }

    I hope this works for you -

    public function routesmap() {
            
            if (!Auth::LoggedIn()) {
                $this->set('message', 'You must be logged in to access this feature!');
                $this->render('core_error.tpl');
                return;
            }
    
            $this->title = 'My Flight Map';
    
            $pireps = PIREPData::findPIREPS(array(
                'p.pilotid' => Auth::$pilot->pilotid
            ), $count = '10');
    
            if (!$pireps) {
                $this->set('message', 'There are no PIREPs for this pilot!!');
                $this->render('core_error.tpl');
                return;
            }
    
            $this->set('allschedules', $pireps); #deprecated
            $this->set('pirep_list', $pireps);
            $this->render('flown_routes_map.tpl');
        }

     

  10. Alternative way:

    First of all add a column to pireps table name it scheduledflight 


    In your PIREPData.class.php, head to line 795 if using default file, you'll see self::$pirepid = $pirepid;

    Now below it, add this code
     

    $checkschedflight = "SELECT * FROM " . TABLE_PREFIX . "schedules WHERE depicao = {$pirepdata['depicao']} AND arricao = {$pirepdata['arricao']} AND flightnum = {$pirepdata['flightnum']}";
            $res= DB::get_results($checkschedflight);
    
            if(count($res) > 0){
                $issched = "UPDATE " . TABLE_PREFIX . "pireps SET scheduledflight = '1' WHERE pirepid = '$pirepid' ";
                DB::query($issched);
            }

     

  11. 1 hour ago, orobouros said:

    I use a personnal ACARS, created only for my company. But I don't see the relationship between ACARS and finance. In my opinion, it's only a problem of database request and PHP.

     

    Here is what you can do:

    First of all add a column to pireps table name it 'scheduledflight'

    Ask the developer of your ACARS to insert a query which checks that the PIREP Filed by Pilot has the same data as in schedules table that has the same Flight Number, Departure ICAO and Arrival ICAO. If it exists then, it should update the 'scheduledflight' column of that pirep to '1'

    Now you need to edit your Finance query like this:
     

    $scheduledFlights="SELECT COUNT(pirepid) as totalflights FROM phpvms_pireps WHERE scheduledflight = '1' AND  month(submitdate)=".$month->ym." AND (code='xxx')";

    That's it!

×
×
  • Create New...