<?php

include ("config.php");

if (!isset($_SESSION["Sadmin"]))
{
	header ("Location: index.php");
	exit;
}

$fields = array (
	"id_user"    => array ("get", "integer", 0),
);
getFields($fields);

if (!$id_user)
{
	header ("Location: utilisateur.php");
	exit;
}

$q = "SELECT * FROM utilisateur WHERE id_user = '" . $id_user . "'";
$infoUser = queryOne($q);

if (empty($infoUser))
{
	header ("Location: utilisateur.php");
	exit;
}

$_SESSION = array ();
$_SESSION["Sid_user"] = $infoUser["id_user"];
$_SESSION["Suser_nom"] = $infoUser["user_nom"];
$_SESSION["Suser_prenom"] = $infoUser["user_prenom"];
$_SESSION["Suser_login"] = $infoUser["user_login"];
$_SESSION["Suser_cat"] = $infoUser["user_cat"];

header ("Location: suivi.php");
exit;

?>