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

Copyright (C) 2006  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
****************************************************************************************/

session_start(); 
?>
<?php if ((@$HTTP_SESSION_VARS["etat_log"] <> "connecte") or (@$HTTP_SESSION_VARS["niv_log"] <> 2)) header("Location: ../index.php") ?>
<?php include ("../inc/config.inc.php") ?>
<?php require ("../inc/func.inc.php") ?>
<?php require ("../inc/func_log.inc.php") ?>
<?php require ("../inc/fic.inc.php") ?>
<?PHP include("../inc/geoip.inc"); ?>
<?PHP
	Archivelog(@$HTTP_SESSION_VARS["code_log"]);
?>
<?php
	$td = strip_tags(trim($_GET['td']));
	$coderech = strip_tags(trim($_GET['cc']));
	$cli_dep = strip_tags(trim($_GET['dep']));
	
	$nbcontacts = 0;
	$nbcontrats = 0;

	if ($coderech <> "")
	{
		// Vérification qu'il existe bien des contacts et nombre de ceux-ci
		$nbcontacts = nb_ccli_in_cli($coderech);

		// Vérification qu'il existe bien des contrats et nombre de ceux-ci
		$nbcontrats = nb_cocl_in_cli($coderech);

		// Récupération des informations clients
		$row = lit_enr_cli($coderech);
		extract ($row);

		if ($td == "edit")
			$titre = "MISE A JOUR COMPTE CLIENT";

		if ($td == "del")
			$titre = "SUPPRESSION COMPTE CLIENT";
	}
	else
	{
		if ($td == "add")
		{
			$zc_totale = zc_age_actives();

			$cli_code = crecodesession("C");
			$cli_cpta = 0;
			$cli_pays = pays_connect($_SERVER['REMOTE_ADDR']);

			$titre = "CREATION COMPTE CLIENT";
		}
	}
?>

<!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 - ESPACE PRIVE : Fiche Client</title>

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

<!-- Feuille de style & Script pour le menu -->
<link href="../inc/menu.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../coolmenus/coolmenus4.js"></script>

<!-- Scripts Javascript pour validation des formulaires -->
<script language="JavaScript" src="../inc/validator.js"></script>

<!-- Scripts Javascript pour affichages -->
<script language="JavaScript" src="../inc/aff.js"></script>

<!-- Affichage nouvelle fenêtre pour impression -->
<script type="text/javascript">
	function lanceimp(page)
	{
	  window.open(page,'impression','width='+screen.width+' height='+screen.height);
	}
</script>

<div id="patience" style="position:absolute; width:620px; height:50px; z-index:1; left: 50px; top: 120px;">
  <table width="100%"  border="1" cellspacing="0" bordercolor="#FFFF00">
    <tr>
      <td class="titrerubrique1"><div align="center">
        <p>Merci de patienter pendant le chargement des fichiers Villes et Pays</p>
        <p><img src="../img/baratt.gif" width="350" height="11"></p>
      </div></td>
    </tr>
  </table>
</div>


<script language="JavaScript" type="text/JavaScript">
var nava = (document.layers);
var dom = (document.getElementById);
var iex = (document.all);
if (nava) { cach = document.cache }
else if (dom) { cach = document.getElementById("patience").style }
else if (iex) { cach = cache.style }
largeur = screen.width;
cach.left = Math.round((largeur/2)-200);
cach.visibility = "visible";

function cacheOff()
	{
	cach.visibility = "hidden";
	}
window.onload = cacheOff
</script>

</head>

<body>

<?php 
	include_once ("../inc/entete.php"); 
?>

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

