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

Version 0.9.6
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
****************************************************************************************/

include ("../inc/config.inc.php");
?>
<?php require ("../inc/func.inc.php") ?>
<?php require ("../inc/func_date.inc.php") ?>
<?php require ("../inc/func_log.inc.php") ?>
<?php require ("../inc/func_txt.inc.php") ?>
<?php require ("../inc/fic.inc.php") ?>
<?php require ("../inc/lst.inc.php") ?>
<?PHP
	Archivelog(@$HTTP_SESSION_VARS["code_log"]);
?>
<?php
	$td = strip_tags(trim($_GET['td'])); // Récupération type demande
	$tr = strip_tags(trim($_GET['tr'])); // Récupération type Relevé (1 = Licence, 2 = Matériel)
	$cr = strip_tags(trim($_GET['cr'])); // Récupération code Relevé
	$id = strip_tags(trim($_GET['id'])); // Récupération code ID
	$cap = strip_tags(trim($_GET['cap'])); // Code Appelant (0 = Dossier Relevé, 1 = Fiche Relevé)

	if ($cr <> "")
	{
		if ($tr == 1)
		{
			// Récupération des informations relevé licence
			$row = lit_enr_rlic($cr);
			if (is_array($row))
				extract ($row);
				
			$datecfich = formatedate($rlic_daterel);
			$coderel = $rlic_coderel;
			$code = $rlic_code;
			$codecli = $rlic_codecli;
			$idsite = $rlic_idsite;

			// Récupération de la marque marque et du type de licence
			$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
			mysql_select_db(DBNAME);
			$rech = "SELECT * FROM ".TBRLPMA." WHERE `rlpma_code` = '".$rlic_codema."'";
			$rs = mysql_query($rech)or die(mysql_error());
			if ($row = mysql_fetch_array($rs))
				extract ($row);
			$rech = "SELECT * FROM ".TBRLTL." WHERE `rltl_code` = '".$rlic_codetl."'";
			$rs = mysql_query($rech)or die(mysql_error());
			if ($row = mysql_fetch_array($rs))
				extract ($row);
			mysql_free_result($rs);
			mysql_close($conn);

			$descr = "<b>".$rlpma_desc."</b> : ".$rlic_modele." ".$rlic_version." (".$rltl_desc.")";
		}
		
		if ($tr == 2)
		{
			// Récupération des informations relevé produit
			$row = lit_enr_rpdt($cr);
			if (is_array($row))
				extract ($row);
	
			$datecfich = formatedate($rpdt_daterel);
			$coderel = $rpdt_coderel;
			$code = $rpdt_code;
			$codecli = $rpdt_codecli;
			$idsite = $rpdt_idsite;

			// Récupération de la catégorie et de la marque
			$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
			mysql_select_db(DBNAME);
			$rech = "SELECT * FROM ".TBRPCAT." WHERE `rpcat_code` = '".$rpdt_codecat."'";
			$rs = mysql_query($rech)or die(mysql_error());
			if ($row = mysql_fetch_array($rs))
				extract ($row);
			$rech = "SELECT * FROM ".TBRLPMA." WHERE `rlpma_code` = '".$rpdt_codema."'";
			$rs = mysql_query($rech)or die(mysql_error());
			if ($row = mysql_fetch_array($rs))
				extract ($row);
			mysql_free_result($rs);
			mysql_close($conn);

			$descr = "<b>".$rpcat_desc."</b> : ".$rlpma_desc." / ".$rpdt_modele." <span class=\"annot_std_it\">(".$rpdt_ns.")<br>".$rpdt_codep." - ".$rpdt_empl."</span>";
		}

		$row = lit_enr_rel($coderel);
		if (is_array($row))
			extract ($row);

		$datedrel = formatedate($rel_datecrea);

		$row = lit_enr_rpbm($id);
		if (is_array($row))
		{
			extract ($row);
			if ($rpbm_codeint <> "")
				$td="view";
		}
		$datecreaf = formatedate($rpbm_datecrea);
		$datettf = formatedate($rpbm_datett);

		if ($td == "view")
			$titre = "VOIR DECLARATION DE PROBLEME";

		if ($td == "edit")
			$titre = "MISE A JOUR DECLARATION DE PROBLEME";

		if ($td == "del")
			$titre = "SUPPRESSION DECLARATION DE PROBLEME";

		if ($td == "add")
		{
			$rpbm_idsite=-2;
			$titre = "DECLARATION DE PROBLEME";
		}

	}

	if ($codecli <>"")
	{
			$row = lit_enr_cli($codecli);
			extract ($row);
			
			$rpbm_codecli = $codecli;
	}
