<?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 include ("../inc/func_txt.inc.php") ?>
<?php require ("../inc/fic.inc.php") ?>
<?php require ("../inc/lst.inc.php") ?>
<?PHP include("../inc/geoip.inc"); ?>
<?PHP
	Archivelog(@$HTTP_SESSION_VARS["code_log"]);
?>
<?php
	$codecli = strip_tags(trim(@$_GET['cc']));
	$id = strip_tags(trim(@$_GET['id']));
	$td = strip_tags(trim(@$_GET['td']));
	$scli_dep = strip_tags(trim($_GET['dep']));
		
	$pbm_scli=FALSE;

	if ($codecli <> "")
	{
		$row = lit_enr_cli($codecli);
		if (is_array($row))
			extract ($row);
			
		if (($td<>"add") AND ($td<>"edit") AND ($td<>"del"))
			$td="lst";
		
		// Contrôle qu'une agence n'essaye pas de "hacker" un client
		if ((@$HTTP_SESSION_VARS["niv_log"] == 4) OR (@$HTTP_SESSION_VARS["niv_log"] == 3))
		{
			if (($cli_prop <> @$HTTP_SESSION_VARS["code_age"]) AND ($cli_prop <> NULL))
			{
				$pbm_scli = TRUE;
			}
		}

		if ($td == "lst")
			$titre = "LISTE SITES CLIENT";

		if ($td == "add")
		{
			$titre = "CREATION SITE CLIENT";
			$scli_pays = pays_connect($_SERVER['REMOTE_ADDR']);
		}

		if ($td == "edit")
		{
			$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
			mysql_select_db(DBNAME);
			$rech = "SELECT * FROM " .TBSCLI. " WHERE scli_id = '$id' AND scli_codecli='$codecli'";
			$rs = mysql_query($rech)or die(mysql_error());
			if (mysql_num_rows($rs) <> 1)
			{
				$pbm_scli=TRUE;
			}
			else
			{
				if ($row = mysql_fetch_array($rs))
				{
					extract($row);
				}
			}
			mysql_free_result($rs);
			mysql_close($conn);

			$titre = "EDITER SITE CLIENT";
		}

		if ($td == "del")
		{
			$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
			mysql_select_db(DBNAME);
			$rech = "SELECT * FROM " .TBSCLI. " WHERE scli_id = '$id' AND scli_codecli='$codecli'";
			$rs = mysql_query($rech)or die(mysql_error());
			$totalccli = mysql_num_rows($rs);
			if (mysql_num_rows($rs) <> 1)
			{
				$pbm_scli=TRUE;
			}
			else
			{
				if ($row = mysql_fetch_array($rs))
				{
					extract($row);
				}
			}
			mysql_free_result($rs);
			mysql_close($conn);

			$titre = "SUPPRIMER SITE CLIENT";
		}
	}
	else
	{
		$pbm_scli=TRUE;
	}
?>

<!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 : Sites Client</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 contrôle de formulaire -->
<script	type="text/javascript" src="../jscript/vform/vform.js"></script>

<script language="javascript">
var tab1_champ=new Array(
	"nom:dep ; format:liste ; req:Y ; txt:Département ; vmn:1 ; stok:frmok ; stbad:frmbad");