<!-- Formulaire de demande du numéro de département (uniquement si n'existe pas) -->
<?PHP if ($cli_dep == "") { ?>
<form name="dde_dep" id="dde_dep" method="GET" action="cli_maj.php">
<p>
	  <input name="td" type="hidden" id="td" value="<?PHP echo $td ?>">
	  <input name="cc" type="hidden" id="cc" value="<?PHP echo $coderech ?>">
</p>
	<p align="center">Merci de choisir le d&eacute;partement o&ugrave; r&eacute;side ce client.</p>
	<table width="100%"  border="0">
<tr>
	<td width="20%" class="tfvNormal" id="f_dep"><div align="right">D&eacute;partement</div></td>
	<td>
		<select name="dep" size="1" id="dep">
		<?PHP
		
		// Création de la liste des départements
		
		$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
		mysql_select_db(DBNAME);
		$rs = mysql_query("SELECT * FROM ".TBDEP." ORDER BY dep_nom");
		
		$i=0;
		
		while ($resultat = mysql_fetch_array($rs)) 
		{
			extract($resultat);

			if ($i == 0)
			{
				echo "<option value=\"\" selected>-- Choisissez un département --</option>";
			}

			if (dep_in_zc($dep_num,$zc_totale) == TRUE)
			{
				$chaine_dep = $dep_nom." (".$dep_num.")";
				echo "<option value=\"".$dep_num."\">".$chaine_dep."</option>";
			}
			
			$i++;
		}
		mysql_free_result($rs);
		mysql_close($conn);
		?>
		</select>
        <span class="annot_petit_it">(D&eacute;partements couverts par les agences)</span> <img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
</table>
<p align="center">
	<input type="submit" name="Submit" value="Valider">
</p>
</form>

<script>
// form fields description structure
var a_fields = {
	'dep':{'l':'Département','r':true,'f':'integer','t':'f_dep','mx':3}
},

o_config = {
	'to_disable' : ['submit'],
	'alert' : 1
}

// validator constructor call
var v = new validator('dde_dep', a_fields, o_config);

</script>
<?PHP } ?>
<!-- Fin de formulaire de demande du numéro de département (uniquement si n'existe pas) -->

<!-- Affichage uniquement si numéro de département saisi -->
<?PHP 
if ($cli_dep <> "") 
{ 
	if (exist_age_in_dep($cli_dep) == TRUE)
	{
?>
<table width="100%"  border="0">
  <tr>
    <td width="33%"><strong>
    <?PHP if (($td == "edit") AND ($cli_ste <> ""))
	{
	  $url_ccli = "ccli_maj.php?td=add&cc=".$cli_code."&page=1";
	?>
      <a href="javascript:;" onclick="fensaisie('<?PHP echo $url_ccli; ?>',600,560,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")><img src="../img/ctacts.gif" width="22" height="22" border="0" align="absmiddle"></a>
	  <a href="javascript:;" onclick="fensaisie('<?PHP echo $url_ccli; ?>',600,560,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")> Ajouter un contact </a>
    <?PHP
	}
	?>
	</strong></td>
    <td width="33%" bgcolor="#FF0000"><div align="center"><span class="titrerubrique1">Coordonn&eacute;es</span></div></td>
    <td width="33%"><div align="right"><strong><a href="index.php">Retour &agrave; la liste</a> </strong></div></td>
  </tr>
</table>
<table width="100%"  border="0">
<tr>
	<td width="31%">
	<?PHP if (($td == "edit") AND ($nbcontacts <> 0))
	{
		$url_ccli = "ccli_maj.php?td=edit&cc=".$cli_code."&page=1";
	?>
		<a href="javascript:;" onclick="fensaisie('<?PHP echo $url_ccli; ?>',600,560,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")><img src="../img/view.gif" width="22" height="22" border="0" align="absmiddle"></a>
		<a href="javascript:;" onclick="fensaisie('<?PHP echo $url_ccli; ?>',600,560,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")> Voir /MAJ contacts (<?PHP echo sprintf ("%'03s",$nbcontacts);?>) </a>
	<?PHP
	}
	?>
	</td>
	<td width="39%" valign="top">
		<div align="center">
		<span class="annot_gras_it">
		(<img src="../img/oblig.gif" width="10" height="11"> : Saisie obligatoire)
		</span>
		</div>
	</td>
	<td width="30%">&nbsp;
	
	</td>
</tr>
</table>

<table width="100%"  border="0">
<tr>
	<td width="31%">
	<?PHP if (($td == "edit") AND ($nbcontrats <> 0))
	{
		$url_coclh = "coclhd_lst.php?or=cli&cc=".$cli_code;
	?>
		<a href="javascript:;" onclick="fensaisie('<?PHP echo $url_coclh; ?>',800,560,'status=no,scrollbars=yes,menubar=no,statusbar=no,location=no,locationbar=no');")><img src="../img/view.gif" width="22" height="22" border="0" align="absmiddle"></a> <a href="javascript:;" onclick="fensaisie('<?PHP echo $url_coclh; ?>',800,560,'status=no,scrollbars=yes,menubar=no,statusbar=no,location=no,locationbar=no');")> Historiques contrats (<?PHP echo sprintf ("%'03s",$nbcontrats);?>) </a>
	<?PHP
	}
	?>
	</td>
	<td width="39%" valign="top">&nbsp;</td>
	<td width="30%">&nbsp;</td>
