3 require_once("config.php");
5 require_once("squasher.class.php");
7 $salt = md5($_SERVER['REMOTE_ADDR']."|".$_SERVER['HTTP_USER_AGENT']);
9 if (@$_GET['tools']=="logout"){
11 $_SESSION['creds']['validated'] = false;
12 header( 'Location: '.$_SERVER['PHP_SELF'] ) ;
15 if (!@$_SESSION['creds']['validated']){
16 validate_user(@$_POST['user'], @$_POST['pass'], $salt);
19 if ($_SESSION['creds']['validated'] || @$_GET['f']) {
20 //if ($_SESSION['creds']['validated']){
22 include("squasher.php");
26 $smarty = get_smarty();
28 $smarty->assign('salt', $salt);
29 $smarty->assign('debug', @$_GET['debug']);
30 $smarty->display('login.tpl');
32 // vim: syntax=php ts=4 sw=4 sts=4 sr noet