<?	
include ('logue.php'); 
include ('entete2.php');

$id = $_POST["id"];

$sql = "SELECT * FROM matgraph_banni WHERE id = $id";
$res = mysql_query($sql)or die('erreur sql<br>'.$sql.'<br>'.mysql_error());
$row = mysql_fetch_array($res);

$sql4 = "INSERT INTO `matgraph_logadmin` ( `id` , `mdj` , `date` , `action` )
				VALUES (
				'', '".$login."', now(), 'Supr ban | ".addslashes($row['login'])." | ".addslashes($row['jour'])."j ".addslashes($row['heure'])."h ".addslashes($row['minute'])."m | ".addslashes($row['date'])." | ".addslashes($row['motif'])."'
				)";
$res4 = mysql_query($sql4)or die('erreur sql<br>'.$sql4.'<br>'.mysql_error());

$sql4 = "DELETE FROM matgraph_banni WHERE id = $id";
$res4 = mysql_query($sql4)or die('erreur sql<br>'.$sql4.'<br>'.mysql_error());
echo '<script language="javascript" type="text/javascript">
<!--
window.location.replace("ban.php");
-->
</script>';
  
?>