?>

<!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 : D&eacute;claration de Probl&egrave;me</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 -->
<link href="../inc/menu.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../coolmenus/coolmenus4.js"></script>

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

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

<!-- Définition Javascript pour calendrier popup -->

  <!-- Feuille de Style -->
  <link rel="stylesheet" type="text/css" media="all" href="../jscal/skins/aqua/theme.css" title="Aqua" />

  <!-- Script Javascript Principal -->
  <script type="text/javascript" src="../jscal/calendar.js"></script>

  <!-- Choix du langage -->
  <script type="text/javascript" src="../jscal/lang/calendar-fr.js"></script>

  <!-- the following script defines the Calendar.setup helper function, which makes
       adding a calendar a matter of 1 or 2 lines of code. -->
  <script type="text/javascript" src="../jscal/calendar-setup.js"></script>

<!-- Fin de la définition Javascript pour calendrier popup -->

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

<!-- Fonction afficher/cacher un bloc div -->
<script type="text/javascript">
	function display(idobjet,etat)
	{
		var objet = document.getElementById(idobjet);
		etat = objet.style.display;
		if (etat == 'none')
			objet.style.display = 'block';
		else
			objet.style.display = 'none';
	}
</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 (($idsite==-1) and (td<>"view") and ($td<>"del"))
{
?>
	"nom:site ; format:liste ; req:Y ; txt:Site où le problème a été détecté ; vmn:1; stok:frmok ; stbad:frmbad",
<?PHP
}
else
{
?>
	"nom:site ; format:txt ; req:Y ; txt:Site où le problème a été détecté ; stok:frmok ; stbad:frmbad",
<?PHP
}
?>
	"nom:pbm ; format:txt ; req:Y ; txt:Problème détaillé ; stok:frmok ; stbad:frmbad",
	"nom:datecreaf ; format:date ; masque:jj-mm-aaaa ; req:Y ; txt:Détecté le ; stok:frmok ; stbad:frmbad",
	"nom:signale; format:txt ; req:Y ; txt:Signalé par ; lmx:50 ; stok:frmok ; stbad:frmbad");
</script>

</head>

<?PHP if ($td == "del"){ ?>
<body onload=warndel();>
<?PHP } else { ?>
<body>
<?PHP } ?>

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

