コード例 #1
0
ファイル: index.php プロジェクト: javinc/loadavg
$loadModules = new LoadModules();
/* Initialize LoadAvg plugins  */
include_once 'class.Plugins.php';
$loadPlugins = new loadPlugins();
// Grab Default settings
$settings = LoadAvg::$_settings->general;
$flooding = false;
//first lets see if a name has been set...
$pageName = "installer";
// Including header view
require_once APP_PATH . '/layout/header.php';
//check for settings
$settings_file = APP_PATH . '/config/settings.ini.php';
// path to settings INI file
//read some system data
$settingsActive = LoadUtility::checkWritePermissions($settings_file);
//check out logs
$logStatus = $loadavg->testLogs(false);
//check if any data has been passed in
$step = 1;
if (isset($_GET['step'])) {
    $step = $_GET['step'];
}
// if step argument exists set the step
//if (isset($_GET['step'])) ? $step=1; : $step = $_GET['step'];
//forceinstall is used to force a install when script has detected an upgrade
$forceInstall = false;
if (isset($_GET['forceinstall'])) {
    $forceInstall = true;
}
//see if we can get the version number
コード例 #2
0
ファイル: class.LoadAvg.php プロジェクト: javinc/loadavg
 /**
  * cleanUpInstaller
  *
  * Checks if is still installation progress and redirects if TRUE.
  *
  */
 public function cleanUpInstaller()
 {
     //location of core settings
     $settings_file = APP_PATH . '/config/settings.ini.php';
     //see if we can write to settings file
     //if ( $this->checkWritePermissions( $settings_file ) )
     if (LoadUtility::checkWritePermissions($settings_file)) {
         /* 
          * Create first log files for all active modules 
          * only executes if there are no log files
          */
         $this->createFirstLogs();
         /* 
          * clean up installation files
          */
         //if installer is not present (true) leave
         if ($this->checkInstaller()) {
             header("Location: index.php");
         } else {
             //clean up - try to delete installer if we have permissions
             $installer_file = HOME_PATH . "/install/index.php";
             $installer_loc = HOME_PATH . "/install/";
             unlink($installer_file);
             rmdir($installer_loc);
             //check again if it worked exit
             if ($this->checkInstaller()) {
                 header("Location: index.php");
             } else {
                 //if not throw a error and exit
                 require_once APP_PATH . '/layout/secure.php';
                 require_once APP_PATH . '/layout/footer.php';
                 exit;
             }
         }
     } else {
         header("Location: /install/index.php?step=1");
     }
 }