Jump to content

servetas

Moderators
  • Posts

    1726
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by servetas

  1. Yes, the error is shown because there is not a closing bracket before the new function ("public static function.........") statement. Did you randomly past it into the file? The previous function should close using a bracket "}" without the "" before you start declaring a new one.

  2. I am pretty sure that the issue has to do with the days of week.

     

    Can you get into your phpmyadmin and run the following query:

    UPDATE phpvms_schedules SET daysofweek='0123456', week1='0123456', week2='0123456', week3='0123456', week4='0123456';

    Don't forget to replace "phpvms_" with your database table prefix if you are using a different one. Let us know if it worked.

    • Thanks 1
  3. Open your core/ScreenshotsData.class.php file and find this:

    public static function get_comments($ss_id)   {
            $query = "SELECT * FROM ".TABLE_PREFIX."screenshots_comments
                        WHERE ss_id='$ss_id'";
    
            return DB::get_results($query);
        }

    add the following after the closing bracket of the above statement:

    public static function getLatestComment($ss_id) {
    	$sql = "SELECT * FROM ".TABLE_PREFIX."screenshots_comments WHERE ss_id='$ss_id' ORDER BY ss_id DESC LIMIT 1";
    	return DB::get_row($sql);
    }

    Then, within your code replace:

    $comment = ScreenshotsData::get_comments($ss_id);

    with this:

    $comment = ScreenshotsData::getLatestComment($ss_id);

    Let us know if it worked for you. 

     

  4. Yeah, you should be able to do that. Open your core/modules/Screenshots/Screenshots.php file and find the following statement:

    ScreenshotsData::send_message($who_to, $who_from, $subject, $message);

    There should be two of these statements in the above mentioned file. One of them is within the "approve_screenshot" function and the second one is within the "reject_screenshot" function. Below the above mentioned statement you can add the following:

    $pilotdata = PilotData::getPilotData($who_to);
    $subject = "Screenshot Approved or Rejected";
    $message = "Congratulations, you screenshot has been approved. etc";
    Util::SendEmail($pilotdata->email, $subject, $message);

    You can update any of the above variables (subject or message) to send the right message for "reject_screenshot" too. You can also comment out the statement that exists to send the airmail to the pilot like this:

    //ScreenshotsData::send_message($who_to, $who_from, $subject, $message);
  5. Unfortunately no, the ranks can be either auto or manual. Alternatively, you will have to edit the core of the phpVMS. If you at least have some basic knowledge of coding you can give it a try. Do not forget to keep backup of every file before you edit it!

     

    You will have to bypass your staff members from the auto ranks calculation function of your phpVMS system. This means that first of all, you will have to enable the rank editing option on the admin side for your staff members and stop the auto rank recalculation.

     

    Step 1

    Open your admin/templates/pilot_details.php and find the following:

    if(Config::Get('RANKS_AUTOCALCULATE') == false) {

    replace it with this:

    if(Config::Get('RANKS_AUTOCALCULATE') == false || $pilotinfo->pilotid == X || $pilotinfo->pilotid == X) {

    Step 2

    After that, open your admin/modules/PilotAdmin/PilotAdmin.php and find the following:

    if (Config::Get('RANKS_AUTOCALCULATE') == false) {

    replace it with this:

    if (Config::Get('RANKS_AUTOCALCULATE') == false || $this->post->pilotid == X || $this->post->pilotid == X) {

    Step 3

    Then, open your core/common/RanksData.class.php file and find the following:

    foreach ($pilots as $pilot) {

    below this line, add the following statement:

    if($pilot->pilotid == X || $pilot->pilotid == X) continue;

    In both of the pasted snippets, you will have to replace X with the pilot id which is just a number (for example: 1 or 5 or 11), do not confuse it with your pilot code and you can add ad many "|| $pilotinfo->pilotid == X" or "|| $this->post->pilotid == X" or "|| $pilot->pilotid == X" as you want based on the statements above. 

     

    Give me an example what would you write if you wanted to bypass four different pilots. In any case, let us know if it worked for you.

  6. There are many emails based on the progress of the pilot's registration. Check your lib/skins/your_skin_name folder or core/templates. All of the email templates are starting with "email_". If the file exists within your skin's folder then this template is used otherwise the system is using the file within the core/templates folder.

    • Thanks 1
  7. Flight Assignments v1

    • Seach between the flights on your schedules based on multiple criteria.
    • Book all the flights found with one click.
    • Select, as an administrator, the pre selected option for the schedule search.

     

    More information about the module can be found here

    You can any time request support for this module via opening a support ticket on our own billing system.

    For more information, do not hesitate to contact us.

    • Like 1
  8. Can you check the code below?

    <?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { ?>
    <!-- Admin Notifications -->
    <li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle text-muted text-muted  " href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-bell"></i>
    <?php
    $pendingpireps = count(PIREPData::findPIREPS(array('p.accepted' => PIREP_PENDING)));
    $pendingpilots = count(PilotData::findPilots(array('p.confirmed' => PILOT_PENDING)));
    										
    $count = ($pendingpireps + $pendingpilots);
                                            
    if(!$count) {
    echo '';
    } else {
    echo '
    <div class="notify"> 
    <span class="heartbit"></span> 
    <span class="point"></span> 
    </div>';
    }
    ?>
    </a>
    
    <div class="dropdown-menu dropdown-menu-right mailbox animated zoomIn">
      
    <center>
    <br />
    <font color="#f39c12"><b>ADMIN NOTIFICATIONS</b></font>
    
    <hr />
    
    <!-- PILOTS -->
    
    <a href="<?php echo SITE_URL?>/admin/index.php/pilotadmin/pendingpilots">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo count(PilotData::GetPendingPilots()); ?></b></span><br />Pending Registrations</font></a>
                                                    
    <hr />
    <!-- PIREPs -->
    <a href="<?php echo SITE_URL?>/admin/index.php/pirepadmin/viewpending">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo count(PIREPData::GetAllReportsByAccept(PIREP_PENDING)); ?></b></span> <br />Pending PIREPs.</font></a>
      
      <hr />
    <!-- Screenshots -->
    <a href="<?php echo SITE_URL?>/index.php/screenshots/approval_list">
    <font color="#fff">You have <span class="label label-warning"><b><?php echo ScreenshotsData::countpending(); ?></b></span> <br />Pending Screenshots.</font></a>
    <hr />
                     
    <a href="<?php echo SITE_URL?>/admin"><font color="#ffff00">Check all notifications</font></a>
    </center>
    <br />
    </div>
                                
    <!-- End Admin Notifications -->
    <?php } ?>

     

×
×
  • Create New...