</tr>
</table>

<form name="cli_maj" method="post" action="cli_enr.php" onsubmit="return v.exec()">
	<input name="titre" type="hidden" id="titre" value="<?PHP echo $titre ?>">
	<input name="typdde" type="hidden" id="typdde" value="<?PHP echo $td ?>">
	<input name="notaa" type="hidden" id="notaa" value="<?PHP echo $cli_notaa ?>">
	<?PHP if ($td == "add") ?>
		<input name="code" type="hidden" id="code" value="<?PHP echo $cli_code ?>">
<?PHP if ($td <> "add") {?>
<table width="800"  border="0">
<tr>
	<td width="16%" class="tfvNormal" id="f_codecli"><div align="right">Code Client</div></td>
	<td width="84%">
		<input name="code" type="text" id="code" value="<?PHP echo $cli_code ?>" readonly="1">
	</td>
</tr>
</table>
<?PHP }  ?>

<table width="800"  border="0">
<tr>
	<td class="tfvNormal" id="f_typ"><div align="right">Type</div></td>
	<td>
		<?PHP 
		if ($td == "add")
		{ 
			echo "<select name=\"typ\" size=\"1\" id=\"typ\">";
			echo "<option value=\"\" selected>-- Choisissez pourquoi vous créez ce client --</option>";
			for ($i=0; $i<3; $i++)
			{
				echo "<option value=\"".$i."\">".$typ_client[$i]."</option>";
			}
			echo "</select>";
		?>
			<img src="../img/oblig.gif" width="10" height="11">
		<?PHP
		}

		if (($td == "edit") OR ($td == "del"))
		{ 
			if ($cli_type <> 2)
			{
				echo "<select name=\"typ\" size=\"1\" id=\"typ\">";
				for ($i=0; $i<3; $i++)
				{
					if ($i == 0)
					{
						if ($cli_type <> "")
							echo "<option value=\"\">-- Choisissez pourquoi vous créez ce client --</option>";
						else
							echo "<option value=\"\" selected>-- Choisissez pourquoi vous créez ce client --</option>";
					}
					
					if ($i == $cli_type)
						echo "<option value=\"".$i."\" selected>".$typ_client[$i]."</option>";
					else
						echo "<option value=\"".$i."\">".$typ_client[$i]."</option>";
				}
				echo "</select>";
			?>
				<img src="../img/oblig.gif" width="10" height="11">
			<?PHP
			}
			else
			{
			?>
				<input name="typ" type="text" id="type" value="<?PHP echo $typ_client[$cli_type] ?>" readonly="1">		
			<?PHP
			}
		}
		?>
	</td>
</tr>
<tr>
	<td width="16%" class="tfvNormal" id="f_cat"><div align="right">Cat&eacute;gorie</span></div></td>
	<td width="84%">
		<select name="cat" size="1" id="cat">
		<?PHP
		
		// Création de la liste des catégories
		
		$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
		mysql_select_db(DBNAME);
		$rs = mysql_query("SELECT * FROM ".TBCCAT." ORDER BY cat_desc");

		$i=0;
	
		while ($resultat = mysql_fetch_array($rs)) 
		{
			extract($resultat);

			if ($i == 0)
			{
				if ($cli_cat <> "")
					echo "<option value=\"\">-- Choisissez une catégorie --</option>";
				else
					echo "<option value=\"\" selected>-- Choisissez une catégorie --</option>";
			}

			if ($cli_cat == $cat_code)
			{
				echo '<option value="'.$cat_code.'" selected>'.$cat_desc.'</option>';
			}
			else
			{
				echo '<option value="'.$cat_code.'">'.$cat_desc.'</option>';
			}

			$i++;
		}
		mysql_free_result($rs);
		mysql_close($conn);
		?>
		</select>
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td width="16%" class="tfvNormal" id="f_ste"><div align="right">Soci&eacute;t&eacute;</div></td>
	<td width="84%">
		<input name="ste" type="text" id="ste" value="<?PHP echo $cli_ste ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();">
	</td>
</tr>
<tr>
  <td class="tfvNormal" id="f_rcs"><div align="right">RCS</div></td>
  <td><input name="rcs" type="text" id="rcs" value="<?PHP echo $cli_rcs ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();"></td>