var tab2_champ=new Array(
	"nom:ste ; format:txt ; req:Y ; txt:Société ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:adr1 ; format:txt ; req:Y ; txt:Adresse(1) ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:adr2 ; format:txt ; req:N ; txt:Adresse(2) ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:ville ; format:liste ; req:Y ; txt:Ville; vmn:1; stok:frmok ; stbad:frmbad",
	"nom:pays ; format:liste ; req:Y ; txt:Pays; vmn:1; stok:frmok ; stbad:frmbad",
	"nom:telf ; format:tel_fr ; req:Y ; txt:Téléphone Fixe; stok:frmok ; stbad:frmbad",
	"nom:fax ; format:tel_fr ; req:N ; txt:Télécopieur; stok:frmok ; stbad:frmbad",
	"nom:email ; format:mail ; req:Y ; txt:Email ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:rcivil ; format:liste ; req:Y ; txt:Civilité (Contact) ; vmn:1; stok:frmok ; stbad:frmbad",
	"nom:rprenom ; format:txt ; req:Y ; txt:Prénom (Contact) ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:rnom ; format:txt ; req:Y ; txt:Nom (Contact) ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:rtelf ; format:tel_fr ; req:Y ; txt:Téléphone Fixe (Contact) ; lmx:20 ; stok:frmok ; stbad:frmbad",
	"nom:rfax ; format:tel_fr ; req:N ; txt:Télécopieur (Contact) ; lmx:20 ; stok:frmok ; stbad:frmbad",
	"nom:rtelp ; format:telp_fr ; req:N ; txt:Téléphone Portable (Contact) ; lmx:20 ; stok:frmok ; stbad:frmbad",
	"nom:remail ; format:mail ; req:Y ; txt:Email (Contact) ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:rfunc ; format:txt ; req:N ; txt:Fonction (Contact) ; lmx:50; stok:frmok ; stbad:frmbad",
	"nom:nota; format:txt ; req:N ; txt:Notes; stok:frmok ; stbad:frmbad");
</script>


</head>

<body>

