<?php
/****************************************************************************************
SMI (Services Maintenance Interventions) est une gestion libre de maintenance et de SAV

Version 0.9.9

Copyright (C) 2006-2009  Sylvain FATOME
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; 
either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program
(in the directory docs); 
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
Boston, MA  02110-1301, USA.

Contact : galawa@free.fr

Web : http://smitst.homelinux.com
****************************************************************************************/

session_start(); 
if (!isset($_SESSION["lng"])) $_SESSION["lng"]="fr";
include_once("../lng/".$_SESSION["lng"].".inc.php"); // Paramètres de language
include_once("../inc/config.inc.php");
include_once("../inc/func_log.inc.php");
if (CheckURLLog(FALSE)==FALSE) header("Location: ../index.php");
if (CheckNivLog("5-9")==FALSE) header("Location: ../index.php");
include_once("../inc/fic_fici.inc.php");
include_once("../inc/func.inc.php");
include_once("../inc/func_geo.inc.php");
include_once("../inc/func_geol.inc.php");
include_once("../inc/func_txt.inc.php");
include_once("../inc/func_date.inc.php");
include_once("../inc/geoip.inc.php");
Archivelog(@$_SESSION["code_log"]);

$cge_dep = strip_tags(trim(@$_GET['dep']));

// Récupération des informations centre de gestion
if (existe_cdg()==TRUE)
{
	$row=lit_enr_cdg();
	if (is_array($row))
		extract($row);
	$creation = 0;
	$titre = $titlein_cge_maj_edit;
}
else // Si pas encore créé
{
	$creation = 1;
	$cge_codepays = pays_connect_code($_SERVER['REMOTE_ADDR']);
	$titre = $titlein_cge_maj_add;
}

$cge_datemod = $datea;
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SMI - <?PHP echo $title_esp_prive; ?> : <?PHP echo $title_cge_maj; ?></title>

<!-- Feuille de style pour les affichages courants -->
<link href="../css/smi.css" rel="stylesheet" type="text/css">

<!-- Feuille de style & Script pour le menu -->

<script language="JavaScript" src="../jscript/coolmenus/coolmenus4.js"></script>

<!-- Scripts Javascript pour fenêtres -->
<script language="JavaScript" src="../jscript/fen.js"></script>

<!-- Scripts Javascript pour contrôle de formulaire -->
<script	type="text/javascript" src="../jscript/vform/vform.js"></script>