</tr>
<tr>
	<td width="16%" class="tfvNormal" id="f_civil"><div align="right">Civilit&eacute;</div></td>
	<td width="84%">
		<select name="civil" size="1" id="civil">
		<?PHP
		
		// Création de la liste des civilités
		
		$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
		mysql_select_db(DBNAME);
		$rs = mysql_query("SELECT * FROM ".TBCIV." ORDER BY civ_desc");
		
		$i=0;
		
		while ($resultat = mysql_fetch_array($rs)) 
		{
			extract($resultat);

			if ($i == 0)
			{
				if ($cli_civilite <> "")
					echo "<option value=\"\">-- Choisissez une civilité --</option>";
				else
					echo "<option value=\"\" selected>-- Choisissez une civilité --</option>";
			}

			if ($cli_civilite == $civ_code)
			{
				echo '<option value="'.$civ_code.'" selected>'.$civ_desc.'</option>';
			}
			else
			{
				echo '<option value="'.$civ_code.'">'.$civ_desc.'</option>';
			}

			$i++;
		}
		mysql_free_result($rs);
		mysql_close($conn);
		?>
		</select>
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_prenom"><div align="right">Pr&eacute;nom</div></td>
	<td>
		<input name="prenom" type="text" id="prenom" value="<?PHP echo $cli_prenom ?>" size="50" maxlength="50">
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_nom"><div align="right">Nom</div></td>
	<td>
		<input name="nom" type="text" id="nom" value="<?PHP echo $cli_nom ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toUpperCase();">
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_adr1"><div align="right">Adresse(1)</div></td>
	<td>
		<input name="adr1" type="text" id="adr1" value="<?PHP echo $cli_adr1 ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toUpperCase();">
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_adr2"><div align="right">Adresse(2)</div></td>
	<td>
		<input name="adr2" type="text" id="adr2" value="<?PHP echo $cli_adr2 ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toUpperCase();">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_dep"><div align="right">D&eacute;partement</div></td>
	<td>
		<input name="dep" type="text" id="dep" value="<?PHP echo $cli_dep ?>" size="3" maxlength="3" readonly="1">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_ville"><div align="right">Ville</div></td>
	<td>
		<select name="ville" size="1" id="ville">
		<?PHP
		
		// Création de la liste des villes
		
		$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
		mysql_select_db(DBNAME);
		$rs = mysql_query("SELECT * FROM ".TBVILLES." WHERE `villes_cp` LIKE '".$cli_dep."%' ORDER BY villes_nom");
		
		$i=0;
		
		while ($resultat = mysql_fetch_array($rs)) 
		{
			extract($resultat);

			if ($i == 0)
			{
				if ($cli_ville <> "")
					echo "<option value=\"\">-- Choisissez une ville --</option>";
				else
					echo "<option value=\"\" selected>-- Choisissez une ville --</option>";
			}

			if ($cli_ville == $villes_insee)
			{
				echo '<option value="'.$villes_insee.'" selected>'.str_majuscules($villes_nom).' ('.$villes_cp.')</option>';
			}
			else
			{
				echo '<option value="'.$villes_insee.'">'.str_majuscules($villes_nom).' ('.$villes_cp.')</option>';
			}

			$i++;
		}
		mysql_free_result($rs);
		mysql_close($conn);
		?>
		</select>
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_pays"><div align="right">Pays</div></td>
	<td>
		<select name="pays" size="1" id="pays">
	<?PHP
		
		// Création de la liste des pays
		
		$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
		mysql_select_db(DBNAME);
		$rs = mysql_query("SELECT * FROM ".TBPAYS." ORDER BY pays_nom");
		
		$i=0;
		
		while ($resultat = mysql_fetch_array($rs)) 
		{
			extract($resultat);

			if ($i == 0)
			{
				if ($cli_pays <> "")
					echo "<option value=\"\">-- Choisissez un pays --</option>";
				else
					echo "<option value=\"\" selected>-- Choisissez un pays --</option>";
			}

			if ($cli_pays == $pays_nom)
			{
				echo '<option value="'.$pays_nom.'" selected>'.$pays_nom.'</option>';
			}
			else
			{
				echo '<option value="'.$pays_nom.'">'.$pays_nom.'</option>';
			}

			$i++;
		}
		mysql_free_result($rs);
		mysql_close($conn);
		?>
		</select>
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_telf"><div align="right">T&eacute;l&eacute;phone Fixe </div></td>
	<td>
		<input name="telf" type="text" id="telf" value="<?PHP echo $cli_telf ?>" size="20" maxlength="20">
		<img src="../img/oblig.gif" width="10" height="11">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_fax"><div align="right">T&eacute;l&eacute;copieur</div></td>
	<td>
		<input name="fax" type="text" id="fax" value="<?PHP echo $cli_fax ?>" size="20" maxlength="20">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_telp"><div align="right">Portable</div></td>
	<td>
		<input name="telp" type="text" id="telp" value="<?PHP echo $cli_telp ?>" size="20" maxlength="20">
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_email"><div align="right">Email</div></td>
	<td>
		<input name="email" type="text" id="email" value="<?PHP echo $cli_email ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
		<img src="../img/oblig.gif" width="10" height="11">
		<?PHP if ($td == "edit") { ?>
			<a href="mailto:<?PHP echo $cli_email ?>"><img src="../img/mail.png" width="22" height="22" title="Envoyer e-mail" border="0" align="absmiddle"></a>
		<?PHP } ?>
	</td>
