<html>

 <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Gestion des clients</title>
<body>

<?php 

//Fichiers contenant les fonctions utilis&eacute;es dans le script.
require("../outils/gui.php");
require("../outils/session.php");
require("../outils/mise_en_page.php");
require("../historique.php");

//V&eacute;rifier si la session est valide.
$Bsession_id = $_GET["Bsession_id"];
verifierSession($Bsession_id);

//V&eacute;rifier les droits de l'utilisateur.
$privilege_base = lirePrivilege($Bsession_id);
if (($privilege_base != 2) and ($privilege_base != 1))
	die("Vous n'avez pas les droits!");
	
	
	$code_client = $_GET['code_client'];
	$organisme = $_GET['organisme'];
	$type = $_GET['type'];
	$org_tel = $_GET['org_tel'];
	$mod_org_tel_poste = $_GET['mod_org_tel_poste'];
	$org_tel_poste = $_GET['org_tel_poste'];
	$org_tel_poste = $_GET['org_tel_poste'];
	$mod_org_ad_civile = $_GET['mod_org_ad_civile'];
	$org_ad_civile = $_GET['org_ad_civile'];
	$mod_org_rue = $_GET['mod_org_rue'];
	$org_rue = $_GET['org_rue'];
	$mod_org_ville = $_GET['mod_org_ville'];
	$org_ville = $_GET['org_ville'];
	$mod_org_province = $_GET['mod_org_province'];
	$org_province = $_GET['org_province'];
	$mod_org_pays = $_GET['mod_org_pays'];
	$org_pays = $_GET['org_pays'];
	$mod_org_code_postal = $_GET['mod_org_code_postal'];
	$org_code_postal = $_GET['org_code_postal'];
	$nom = $_GET['nom'];
	$mod_prenom = $_GET['mod_prenom'];
	$prenom = $_GET['prenom'];
	$mod_tel_reside = $_GET['mod_tel_reside'];
	$tel_reside = $_GET['tel_reside'];
	$mod_tel_fax = $_GET['mod_tel_fax'];
	$tel_fax = $_GET['tel_fax'];
	$mod_tel_autre = $_GET['mod_tel_autre'];
	$tel_autre = $_GET['tel_autre'];
	$mod_client_ad_civile = $_GET['mod_client_ad_civile'];
	$client_ad_civile = $_GET['client_ad_civile'];
	$mod_client_rue = $_GET['mod_client_rue'];
	$client_rue = $_GET['client_rue'];
	$mod_client_app = $_GET['mod_client_app'];
	$client_app = $_GET['client_app'];
	$mod_client_ville = $_GET['mod_client_ville'];
	$client_ville = $_GET['client_ville'];
	$mod_client_province = $_GET['mod_client_province'];
	$client_province = $_GET['client_province'];
	$mod_client_pays = $_GET['mod_client_pays'];
	$client_pays = $_GET['client_pays'];
	$mod_client_code_postal = $_GET['mod_client_code_postal'];
	$client_code_postal = $_GET['client_code_postal'];
	$od_client_courriel = $_GET['od_client_courriel'];
	$client_courriel = $_GET['client_courriel'];
	$mod_commentaire = $_GET['mod_commentaire'];
	$commentaire = $_GET['commentaire'];	
	
	
//*****************************************************************************************************
// modification apporter &agrave; un champ dans la basse de  donn&eacute;e ******************************************
//*****************************************************************************************************

