Jump to content

opsman

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by opsman

  1. Ok - connection to the database looks good but when I click setup database, I get a bunch of errors -

    site: http://ndm.world

     

    Whoops, looks like something went wrong.

    (1/1) ParseError

    syntax error, unexpected ','

    in config.php line 73

    at LoadConfiguration->loadConfigurationFiles(object(application), object(Repository))in LoadConfiguration.php line 39

    at LoadConfiguration->bootstrap(object(application))in Application.php line 206

    at Application->bootstrapWith(array('Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables', 'App\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders'))in application.php line 47

    at application->bootstrapWith(array('Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables', 'App\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders'))in Kernel.php line 162

    at Kernel->bootstrap()in Kernel.php line 146

    at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php line 116

    at Kernel->handle(object(Request))in index.php line 18

  2. I tried this as well but I get the following errors...any ideas?

    Warning: require(/var/sites/n/ndm.world/public_html/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/sites/n/ndm.world/public_html/bootstrap/autoload.php on line 17

    Warning: require(/var/sites/n/ndm.world/public_html/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/sites/n/ndm.world/public_html/bootstrap/autoload.php on line 17

    Fatal error: require(): Failed opening required '/var/sites/n/ndm.world/public_html/bootstrap/../vendor/autoload.php' (include_path='.:/usr/local/php-7.2.11-flock/lib/php') in /var/sites/n/ndm.world/public_html/bootstrap/autoload.php on line 17

  3. Hi @servetas

    I've added your code to the core/common/PIREPData.class.php however when I add the following line to profile_main.php, I can see the name of the field but no values within?

    • Grade: 4
    • Violations: 68
    • Latest XP: 

    Here is what I added in profile_main.php

    <li><strong>Latest XP: </strong><?php echo PIREPData::getSumByField($pilotid, $field); ?></li>

    Any help would be appreciated!

    Thanks

    Nick

  4. Hi @Parkho

    Sorry for my late reply...this is what I've got so far but its not pulling through the flightnum.
    Ideally I would like the dropdown to be populated from the flightnum and notes columns contained in schedules database table

    PIREPS.php

        <dt>* Select Mission:</dt>
        <dd><select name "flightnum">
            <option value="">Select mission</option>
            <?php 
                foreach($bids as $bid){
                $sel = ($_POST['flightnum'] == $bid->flightnum)?'selected':'';    
                echo '<option value="'.$bid->flightnum.'" '.$sel.'>'.$bid->flightnum.'</option>';
                }
            ?> 

        </select>
        </dd>

    Many thanks

    Nick

  5. Hi there

    When my users submit a PIREP, I would like them to select a flight number from one of the schedules I've created without having to remember the flight number.
    I've managed to convert the flight number text box into a dropdown menu but not sure how to pull the schedule flight number and note through so the data appears in the dropdown automatically.

    Any ideas how I would go about doing this? Apologies, I'm still learning!

    Thanks in advance

  6. Hi 

    Apologies as I'm new to PHPVMS but I'm getting the following error message in the admin center and I'm not sure whats causing it...

    Warning: Illegal string offset 'group_add' in /core/common/PilotData.class.php on line 359
    Warning: Illegal string offset 'group_remove' in /core/common/PilotData.class.php on line 365

    Im on phpVMS version 2.1.936 and here is the code below from /core/common/PilotData.class.php

    Any help or support would be greatly appreciated!

     

     

        /**
         * Update a pilot, $params is an array of column_name=>value
         *
         * @param mixed $pilotid This is a description
         * @param mixed $params This is a description
         * @return mixed This is the return value description
         *
         */
        public static function updateProfile($pilotid, $params) {
        
            /*$params = array(
                'pilotid' => '',
                'code' => '',
                'email' => '',
                'location' => '',
                'hub' => '',
                'bgimage' => '',
                'retired' => false,
                );
             */

            if(empty($pilotid)) {
                return false;
            }
            
            if (!is_array($params)) {
                return false;
            }

            /* Cleanup any specific parameters */
            if (isset($params['location'])) {
                $params['location'] = strtoupper($params['location']);
            }
                    
            if (isset($params['pilotid'])) {
                unset($params['pilotid']);
            }

            $sql = "UPDATE " . TABLE_PREFIX . "pilots SET ";
            $sql .= DB::build_update($params);
            $sql .= " WHERE `pilotid`={$pilotid}";

            $res = DB::query($sql);
            
            if (DB::errno() != 0) {
                return false;
            }
            
            # Auto groups?
            $groups = Config::get('PILOT_STATUS_TYPES');
            if(isset($params['retired'])) {
                
                $info = $groups[$params['retired']];
                
                # Automatically add into these groups
                if(is_array($info['group_add']) && count($info['group_add']) > 0) {
                    foreach($info['group_add'] as $group) {
                        PilotGroups::addUsertoGroup($pilotid, $group);
                    }
                }
                
                if(is_array($info['group_remove']) && count($info['group_remove']) > 0) {
                    foreach($info['group_remove'] as $group) {
                        PilotGroups::removeUserFromGroup($pilotid, $group);
                    }
                }
            }
            
            return true;
        }

     

×
×
  • Create New...