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

$id = htmlentities ($_POST["id"]);
$idplanete = htmlentities ($_POST["planete"]);
$idjoueur = htmlentities ($_POST["envoyeur"]);
$type = htmlentities ($_POST["type"]);

$sujet = "Proposition de pacte $type refusé.";
$msg = "Votre proposition de pacte $type a été refuser par $login";
$requete = "INSERT INTO matgraph_msg VALUES ('', now(), 'non', '$idjoueur', '$sujet', '$msg')";
$resultat = db_mysql_Query($requete)or die('erreur sql<br>'.$requete.'<br>'.mysql_error());

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