if ($privilege_base ==2)
{

if (!empty ($organisme))	
{
	$sql = "update base_clients 
		    set base_clients.organisme = '$organisme', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de l'organisme",$Bsession_id);	

}

if (!empty ($type))	
{
	$sql = "update base_clients 
		    set base_clients.type = '$type', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du type de client",$Bsession_id);
}


if (!empty ($org_tel))	
{
	$sql = "update base_clients 
		    set base_clients.org_tel = '$org_tel', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du tel de l'organisme",$Bsession_id);
}	

if (!empty ($org_tel_poste))	
{
	$sql = "update base_clients 
		    set base_clients.org_tel_poste = '$org_tel_poste', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du tel de l'organisme",$Bsession_id);
}			

if (!empty ($org_ad_civile))	
{
	$sql = "update base_clients 
		    set base_clients.org_ad_civile = '$org_ad_civile', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de l'adresse de l'organisme",$Bsession_id);
}

if (!empty ($org_rue))	
{
	$sql = "update base_clients 
		    set base_clients.org_rue = '$org_rue', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de la rue de l'organisme",$Bsession_id);
}

if (!empty ($org_ville))	
{
	$sql = "update base_clients 
		    set base_clients.org_ville = '$org_ville', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de la ville l'organisme",$Bsession_id);
}

if (!empty ($org_province))	
{
	$sql = "update base_clients 
		    set base_clients.org_province = '$org_province', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de la province de l'organisme",$Bsession_id);
}

if (!empty ($org_pays))	
{
	$sql = "update base_clients 
		    set base_clients.org_pays = '$org_pays', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du pays de l'organisme",$Bsession_id);	
}

if (!empty ($org_code_postal))	
{
	$sql = "update base_clients 
		    set base_clients.org_code_postal = '$org_code_postal', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du code postal de l'organisme",$Bsession_id);	
}

if (!empty ($credit))	
{
	$sql = "update base_clients 
		    set base_clients.credit = '$credit', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du credit de l'organisme",$Bsession_id);	
}

if (!empty ($nom))	
{
	$sql = "update base_clients 
		    set base_clients.nom = '$nom', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du nom",$Bsession_id);	
}

if (!empty ($prenom))	
{
	$sql = "update base_clients 
		    set base_clients.prenom = '$prenom', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du prenom",$Bsession_id);	
}

if (!empty ($tel_reside))	
{
	$sql = "update base_clients 
		    set base_clients.client_tel_reside = '$tel_reside', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du telephone residence",$Bsession_id);
}

if (!empty ($tel_fax))	
{
print("1");
	$sql = "update base_clients 
		    set base_clients.client_tel_fax = '$tel_fax', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du fax",$Bsession_id);
}

if (!empty ($tel_autre))	
{
print("2");
	$sql = "update base_clients 
		    set base_clients.client_tel_autre = '$tel_autre', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du tel autre",$Bsession_id);	
}

if (!empty ($client_ad_civile))	
{
	$sql = "update base_clients 
		    set base_clients.client_ad_civique = '$client_ad_civile', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de l'adresse du client",$Bsession_id);	
}

if (!empty ($client_rue))	
{
	$sql = "update base_clients 
		    set base_clients.client_rue = '$client_rue', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de la rue du client",$Bsession_id);
	
}

if (!empty ($client_app))	
{
	$sql = "update base_clients 
		    set base_clients.client_app = '$client_app', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de l'appartement du client",$Bsession_id);	
}

if (!empty ($client_ville))	
{
	$sql = "update base_clients 
		    set base_clients.client_ville = '$client_ville', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de la ville du client",$Bsession_id);	
}

if (!empty ($client_province))	
{
	$sql = "update base_clients 
		    set base_clients.client_province = '$client_province', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification de la province du client",$Bsession_id);	
}

if (!empty ($client_pays))	
{
	$sql = "update base_clients 
		    set base_clients.client_pays = '$client_pays', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du pays du client",$Bsession_id);	
}

if (!empty ($client_code_postal))	
{
	$sql = "update base_clients 
		    set base_clients.client_code_postal = '$client_code_postal', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du code postal du client",$Bsession_id);	
}

if (!empty ($client_courriel))	
{
	$sql = "update base_clients 
		    set base_clients.client_courriel = '$client_courriel', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du courriel du client",$Bsession_id);	
}

if (!empty ($commentaire))	
{
	$sql = "update base_clients 
		    set base_clients.commentaire = '$commentaire', 
			    base_clients.mis_a_jour = now()
       	    WHERE base_clients.code_client = '$code_client';";
	$result = mysql_query($sql)
	or die("ne peut faire la modification");
	historique("../historique.txt","---Modification du commentaire du client",$Bsession_id);	
}
}

	
	
	
	
	
	
	
	
