include 'config.php'; include 'functions.php'; session_start(); if(isset($_SESSION["logged_in"]) && $_SESSION["logged_in"] == true){ //$_SESSION["logged_in"]; redirect(); } if(!$useLogin){ $_SESSION["started"] = true ; } if(isset($_POST["password"])){ $password = $_POST["password"]; if (sha1($password) === $loginPassword){ $_SESSION["logged_in"] = true; redirect('index.php'); die(); }else{ echo "incorrect password"; } }else{ //no password set } ?>