Jump to content

Curshad

Members
  • Posts

    175
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Curshad

  1. a few days later ive realized i didn't quite crack it. If anyone has got a clue please let me know.

    In acarsmap.php

     the flight phase detail shown for each flight coding is <%=flight.phasedetail%>
     I tried using code 

    <td>
     <?php
        if ('<%=flight.phasedetail%>' == Preflight) {
           echo '<span class="label label-success">Boarding</span>';
        } elseif ('<%=flight.phasedetail%>' == Cruising) {
          echo '<span class="label label-warning">Cruising</span>';
        }
      ?>
    </td>


    But that doesnt seem to show anything, so i thought i fixed it with this:

    <td><?php if ($flight->phasedetail == 'Preflight') 
        {echo '<span class="label label-success"><img src="https://myvadomain.com/towers2.png" width="15" height="15"></img>Boarding</span>';}
        elseif ($flight->phasedetail == 'Boarding') ?></td>


    This does work but i have to add

    <table>
    <?php
    $results = ACARSData::GetACARSData($flight->phasedetail);
    if (count($results) > 0)
      {
      foreach($results as $flight)
         { 
           if($flight->client == 'FSACARS')
           {$plane = OperationsData::getAircraftInfo($flight->aircraft);}
           else
           {$plane = OperationsData::getAircraftByReg($flight->aircraft);}
            ?>
            
        <?php
             }
               } else { ?>
                   <tr><td border="0" width="20%" align="center" colspan="6" style="padding: 5px; font-size: 13px; text-align:center; font-weight: bold; color: #A02626;">No Flights in Progress...</td></tr>
               <?php
               }
               ?>
    </table>


    for it to show the phase detail(lets call that code my fix).

    The problem with that is it is using one flight phase detail and showing it up on others, for example 2 or more pilots would be flying each with a different flight phase but "my fix" would show one flight phase for those 2 or more pilots who would be cruising, landing, etc.

    I have no idea how to get the if statement to follow this <%=flight.phasedetail%> and not anymore this $flight->phasedetail .

    I finally tried this
     

    <td><?php 
    $flights = ACARSData::GetACARSData();
                       if ($flights)
                       foreach ($flights as $flight)
    if ($flight->phasedetail == 'Preflight') 
        {echo '<span class="label label-success"><img src="https://domainname.com/image.png" width="15" height="15"></img>Boarding</span>';}</td>

    And thats the hottest trail i've come to getting the results im looking for. im going to give up and discontinue this cause I have no clue wat the heck im doing or need to do. I feel like some people know, but the want/need to share knowledge & help just isn't with today's earthling society. If anyone else can point me in the right way i'd be greatful. if not good luck continuing where i've stopped. I have "my fix" along with the above code in the same acarsmap.php file to get the phasedetail to display, so you might want to keep those there.

  2. UPDATE:

    I Believe I've figured it out. For anyone looking for guidance like me this is what i've come up with

    <?php
    if ($flight->phasedetail == "Preflight") {
    echo '<span class="label label-success">Boarding</span>';
    } elseif ($flight->phasedetail == "Pushing Back") {
    echo '<span class="label label-warning">Pushing Back</span>';
    } elseif($flight->phasedetail == "Taxiing to Runway"){
        echo '<span class="label label-warning">Taxiing to Runway</span>';
    } elseif($flight->phasedetail == "Taking Off"){
        echo '<span class="label label-warning">Taking Off</span>';
    } elseif($flight->phasedetail == "Climbing"){
        echo '<span class="label label-warning">Climbing</span>';
    }elseif ($flight->phasedetail == "Cruising") {
    echo '<span class="label label-warning">Cruising</span>';
    } elseif ($flight->phasedetail == "Descending") {
    echo '<span class="label label-warning">Descending</span>';
    } elseif ($flight->phasedetail == "Approaching") {
        echo '<span class="label label-danger">On Approach</span>';
    }  elseif ($flight->phasedetail == "Final Approach") {
        echo '<span class="label label-warning">On Final</span>';
    } elseif($flight->phasedetail == "Landing"){
        echo '<span class="label label-warning">Landing</span>';
    } elseif ($flight->phasedetail == "Taxiing to Gate") {
        echo '<span class="label label-danger">Cleared into Gate</span>';
    } elseif ($flight->phasedetail == "Arrived") {
        echo '<span class="label label-danger">Parked at Gate</span>';
    }
    ?>
    </td>

     

    • Thanks 1
  3. On 1/25/2013 at 4:51 PM, simpilot said:

    The flight phases in all the acars programs are created within the client except for a little difference in FSAcars. In fsacars.php you will find the following code that you can adjust to your needs. FSAcars provides just a phase number that corosponds to the formats below.

     

    
    $phase_short = array('null', 'Boarding', 'Departing', 'Cruise', 'Arrived');
    $phase_detail = array('FSACARS Closed', 'Boarding', 'Taxiing', 'Takeoff', 'Climbing',
     'Cruise', 'Landing Shortly', 'Landed', 'Taxiing to gate', 'Arrived');
    
     

     

    For the other ACARS clients you are going to either have the client changed or change what is shown on your site using some if statements.

    Example

     

    
    <?php
    if($phase == 'taxi to gate'){$phase = 'Flight Complete';}
    echo $phase;
    ?>
    
     

     

    Would you mind piecing together for me a working code? I'm trying to display this on my front page map to no success, don't know what the else if isnt working or how to even get it to recognise these. I did see this you posted but that doesn't seem to work when i take out the images and used words. I'd be most greatful !

    Above instructions along with this is my reference but i'm stuck lol

  4. Update:

    I'm going to try adding an else if like so:

                        if ($settings->sendmail_to_pilot == '1' && $pirepdetailsafter->accepted =='2')  
                        {  
    
                            $sub = "Your PIREP {$pirepdetails->pirepid}({$pirepdetails->depicao} - {$pirepdetails->arricao}) has been rejected ";
                            $message="Your flight from {$pirepdetails->depicao} to {$pirepdetails->arricao} has been rejected PIREP {$pirepdetails->pirepid}\n\n" 
                            ."If you wish to see the reason please visit the company Website \n";
    
                            $email = $userinfo->email;
    
    
                            Util::SendEmail($email, $sub, $message);  
    
    
    
                        }
    
                        //If sendmail_too_pilot=1 send email to pilot that the pirep has been accepted 
    
                        elseif ($settings->sendmail_to_pilot == '1' && $pirepdetailsafter->accepted =='1')  
                        {  
    
                            $sub = "Your PIREP has been approved!";
                            $message="Hey Nice! Your flight from <b> {$pirepdetails->depicao} </b> to <b> {$pirepdetails->arricao} </b> has been approved PIREP {$pirepdetails->pirepid}\n\n";
    
                            $email = $userinfo->email;
    
    
                            Util::SendEmail($email, $sub, $message);  

    It should work. But knowing how coding works, it may not I'm going to test it

  5. Hello everyone! If you are having an issue with Fltbook bids not showing up on your "my bids" page with the StislaSkin when bidding on a flight through smartCARS. I've finally figured it out to fix the issue!!! Enough talk!

    Go to:

    /lib/skins/StislaSkin/schedule_bids.php

    go to line 31 and change: 

    $bids = FltbookData::getBidsForPilot(Auth::$userinfo->pilotid);

    to

    $bids = SchedulesData::getBids(Auth::$userinfo->pilotid);

     There! PROBLEM SOLVED! After nagging and looking in the forums for months! And getting no response or help from anybody about it I was fiddling with the codes and found out that FltbookData was the reason that was happening, and I was looking for a default Bid code that would still display my bids. I don't know if what i said made sense but I'm not a coder and i didn't go to college or uni to study computer science i just learned the language from the help of this forum community. Hopefully somebody that was having this issue will now have it solved just like i did.

    P.S. If that code isnt on line 31 for you just ctrl+F and search for FltbookData, and you know the rest... 

     

    Be Blessed all!!

  6. Hi Guys,

    So I did a lot of research and found this. To which it didn't really help but it sorta did. I use the auto accept PIREP Module, and I learned/noticed whenever a PIREP is rejected an email is sent out, this is the code I found in the PIREPACData Class file 

                        //If sendmail_to_pilot=1 send email to pilot that the pirep has been rejected 
    
                        if ($settings->sendmail_to_pilot == '1' && $pirepdetailsafter->accepted =='2')  
                        {  
    
                            $sub = "Your PIREP {$pirepdetails->pirepid}({$pirepdetails->depicao} - {$pirepdetails->arricao}) has been rejected ";
                            $message="Your PIREP {$pirepdetails->pirepid}({$pirepdetails->depicao} - {$pirepdetails->arricao}) has been rejected\n\n" 
                            ."If you wish to see the reason please visit the company Website \n";
    
                            $email = $userinfo->email;
    
    
                            Util::SendEmail($email, $sub, $message);  
    
    
    
                        }

    this starts at around line 301, So what I did to try and create my own accepted pirep email was take this same code and tweak it abit according to the notes that are commented out in the code, and it looks like this:
     

                        //If sendmail_to_pilot=1 send email to pilot that the pirep has been accepted 
    
                        if ($settings->sendmail_to_pilot == '1' && $pirepdetailsafter->accepted =='1')  
                        {  
    
                            $sub = "Your PIREP has been approved!";
                            $message="Nice! Your PIREP {$pirepdetails->pirepid}({$pirepdetails->depicao} - {$pirepdetails->arricao}) has been approved\n\n";
    
                            $email = $userinfo->email;
    
    
                            Util::SendEmail($email, $sub, $message);  
    
    
    
                        }
    
                    }
    
                } 
                else 
                {
    
                }
            }
    
    
        }    

    at the end of that last bracket the data class file has ended. Could someone point out to me why this very code works, but is sending out 4 of the same email? I noticed in this forum the Original Poster, ran into the same issue while getting help with the code seen here at the very top he explains why it sends 4 of the same "your PIREP has been accepted" email which is great, but clearly his coding is a bit different from mine so follow his instructions or i should say taking his codes to fix my issue wont work, right? I'm going to try inserting this:

                            echo Util::SendEmail($email, $sub, $message);  
                            echo 'Accepted';
                        }
                            elseif($pirep->accepted == PIREP_REJECTED)
                        {
                            echo 'Rejected';
                        }
                            elseif($pirep->accepted == PIREP_PENDING)
                        {
                            echo 'Approval Pending';
                        }


    and see if it works, But I'm not so sure it will, would anyone care to help me out here seems i am at a brick wall.

  7. On 7/13/2020 at 11:01 PM, flyalaska said:

    Mine hasnt worked in so many years, I forgot it was even supposed to be there.

    Haha i logged on just now and said" Oh yeah this suppose to work. Hopefully someone found a fix?" and here i am xD

     

    Thank you @alans Not all Heroes wear capes! and people like you definitely save the day ! ❤️ much love

     

    • Like 1
  8. On 9/30/2019 at 10:33 PM, omglookeyhere said:

    LAST UPDATE (I promise): I have finally fixed it and SOLVED it. Come to find out I forgot I removed the code from ACARS.php. Hahahah so now I am at peace. @shakamonkey88 thank you for your willingness to assist. Appreciate it. 

    Akz6Y4A.jpg

     

    What code did you remove from ACARS.php? And I hate to sound like a big dummy, but i have to. I get what you mean when you say 

    Quote

    UPDATE: I have figured out the map display issue. Solution: Uncommented Google map script and commented out (what I presume is) OpenLeaf map. 

    Still have an issue of a flight path not showing.  I'll keep digging in the code. 

    But what's commenting and uncommenting? is that these brackets?

    {}

    or these?

    ()

    or you mean the slashes?(a google search let me know it was the slashes (lol i dont know the language of coding, but i know what each of those things do)

    // 

     

  9. 5 hours ago, ProAvia said:

     

    That would be because this thread and the links posted are over 10 years old. There was an issue with the forum DB some years back and some things got corrupted.

     

    Best not to necropost anyway. If you are having the same issue as in an old, dead post - start a new topic. Besides, much has changed in 10+ years - and what applied then may not work in today's environment.

    gotcha thank you. I believe i solved my issue (but have not tested). If it isn't solved eh its ok. Thanks again proavia

  10. 16 hours ago, Strider said:

    Sounds like you have not set it up correctly. If a module is setup correctly, it works, if it is not working then there is something amiss. Is the an admin sidie with settings? Do you have to edit the local.config file to add some lines to it? You have to make sure they are all in if so and you haven't missed anything. Have you added the criteria?


    Mmmm idk, instructions are straight forward, I get the same no error. Files and codes are where they need to be. But Auto Accepting does not work. Looking around at page 1 - 3 Maybe it could be the PIREPData.class.php? This is updated for MySQLi right?(really dumb to ask cause i think it is) I even kept the default criteria. No luck 😕.

    What I am going to try (while wait for a response for someone to help cause please i have no idea what to even check 😕 ) is in those first dew pages try those downloadable fixes the OG post commented stating that it fixes those users specific issues. maybe this'll work for me, again; unless someone has a sure fix

  11. On 2/6/2010 at 8:19 PM, Nabeel said:

     

    Yo the link is Dead. 

    Quote

    You must enter a new DATABASE_ID. The formatted pilow ID is based on the database ID and the offset. Your current offset is 0.

    For example, you want the pilot ID to be VMS200 - for the new ID you would enter: 200. If your offset is 1000 (meaning all pilot IDs start from 1000), to have a pilot ID of 1030 you would change the DB ID to 30 (that's what you would enter below).

    ID Calculator: Enter the intended pilot ID: 

    doesn't change anything. Atleast idk what the DB name is for the ID

  12. On 7/20/2020 at 1:08 PM, Strider said:

    Make sure your browser allows popups, if the browser blocks them, nothing will happen. I have it and it works fine, so that is not the cause.

    My browser Allows popups, and it doesn't work what do you recommend me to check to fix the issue?

     

    -EDIT-

     If this is you, i fixed by going to yourwebsite/lib/js/simbrief.apiv1.js line 23 was this

    var api_dir = '';

    for me. Just change to:

    var api_dir = 'http://yourwebsite.com/core/modules/SimBrief/';

     

     

    - If i didn't need to say that i'm a dunce (honestly) i just need to read...

  13. On 1/27/2020 at 6:33 PM, BaderNET said:

    Thanks, FlyAlaska.

    Can please tell me how to change the all blue buttons ?? I upload the images 

    do.php?img=16

    do.php?img=17 
     


    do.php?img=18

     

    And i see folder name slider ?? this skin have header slider ?? if have how it's work ??

    And my last thing any update news about the blueIce skin for new Version ?? 

     

    Best Regards,

     

    EDIT: Moderator moved to Skinning forum as this relates to changing something in this skin, not a new skin release.

    How did you change your color scheme to red? I've been looking around in the Style Sheet for hours

×
×
  • Create New...