<p align="center"> <span class="titrepage"><?PHP echo $titre ?></span></p>
<table width="100%"  border="0">
<tr>
	<td width="33%">
	<span class="annot_gras_it">
	<?PHP
	if (@$HTTP_SESSION_VARS["niv_log"] <> 1)
	{
	?>
		<a href="rel_maj.php?td=edit&cr=<?PHP echo $coderel; ?>">Retour au dossier de relev&eacute;</a></span> ou 
	<?PHP
	}
	else
	{
	?>
		<a href="rel_maj.php?td=view&cr=<?PHP echo $coderel; ?>">Retour au dossier de relev&eacute;</a></span> ou 
	<?PHP
	}
	?>
	<?PHP if ($tr == 1)
	{
		if (@$HTTP_SESSION_VARS["niv_log"] <> 1)
		{
	?>
			<span class="annot_gras_it"><a href="rlic_maj.php?td=edit&crl=<?PHP echo $code; ?>">&agrave; la fiche licence</a></span>
	<?PHP 
		}
		else
		{
	?>
			<span class="annot_gras_it"><a href="rlic_maj.php?td=view&crl=<?PHP echo $code; ?>">&agrave; la fiche licence</a></span>
	<?PHP
		}
	} 
	else
	{ 
		if (@$HTTP_SESSION_VARS["niv_log"] <> 1)
		{
	?>
			<span class="annot_gras_it"><a href="rpdt_maj.php?td=edit&crp=<?PHP echo $code; ?>">&agrave; la fiche mat&eacute;riel</a></span>
	<?PHP 
		}
		else
		{
	?>
			<span class="annot_gras_it"><a href="rpdt_maj.php?td=view&crp=<?PHP echo $code; ?>">&agrave; la fiche mat&eacute;riel</a></span>
	<?PHP
		}
	} 
	?>
    </td>
	<td width="33%" 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="33%">
	&nbsp;
	</td>
</tr>
</table>
<br>

<form name="rpbm_maj" method="post" action="rpbm_enr.php" onSubmit="javascript:; return (VForm(this,tab1_champ,''));">
<input name="titre" type="hidden" id="titre" value="<?PHP echo $titre ?>">
<input name="typdde" type="hidden" id="typdde" value="<?PHP echo $td ?>">
<input name="typrel" type="hidden" id="typrel" value="<?PHP echo $tr ?>">
<input name="coderel" type="hidden" id="coderel" value="<?PHP echo $coderel ?>">
<input name="id" type="hidden" id="id" value="<?PHP echo $id ?>">
<input name="code" type="hidden" id="code" value="<?PHP echo $code ?>">
<input name="codecli" type="hidden" id="codecli" value="<?PHP echo $rpbm_codecli ?>">
<input name="cap" type="hidden" id="cap" value="<?PHP echo $cap ?>">


<!-- Code du relevé client (affiché uniquement si édition ou suppression) -->
<table width="800"  border="0">
<tr>
	<td width="160" class="rubfrm" id="f_coderlic"><div align="right">Code fiche relev&eacute; </div></td>
	<td>
		<span class="annot_std_gras"><?PHP echo $code; ?></span>
		<span class="annot_petit_it">(Fiche de relev&eacute; cr&eacute;&eacute;e le <?PHP echo $datecfich ?>)</span>
	</td>
</tr>
</table>

<!-- N° Dossier & Date de création -->
<table width="800"  border="0">
<tr>
	<td class="annot_petit_it">
		Appartient au dossier de relev&eacute; <?PHP echo $coderel; ?>, cr&eacute;&eacute; le <?PHP echo $datedrel; ?>
	</td>
</tr>
</table>

<!-- Affichage du client -->
<table width="800"  border="0">
<tr>
	<td width="400" class="rubfrm" colspan="2"  id="f_codecli">
		<div align="center">Client</div>
	</td>
	</tr>
</table>

<!-- Détails client -->
<table width="800"  border="0">
<tr>
	<td width="370" valign="top" bgcolor="#CCFFCC">
	<?PHP
	if (($cli_ste <>"") OR ($cli_nom <> ""))
		echo "<img src=\"../img/".$ico_cpta[$cli_cpta]."\" title =\"".$mess_cpta[$cli_cpta]."\" width=\"".$hl_vign."\" height=\"".$hl_vign."\" border=\"0\" align=\"absmiddle\">";
	echo "<b>";
	if ($cli_ste <>"") 
	{
		echo $cli_ste."<br>";
		echo "<span class=\"annot_gras_it\">";
	}
	echo $cli_civilite." ".$cli_prenom." ".$cli_nom."<br>";
	if ($cli_ste <>"") 
	{
		echo "</span>";
	}
	echo "</b>";
	echo $cli_adr1."<br>";
	if ($cli_adr2 <>"") 
		echo $cli_adr2."<br>";
	echo Retournecp($cli_ville)." ".Retourneville($cli_ville)."<br>";
	echo "Tel : ".$cli_telf."<br>";
	?>
	</td>
	<td width="30" valign="top">
	<?PHP 
	if (@$HTTP_SESSION_VARS["niv_log"] >= 3)
	{
	  $url_affnotesc = "aff_notesc.php?cc=".$codecli;
	?>
	  <a href="javascript:;" onclick="fensaisie('<?PHP echo $url_affnotesc; ?>',930,380,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")><img src="../img/detail.gif" width="16" height="16" border="0" align="absmiddle"></a>
	  <a href="javascript:;" onclick="fensaisie('<?PHP echo $url_affnotesc; ?>',930,380,'status=no,scrollbars=no,menubar=no,statusbar=no,location=no,locationbar=no');")> Notes</a>
	<?PHP
	}
	else
		echo "&nbsp;";
	?>
	</td>
	</tr>
