Jump to content

ProAvia

Administrators
  • Posts

    1754
  • Joined

  • Last visited

  • Days Won

    79

Posts posted by ProAvia

  1. If you have a customized kACARSI or kACARSII, your site URL is hard coded into the program. I believe this was done to prevent use at other VA's or URL's without actually purchasing the base program.

    Do you still have access to the old URL? If so, just redirect the old domain to the new one.... and then use the old domain URL for your custom kACARS access.

  2. Well... let's try this then....

    Near the end of frontpage_map.php...... change

    echo '</tr>';
        }
      }
      else
      {
          echo '<tr><td>There are no recent flights!</td></tr>';
      }
    }
    ?>

    To this

    echo '</tr>';
        }
      }
    }
      else
      {
          echo '<tr><td>There are no recent flights!</td></tr>';
      }
    ?>

    Basically, you are moving the last ' } ' to just before 'else'.

    Let us know how that works.

     

  3. You need to re-read my reply above ..... there are 2 files to edit...

    frontpage_main.php and frontpage_map.php - two different files.... MAIN and MAP

    frontpage_main.php gets the first edit

    frontpage_map.php  - you need to edit the contents as directed - along the same lines as the first file.... I used fake names for the calls cause I didn't have the file available this morning.

    Replace lines 16-56

    <?php
    if(count($pireps) > 0)
    {
      foreach ($pireps as $pirep)
      {
        $pilotinfo = PilotData::getPilotData($pirep->pilotid);
        $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
        $acrid = OperationsData::getAircraftByReg($pirep->registration);
    
        echo '<tr>';
        echo '<td><a href="'.SITE_URL.'/index.php/profile/view/'.$pilotinfo->pilotid.'">'.$pilotinfo->firstname.' '.$pilotinfo->lastname[0].'.</a></td>';
        echo '<td><a href="'.SITE_URL.'/index.php/pireps/viewreport/'.$pirep->pirepid.'">'.$pirep->code.$pirep->flightnum.'</a></td>';
        echo '<td>'.$pirep->depicao.'</td>';
        echo '<td>'.$pirep->arricao.'</td>';
        echo '<td>'.$pirep->aircraft.'</td>';
        echo '<td>'.$pirep->flighttime.'</td>';
        echo '<td>'.$pirep->landingrate.' ft/m</td>';
    
    if($pirep->accepted == PIREP_ACCEPTED)
    
    echo '<td><button type="button" class="btn btn-outline btn-success btn-xs mb-2">Flight Approved</button></td>';
    
                                    elseif($pirep->accepted == PIREP_REJECTED)
    
    echo '<td><button type="button" class="btn btn-outline btn-danger btn-xs mb-2">Flight Rejected</button></td>';
    
                                    elseif($pirep->accepted == PIREP_PENDING)
    
    echo '<td><button type="button" class="btn btn-outline btn-primary btn-xs mb-2">Approval Pending</button></td>';
    
                                    elseif($pirep->accepted == PIREP_INPROGRESS)
    
    echo '<td><button type="button" class="btn btn-outline btn-primary btn-xs mb-2">On Progress</button></td>';
        echo '</tr>';
      }
    }
    else
    {
        echo '<tr><td>There are no recent flights!</td></tr>';
    }
    ?>

    With this

    <?php
    if(is_array($pireps) || ($pireps) instanceof Countable
    {
      if(count($pireps) > 0)
      {
        foreach ($pireps as $pirep)
        {
          $pilotinfo = PilotData::getPilotData($pirep->pilotid);
          $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
          $acrid = OperationsData::getAircraftByReg($pirep->registration);
    
          echo '<tr>';
          echo '<td><a href="'.SITE_URL.'/index.php/profile/view/'.$pilotinfo->pilotid.'">'.$pilotinfo->firstname.' '.$pilotinfo->lastname[0].'.</a></td>';
          echo '<td><a href="'.SITE_URL.'/index.php/pireps/viewreport/'.$pirep->pirepid.'">'.$pirep->code.$pirep->flightnum.'</a></td>';
          echo '<td>'.$pirep->depicao.'</td>';
          echo '<td>'.$pirep->arricao.'</td>';
          echo '<td>'.$pirep->aircraft.'</td>';
          echo '<td>'.$pirep->flighttime.'</td>';
          echo '<td>'.$pirep->landingrate.' ft/m</td>';
    
      	if($pirep->accepted == PIREP_ACCEPTED)
    
          echo '<td><button type="button" class="btn btn-outline btn-success btn-xs mb-2">Flight Approved</button></td>';
    
        elseif($pirep->accepted == PIREP_REJECTED)
    
          echo '<td><button type="button" class="btn btn-outline btn-danger btn-xs mb-2">Flight Rejected</button></td>';
    
        elseif($pirep->accepted == PIREP_PENDING)
    
          echo '<td><button type="button" class="btn btn-outline btn-primary btn-xs mb-2">Approval Pending</button></td>';
    
        elseif($pirep->accepted == PIREP_INPROGRESS)
    
          echo '<td><button type="button" class="btn btn-outline btn-primary btn-xs mb-2">On Progress</button></td>';
        echo '</tr>';
        }
      }
      else
      {
          echo '<tr><td>There are no recent flights!</td></tr>';
      }
    }
    ?>

    So I think you may need to revert to the original files first and then edit the TWO files again. Hopefully your renamed the originals before saving the edit - if not, you can get the originals from the skin download. Sorry for any confusion on the second edit.

    The edit to the frontpage_map.php file should work - but I have no way to try it. I had to do the edit to frontpage_main.php on another site that was using php 7.2 and an older version of the Ocean Blue skin.

    Let us know how it works out.

  4. Your warning error is NOT caused by the skin you are using.... it is because of changes between PHP 5.6 and PHP 7.2

    For front_page main.php line 157 - replace the "<?php ... ?>" section with

    <?php if(is_array(ACARSData::GetACARSData()) || (ACARSData::GetACARSData()) instanceof Countable) {
    	echo count(ACARSData::GetACARSData());
    }?>

    I don't have frontpage_map.php line 17 in front of me right now, but the fix is very similar to the above

    <?php if(is_array(...call after 'count') || (...call after 'count') instanceof Countable) {
         .... probably an echo line;
    }?>

    If you need the fix for frontpage_map.php to be more specific, you will need to post the code for that line here first.

    Chances are you may encounter these 'count' warning errrors again in different modules. For the most part, the fix is the same.

    The above changes only apply to PHP 7 and above.

  5. 4 hours ago, djtiger76 said:

    Hi. 
    I installed phpVMS-ScheduleSearch (https://github.com/DavidJClark/phpVMS-ScheduleSearch) manually. The readme says: Point your browser to mysite/index.php/FrontSchedules and start searching. So that works (test.americanva.org/index.php/FrontSchedules), but doesnt show on the user side. Im sure I need to add the link to a php page, but not sure which one or where. Sigh, this is beginning to be a huge undertaking. 

    Yes, you need to add it to an existing page or provide a link in the menu to possibly replace the default search. This link may provide an updated "Front Schedules" file: https://github.com/web541/phpVMS-ScheduleSearch

    Yeah - it is just beginning for you to be a huge undertaking.... many of us have been at it for years and are still tweaking here and there.... it can get to be addicting.

    Happy tweaking!!!

  6. They need to be installed following the phpVMS folder structure. Many (not all) should then show under Add Ons in the admin panel - where you can possibly change some settings. Some of them have instructions on how to "call" them on the user side of your site. Some also come with a SQL file that needs to be installed into the database... AIRMail comes to mind.

    If you list one or two that you want to use, maybe we can further assist you.

  7. Well, that would explain it.... I usually install 2 copies also - a live site and a development one. This way I have a working site and one I can play around with. I am not familiar with Kingsoft Office, but I do always have issues with Excel 2003 and saving in csv format - so I use OpenOffice instead for saving in csv format. Others using newer Excel versions don't seem to have any issues.

    Can you outline exactly where this "show all" or "check all" is? Do you mean in the database? And why can't you get back in "there"? You may possibly need to set your max_execution_time to a higher number in your php.ini

  8. I moved this to a new topic as it's a bit different from the one you originally posted in.

    I am guessing you imported thru the admin panel. Did you look directly in the database using phpMyAdmin? Chances are the import was not successful and you won't see the imported aircraft and schedules in the database. 

    Do you already have an airline and airports in the database and do those show in the admin panel? Were these entered manually or imported?

    As soon as the import is successfully completed the data is available. There is no time delay.

    Are the files in CSV format? Are all the column headers correct? While Kingsoft Office may have saved the files, maybe the exact format needed isn't correct.

  9. What is IONOS - your web host?

    Here is lines 101-106 in ezdb_mysqli.class.php:

    $this->dbh =  new mysqli($dbhost, $dbuser, $dbpassword);
    
    		if(mysqli_connect_errno() != 0)
    		{
    			if($this->throw_exceptions)
    				throw new ezDB_Error(mysqli_connect_error(), mysqli_connect_errno());

    Did you enter the host, user and password correctly? Did you start with a fresh DB and fresh phpVMS upload?

  10. Can you set the PHP version to 7.2 or 7.1? If so, use phpVMS 5.5.2.72 - which will work with smartCARS.

    Most all addons will work with 5.5.2.72 also. There may be some errors shown pertaining to the count parameter, but they are easily fixed.

    Or if you can set PHP to version 5.6, use phpVMS 5.5.2 (Simpilot) version.

     

  11. iCrew skin and crystal skin will possibly display schedule search very differently.

    phpVMS 5.5.2.72 has not been test with PHP versions above 7.2 (only with 7.0, 7.1, 7.2). I tried it briefly with 7.3, but it showed additional errors and I didn't persue that further as I was using PHP 7.2. I have no idea what issues/errors may occur with PHP 7.4.

    Again, my understanding is that it will still load all schedules when selecting schedule search whether or not the particular skin page displays them all or not. Loading and displaying are to different things.

×
×
  • Create New...