} } OperationsData::updateAircraftRankLevels(); /* Add them to the default group */ $status_type_list = Config::get('PILOT_STATUS_TYPES'); $pilot_list = PilotData::getAllPilots(); foreach ($pilot_list as $pilot) { echo "Fixing settings for " . $pilot->firstname . " " . $pilot->lastname . "<br>"; PilotData::resetLedgerforPilot($pilot->pilotid); PilotGroups::addUsertoGroup($pilot->pilotid, DEFAULT_GROUP); # Reset the default groups $status = $status_type_list[$pilot->retired]; foreach ($status['group_add'] as $group) { PilotGroups::addUsertoGroup($pilot->pilotid, $group); } foreach ($status['group_remove'] as $group) { PilotGroups::removeUserFromGroup($pilot->pilotid, $group); } } SettingsData::saveSetting('PHPVMS_VERSION', $FULL_VERSION_STRING); # Don't count forced updates if (!isset($_GET['force'])) { Installer::RegisterInstall($FULL_VERSION_STRING); } echo '<p><strong>Update completed!</strong></p> <hr> <p >If there were any errors, you may have to manually run the SQL update, or correct the errors, and click the following to re-run the update: <br /> <a href="update.php?force">Click here to force the update to run again</a></p> <p>Click here to <a href="' . SITE_URL . '">goto your site</a>, or <a href="' . SITE_URL . '/admin">your admin panel</a></p> '; Template::Show('footer');
echo '<div id="error">' . Installer::$error . '</div>'; break; } SettingsData::saveSetting('PHPVMS_VERSION', INSTALLER_VERSION); echo '<div align="center" style="font-size: 18px;"><br /> <a href="install.php?page=sitesetup">Continue to the next step</a> </div>'; } break; case 'sitesetup': Template::Show('s2_site_setup.tpl'); break; case 'complete': if ($_POST['action'] == 'submitsetup') { if ($_POST['firstname'] == '' || $_POST['lastname'] == '' || $_POST['email'] == '' || $_POST['password'] == '' || $_POST['vaname'] == '' || $_POST['vacode'] == '') { Template::Set('message', 'You must fill out all of the fields'); Template::Show('s2_site_setup.tpl'); break; } $_POST['SITE_NAME'] = $_POST['vaname']; if (!Installer::SiteSetup()) { Template::Set('message', Installer::$error); Template::Show('s2_site_setup.tpl'); } else { Installer::RegisterInstall(INSTALLER_VERSION); Template::Show('s3_setup_finished.tpl'); } } break; } Template::Show('footer.tpl');
foreach($results as $row) { $flighttime = str_replace('.', ':', $row->flighttime); $flighttime .= ':00'; $sql = "UPDATE ".TABLE_PREFIX."pireps SET `flighttime_stamp`='{$flighttime}' WHERE `pirepid`={$row->pirepid}"; DB::query($sql); } }*/ # Final version update /*if(!isset($_GET['test'])) { $sql = 'UPDATE `'.TABLE_PREFIX.'settings` SET value=\''.UPDATE_VERSION.'\' WHERE name=\'PHPVMS_VERSION\''; DB::query($sql); }*/ echo '<p><strong>Update completed!</strong></p> <hr> <p >If there were any errors, you may have to manually run the SQL update, or correct the errors, and click the following to re-run the update: <br /> <a href="update.php?force">Click here to force the update to run again</a></p> <p>Click here to <a href="' . SITE_URL . '">goto your site</a>, or <a href="' . SITE_URL . '/admin">your admin panel</a></p> '; # Don't count forced updates if (!isset($_GET['force'])) { Installer::RegisterInstall(UPDATE_VERSION); } Template::Show('footer.tpl');