Пример #1
0
         if (strlen($_SESSION['MAIN_Password1']) < 4 || $_SESSION['MAIN_Password1'] != $_SESSION['MAIN_Password2']) {
             RevertOneStep($content['INSTALL_STEP'] - 1, $content['LN_INSTALL_PASSWORDNOTMATCH']);
         }
     } else {
         if ($_SESSION['UserDBAuthMode'] == USERDB_AUTH_LDAP) {
             $_SESSION['MAIN_Username'] = $_SESSION['LDAPDefaultAdminUser'];
             $_SESSION['MAIN_Password1'] = "";
             $_SESSION['MAIN_Password2'] = "";
         }
     }
     // --- Now execute all commands
     ini_set('error_reporting', E_WARNING);
     // Enable Warnings!
     InitUserDbSettings();
     // We need some DB Settings
     InitUserSystemPhpLogCon();
     // We need the user system now!
     // Establish DB Connection
     DB_Connect();
     // Everything is fine, lets go create the User!
     CreateUserName($_SESSION['MAIN_Username'], $_SESSION['MAIN_Password1'], 1);
     // Show User success!
     $content['MAIN_Username'] = $_SESSION['MAIN_Username'];
     $content['createduser'] = true;
 }
 // Init Source Options
 if (isset($_SESSION['SourceType'])) {
     $content['SourceType'] = $_SESSION['SourceType'];
 } else {
     $content['SourceType'] = SOURCE_DISK;
 }
function InitPhpLogCon()
{
    // Needed to make global
    global $gl_root_path, $content, $CFG;
    // Abort if already defined
    if (defined('PHPLOGCON_INITIALIZED')) {
        return;
    }
    // Init Basics which do not need a database
    InitBasicPhpLogCon();
    // Will init the config file!
    InitPhpLogConConfigFile();
    // Init UserDB related stuff!
    InitUserSystemPhpLogCon();
    // Establish DB Connection
    if (GetConfigSetting("UserDBEnabled", false)) {
        DB_Connect();
    }
    // Now load the Page configuration values
    InitConfigurationValues();
    // Moved here, because we do not need if GZIP needs to be enabled before the config is loaded!
    InitRuntimeInformations();
    // Now Create Themes List because we haven't the config before!
    CreateThemesList();
    // Create Language List
    CreateLanguageList();
    // Init Predefined Searches List
    CreatePredefinedSearches();
    // Init predefined paging sizes
    CreatePagesizesList();
    // Init predefined reload times
    CreateReloadTimesList();
    // Init predefined reload times
    CreateExportFormatList();
    // --- Enable PHP Debug Mode
    InitPhpDebugMode();
    // ---
    // --- Init Allowed directories for DiskSources
    InitDiskAllowedSources();
    // ---
    // --- Check and Remove Magic Quotes!
    RemoveMagicQuotes();
    // ---
    // Finally defined PHPLOGCON_INITIALIZED!
    define('PHPLOGCON_INITIALIZED', TRUE);
}