//*****************************************************************************************************
// remplir les variables ******************************************************************************	
//*****************************************************************************************************

$sql = "SELECT organisme, nom, prenom, type, org_tel, org_tel_poste, org_ad_civile, org_rue, org_ville,
               org_province, org_pays, org_code_postal, credit, client_tel_reside, client_tel_autre, client_ad_civique,
			   client_rue, client_app, client_ville, client_province, client_pays, client_code_postal,
			   client_courriel, commentaire, code_client, date_inscription, client_tel_fax   
        FROM base_clients
	    WHERE base_clients.code_client ='$code_client';";
		
// Ex&eacute;cute la requ&ecirc;te et mettre les r&eacute;sultats dans $result
$result = mysql_query($sql)
	or die ("Ne peut lire dans la table des membres".$sql);
// obtenir le nombre d'enregistrement. 0 si invalide, 1 si valide.
$num = mysql_numrows($result);

// met la valeur dans les variables
if ($num)
{
	$i = 0;
	$row = mysql_fetch_row ($result);
	$organisme = ($row[$i++]);
	$nom = ($row[$i++]);
	$prenom = ($row[$i++]);
	$type = ($row[$i++]);
	$org_tel = ($row[$i++]);
	$org_tel_poste = ($row[$i++]);
	$org_ad_civile = ($row[$i++]);
	$org_rue = ($row[$i++]);
	$org_ville = ($row[$i++]);
	$org_province = ($row[$i++]);
	$org_pays = ($row[$i++]);
	$org_code_postal = ($row[$i++]);
	$credit = ($row[$i++]);
	$tel_reside = ($row[$i++]);
	$tel_autre = ($row[$i++]);
	$client_ad_civile = ($row[$i++]);
	$client_rue = ($row[$i++]);
	$client_app = ($row[$i++]);
	$client_ville = ($row[$i++]);
	$client_province = ($row[$i++]);
	$client_pays = ($row[$i++]);
	$client_code_postal = ($row[$i++]);
	$client_courriel = ($row[$i++]);
	$commentaire = ($row[$i++]);
	$code_client = ($row[$i++]);
	$date_inscription = ($row[$i++]);
	$tel_fax = ($row[$i++]);
}
else
{
	die ("Il y a un probl&egrave;me dans la base de donn&eacute;es !".$sql);
}


// fait le m&eacute;nage des r&eacute;sultat en m&eacute;moire
mysql_free_result ($result);

	
historique("../historique.txt","GESTION DU CLIENT ".$organisme.", ".$nom."".$prenom."",$Bsession_id);		
	
//*****************************************************************************************************
// afficher les r&eacute;sultats *****************************************************************************
//*****************************************************************************************************	
//Afficher le titre de la page.
	print("<center><table cellspacing=0 cellpadding=0 width=750px border=0>");
	print("<tr><td bgcolor=white width=27px><img src=coin-haut-gauche.gif></td>");
	print("<td bgcolor=#636300><center><font face=Arial,Helvetica size=3 color=white><b>Gestion du client</b></td>");
	print("<td bgcolor=white width=27px><img src=coin-haut-droit.gif></td>");
	print("</td></tr></table>");			   
		   
		   
		   
	print("<table cellspacing=0 cellpadding=0 width=750px border=0><tr><td bgcolor=#E7EFCE valign=top>");			
//***************POUR L'ORGANISME***************************
	//Tableau de mise en page.
	print("<table cellspacing=0 cellpadding=0 width=375 border=0>");
	print("<tr><td bgcolor=#E7EFCE><b>Num&eacute;ro du client : ".$code_client);
	print("<br><br></td></tr>");	
	
