Jump to content

djtiger76

Members
  • Posts

    44
  • Joined

  • Last visited

Posts posted by djtiger76

  1. Whoops, sorry!

     

    phpvms 5.5.2
    mysql 5.7.30-cll-lve
    php 5.6

    The exact errors are in my post above:

    • Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
    • Warning: mysql_affected_rows(): Access denied for user ''@'localhost' (using password: NO) in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
    • Warning: mysql_affected_rows(): A link to the server could not be established in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63

    The code for /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php is also in my post, with Line 63 noted out. 

  2. Hey ProAvia,

    Here are me and William's errors in admin:

    Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
    Warning: mysql_affected_rows(): Access denied for user ''@'localhost' (using password: NO) in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63
    Warning: mysql_affected_rows(): A link to the server could not be established in /home/tstamer/public_html/crew/admin/modules/LoA/LoA.php on line 63

     

    And here is that file with line 63 noted:

     

    Thanks
     

    class LoA extends CodonModule {
    
        public $title = "Leave of Absence Admin";
        
        public function HTMLHead()
            {
               $this->set('sidebar', 'loa/loa_admin_sidebar.php');
            }
    
        public function NavBar ()
            {
                echo '<li><a href="'.SITE_URL.'/admin/index.php/LoA">LoA Admin</a></li>';
            }
    
        public function index ()
    
        {
            $version = '1.0';
            $leaves = LoAData::GetAllRequests(array());
            $this->set('all_leaves', $leaves);
            $this->render('loa/loa_admin_index.php');
            $this->check($version);
         }
    
    
    
         public function viewLOA()
         {  
            $id = $this->get->id;        
            $getinfo = LoAData::GetInfoByID($id);
            $this->set('info', $getinfo);
            $this->render('loa/loa_admin_view_request.php');
    
         }
    
         public function confirmDeleteLOA()
         {
           $id = $this->get->id;        
            $getinfo = LoAData::GetInfoById($id);
            $this->set('info', $getinfo);
            $this->render('loa/loa_admin_confirm_delete_request.php');
         }
         public function deleteLOA()
         {
            $id = $this->get->id;
            $getinfo = LoAData::DeleteLoA($id);
     Line 63->       if (mysql_affected_rows() == -1)
           
            {
                $this->set('message', 'The LoA Reqest hasn\'t been deleted from the database for some reason. This isn\'t suppose to happen. Check the phpVMS forums for support.');
                $this->render('loa/loa_admin_delete_request.php');
            }
            else
            {
                
                $this->set('message', 'The LoA Reqest has been successfuly deleted from the database.');
                $this->render('loa/loa_admin_delete_request.php');
            }
    
    
         }
         protected function check ($version)
         {
            $version_to_check = $version;
            $url = 'http://www.savamarkovic.com/loa.csv';
            $fp = @fopen ($url, 'r') or $message = "The updater checking service is currently offline"; //If the server is unreachable
            $read = fgetcsv ($fp); 
            fclose ($fp); // Closes the connection
            if ($read[0] > $version_to_check && $read[2] == "1") { $critical = TRUE; } // If its 1, set ciritcal to true
            if ($read[0] > $version_to_check) { $update = TRUE; } // Anything other than 1 set update to true
            if ($read[0] == $version_to_check) {
                echo '<p id="success">Your version of this module is up to date. Wohooooo! ;))</p>';
            }else if ($critical) {
                    echo '<h4>CRITICAL UPDATE FOUND!</h4>';
                    echo '<p id="error">There is a critical update available! Here is the information associated with the update. <br/><b>Version:
                     '.$read[0].' - '. $read[1].' <br /></b>Please send an email to ceo@airserbiavirtual.com to receive the updated version.</p>';
            }else if ($update){
                    echo '<h4>NON CRITICAL UPDATE FOUND!</h4>';
                    echo '<p id="error" style="background:#fffca7;border-color:orange">There is NON critical update available! Here is the information associated with the update. <br/><b>Version:
                     '.$read[0].' - '. $read[1].' <br /></b>Please send an email to ceo@airserbiavirtual.com to receive the updated version.</p>';
          }
    
       
    }
    }

     

  3. Hey guys,

    Fiiiinally, got my crew center going live! 

     

    I have a pilot asking about the prefile feature on the SimBrief website (where pilots could prefile their report with VATSIM, IVAO, etc). That option doesn't appear to be available in the template/module. Is that correct or is  there a way I can add that to the template? 

     

    Thanks

     

    --edit

    My IT department figured it out. Looks like just needed to add some additional code on the actual briefing. 

  4. Anyone using this module?

     

    How do you clear the forum requirement if your forum is not an external forum?

     

    edit- I can do it through SQL, but it should recognize a pilot visited the forum after setting the forum website address in the settings

  5. Wait.. I don't understand whats happening in this thread anymore. Im just now seeing this. 

     

    @shakamonkey88

    My solution was simple but may not work for everyone. In the schedule_briefing.php file, find the line that says:


    onclick="simbriefsubmit

     

    make sure the web address after onclick="simbriefsubmit, has a www. in the URL. And of course make sure you are using the correct protocol (http or https).

    Adding 'www' to my web address allowed my SimBrief dispatch to show up in the skin. 

     

    I hope that helps

    (sidenote) i thought I already shared this information. 

     

    @Shadesb181

    You solution may be different. Please share what you solution was.

  6. 3 hours ago, ProAvia said:

    The first thing I would do is to verify that the directory phpVMS is in is using PHP 5.6 and not some version of PHP7. You shouldn't get that error in PHP 5.6 .

     

    Create a phpinfo.php file to check the PHP info of the phpVMS directory.

    https://mediatemple.net/community/products/dv/204643880/how-can-i-create-a-phpinfo.php-page

     

    @ProAvia

    I have been getting all kinds of PHP 7 errors. My php version is set to 5.6 and running phpvms 5.5.2. I don't know why I am running 7.2.29 per phpinfo or how to change it to what it should be.
    http://www.test.americanva.org/phpinfo.php

    @servetas

    I sent you a ticket for the academy that has an error in the admin panel. Could the be the reason for it?

  7. Another day, another error 😀

     

    Wondering if anyone could assist. I was looking to approve a PIREP in the admin panel and got 2 errors:

     

    -Warning: count(): Parameter must be an array or an object that implements Countable in /home/tstamer/public_html/crew/admin/modules/PIREPAdmin/PIREPAdmin.php on line 120
    -Warning: Invalid argument supplied for foreach() in /home/tstamer/public_html/crew/admin/modules/PIREPAdmin/PIREPAdmin.php on line 122
    0 of 0 were approved (0 has errors)

     

    Ive looked around the internet for solutions to fix and while there are several suggestion on how to fix, i swear its like reading a different language! I can't wrap my head around it.

    phpVMS 5.5.2 - PHP 5.6

    Here is that section on the PIREPAdmin.php from admin/modules/:
     

    public function approveall() {
            $this->checkPermission(MODERATE_PIREPS);
            
            echo '<h3>Approve All</h3>';
    
            $allpireps = PIREPData::findPIREPS(array('p.accepted' => PIREP_PENDING));
            
            $total = count($allpireps);
            $count = 0;
            foreach ($allpireps as $pirep_details) {
                
                if ($pirep_details->aircraft == '') {
                    continue;
                }
    
                # Update pilot stats
                SchedulesData::IncrementFlownCount($pirep_details->code, $pirep_details->flightnum);
                PIREPData::ChangePIREPStatus($pirep_details->pirepid, PIREP_ACCEPTED); // 1 is accepted
                #PilotData::UpdatePilotStats($pirep_details->pilotid);
    
                #RanksData::CalculateUpdatePilotRank($pirep_details->pilotid);
                RanksData::CalculatePilotRanks();
                #PilotData::GenerateSignature($pirep_details->pilotid);
                #StatsData::UpdateTotalHours();
                CodonEvent::Dispatch('pirep_accepted', 'PIREPAdmin', $pirep_details);
    
                $count++;
            }
    
            $skipped = $total - $count;
            echo "$count of $total were approved ({$skipped} has errors)";
        }

     

    Thanks

  8. Hi all.
    I have a section on the front page of my crew center that gives a snapshot of how many hours are left before the pilot reaches the next rank.
    The problem... When the pilot maxes out it starts to give a negative number. 

    mrVI1w.jpg

     

    I would like to add an "if" statement to the following code that says basically, if the hours = < 0, then display "Congratulations<br>You have reached the highest rank."

     

    <div class="small-box bg-blue">
                    <div class="inner">
                        <h3><?php echo ($nextrank->minhours - $pilot_hours)?> Hours</h3>

                        <p>until promotion to<br>
                        <?php echo $nextrank->rank?>!</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-checkmark"></i>
                    </div>
                </div>

  9.  

    1 minute ago, Strider said:

    In the simbrief.apiv1.js change the url of your site in that to https, it should work then. And any other link in the module to https.

     

    Thanks

    I got it working. I forgot to post. Actually it was as simple as adding "www." to the simbrief address on the generate button.

  10. Hey guys. Did a search for Simbrief in this topic and no results. I am running this skin. When i generate my simbrief OFP, it opens in a blank page (no sidebar, header or footer). I reached out to Vangelis (simbrief guru) who said someone will need to design the template for this skin. 

    Surely someone is using this skin and getting the Simbrief dispatch to open inside the skin. 
    M7rcQV.jpg

     

    Had a CEO attempt to help from Brazil but there was a language barrier. If anyone can assist me, it would be greatly appreciated as this is placed a total halt on the rollout of my site. I am not opposed to donating money to the cause (thats how serious this is for me right now). 

    Thanks

    phpvms 5.5.2
    PHP 5.6
     

  11. Hey all,
    Vangelis is a busy person, ive already asked but its like 1am local there. 

    We got the OFP to work, however, it does not show up in the skin. It opens a new page without the skin.

    Anyone know how to make this:

    1OZCL9.jpg

     

    Show up in my skin with the header, footer and side bar?
    M7rcQV.jpg

     

    Thanks

  12. Hey ProAvia,

     

    I saw another website that mentioned the while vs. foreach functions as a culprit, but was not sure how to rewrite that line. I changed that line and changed debug back to false and no errors. I promise I didn't change that before today. Is it possible a mod i installed could have changed that and created the errors?

     

    Thanks much!

  13. Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/tstamer/public_html/crew/core/classes/Config.class.php on line 108

     

    Not sure what happened between this morning and now, but just went to my site (http://test.americanva.org) and on the home page I have a depreciated message. I don't know what needs to be done to correct it or hide the message. Can someone help?

    Here is the code for that area

     

     

        /**
         * Load all the site settings. Make the settings into define()'s
         *    so they're accessible from everywhere
         */
        public static function LoadSettings() {
            while (list($key, $value) = each(self::$values)) {
                if (!is_array($value)) {
                    if (!defined($key)) {
                        define($key, $value);
                    }
                }
            }

            return true;
        }

  14. On 1/16/2020 at 3:59 AM, SmarticleCo said:

    Anyone have a way i can fix this system? i cant seem to get it to work properly i get these errors

    Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

    Warning: mysql_query(): Access denied for user 'deltavi1'@'localhost' (using password: NO) in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

    Warning: mysql_query(): A link to the server could not be established in /home/deltavi1/public_html/core/common/LoAData.class.php on line 60

    Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

    Warning: mysql_affected_rows(): Access denied for user 'deltavi1'@'localhost' (using password: NO) in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

    Warning: mysql_affected_rows(): A link to the server could not be established in /home/deltavi1/public_html/core/common/LoAData.class.php on line 61

    Deprecated: mysql_affected_rows(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

    Warning: mysql_affected_rows(): Access denied for user 'deltavi1'@'localhost' (using password: NO) in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

    Warning: mysql_affected_rows(): A link to the server could not be established in /home/deltavi1/public_html/admin/modules/LoA/LoA.php on line 64

    bump

  15. On 6/21/2016 at 3:06 AM, web541 said:

    Maybe try this:

     

    
    public static function get_pilots_newscreenshot($pilot_id, $count) {
    	 $query = "SELECT id, file_name, file_description, pilot_id, UNIX_TIMESTAMP(date_uploaded) AS date FROM ".TABLE_PREFIX."screenshots WHERE pilot_id='$pilot_id' AND file_approved='1' ORDER BY date_uploaded DESC LIMIT $count;";
    	 return DB::get_results($query);
    }
    
     

     

    I added the

     

    
    ".TABLE_PREFIX."
    
     

     

    In front of the table name which should allow it to pick up the data now

    @web541

    Hey, This whole conversation went right over my head, however I feel my solution is somewhere in here. 

    Using php 5.5.2

    Module is working fine, I am trying to show pictures on my dashboard (outside of the screenshot center): 
    Deprecated: Non-static method Screenshots::show_newest_screenshot() should not be called statically, assuming $this from incompatible context in /home/tstamer/public_html/crew/lib/skins/crewcenter/profile_main.php on line 167

    Here is that section: 

                    <div class="box-header with-border">
                        <h3 class="box-title">Most Recent Screenshot</h3>
                    </div>
                    <div class="box-body">
                        <?php Screenshots::show_newest_screenshot(); ?>
                    </div>
                </div>

×
×
  • Create New...