<script language="javascript">
<!--
var tab1_champ=new Array(
<?PHP if ($creation == 1) { ?>
	"nom:code ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_code); ?>; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:pass ; format:pw ; pwq:6 ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_mdp); ?> ; lmn:7 ; lmx:10; stok:frmok ; stbad:frmbad",
<?PHP } ?>
	"nom:nom ; format:txt ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_nom); ?> ; lmx:50 ; stok:frmok ; stbad:frmbad",
	"nom:rcs ; format:siret ; req:N ; txt:<?PHP echo html_entity_decode($txt_chp_siret); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:ape ; format:naf ; req:N ; txt:<?PHP echo html_entity_decode($txt_chp_ape); ?> ; lmx:10; stok:frmok ; stbad:frmbad",
	"nom:tvai ; format:tva ; req:N ; txt:<?PHP echo html_entity_decode($txt_chp_tvai); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:tcom ; format:txt ; req:N ; txt:<?PHP echo html_entity_decode($txt_chp_tcomfull); ?> ; lmx:70; stok:frmok ; stbad:frmbad",
	"nom:adr1 ; format:txt ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_adr1); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:adr2 ; format:txt ; req:N ; txt:<?PHP echo html_entity_decode($txt_chp_adr2); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:ville ; format:liste ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_ville); ?> ; vmn:1; stok:frmok ; stbad:frmbad",
	"nom:dep ; format:liste ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_dep); ?> ; vmn:1; stok:frmok ; stbad:frmbad",
	"nom:pays ; format:liste ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_pays); ?> ; vmn:1; stok:frmok ; stbad:frmbad",
	"nom:telf ; format:tel ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_telf); ?>; stok:frmok ; stbad:frmbad",
	"nom:txttelf ; format:txt ; req:N ; txt:<?PHP echo html_entity_decode($txt_div_comment)." ".html_entity_decode($txt_chp_telf); ?>; lmx:100 ; stok:frmok ; stbad:frmbad",
	"nom:fax ; format:tel ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_fax); ?>; stok:frmok ; stbad:frmbad",
	"nom:txtfax ; format:txt ; req:N ; txt:<?PHP echo html_entity_decode($txt_div_comment)." ".html_entity_decode($txt_chp_fax); ?>; lmx:100 ; stok:frmok ; stbad:frmbad",
	"nom:web ; format:url_npref ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_sweb); ?>; lmx:200; stok:frmok ; stbad:frmbad",
	"nom:heures ; format:txt ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_horaires); ?>; lmx:200; stok:frmok ; stbad:frmbad",
	"nom:email ; format:mail ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_email)." ".html_entity_decode($txt_chp_emailgeneral); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:emaild ; format:mail ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_email)." ".html_entity_decode($txt_chp_emaildir); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:emailc ; format:mail ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_email)." ".html_entity_decode($txt_chp_emailcptafin); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:emailt ; format:mail ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_email)." ".html_entity_decode($txt_chp_emailtech); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:emailf ; format:mail ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_email)." ".html_entity_decode($txt_chp_emailfrpart); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:emaili ; format:mail ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_email)." ".html_entity_decode($txt_chp_emailinvest); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:emailrh ; format:mail ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_email)." ".html_entity_decode($txt_chp_emailrh); ?> ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:nota ; format:txt ; req:N ; txt:<?PHP echo html_entity_decode($txt_chp_notes); ?>; stok:frmok ; stbad:frmbad");
//-->
</script>

<!-- Scripts Javascript divers -->
<script language="JavaScript" src="../jscript/divers.js"></script>

<!-- Scripts Javascript pour vérifications -->
<script language="JavaScript" src="../jscript/verif_field.js"></script>

<!-- Scripts Ajax -->
<script type="text/javascript" src="../ajax/util.js"></script>
<script type="text/javascript" src="../ajax/SelectUpdater.js"></script>

<script type="text/javascript">
<!--
function updateVille()
{
	villeUpdater = new SelectUpdater("ville", "<?PHP echo $rep_appli.'/ajax/'; ?>recupville.php?dep=", "attn2", "msg2", "<?PHP echo $msg2_err_type; ?>");
	anciendep = "";
	document.getElementById("dep").onchange = function() {
		var listedep = document.getElementById("dep");
		var dep = listedep.options[listedep.selectedIndex].value;
		var listepays = document.getElementById("pays");
		var codepays = listepays.options[listepays.selectedIndex].value;
		if (dep.length > 0)
		{
			if (dep != anciendep)
			{
				// Faire l'appel Ajax
				var prmget=dep+"_"+codepays;
				villeUpdater.run(prmget);
				anciendep = dep;
			}
		}
		else
		{
			// Remettre la liste a vide et annuler l'appel eventuel
			villeUpdater.reset();
			anciendep = "";
		}
	}
}