</table>

<!-- Site de déclaration du problème -->
<table width="800"  border="0">
<tr>
	<td width="160" class="rubfrm" id="f_site"><div align="right">Site</div></td>
	<td>
	<?PHP
		// On doit choisir un site précis si la fiche est notée "affectée à tous les sites"
		if (($idsite == -1) and ($td <> "view") and ($td<>"del"))  // zone modifiable si pas sorti du parc et si pas en visualisation
		{
	?>
			<select name="site" id="site">
			<option selected>-- Choisissez le site touché par ce problème --</option>
			<?PHP 
			if ($td =="add") // On ne peut déclarer "Tous les sites" que lors de la 1ère déclaration du problème
			{
			?>
			<option value="-1">Tous les sites</option>
			<?PHP
			}
			?>
			<option value="0" <?PHP if ($rpbm_idsite==0) echo "selected=\"selected\""; ?>>Site principal</option>
			<?PHP
				// Création de la liste des sites actifs
				
				$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
				mysql_select_db(DBNAME);
				$rech = "SELECT * FROM ".TBSCLI." WHERE `scli_actif` = '1' AND `scli_codecli` = '".$codecli."' ORDER BY scli_ste";
				$rs = mysql_query($rech);
			
				if (mysql_num_rows($rs) <> 0)
				{
					while ($resultat = mysql_fetch_array($rs)) 
					{
						extract($resultat);
			
						if ($scli_adr2<>"")
							$nom_site = $scli_ste." (".$scli_adr1.", ".$scli_adr2.", ".Retournecp($scli_ville)." ".Retourneville($scli_ville).")";
						else
							$nom_site = $scli_ste." (".$scli_adr1.", ".Retournecp($scli_ville)." ".Retourneville($scli_ville).")";
						if ($rpbm_idsite == $scli_id)
							echo '<option value="'.$scli_id.'" selected>'.$nom_site.'</option>';
						else
							echo '<option value="'.$scli_id.'">'.$nom_site.'</option>';
					}
				}
				mysql_free_result($rs);
			?>
			</select>
			<img src="../img/oblig.gif" width="10" height="11">
	<?PHP
		}
		else
		{
	?>
			<input name="site" type="hidden" id="site" value="<?PHP echo $idsite; ?>">
		<?PHP
			switch ($idsite)
			{
			case 0 :
			?>
					<input name="nsite" type="text" id="nsite" value="Site principal" readonly="1">
			<?PHP
				break;
			default :
					$nom_site="";
					$row=lit_enr_scli($idsite);
					if (is_array($row))
					{
						extract($row);
						if ($scli_adr2<>"")
							$nom_site = $scli_ste." (".$scli_adr1.", ".$scli_adr2.", ".Retournecp($scli_ville)." ".Retourneville($scli_ville).")";
						else
							$nom_site = $scli_ste." (".$scli_adr1.", ".Retournecp($scli_ville)." ".Retourneville($scli_ville).")";
					}
			?>
					<input name="nsite" type="text" id="nsite" value="<?PHP echo $nom_site; ?>" size="100" readonly="1">
			<?PHP
				break;
			}
		}
	?>
	</td>
