<?php if (is_dir("install") && $CMD!='request.installcleanup') { if (!$Config->DBType) { header('Location: install/'); die; } else { if (@filectime('base/config.common.inc.php')<@filectime('install/index.php')) { echo 'Under Maintenance ...'; die; } else { @remove_dir("install"); clearstatcache(); if (is_dir("install")) { if (file_exists('install/commands/request.installcleanup.php')) header('Location: install/?cmd=request.installcleanup'); else echo 'Please delete the "install" directory.'; die; } } } } if (is_https()) { SET_LIFELONG_COOKIE('USESSL','yes'); if (!$Config->AllowSSL) { header("Location: ".'http://'.$Config->SERVER_DOMAIN.$_SERVER['REQUEST_URI']); exit; } } else { if (COOKIE('USESSL')=='yes' && $Config->AllowSSL) { header("Location: ".'https://'.$Config->SERVER_DOMAIN.$_SERVER['REQUEST_URI']); exit; } } ?>