<?php

	session_start();
	
	$_SESSION['database']="local";
	
	if($_SESSION['database']=="local")
	  {
	     $db_host    = "localhost";
	     $db_user   = "root";
	     $db_pass   = "";
     	     $db_name   = "boutique";

	 }
	
	if($_SESSION['database']=="public")
	  {
  	     $db_host    = "sql2";
   	     $db_user   = "analogde";
 	     $db_pass   = "rainbow";
    	     //$db_type   = "mysql";
	     $db_name   = "analogde";
	 }
	 
	 
	// 
	

	
	$mail = $_GET['mail'];
	// $_GET['sujet'];
	// $_GET['message'];

	if(isset($_POST['email']) && isset($_POST['sujet']) && isset($_POST['message']) )
	  { 
	  	
	  	if($_POST['email'] == "toto" )
	  	  {
	  	  //header('Location: lula.php');
	  	  echo  "mljmljmljmljùmgjsùsfmbs,ùmlfdùb,dbùmfd,dbùbmùsf";
	  	 } 
		else { echo "kiki"; 
		     }
	  }
 
  
 


	
		
	
	/*$mail_entete = "MIME-Version: 1.0\r\n";
	$mail_entete .= "From: {$_POST['nom']} "
             ."<{$_POST['email']}>\r\n";
	$mail_entete .= 'Reply-To: '.$_POST['email']."\r\n";
	$mail_entete .= 'Content-Type: text/plain; charset="iso-8859-1"';
	$mail_entete .= "\r\nContent-Transfer-Encoding: 8bit\r\n";
	$mail_entete .= 'X-Mailer:PHP/' . phpversion()."\r\n";*/
	
	//  corps du mail
	/*$mail_corps = "Message de : $civilite $nom\n";
	$mail_corps .= "Adresse : $adresse, $codepostal $ville, $pays\n";
	$mail_corps .= "Ses centres d'intérêts : $sqlinterets\n\n\n";
	$mail_corps .= $comments;  */
	 
//  <a href="#" onClick="checkForm('configuration')" class="formButton">Envoyer</a> 	 
?>	 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Administration :: Patrice Delpy</title>

<link rel="stylesheet" href="default.css" type="text/css">

</head>

<body>

<div id="header"><h1>Administration</h1>
<div class="membre">Vous Ãªtes connectÃ© en tant que <b><?php echo $_SESSION['admin_identifiant']; ?> </b></div>
</div>

	<?php include('menu.php'); ?>



        <div class="heading">Envoi d'un email</div>
        <div id="list">

        <form action="envoi_email.php" method="post" name="form_email" id="form_email">

        <table align="left" cellspacing="1" cellpadding="5" border="0" bgcolor="#D5D5D5">
        
        <tr bgcolor="#F1F3F5">
        <td colspan="2" class="h1" align="left">Rédiger votre courrier électronique</td>
        </tr>
        
        <tr bgcolor="#FFFFFF">
	<td align="right" valign="top">Email :</td>
	<td align="left" valign="middle" colspan="1">
	<input type="text" name="email" size="40" maxlength="50" value="<?php echo $mail ?>" id="email">&nbsp;</td>
	</tr>
	
	<tr bgcolor="#FFFFFF">
	<td align="right" valign="top">Sujet :</td>
	<td align="left" valign="middle" colspan="1">
	<input type="text" name="sujet" size="40" maxlength="50" value="" id="sujet">&nbsp;</td>
	</tr>
	
	<tr bgcolor="#FFFFFF">
	<td align="right" valign="top">Message :</td>
	<td align="left" valign="middle" colspan="1">
	<textarea name="message" cols=50 rows=20></textarea>
	&nbsp;</td>
	</tr>
       
        
        <tr bgcolor="#F1F3F5">
        <td colspan="2" align="center">
        
         <input type="submit" value="Valider" />

        
        </td>
        </tr>
        </table>

        </form>
        </div>



</body>
</html>