</tr>
</table>

<!-- Descriptif rapide de la licence ou du produit concerné -->
<table width="800"  border="0">
<tr>
	<td width="400" class="rubfrm" colspan="2"  id="f_codecli">
		<div align="center">
		<?PHP if ($tr == 1) { ?>
			Licence Concern&eacute;e
		<?PHP }
			if ($tr == 2) { ?>
			Mat&eacute;riel Concern&eacute;
		<?PHP } ?>
		</div>
	</td>
	</tr>
</table>

<table width="800"  border="0">
<tr>
    <td width="160" valign="top" class="rubfrm">
		<div align="right">
		<?PHP if ($tr == 1) { ?>
			Licence
		<?PHP }
			if ($tr == 2) { ?>
			Mat&eacute;riel (ns)<br>
			Code - empl.
		<?PHP } ?>
		</div>
	</td>
	<td>
		<?PHP echo $descr ?>
	</td>
</tr>
</table>

<!-- Délai du problème rencontré -->
<table width="800"  border="0">
<tr>
	<td width="400" class="rubfrm" colspan="2">
		<div align="center">D&eacute;tail du probl&egrave;me rencontr&eacute; </div>
	</td>
	</tr>
</table>

<!-- Descriptif du problème -->
<table width="800"  border="0">
  <tr>
    <td width="160" valign="top" class="rubfrm" id="f_pbm"><div align="right">Probl&egrave;me d&eacute;taill&eacute;</div></td>
    <td>
	<?PHP if ($td <> "view") { ?>
		<textarea name="pbm" cols="95" rows="5" id="pbm"><?PHP echo $rpbm_pbm ?></textarea>
	  <img src="../img/oblig.gif" width="10" height="11"><br>
	  <span class="annot_petit_it">D&eacute;tailler pr&eacute;cis&eacute;mment le probl&egrave;me pour qu'il soit plus facile &agrave; r&eacute;soudre.<br>
	  S'il s'agit d'une licence, indiquer sur quel mat&eacute;riel se produit le probl&egrave;me. </span>
	<?PHP } else { ?>
		<textarea name="pbm" cols="95" rows="5" id="pbm" readonly><?PHP echo $rpbm_pbm ?></textarea>
	<?PHP } ?>
	</td>
  </tr>
</table>

<!-- Date détection -->
<table width="800"  border="0">
<tr>
	<td width="160" class="rubfrm" id="f_datecreaf"><div align="right">D&eacute;tect&eacute; le </div></td>
	<td>
		<input name="datecreaf" type="text" id="datecreaf" value="<?PHP echo $datecreaf ?>" size="10" maxlength="10" readonly="1">
		<?PHP if ($td <> "view") { ?>
		<img src="../img/calendar.png" id="f_img_datecreaf" title="Choisir votre date" width="16" height="16">
		<img src="../img/oblig.gif" width="10" height="11">
		<span class="annot_std_it">(
		<a href="javascript:;" onClick="document.rpbm_maj.datecreaf.value=''"><img src="../img/raz.gif" width="12" height="12" border="0" align="absmiddle"></a>
		<a href="javascript:;" onclick="document.rpbm_maj.datecreaf.value=''")> Annuler</a> )</span>
		<?PHP } ?>
	</td>
</tr>
</table>

<!-- Qui a détecté le problème ?-->
<table width="800"  border="0">
<tr>
	<td width="160" class="rubfrm" id="f_signale">
		<div align="right">D&eacute;t&eacute;ct&eacute; par </div>
	</td>
    <td>
	<?PHP if ($td <> "view") { ?>
		<input name="signale" type="text" id="signale" value="<?PHP echo $rpbm_signale ?>" size="50" maxlength="50"> 
	  <img src="../img/oblig.gif" width="10" height="11"><br>
	  <span class="annot_petit_it">Entrer le pr&eacute;nom et le nom de personne ayant d&eacute;tect&eacute; le probl&egrave;me. </span>
	<?PHP } else { ?>
		<input name="signale" type="text" id="signale" value="<?PHP echo $rpbm_signale ?>" size="50" maxlength="50" readonly="1"> 
	<?PHP } ?>
	</td>