</tr>
<tr>
	<td class="tfvNormal" id="f_mess"><div align="right">Messagerie</div></td>
	<td>
		<input name="mess" type="text" id="mess" value="<?PHP echo $cli_mess ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toLowerCase();">
	</td>
</tr>
<tr>
	<td height="37" class="tfvNormal" id="f_cpta"><div align="right">Comptabilit&eacute;</div></td>
	<td>
		<input name="cpta" type="text" id="cpta" value="<?PHP echo $cli_cpta ?>" size="2" maxlength="2" readonly="1">
		<br>
		<span class="annot_std_it"><em>0 : Aucun probl&egrave;me / 1 : A surveiller / 2 : Relanc&eacute; / 3 : Bloqu&eacute; </em></span>
	</td>
</tr>
</table>

<p align="center">
	<?PHP if (($td == "edit") or ($td == "add")) 
	{ ?>
		<input name="RAZ" type="reset" id="RAZ" value="R&eacute;initialiser">
		<input name="submit" type="submit" id="submit" value="Enregistrer">
		<?PHP if ($cli_cpta <> 3){?>
			<input name="int" type="submit" id="int" value="Enregistrer & Saisir Intervention">
		<?PHP
		} 
	} ?>
	<?PHP if ($td == "del") { ?>
	<input name="del" type="submit" id="del" value="Supprimer">
	<input name="annul" type="button" id="annul" value="Annuler" onclick="javascript:; history.back();">
	<?PHP } ?>
</p>
</form>

<?PHP if ($td == "del") 
{
?>

<script>
	warndelcli();
</script>

<?PHP
}
?>
  
<script>
// form fields description structure
var a_fields = {
	'typ':{'l':'Type','r':true,'t':'f_typ'},
	'cat':{'l':'Catégorie','r':true,'t':'f_cat'},
	'ste':{'l':'Société','r':false,'t':'f_ste'},
	'civil':{'l':'Civilité','r':true,'f':'alpha','t':'f_civil'},
	'prenom':{'l':'Prénom','r':true,'t':'f_prenom','mx':50},
	'nom':{'l':'Nom','r': true,'t':'f_nom','mx':50},
	'adr1':{'l':'Adresse(1)','r':true,'t':'f_adr1','mx':50},
	'adr2':{'l':'Adresse(2)','r':false,'t':'f_adr2','mx':50},
	'ville':{'l':'Ville','r':true,'t':'f_ville','mx':20},
	'pays':{'l':'Pays','r':true,'t':'f_pays','mx':20},
	'telf':{'l':'Téléphone','r':true,'f':'unsigned','t':'f_telf','mx':20},
	'fax':{'l':'Télécopie','r':false,'f':'unsigned','t':'f_fax'},
	'telp':{'l':'Portable','r':false,'f':'unsigned','t':'f_telp'},
	'email':{'l':'E-mail','r':true,'f':'email','t':'f_email','mx':50},
	'mess':{'l':'Messagerie','r':false,'f':'email','t':'f_mess','mx':50},
	'cpta':{'l':'Comptabilité','r':true,'f':'unsigned','t':'f_cpta','mx':2}
},

o_config = {
	'to_disable' : ['submit', 'RAZ'],
	'alert' : 1
}

// validator constructor call
var v = new validator('cli_maj', a_fields, o_config);

    </script>
  
<script type="text/javascript">
	warnedit(<?PHP echo $cli_cpta; ?>,"client");
</script>
<?PHP
	}
	else
	{
?>
	<div align="center">
	<span class="rubNormal">Pas d'agence g&eacute;rant ce d&eacute;partement</span>
	</div>
<?PHP 
	} 
}?>
<!-- Fin affichage uniquement si numéro de département saisi -->
  
<?php 
	include_once ("pied.php")
?>

