Jump to content

natcret

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by natcret

  1. I have recently started php logging in order to troubleshoot another issue I am having.  In the php log, it shows the following over and over:

    Quote

    [13-May-2017 10:54:15 America/Los_Angeles] PHP Warning:  strpos(): Empty needle in /xxxx/xxxx/phpvms/core/common/SchedulesData.class.php on line 157

    Here is the code for that section:

    Quote

        /**
         * Extract the code and flight number portions from the flight number
         * Ensures that the code and number are properly split
         */
        public static function getProperFlightNum($flightnum) {
            if ($flightnum == '') return false;

            $ret = array();
            $flightnum = strtoupper($flightnum);
            $airlines = OperationsData::getAllAirlines(false);

            foreach ($airlines as $a) {
                $a->code = strtoupper($a->code);

                if (strpos($flightnum, $a->code) === false) {
                    continue;

                }

                $ret['code'] = $a->code;
                $ret['flightnum'] = str_ireplace($a->code, '', $flightnum);

                return $ret;
            }
     

     

    Any ideas?

    Regards,

    Nat

  2. On 12/16/2016 at 1:05 PM, Kyle said:

    NEW VERSION!

    I have updated this module to provide a cleaner URL. The file changes are listed here - GitHub Commit

    - The URL to the module will be required to be updated.

    
    <a href="<?php echo url('/vStatsCenter/index/'.date(n).'/'.date(Y)) ?>">vStatsCenter</a>

    - Simply, download the new files, replace them, and update the URL!

    Download Version 1.1

    Keep getting the following error:

    Deprecated: Non-static method VAStatsData::monthly_flight_stats() should not be called statically, assuming $this from incompatible context in phpvms\core\modules\vStatsCenter\vStatsCenter.php on line 36

     

     

  3. On 3/22/2017 at 4:15 PM, web541 said:

    Try using this

    
    <?php
    $dep_schedules = SchedulesData::findSchedules(array('depicao' => $hubs->icao));
    foreach($dep_schedules as $sched) {
    	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
    	echo '<br />';
    }
    
    $arr_schedules = SchedulesData::findSchedules(array('arricao' => $hubs->icao));
    foreach($arr_schedules as $sched) {
    	echo $sched->code.$sched->flightnum.' | '.$sched->depicao.' - '.$sched->arricao;
    	echo '<br />';
    }
    ?>

    You can then format it how you would like in your template.

    Will apologize upfront, however this is rather confusing.  Is this code specifically for use with the Hub Module or is this referencing somewhere else?  

     

    Regards,

    Nat

  4. Hi folks,

    If anyone could lend help with this, I would appreciate it. Per this post, I was able to modify the download_list.php file get the image added. What I am trying to figure out now is how to make a link out of the IMG tag so that if a person clicks on the reduced size picture (reduced due to the width attribute), they would be able to see the original full size picture (in a separate window of course).

    <li style="overflow:hidden;">
    <a href="<?php echo url('/downloads/dl/'.$download->id);?>">
    <?php echo $download->name?></a><br />
    <img src="<?php echo $download->image?>" style="width:150px; vertical-align:middle;" /><br />
     <?php echo $download->description?><br />
    	 <em>Downloaded <?php echo $download->hits? times</em></li><br />
    

    Regards,

    Nat

  5. I realize this is a very old thread. I am wondering does anyone have any recent examples of integrations they have done with phpVMS and phpBB? Is the information that Nabeel provided in this thread still valid today? Is thre any type of security issue as it relates to the "connect statement" as mentioned in a couple of responses?

    Regards,

    Nat

  6. Is this corrected when you roll back to what it was? If yes then the new code causes the issue if not look at you DB table and see what data you have there.

    When I roll back to the original code prior to Servetas' fix, all is ok. So to make sure I understand, do you want me to put his code back in along with your update, or just your update with original code?

  7. Thank you so very much! The schedules limit code change worked as advertised. Unfortunately, I am still having problems with the pirep item. Under the Profile.php, I find this statement:

    $this->set('allfields', PilotData::getFieldData($pilotid, false));
    	 $pirep_list = PIREPData::getAllReportsForPilot($pilotid);
    	 $this->set('pireps', $pirep_list);
    	 $this->set('pirep_list', $pirep_list);
    

    So when I replaced:

    $pirep_list = PIREPData::getAllReportsForPilot($pilotid);
    

    With what you had above:

    $this->set('pireps', PIREPData::getLastReports($pilotid, 10));
    

    I get "no reports to be found". I know that can't be correct because this particular pilot flies at least 3-5 small flights a day. I then changed the code back to the original line.

    Below is the original code for that section and I am using the phpvms 5.5.2:

    public function view($pilotid='')
    {
    	 #replacement for OFC charts - Google Charts API - simpilot
    	 $this->set('chart_url', ChartsData::build_pireptable($pilotid, 30));
    	 #end
    	 $pilotid = PilotData::parsePilotID($pilotid);
    	 $pilot = PilotData::getPilotData($pilotid);
    	 $this->title = 'Profile of '.$pilot->firstname.' '.$pilot->lastname;
    	 $this->set('userinfo', $pilot);
    	 $this->set('pilot', $pilot);
    	 $this->set('allfields', PilotData::getFieldData($pilotid, false));
    	 $pirep_list = PIREPData::getAllReportsForPilot($pilotid);
    	 $this->set('pireps', $pirep_list);
    	 $this->set('pirep_list', $pirep_list);
    $this->set('pireps', PIREPData::GetLastReports(Auth::$userinfo->pilotid, '10'));
    	 $this->set('pilotcode', PilotData::getPilotCode($pilot->code, $pilot->pilotid));
    	 $this->set('allawards', AwardsData::getPilotAwards($pilot->pilotid));
    	 $this->render('pilot_public_profile.php');
    	 $this->render('pireps_viewall.php');
    }
    

    Thoughts?

  8. I apologize, I think I may have misunderstood and caused even more confusion. I went back and checked.

    I have both Advanced Fleet and vFleetTracker installed but my initial question is related to the Advanced Fleet module and how do you limit the amount of scheduled aircraft shown: http://flymirageva.org/phpvms/index.php/fleet/view/9

    My other question is related to the default public pilot profile and how to shorten the number of pireps listed on a page. Example link below: http://flymirageva.org/phpvms/index.php/profile/view/5

    Again, I am sorry for the confusion.

×
×
  • Create New...