X-Git-Url: https://git.nirgal.com/?p=squasher.git;a=blobdiff_plain;f=index.php;h=d733f0ba64f08b863b96e08e6d2d69459a016a69;hp=d092dd6df90c422195b8ab96c28dc8e49da0e803;hb=beab39bd5b14a6607f64e382cea4936d9750cf90;hpb=0734b6f963e78531463fd66c7b9890fac36821d5 diff --git a/index.php b/index.php index d092dd6..d733f0b 100644 --- a/index.php +++ b/index.php @@ -4,26 +4,19 @@ require_once("include/connect.inc.php"); require_once("squasher.class.php"); -$vars['debug'] = $_GET['debug']; -$vars['newtpl'] = $_GET['newtpl']; -$tools = $_GET['tools']; - -foreach($_POST AS $key => $value) - $submitted[$key]=$value; - $salt = md5($_SERVER['REMOTE_ADDR']."|".$_SERVER['HTTP_USER_AGENT']); -if ($tools=="logout"){ +if (@$_GET['tools']=="logout"){ session_destroy(); $_SESSION['creds']['validated'] = false; header( 'Location: '.$_SERVER['PHP_SELF'] ) ; } -if (!$_SESSION['creds']['validated']){ - validate_user($_POST['user'], $_POST['pass'], $salt); +if (!@$_SESSION['creds']['validated']){ + validate_user(@$_POST['user'], @$_POST['pass'], $salt); } -if ($_SESSION['creds']['validated'] || isset($_GET['f'])) { +if ($_SESSION['creds']['validated'] || @$_GET['f']) { //if ($_SESSION['creds']['validated']){ //load squasher include("squasher.php"); @@ -34,8 +27,8 @@ if ($_SESSION['creds']['validated'] || isset($_GET['f'])) { $smarty = new Smarty; - $smarty->assign('salt',$salt); - $smarty->assign('debug',$debug); + $smarty->assign('salt', $salt); + $smarty->assign('debug', @$_GET['debug']); $smarty->display('login.tpl'); } // vim: syntax=php ts=4 sw=4 sts=4 sr noet