<?php
function verif_connexion($_POST){
	session_start();
	if(NewFct('control_user',$_POST) ==false) {
		if(!header("Location:autorisation_refusee.php")) print "<meta HTTP-EQUIV=\"refresh\" content=\"0; URL=autorisation_refusee.php\"> ";
	}
	else {
		$_SESSION['login_utilisateur'] = $_POST['login_utilisateur'];
		$_SESSION['hash_acces_utilisateur'] = md5($_POST['login_utilisateur'] . $_POST['pass_utilisateur']);
		$_SESSION['ip_utilisateur'] = $_SERVER['REMOTE_ADDR'];
		$_SESSION['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
		if(!header("Location:admin.php")) print "<meta HTTP-EQUIV=\"refresh\" content=\"0; URL=admin.php\"> ";
		return true;
	}
}
?>