Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by simpilot

  1. Can I do that?! Or does the module have to be modified?!

    This will have to be set in the template, the module just gives an array of the data from the database.

    Maybe something like this could be used as a base;

    $columns = 1;
    foreach($lines as $line)    {
       //check to see if we are on the first column of the row
       if($columns == 1){echo '<tr>';}
       echo '<td>'.mydata.'</td>';
       //check and see if we are on the second column
       //if we are - end the row and reset the column count
       //if not - add to the column count
       if($columns == 2){echo '</tr>'; $columns = 1;}
       else
       {$columns++;}
    }
    //check if we have an open row
    if($columns == 2){echo '</tr>';}
    

  2. I do not know what code you are running prior to the snippet but I think you would be better served by using explode and then in_array, maybe something like this;

    <?php
    
    $daysofweek = explode($route->daysofweek);
    
    // We are gonna loop each day of the week
    for($dayofweek = 0; $dayofweek < 7; $dayofweek++)
    {
     // echo our column opening
     echo '<td>';
      // Check if $i (the current day of week) exists
      if(in_array($dayofweek, $daysofweek)
      {
      // there is a flight for this day , so echo that plane icon out
         echo 'imagehere';
       }
       // Close that column
       echo '</td>';
    }
    ?>
    

    • Like 1
  3. The code you are using builds a table using the javascript from the acars map which you have cut off. If you do not want the map, just a table, your best bet is probably to load the acars data into a variable like you are doing and then just loop through the data on the template page to create your table rows. Do not use any of the javascript functions, there is no need for them.

  4. You could use the setlocale function and set the LC_NUMERIC category somewhere at the start of the script. -> http://php.net/manual/en/function.setlocale.php

    No guarantees on this as there is a lot of places in phpVMS thst use various types of numeric values including flight numbers and pilot id's. You will probably end up with things like => Flight # ABC1,234 - most likely you will need to just use number_format where you want your specific format.

  5. Access denied for user 'xxxxxx'@'localhost' (using password: NO)
    

    Generally that is simply the wrong credentials for the database but if the site is running on the same thing it doesnt make sense. Are you possibly running two databases, one as a test and one live or something?

    A link to the server could not be established
    

    This one leads me more to believe that the sql server was down or refusing connections when the script went to use it. Again, are there possibly multiple databases in operation?

    When you changed the system did you move and overwrite all files?

  6. function.move-uploaded-file"]function.move-uploaded-file[/url]]: failed to open stream: Permission denied in [b]/home/woodsdom/public_html/CPC/admin/modules/Import/Import.php[/b]
    

    Unable to move '/tmp/phpWOE4OY' to '/home/woodsdom/public_html/CPC/core/cacheschedules_ttz_wip.csv'
    

    These two things make me believe that the folder it is trying to save to has permissions set to not allow a file to be saved.

  7. I think Inactive is the same as retired in this case. Although the column in the database is titled retired there is no actual retired status by default in the config file. Retired, when true is marked with a "1" and that corresponds with the inactive status. Not sure why they are showing up as on leave. What version of phpvms are you using? Are the accounts actually being marked with a 3 in the retired column?

    I am not sure how smartcars works as far as login - all the others you simply have to submit a pirep through the acars and your account is reactivated and then you can login again.

  8. You will not be able to please everyone I'm afraid. I thought the system you created was more fair than what the first version of VACentral had. Obviously it's your call but I'd add it back. :-)

    I agree on both not being able to please everyone and that it was more fair than the original. It is funny, the hate mails that I got about it I returned asking what their solution would be and never heard anything but from one.

    • Like 1
×
×
  • Create New...