</tr>
</table>

<?PHP 
if ($td <> "add") 
{
?>
<!-- Détail du traitement -->
<table width="800"  border="0">
<tr>
	<td width="400" class="rubfrm" colspan="2"  id="f_operation">
		<div align="center">Pour info : Op&eacute;ration en cours ou effectu&eacute;e</div>
	</td>
	</tr>
</table>

	<?PHP
	if ($rpbm_codeint<>"")
	{
	?>
	<!-- N° Intervention-->
	<table width="800"  border="0">
	<tr>
		<td width="160" class="rubfrm" id="f_datettf"><div align="right">N&deg; Intervention </div></td>
		<td>
			<input name="codeint" type="text" id="codeint" value="<?PHP echo $rpbm_codeint ?>" size="20" maxlength="20" readonly="1">
		</td>
	</tr>
	</table>
	
	<!-- Date traitement-->
	<table width="800"  border="0">
	<tr>
		<td width="160" class="rubfrm" id="f_datettf"><div align="right">Trait&eacute; le </div></td>
		<td>
			<input name="datettf" type="text" id="datettf" value="<?PHP echo $datettf ?>" size="10" maxlength="10" readonly="1">
		</td>
	</tr>
	</table>
	
	<!-- Travail effectué-->
	<table width="800"  border="0">
	<tr>
		<td width="160" class="rubfrm" id="f_fait"><div align="right">Travail effectu&eacute; </div></td>
		<td>
			<textarea name="fait" cols="95" rows="5" id="fait" readonly><?PHP echo $rpbm_fait ?></textarea>
		</td>
	</tr>
	</table>
	
	<!-- Intervention -->
	<table width="800"  border="0">
	<tr>
		<td width="160" class="rubfrm" id="f_codeint"><div align="right">Intervention </div></td>
		<td>
			<input name="codeint" type="text" id="codeint" value="<?PHP echo $rpbm_codeint ?>" size="20" maxlength="20" readonly="1">
		</td>
	</tr>
	</table>
	<?PHP
	}
	else
	{
	?>
		<table width="800"  border="0">
		<tr>
			<td width="400" colspan="2"  id="f_codecli">
				<div align="center">
				<span class="annot_std_it">
					Aucune intervention effectu&eacute;e.
				</span>
				</div>
			</td>
			</tr>
		</table>
	<?PHP
	}
	?>

<?PHP
} 
?>

<p align="center">
<?PHP 
if (($td == "edit") or ($td == "add")) // Boutons si en édition ou création
{ 
?>
	<input name="RAZ" type="reset" id="RAZ" value="R&eacute;initialiser">
	<input name="enr" type="submit" id="enr" value="Enregistrer">
<?PHP 
} 
?>

<?PHP 
if ($td == "del") // Bouton si en mode suppression
{ 
?>
	<input name="del" type="submit" id="del" value="Supprimer">
<?PHP 
} 
?>
</p>
</form>
<?PHP
if ($td == "add")
{
?>
	  <script type="text/javascript">
		Calendar.setup({
			inputField     :    "datecreaf",     // id of the input field
			ifFormat       :    "%d-%m-%Y",      // format of the input field
			button         :    "f_img_datecreaf",  // trigger for the calendar (button ID)
			align          :    "Ll",           // alignment (defaults to "Bl")
			singleClick    :    true
		});
	</script>
<?PHP
}
?>	
<script type="text/javascript">
warnedit(<?PHP echo $cli_cpta; ?>,"cont");
</script>
