<?php if (is_dir("install") && $CMD!='request.installcleanup') { if (!$Config->DBType) { header('Location: install/'); die; } else { if (@filectime('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; } } } } $Config->AllowSSL=$Config->AllowSSL && !in_array(TGET('cmd'),$Config->NoSSLCommands); if (is_https()) { if (!$Config->AllowSSL) { SET_LIFELONG_COOKIE('USESSL',''); header("Location: http://".$Config->SERVER_DOMAIN.$_SERVER['REQUEST_URI']); exit; } else SET_LIFELONG_COOKIE('USESSL','yes'); } else { if (COOKIE('USESSL')=='yes' && $Config->AllowSSL) { header("Location: https://".$Config->SERVER_DOMAIN.$_SERVER['REQUEST_URI']); exit; } } if ($_SESSION[SESSKEYPFX.'status']['login.timestamp']!=$_SESSION['uniwits.status']['login.timestamp'] && TGET('cmd')!='relogin') { header("Location: ./?cmd=relogin&gotourl=".urlencode($_SERVER['REQUEST_URI'])); exit; } ?>