				$result = $db->select("SELECT * FROM users WHERE login='".$_POST['login']."'");
				foreach ($result as $key) 
					if ((hash('sha256', $_POST['password'])==$key['password'])&&($_POST['login']==$key['login']))
							$_SESSION['log']="true";
							$_SESSION['enter']=intval($key['rights']);
							header("Location:/");
			}
			
			
			
			//}
		}
		