<?PHP
if ($pbm_scli==FALSE)
{
?>
	<p align="center"> <span class="titrepage"><?PHP echo $titre ?></span></p>
	<p align="center"><span class="titre_gras">Pour le client : <?php echo $cli_ste; ?> </span></p>
	<?PHP if ($td=="lst")
	{
		$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
		mysql_select_db(DBNAME);
		$rech = "SELECT * FROM `" .TBSCLI. "` WHERE `scli_codecli`= '".$codecli."' ORDER BY scli_ste";
		
		$rs = mysql_query($rech);
		
		if (mysql_num_rows($rs) <> 0)
		{
		
			echo "<table class=\"MtableD\" border=\"0\" width=\"890\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\n";
			 
			// Création de l'entête de la table "sites secondaires"
			echo "<th>";
			echo "Coordonn&eacute;es";
			echo "</th>\n";
			echo "<th>";
			echo "Tel/Fax";
			echo "</th>\n";
			echo "<th>";
			echo "Contact";
			echo "</th>\n";
			echo "<th>";
			echo "Créé le";
			echo "</th>\n";
			echo "<th>";
			echo "Cliquer";
			echo "</th>\n";
			
			$j = 0;
			
			while ($row = mysql_fetch_assoc($rs)) 
			{         
				// Création de l'entête de ligne (TR)
				creetrlstdet($j);
				
				echo "<td>\n";
				echo $row["scli_ste"];
				echo "<br>";
				echo $row["scli_adr1"];
				echo "<br>";
				if ($row["scli_adr2"]<>"")
				{
					echo $row["scli_adr2"];
					echo "<br>";
				}
				echo Retournecp($row["scli_ville"])." ".Retourneville($row["scli_ville"])."<br>";
				echo "</td>\n";
				echo "<td align=\"center\">\n";
				echo "T.".$row["scli_telf"];
				if ($row["scli_fax"]<>"")
				{
					echo"<br>";
					echo "F.".$row["scli_fax"];
				}
				echo "<td align=\"center\">\n";
				echo $row["scli_rcivil"]." ".$row["scli_rprenom"]." ".$row["scli_rnom"];
				echo "<br>";
				echo "T.".$row["scli_rtelf"];
				if ($row["scli_rfax"]<>"")
				{
					echo "<br>";
					echo "F.".$row["scli_rfax"];
				}
				if ($row["scli_rtelp"]<>"")
				{
					echo "<br>";
					echo "P.".$row["scli_rtelp"];
				}
				echo "</td>\n";
				echo "<td align=\"center\">\n";
				echo formatedate($row["scli_datecrea"]);
				echo "</td>\n";
				echo "<td align=\"center\">\n";
				$lst_maj = TRUE;
		
				echo "<a href=\"scli_maj.php?td=edit&cc=".$codecli."&id=".$row["scli_id"]."&dep=".$row["scli_dep"]."\"><img src=\"../img/edit.png\" width=\"".$hl_vign."\" height=\"".$hl_vign."\" border=\"0\" align=\"absmiddle\"></a>";
				echo " ";
		
				$lst_del = TRUE;
		
				echo "<a href=\"scli_maj.php?td=del&cc=".$codecli."&id=".$row["scli_id"]."&dep=".$row["scli_dep"]."\"><img src=\"../img/del.gif\" width=\"".$hl_vign."\" height=\"".$hl_vign."\" border=\"0\" align=\"absmiddle\"></a>";
				echo "</td>\n";
		
				echo "</tr>\n";
			
				$j++;
			}
			
			echo "</table>\n";
			// Fin affichage table liste sites
			
		}
		else
		{
		?>
			<p class="annot_petit_it">Aucun site client enregistr&eacute; </p>
		<?PHP
		}
		mysql_free_result($rs);
		
		$taille_piedla="";
		include_once ("piedla.php"); 
	?>
		<p align="center">
		<input name="add" type="button" id="add" value="Ajouter" onClick="javascript:; window.location=('scli_maj.php?cc=<?PHP echo $codecli; ?>&td=add');">
		<input name="quit" type="button" id="quit" value="Quitter" onClick="javascript:; self.close('fscomp');">
		</p>
	<?PHP
	}
	else
	{
	?>
		<?PHP 
		if ($scli_dep == "") 
		{ 
		?>
			<!-- Formulaire de demande du numéro de département (uniquement si n'existe pas) -->
			<form name="dde_dep" id="dde_dep" method="GET" action="scli_maj.php" onSubmit="javascript:; return (VForm(this,tab1_champ,''));">
			<p>
				  <input name="td" type="hidden" id="td" value="<?PHP echo $td ?>">
				  <input name="cc" type="hidden" id="cc" value="<?PHP echo $codecli ?>">
			</p>
				<p align="center">Merci de choisir le d&eacute;partement o&ugrave; se trouve ce site.</p>
				<table width="100%"  border="0">
			<tr>
				<td width="20%" class="rubfrm" id="f_dep"><div align="right">D&eacute;partement</div></td>
				<td>
					<select name="dep" size="1" id="dep">
					<?PHP
					
					echo "<option>-- Choisissez un département --</option>";
			
					// 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_num");
					
					while ($resultat = mysql_fetch_array($rs)) 
					{
						extract($resultat);
						$chaine_dep = $dep_num." (".$dep_nom.")";
						echo "<option value=\"".$dep_num."\">".$chaine_dep."</option>";
					}
					mysql_free_result($rs);
					mysql_close($conn);
					?>
					</select>
				</td>
			</tr>
			</table>
			<p align="center">
				<input type="submit" name="Submit" value="Valider">
			</p>
			</form>
			<!-- Fin de formulaire de demande du numéro de département (uniquement si n'existe pas) -->
		<?PHP 
		} 
		else
		{ 
		?>
			<!-- Affichage uniquement si numéro de département saisi -->
			<form name="scli_maj" method="post" action="scli_enr.php" onSubmit="javascript:; return (VForm(this,tab2_champ,''));">
				<input name="titre" type="hidden" id="titre" value="<?PHP echo $titre ?>">
				<input name="id" type="hidden" id="idccli" value="<?PHP echo $id ?>">
				<input name="cc" type="hidden" id="cc" value="<?PHP echo $codecli ?>">
			  <table width="550"  border="0" align="center">
				<tr>
					<td width="16%" class="rubfrm" 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 $scli_ste ?>" size="50" onChange="javascript:this.value=this.value.toUpperCase();">
						<img src="../img/oblig.gif" width="10" height="11">
					</td>
				</tr>
				<tr>
					<td class="rubfrm" id="f_adr1"><div align="right">Adresse(1)</div></td>
					<td>
						<input name="adr1" type="text" id="adr1" value="<?PHP echo $scli_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="rubfrm" id="f_adr2"><div align="right">Adresse(2)</div></td>
					<td>
						<input name="adr2" type="text" id="adr2" value="<?PHP echo $scli_adr2 ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toUpperCase();">
					</td>
				</tr>
				<tr>
					<td class="rubfrm" id="f_dep"><div align="right">D&eacute;partement</div></td>
					<td>
						<input name="dep" type="text" id="dep" value="<?PHP echo $scli_dep ?>" size="3" maxlength="3" readonly="1">
					</td>
				</tr>				
				<tr>
					<td class="rubfrm" id="f_ville"><div align="right">Ville</div></td>
					<td>
						<select name="ville" size="1" id="ville">
						<?PHP
						
						echo "<option>-- Choisissez une ville --</option>";
				
						// Création de la liste des villes
						
						$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
						mysql_select_db(DBNAME);
						$filtre = $scli_dep;
						if (($filtre == "2A") OR ($filtre == "2B"))
							$filtre = "20";
						$rs = mysql_query("SELECT * FROM ".TBVILLES." WHERE `villes_cp` LIKE '".$filtre."%' ORDER BY villes_nom");
						
						while ($resultat = mysql_fetch_array($rs)) 
						{
							extract($resultat);
							if ($scli_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>';
							}
						}
						mysql_free_result($rs);
						mysql_close($conn);
						?>
						</select>
						<img src="../img/oblig.gif" width="10" height="11">
					</td>
				</tr>
				<tr>
					<td class="rubfrm" id="f_pays"><div align="right">Pays</div></td>
					<td>
						<select name="pays" size="1" id="pays">
					<?PHP
						
						echo "<option>-- Choisissez un pays --</option>";
				
						// 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");
						
						while ($resultat = mysql_fetch_array($rs)) 
						{
							extract($resultat);
							if ($scli_pays == $pays_nom)
							{
								echo '<option value="'.$pays_nom.'" selected>'.$pays_nom.'</option>';
							}
							else
							{
								echo '<option value="'.$pays_nom.'">'.$pays_nom.'</option>';
							}
						}
						mysql_free_result($rs);
						mysql_close($conn);
						?>
						</select>
						<img src="../img/oblig.gif" width="10" height="11">
					</td>
				</tr>
				<tr>
					<td class="rubfrm" 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 $scli_telf ?>" size="20" maxlength="20">
						<img src="../img/oblig.gif" width="10" height="11">
					</td>
				</tr>
				<tr>
					<td class="rubfrm" id="f_fax"><div align="right">T&eacute;l&eacute;copieur</div></td>
					<td>
						<input name="fax" type="text" id="fax" value="<?PHP echo $scli_fax ?>" size="20" maxlength="20">
					</td>
				</tr>
				<tr>
					<td class="rubfrm" id="f_email"><div align="right">Email</div></td>
					<td>
						<input name="email" type="text" id="email" value="<?PHP echo $scli_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 $scli_email ?>"><img src="../img/mail.png" width="22" height="22" title="Envoyer e-mail" border="0" align="absmiddle"></a>
						<?PHP } ?>
					</td>
				</tr>
				<tr>
					<td colspan="2" class="rubfrm" id="f_resp"><div align="center">Responsable du site</div></td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_rcivil"><div align="right">Civilit&eacute;</div></td>
				  <td width="84%"><select name="rcivil" size="1" id="rcivil">
					  <?PHP
							echo '<option>-- Choisir une civilité --</option>';
			
							// 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");
							while ($resultat = mysql_fetch_array($rs)) 
							{
								extract($resultat);
								if ($scli_rcivil == $civ_code)
								{
									echo '<option value="'.$civ_code.'" selected>'.$civ_desc.'</option>';
								}
								else
								{
									echo '<option value="'.$civ_code.'">'.$civ_desc.'</option>';
								}
							}
							mysql_free_result($rs);
							mysql_close($conn);
							?>
					</select>
					  <img src="../img/oblig.gif" width="10" height="11"></td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_rprenom"><div align="right">Pr&eacute;nom</div></td>
				  <td><input name="rprenom" type="text" id="rprenom" value="<?PHP echo $scli_rprenom ?>" size="50" maxlength="50">
					  <img src="../img/oblig.gif" width="10" height="11"></td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_rnom"><div align="right">Nom</div></td>
				  <td><input name="rnom" type="text" id="rnom" value="<?PHP echo $scli_rnom ?>" size="50" maxlength="50" onChange="javascript:this.value=this.value.toUpperCase();">
					  <img src="../img/oblig.gif" width="10" height="11"></td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_rtelf"><div align="right">T&eacute;l. Fixe </div></td>
				  <td><input name="rtelf" type="text" id="rtelf" value="<?PHP echo $scli_rtelf ?>" size="20" maxlength="20">
					  <img src="../img/oblig.gif" width="10" height="11"></td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_rfax"><div align="right">T&eacute;l&eacute;copieur</div></td>
				  <td><input name="rfax" type="text" id="rfax" value="<?PHP echo $scli_rfax ?>" size="20" maxlength="20"></td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_rtelp"><div align="right">Portable</div></td>
				  <td><input name="rtelp" type="text" id="rtelp" value="<?PHP echo $scli_rtelp ?>" size="20" maxlength="20">
				  </td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_remail"><div align="right">Email</div></td>
				  <td>
				  	<input name="remail" type="text" id="remail" value="<?PHP echo $scli_remail ?>" 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 $scli_remail ?>"><img src="../img/mail.png" width="22" height="22" title="Envoyer e-mail" border ="0" align="absmiddle"></a></td>
					<?PHP } ?>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_rfunc"><div align="right">Fonction</div></td>
				  <td><input name="rfunc" type="text" id="rfunc" value="<?PHP echo $scli_rfunc ?>" size="50" maxlength="50">
				  </td>
				</tr>
				<tr>
				  <td width="20%" class="rubfrm" id="f_nota"><div align="right">Notes</div></td>
				  <td><textarea name="nota" cols="50" id="nota"><?PHP echo $scli_nota ?></textarea></td>
				</tr>
				<tr>
					<td width="20%" class="rubfrm" id="f_ouvert"><div align="right">Ouvert ? </div></td>
					<td>
						<?PHP 
						if ($td == "add")
						{ 
							echo "<select name=\"actif\" size=\"1\" id=\"actif\">";
							echo "<option value=\"Oui\" selected>Oui</option>";
							echo "<option value=\"Non\">Non</option>";
							echo "</select>";
						}
						
						if (($td == "edit") OR ($td == "del"))
						{ 
							if ($scli_actif == TRUE)
							{
								echo "<select name=\"actif\" size=\"1\" id=\"actif\">";
								echo "<option value=\"Oui\" selected>Oui</option>";
								echo "<option value=\"Non\">Non</option>";
								echo "</select>";
							}
							else
							{
								echo "<select name=\"actif\" size=\"1\" id=\"actif\">";
								echo "<option value=\"Oui\">Oui</option>";
								echo "<option value=\"Non\" selected>Non</option>";
								echo "</select>";
							}
						}
						?>
						<img src="../img/oblig.gif" width="10" height="11">
					</td>
				</tr>
			  </table>
			  <p align="center">
				<?PHP if (($td == "add") OR ($td=="edit")) { ?>
				<input name="RAZ" type="reset" id="RAZ" value="R&eacute;initialiser">
				<?PHP if ($td == "add") { ?>
					<input name="enr" type="submit" id="enr" value="Enregistrer">
				<?PHP } else { ?>
					<input name="mod" type="submit" id="mod" value="Modifier">
				<?PHP } ?>
				<?PHP } ?>
				<?PHP if ($td == "del") { ?>
					<input name="del" type="submit" id="del" value="Supprimer">
				<?PHP } ?>
				<input name="annul" type="button" id="annul" value="Annuler" onClick="javascript:; window.location=('scli_maj.php?cc=<?PHP echo $codecli; ?>&td=lst');">
			  </p>
			</form>
	<?PHP
		}
	}
}
else
{
?>
		<script type="text/javascript">
		self.close('fscomp');
		</script>
<?PHP
}
?>
<?PHP if ($td == "del") 
{
?>
	<script>
		warndelscli();
	</script>
<?PHP
}
?>
</body>
</html>