//ORGANISME
	print("<tr><td bgcolor=#E7EFCE><b>");
	print("ORGANISME:<br><br>");
	
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_organisme\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");
	
	print("Organisme: ");
	print("<input type=\"text\" value=\"".$organisme."\" name=\"organisme\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification
		print("<input type=\"image\" alt=\"btn_organisme\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form>");
	
//TYPE
	print("</td></tr><tr><td bgcolor=#E7EFCE><b>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_type\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");
	
	print("Type: ");
	print("<select name=\"type\">
			<option selected value=\"".$type."\">".$type."</option>
			<option value=\"SMM\">SMM</option>
			<option value=\"Ext\">Scouts ext</option>
			<option value=\"Famille\">Famille</option>
			<option value=\"District\">District</option>
			<option value=\"Trio\">Trio</option>
			<option value=\"Autres\">Autres</option>			
		</select>");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"btn_type\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");
	
//TELEPHONE 
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_tel\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>T&eacute;l&eacute;phone: ");
	print("<input type=\"text\" value=\"".$org_tel."\" name=\"org_tel\" align=\"top\" maxlength=\"15\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_tel\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");	
	
//TELEPHONE POSTE
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_tel_poste\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Tel poste: ");
	print("<input type=\"text\" value=\"".$org_tel_poste."\" name=\"org_tel_poste\" align=\"top\" maxlength=\"15\" size=\"30\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_tel_poste\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");		
	
//ADRESSE 
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_ad_civile\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Adresse civile: ");
	print("<input type=\"text\" value=\"".$org_ad_civile."\" name=\"org_ad_civile\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_ad_civile\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");	
	
//RUE 
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_rue\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Rue: ");
	print("<input type=\"text\" value=\"".$org_rue."\" name=\"org_rue\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_rue\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");
	
//VILLE 
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_ville\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Ville: ");
	print("<input type=\"text\" value=\"".$org_ville."\" name=\"org_ville\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_ville\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");
	
//PROVINCE 
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_province\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Province: ");
	print("<input type=\"text\" value=\"".$org_province."\" name=\"org_province\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_province\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");
	
//PAYS
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_pays\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Pays: ");
	print("<input type=\"text\" value=\"".$org_pays."\" name=\"org_pays\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_pays\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");
	
//CODE POSTAL
	print("<tr><td bgcolor=#E7EFCE>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_org_code_postal\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Code postal: ");
	print("<input type=\"text\" value=\"".$org_code_postal."\" name=\"org_code_postal\" align=\"top\" maxlength=\"7\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"org_code_postal\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");			
	
	
	

	
	print("</table>");
	print("</td><td valign=top>");
	
	
//***************POUR LE CLIENT**************************	
	//Tableau de mise en page.
	print("<table cellspacing=0 cellpadding=0 width=375 border=0>");
	print("<tr><td bgcolor=#C8DB8D><b>Date de l'inscription : ".$date_inscription);
	print("<br><br></td></tr>");

	
//NOM
	print("<tr><td bgcolor=#C8DB8D><b>");
	print("CONTACT:<br><br>");
	
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_nom\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");
	
	print("Nom: ");
	print("<input type=\"text\" value=\"".$nom."\" name=\"nom\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"nom\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");
	
//PRENOM
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_prenom\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Pr&eacute;nom: ");
	print("<input type=\"text\" value=\"".$prenom."\" name=\"prenom\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"prenom\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");	
	
//TELEPHONE
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_tel_reside\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>T&eacute;l&eacute;phone: ");
	print("<input type=\"text\" value=\"".$tel_reside."\" name=\"tel_reside\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"tel_reside\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");	
	
//TELEPHONE FAX
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_tel_fax\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Fax: ");
	print("<input type=\"text\" value=\"".$tel_fax."\" name=\"tel_fax\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"tel_autre\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");	
	
//TELEPHONE AUTRE
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_tel_autre\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Autre tel: ");
	print("<input type=\"text\" value=\"".$tel_autre."\" name=\"tel_autre\" align=\"top\" maxlength=\"15\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"tel_autre\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");		

//ADRESSE CIVILE
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_ad_civile\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Adresse civile: ");
	print("<input type=\"text\" value=\"".$client_ad_civile."\" name=\"client_ad_civile\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_ad_civile\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");
	
//RUE
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_rue\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Rue: ");
	print("<input type=\"text\" value=\"".$client_rue."\" name=\"client_rue\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_rue\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");	

//APPARTEMENT
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_app\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>App: ");
	print("<input type=\"text\" value=\"".$client_app."\" name=\"client_app\" align=\"top\" maxlength=\"4\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_app\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");	
	
//VILLE
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_ville\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Ville: ");
	print("<input type=\"text\" value=\"".$client_ville."\" name=\"client_ville\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_ville\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");		
	
//PROVINCE
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_province\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Province: ");
	print("<input type=\"text\" value=\"".$client_province."\" name=\"client_province\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_province\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");			
	
//PAYS
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_pays\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Pays: ");
	print("<input type=\"text\" value=\"".$client_pays."\" name=\"client_pays\" align=\"top\" maxlength=\"100\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_pays\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");			
	
//CODE POSTAL
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_code_postal\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Code postal: ");
	print("<input type=\"text\" value=\"".$client_code_postal."\" name=\"client_code_postal\" align=\"top\" maxlength=\"7\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_code_postal\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");			
	
//COURRIEL
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_client_courriel\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Courriel: ");
	print("<input type=\"text\" value=\"".$client_courriel."\" name=\"client_courriel\" align=\"top\" maxlength=\"40\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"client_courriel\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");			
	
//COMMENTAIRE
	print("<tr><td bgcolor=#C8DB8D>");
	print("<form action=\"gestion-client.php\" method=\"get\" name=\"mod_commentaire\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"hidden\" name=\"code_client\" value=".$code_client.">");

	print("<b>Commentaire: ");
	print("<input type=\"text\" value=\"".$commentaire."\" name=\"commentaire\" align=\"top\" maxlength=\"255\" size=\"25\">");
	if ($privilege_base == 2)//protection pour les droits de modification	
		print("<input type=\"image\" alt=\"commentaire\" src=\"bouton0.gif\" border=0 width=15 height=24>");
	print("</form></td></tr>");			

	print("</table>");
	
print("</td></tr></table>");	


print("<center><table cellspacing=0 cellpadding=0 width=750px border=0>");
print("<tr><td bgcolor=white width=27px><img src=coin-bas-gauche.gif></td>");
print("<td bgcolor=#636300 width=746px></td>");
print("<td bgcolor=white width=27px><img src=coin-bas-droit.gif></td>");
print("</tr></table>");	
	
	
	
	
//BAS DE PAGE**********************************************************************
	
print("<hr><table width=100%><tr><td width=50%>");
print("<div align=right>");	
	//Afficher le bouton de retour au menu client.
	print("<form action=\"client.php?Bsession_id=".$Bsession_id."\" method=\"post\" name=\"client\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"submit\" name=\"menu_client\" value=\"Menu client\"></form>");
print("</td><td width=50%>");
print("<div align=left>");	
	//Afficher le bouton de retour au menu principal.
	print("<form action=\"../menu-base.php?Bsession_id=".$Bsession_id."\" method=\"post\" name=\"principal\">");
	print("<input type=\"hidden\" name=\"Bsession_id\" value=".$Bsession_id.">");
	print("<input type=\"submit\" name=\"menu_principal\" value=\"Menu Principal\"></form>");
print("</td><tr></table>");	
	//Fin du formulaire.

	
	




	
?>

</body>
</html>	
	
	
	
	
