--- lib/functions/common.php Fri Jun 17 23:59:47 2011 +++ lib/functions/common.php Thu May 31 21:56:27 2012 @@ -260,7 +260,7 @@ tLog('Invalid session from ' . $ip . '. Redirected to login page.', 'INFO'); $fName = "login.php"; - $baseDir = dirname(__FILE__); + $baseDir = dirname($_SERVER['SCRIPT_FILENAME']); while(!file_exists($baseDir.DIRECTORY_SEPARATOR.$fName)) { @@ -421,6 +421,10 @@ */ function redirect($path, $level = 'location') { + if (($level == 'location') && !headers_sent()) { + header("Location: ".$path); + exit; + } echo "
"; echo "