function updateDep()
{
	depUpdater = new SelectUpdater("dep", "<?PHP echo $rep_appli.'/ajax/'; ?>recupdep.php?pays=", "attn1", "msg1", "<?PHP echo $msg1_err_type; ?>");
	anciencodepays = "";
	anciendep = "";
	document.getElementById("pays").onchange = function() {
		var listepays = document.getElementById("pays");
		var codepays = listepays.options[listepays.selectedIndex].value;
		if (codepays.length > 0)
		{
			if (codepays != anciencodepays)
			{
				// Faire l'appel Ajax
				depUpdater.run(codepays);
				var txthtml = "<option><?PHP echo $sel_lst_makechx; ?></option>\n";
				document.getElementById("ville").innerHTML=txthtml;
				document.getElementById("attn2").innerHTML = "";
				document.getElementById("msg2").innerHTML = "";
				anciencodepays = codepays;
			}
		}
		else
		{
			// Remettre la liste a vide et annuler l'appel eventuel
			depUpdater.reset();
			var txthtml = "<option><?PHP echo $sel_lst_makechx; ?></option>\n";
			document.getElementById("ville").innerHTML=txthtml;
			document.getElementById("attn2").innerHTML = "";
			document.getElementById("msg2").innerHTML = "";
			anciencodepays = "";
		}
	}
}
//-->
</script>

</head>

<?PHP if ($creation == 1) { ?>
<body onLoad="updateDep(document.cge_maj.pays.value);updateVille(document.cge_maj.dep.value);verif_pw(document.getElementById('pass').value,false,'nivpass');metFocus();">
<?PHP } else { ?>
<body onLoad="updateDep();updateVille();metFocus();">
<?PHP } ?>
<?php 
include_once("../inc/entete.inc.php"); 
?>

<p align="center"><span class="titrepage"><?PHP echo $titre ?></span></p>

<div id="oblig" align="center" class="annot_petit_it">(<img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>"> : <?PHP echo $txt_div_saisoblg; ?>)
</div>
<form name="cge_maj" id="cge_maj" method="post" action="cge_enr.php" onSubmit="javascript:; return (VForm(this,tab1_champ,document.cge_maj.pays.value,'<?PHP echo $_SESSION["lng"]; ?>'));">
<input name="titre" type="hidden" id="titre" value="<?PHP echo $titre ?>">
<input name="creation" type="hidden" id="creation" value="<?PHP echo $creation ?>">
<?PHP
if ($creation == 0)
{
?>
<input name="code" type="hidden" id="code" value="<?PHP echo $cge_code ?>">
<input name="pass" type="hidden" id="pass" value="<?PHP echo $cge_pass ?>">
<?PHP
}
?>
<table width="100%"  border="0">
<?PHP if ($creation == 0) { ?>
<tr>
	<td height="21" class="rubfrm" id="f_logo" width="160" align="right"><?PHP echo $txt_chp_logo; ?></td>
	<td>
	<?PHP
	if (exist_logo("cge"))
	{
		$url_img = "cge_logo.php";
	?>
		<a href="javascript:;" onclick="fensaisie('<?PHP echo $url_img; ?>',500,300,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")><img src="../img/vlogo.png" border="0" align="absmiddle"></a>
		<a href="javascript:;" onclick="fensaisie('<?PHP echo $url_img; ?>',500,300,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")> <?PHP echo $txt_lnk_view_logo; ?></a>
	<?PHP } else { ?>
	<span class="alerte1">
	<?PHP echo $alert_noupl; ?>
	</span>
	<span class="annot_gras_it" style="padding-left:10px;">
	<a href="logo_maj.php?td=cge"><?PHP echo $txt_upload; ?></a>
	<?PHP } ?>
	</td>
