0) { $remainingSeconds = $setup_timeOut - (time() - $setup_fileCreated); } else { $remainingSeconds = 1; } if(file_exists('setupControl.php') && (time() - $setup_fileCreated > $setup_timeOut)) { chmod('setupControl.php', 0777); unlink('setupControl.php'); } if(!class_exists('PasswordHash') && file_exists('cmsimple/PasswordHash.php')) { $pwHashPath = 'cmsimple/PasswordHash.php'; $flagsFolder = 'userfiles/images/flags/'; $configFolder = './cmsimple/'; } if(!class_exists('PasswordHash') && file_exists('../cmsimple/PasswordHash.php') && (file_exists('cmsimplesubsite.htm') || file_exists('cmsimplelanguage.htm')) && !file_exists('../cmsimplesubsite.htm')) { $pwHashPath = '../cmsimple/PasswordHash.php'; $flagsFolder = '../userfiles/images/flags/'; $configFolder = './'; } if(!class_exists('PasswordHash') && file_exists('../../cmsimple/PasswordHash.php') && file_exists('cmsimplelanguage.htm') && file_exists('../cmsimplesubsite.htm')) { $pwHashPath = '../../cmsimple/PasswordHash.php'; $flagsFolder = '../../userfiles/images/flags/'; $configFolder = './'; } if (is_writable('setupControl.php') && file_exists('index.php')) { require $pwHashPath; $cmsimple_pwHasher = new PasswordHash(8, true); if (file_exists('cmsimplesubsite.htm') || file_exists('cmsimplelanguage.htm')) { $fileConfigSetup = './config.php'; } else { $fileConfigSetup = $configFolder . 'config.php'; } $passwordhint = ''; if (isset($_POST['submit_password'])) { if (strlen($_POST['password']) > 4) { $hash = $cmsimple_pwHasher->HashPassword($_POST['password']); $hash = str_replace('$P$','\$P\$',$hash); $content = explode("\n", htmlspecialchars(file_get_contents($fileConfigSetup),ENT_QUOTES,'UTF-8')); $content[2] = '$cf[\'security\'][\'password\']="' . $hash . '";'; $myfile = fopen($fileConfigSetup, "w") or die("Unable to open file!"); fwrite($myfile, htmlspecialchars_decode(implode("\n", $content),ENT_QUOTES)); fclose($myfile); chmod('setupControl.php', 0777); unlink('setupControl.php'); header("Location: ./?login"); } else { if(strlen($_POST['password']) < 5) $passwordhint.= '

flag english
Your password must have
5 or more characters!

flag deutsch
Das Passwort muss aus
5 oder mehr Zeichen bestehen!

'; } } echo ' Welcome

' . $remainingSeconds . '  seconds remaining

flag english  Enter your new password!

flag english  Geben Sie Ihr neues Passwort ein!

Minimum: 5 characters

' . $passwordhint . '

'; } else { echo ' Welcome

Setup is not active.

flag english
How you can activate setup, you will find in the readme.php in the Root folder of the CMSimple download.

flag english
Wie Sie Setup aktivieren können, finden Sie in der readme.php des CMSimple Downloads.

Home »

'; } ?>