</tr>
<?PHP } else {?>
<tr>
	<td class="rubfrm" id="f_code" align="right"><?PHP echo $txt_chp_codecnx; ?></td>
	<td>
		<input name="code" type="text" id="code" value="<?PHP echo $cge_code ?>" size="15" onChange="javascript:this.value=this.value.toUpperCase();">
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_pass" align="right"><?PHP echo $txt_chp_mdp; ?></td>
	<td>
		<input name="pass" type="text" id="pass" value="<?PHP echo $cge_pass ?>" size="10" maxlength="20" onBlur="verif_pw(this.value,true,'nivpass');">
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
		<span id="nivpass"></span>
		<br>
		<span class="annot_petit_it"><?PHP echo $txt_div_puissmdp; ?></span>
	</td>
</tr>
<?PHP } ?>
<tr>
	<td class="rubfrm" id="f_nom" align="right"><?PHP echo $txt_chp_nom; ?></td>
	<td>
		<input name="nom" type="text" id="nom" value="<?PHP echo htmlspecialchars($cge_nom) ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();">
	 	 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_rcs" align="right"><?PHP echo $txt_chp_siret; ?></td>
	<td>
		<input name="rcs" type="text" id="rcs" value="<?PHP echo htmlspecialchars($cge_rcs) ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_ape" align="right"><?PHP echo $txt_chp_ape; ?></td>
	<td>
		<input name="ape" type="text" id="ape" value="<?PHP echo htmlspecialchars($cge_ape) ?>" size="10" onChange="javascript:this.value=this.value.toUpperCase();">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_tvai" align="right"><?PHP echo $txt_chp_tvai; ?></td>
	<td>
		<input name="tvai" type="text" id="tvai" value="<?PHP echo htmlspecialchars($cge_tvai) ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_tcom" align="right"><?PHP echo $txt_chp_tcom; ?></td>
	<td>
		<input name="tcom" type="text" id="tcom" value="<?PHP echo htmlspecialchars($cge_tcom) ?>" size="70" onChange="javascript:this.value=this.value.toUpperCase();">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_adr1" align="right"><?PHP echo $txt_chp_adr1; ?></td>
	<td>
		<input name="adr1" type="text" id="adr1" value="<?PHP echo htmlspecialchars($cge_adr1) ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();">
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_adr2" align="right"><?PHP echo $txt_chp_adr2; ?></td>
	<td>
		<input name="adr2" type="text" id="adr2" value="<?PHP echo htmlspecialchars($cge_adr2) ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_pays" align="right"><?PHP echo $txt_chp_pays; ?></td>
	<td>
	<?PHP
		$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
		mysql_select_db(DBNAME);
		$rs = mysql_query("SELECT * FROM ".TBPAYS." ORDER BY pays_nom");
	?>			
		<select name="pays" id="pays">
	<?PHP
		
		echo "<option value=\"\">".$sel_lst_pays."</option>";
	
		// Création de la liste des pays
		while ($resultat = mysql_fetch_array($rs)) 
		{
			extract($resultat);
			if ($cge_codepays == $pays_code)
				echo '<option value="'.$pays_code.'" selected>'.$pays_nom.'</option>';
			else
				echo '<option value="'.$pays_code.'">'.$pays_nom.'</option>';
		}
	?>
		</select>
		<img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	<?PHP
		mysql_free_result($rs);
		mysql_close($conn);
	?>		
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_dep" align="right"><?PHP echo $txt_chp_dep; ?></td>
	<td>
	<?PHP
	// Création de la liste des départements
	$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
	mysql_select_db(DBNAME);
	$rech="SELECT * FROM ".TBDEP." WHERE `dep_codepays`='".$cge_codepays."' ORDER BY dep_code";
	$rs = mysql_query($rech) or die(mysql_error());
	?>
	<select name="dep" size="1" id="dep"">
	<?PHP
	echo "<option>".$sel_lst_makechx."</option>";
	
	if (mysql_num_rows($rs)>0)
	{
		while ($resultat = mysql_fetch_array($rs)) 
		{
			extract($resultat);
			if ($dep_code<>$dep_nom)
				$dep=$dep_code." (".$dep_nom.")";
			else
				$dep=$dep_nom;
			if ($cge_dep == $dep_code)
				echo "<option value=\"".$dep_code."\" selected>".$dep."</option>";
			else
				echo "<option value=\"".$dep_code."\">".$dep."</option>";
		}
	}
	else
		echo "<option value=\"-1\" selected>".$sel_lst_unknown."</option>";
	?>
	</select>
	 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	 <span id="attn1"></span><span id="msg1" style="background-color:#FF0000; color:#FFFF00; font-weight:bold"><?PHP if ((mysql_num_rows($rs)==0) AND ($td<>"del")) echo htmlspecialchars($msg1_err_type)?></span>
	<?PHP
	mysql_free_result($rs);
	mysql_close($conn);
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_ville" align="right"><?PHP echo $txt_chp_ville; ?></td>
	<td>
	<?PHP
	// Création de la liste des villes
	$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
	mysql_select_db(DBNAME);
	
	$rech="";
	if ($cge_dep<>"")
	{
		if ($cge_dep<>"-1")
		{
			$filtre=$cge_dep;
			if (($filtre == "2A") OR ($filtre == "2B"))
				$filtre = "20";
			$rech = "SELECT * FROM ".TBVILLES." WHERE `villes_dep` = '".str_majuscules($filtre)."' AND `villes_codepays`='".str_majuscules($cge_codepays)."' ORDER BY villes_nom";
		}
		else
		{
			$rech = "SELECT * FROM ".TBVILLES." WHERE `villes_codepays`='".str_majuscules($cge_codepays)."' ORDER BY villes_nom";
		}
	}
	if ($rech<>"")
		$rs = mysql_query($rech) or die(mysql_error());
	?>
	<select name="ville" size="1" id="ville">
	<?PHP
	echo "<option>".$sel_lst_ville."</option>";
	
	if ($rech<>"")
	{
		if (mysql_num_rows($rs)>0)
		{
			while ($resultat = mysql_fetch_array($rs)) 
			{
				extract($resultat);
				if ($cge_ville == $villes_id)
				{
					echo '<option value="'.$villes_id.'" selected>'.str_majuscules($villes_nom).' ('.$villes_cp.')</option>';
				}
				else
				{
					echo '<option value="'.$villes_id.'">'.str_majuscules($villes_nom).' ('.$villes_cp.')</option>';
				}
			}
		}
	}
	?>
	</select>
	 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	 <span id="attn2"></span><span id="msg2" style="background-color:#FF0000; color:#FFFF00; font-weight:bold"><?PHP if ($rech<>"") {if ((mysql_num_rows($rs)==0) AND ($td<>"del")) echo htmlspecialchars($msg2_err_type);}?></span>
	<?PHP
	mysql_close($conn);
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_telf" align="right"><?PHP echo $txt_chp_telf; ?><br>
	(<?PHP echo $txt_div_comment; ?>) 
	</td>
	<td>
		<input name="telf" type="text" id="telf" value="<?PHP echo $cge_telf ?>" size="20">
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>"><br>
		<input name="txttelf" type="text" id="txttelf" value="<?PHP echo htmlspecialchars($cge_txttelf) ?>" size="50">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_fax" align="right"><?PHP echo $txt_chp_fax; ?><br>
	(<?PHP echo $txt_div_comment; ?>)
	</td>
	<td>
		<input name="fax" type="text" id="fax" value="<?PHP echo $cge_fax ?>" size="20">
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>"><br>
		<input name="txtfax" type="text" id="txtfax" value="<?PHP echo htmlspecialchars($cge_txtfax) ?>" size="50">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_web" align="right"><?PHP echo $txt_chp_sweb; ?><span class="annot_petit_it">(<?PHP echo $txt_div_nopref; ?>)</span></td>
	<td>
		<input name="web" type="text" id="web" value="<?PHP echo $cge_web ?>" size="80" maxlength="200">
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_heures" align="right"><?PHP echo $txt_chp_horaires; ?></td>
	<td>
		<input name="heures" type="text" id="heures" value="<?PHP echo htmlspecialchars($cge_heures) ?>" size="80">
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td colspan="2" class="rubfrm" align="center"><?PHP echo $txt_chp_emails; ?></td> 
</tr>
<tr>
	<td class="rubfrm" id="f_email" align="right"><?PHP echo $txt_chp_emailgeneral; ?></td>
	<td>
		<input name="email" type="text" id="email" value="<?PHP echo $cge_email ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<?PHP if ($creation == 0) { ?>
		 <a href="mailto:<?PHP echo $cge_email ?>"><img src="../img/mail.png" title="<?PHP echo $alt_envemail; ?>" border ="0" align="absmiddle"></a>
		<?PHP } ?>
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>"> <span class="annot_std_it">(<?PHP echo $txt_div_ctactcli; ?>)</span>
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_emaild" align="right"><?PHP echo $txt_chp_emaildir; ?></td>
	<td>
		<input name="emaild" type="text" id="emaild" value="<?PHP echo $cge_emaild ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<?PHP if ($creation == 0) { ?>
		 <a href="mailto:<?PHP echo $cge_emaild ?>"><img src="../img/mail.png" title="<?PHP echo $alt_envemail; ?>" border ="0" align="absmiddle"></a>
		<?PHP } ?>
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_emailc" align="right"><?PHP echo $txt_chp_emailcptafin; ?></td>
	<td>
		<input name="emailc" type="text" id="emailc" value="<?PHP echo $cge_emailc ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<?PHP if ($creation == 0) { ?>
		 <a href="mailto:<?PHP echo $cge_emailc ?>"><img src="../img/mail.png" title="<?PHP echo $alt_envemail; ?>" border ="0" align="absmiddle"></a>
		<?PHP } ?>
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_emailt" align="right"><?PHP echo $txt_chp_emailtech; ?></td>
	<td>
		<input name="emailt" type="text" id="emailt" value="<?PHP echo $cge_emailt ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<?PHP if ($creation == 0) { ?>
		 <a href="mailto:<?PHP echo $cge_emailt ?>"><img src="../img/mail.png" title="<?PHP echo $alt_envemail; ?>" border ="0" align="absmiddle"></a>
		<?PHP } ?>
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_emailf" align="right"><?PHP echo $txt_chp_emailfrpart; ?></td>
	<td>
		<input name="emailf" type="text" id="emailf" value="<?PHP echo $cge_emailf ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<?PHP if ($creation == 0) { ?>
		 <a href="mailto:<?PHP echo $cge_emailt ?>"><img src="../img/mail.png" title="<?PHP echo $alt_envemail; ?>" border ="0" align="absmiddle"></a>
		<?PHP } ?>
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_emaili" align="right"><?PHP echo $txt_chp_emailinvest; ?></td>
	<td>
		<input name="emaili" type="text" id="emaili" value="<?PHP echo $cge_emaili ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<?PHP if ($creation == 0) { ?>
		 <a href="mailto:<?PHP echo $cge_emailt ?>"><img src="../img/mail.png" title="<?PHP echo $alt_envemail; ?>" border ="0" align="absmiddle"></a>
		<?PHP } ?>
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_emailrh" align="right"><?PHP echo $txt_chp_emailrh; ?></td>
	<td>
		<input name="emailrh" type="text" id="emailrh" value="<?PHP echo $cge_emailrh ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<?PHP if ($creation == 0) { ?>
		 <a href="mailto:<?PHP echo $cge_emailrh ?>"><img src="../img/mail.png" title="<?PHP echo $alt_envemail; ?>" border ="0" align="absmiddle"></a>
		<?PHP } ?>
		 <img src="../img/oblig.png" align="absmiddle" alt="<?PHP echo $alt_chp_oblig; ?>">
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
</tr>
<tr>
	<td class="rubfrm" id="f_nota" align="right"><?PHP echo $txt_chp_notes; ?></td>
	<td><textarea name="nota" id="nota"><?PHP echo htmlspecialchars($cge_nota) ?></textarea></td>
</tr>
</table>
<p align="center">
<input name="RAZ" type="reset" class="bton_std" id="RAZ" value="<?PHP echo $but_reinit; ?>">
<input name="submit" type="submit" class="bton_std" id="submit" value="<?PHP echo $but_enr; ?>">
</p>
</form>
<?php
include_once("pied.php");
?>
