<?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/func.inc.php");
include_once("../inc/func_geo.inc.php");
include_once("../inc/func_txt.inc.php");
include_once("../inc/fic_age.inc.php");
include_once("../inc/fic_cli.inc.php");
include_once("../inc/fic_cocl.inc.php");
include_once("../inc/fic_dde.inc.php");
include_once("../inc/fic_dos.inc.php");
include_once("../inc/fic_loc.inc.php");
include_once("../inc/fic_ope.inc.php");
include_once("../inc/fic_ot.inc.php");
include_once("../inc/fic_rel.inc.php");
include_once("../inc/fic_ret.inc.php");
include_once("../inc/fic_tac.inc.php");
include_once("../inc/fic_tec.inc.php");
Archivelog(@$_SESSION["code_log"]);

$conn2 = mysql_connect(DBHOST, DBUSER, DBPASS);
mysql_select_db(DBNAME);
$rcons = "SELECT * FROM " .TBCONS;
$rscons = mysql_query($rcons) or die(mysql_error());
if (mysql_num_rows($rscons) == 1) // Uniquement UN SEUL enregistrement !
{
	if ($rowcons = mysql_fetch_array($rscons)) 
	{
		extract ($rowcons);
	}

	mysql_free_result($rscons);
	mysql_close($conn2);  
}
?>
<!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_cons_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(
	"nom:relmin ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_minip); ?> ; lmx:3 ; stok:frmok ; stbad:frmbad",
	"nom:relmax ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_maxip); ?> ; lmx:3 ; stok:frmok ; stbad:frmbad",
	"nom:rtec ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_tecs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:ntec ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_tecs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rcli ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_clis); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:ncli ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_clis); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rint ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_ints); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nint ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_ints); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rope ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_opes); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nope ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_opes); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rcon ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_cos); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:ncon ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_cos); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rdde ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_ddes); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:ndde ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_ddes); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rrel ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_drs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nrel ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_drs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rrlic ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_rlics); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nrlic ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_rlics); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rrpdt ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_rpdts); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nrpdt ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_rpdts); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rord ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_ots); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nord ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_ots); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rretp ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_prs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nretp ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_prs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rrete ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_erps); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nrete ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_erps); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rloc ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_colocs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:nloc ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_colocs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rdos ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_doss); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:ndos ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_doss); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:rtac ; format:alphanum ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_tacs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad",
	"nom:ntac ; format:unsigned ; req:Y ; txt:<?PHP echo html_entity_decode($txt_chp_tacs); ?> ; lmx:10 ; stok:frmok ; stbad:frmbad");
//-->
</script>

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

</head>
<body onLoad="metFocus();">

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

<p align="center"><span class="titrepage"><?PHP echo $titlein_numenr_maj_edit; ?></span></p>
<br/>
<form name="num_maj" method="post" action="num_enr.php" onSubmit="javascript:; return (VForm(this,tab1_champ,'','<?PHP echo $_SESSION["lng"]; ?>'));">
<table width="40%"  border="0" cellspacing="0" align="center">
<tr>
	<td colspan="3">
	<br/>
	<span class="annot_gras_it"><?PHP echo $txt_div_minmaxpco; ?></span><br />
	<span class="annot_petit_it"><?PHP echo $txt_div_minpdetail; ?><br /></span>
	<span class="annot_petit_it"><?PHP echo $txt_div_maxpdetail; ?></span>
	<br /><br />
	</td>
</tr>
<tr>
	<td  class="rubfrm" id="f_relmin" align="right"><?PHP echo $txt_chp_minip; ?></td>
	<td colspan="2">
		<input name="relmin" type="text" id="relmin" value="<?PHP echo $cons_relmin ?>" size="10">
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_relmax" align="right"><?PHP echo $txt_chp_maxip; ?></td>
	<td colspan="2">
		<input name="relmax" type="text" id="relmax" value="<?PHP echo $cons_relmax ?>" size="10">
	</td>
</tr>
<tr>
	<td colspan="3">
		<br /><br />
		<span class="annot_gras_it"><?PHP echo $txt_div_radndetail; ?></span><br />
		<span class="annot_petit_it"><?PHP echo $txt_div_radndetail2; ?></span>
		<br /><br />
	</td>
</tr>
<tr>
	<td align="center" class="annot_gras_it"><?PHP echo $tab_ent_typnum; ?></td>
	<td align="center" class="annot_gras_it" width="80"><?PHP echo $tab_ent_rad; ?></td>
	<td align="center" class="annot_gras_it" width="80"><?PHP echo $tab_ent_num; ?></td>
</tr>
<tr>
	<td class="rubfrm" id="f_ntec" align="right"><?PHP echo $txt_chp_tecs; ?></td>
	<td>
		<input name="rtec" type="text" id="rtec" value="<?PHP echo $cons_rtec ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_tec("") == 0)
	{
	?>
		<input name="ntec" type="text" id="ntec" value="<?PHP echo $cons_ntec ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="ntec" type="text" id="ntec" value="<?PHP echo $cons_ntec ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" id="f_ncli" align="right"><?PHP echo $txt_chp_clis; ?></td>
	<td>
        <input name="rcli" type="text" id="rcli" value="<?PHP echo $cons_rcli ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_cli("") == 0)
	{
	?>
		<input name="ncli" type="text" id="ncli" value="<?PHP echo $cons_ncli ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="ncli" type="text" id="ncli" value="<?PHP echo $cons_ncli ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nint"><?PHP echo $txt_chp_ints; ?></td>
	<td>
        <input name="rint" type="text" id="rint" value="<?PHP echo $cons_rint ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_int("") == 0)
	{
	?>
		<input name="nint" type="text" id="nint" value="<?PHP echo $cons_nint ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nint" type="text" id="nint" value="<?PHP echo $cons_nint ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nope"><?PHP echo $txt_chp_opes; ?></td>
	<td>
		<input name="rope" type="text" id="rope" value="<?PHP echo $cons_rope ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_ope() == 0)
	{
	?>
		<input name="nope" type="text" id="nope" value="<?PHP echo $cons_nope ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nope" type="text" id="nope" value="<?PHP echo $cons_nope ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_ncon"><?PHP echo $txt_chp_cos; ?></td>
	<td>
		<input name="rcon" type="text" id="rcon" value="<?PHP echo $cons_rcon ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_cocl("") == 0)
	{
	?>
		<input name="ncon" type="text" id="ncon" value="<?PHP echo $cons_ncon ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="ncon" type="text" id="ncon" value="<?PHP echo $cons_ncon ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_ncon"><?PHP echo $txt_chp_cds; ?></td>
	<td>
		<input name="rcer" type="text" id="rcer" value="<?PHP echo $cons_rcer ?>" size="10">
	</td>
	<td><input name="ncer" type="text" id="ncer" value="<?PHP echo $cons_ncer ?>" size="10"></td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_ndde"><?PHP echo $txt_chp_ddes; ?></td>
	<td>
		<input name="rdde" type="text" id="rdde" value="<?PHP echo $cons_rdde ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_dde() == 0)
	{
	?>
		<input name="ndde" type="text" id="ndde" value="<?PHP echo $cons_ndde ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="ndde" type="text" id="ndde" value="<?PHP echo $cons_ndde ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrel"><?PHP echo $txt_chp_drs; ?></td>
	<td>
		<input name="rrel" type="text" id="rrel" value="<?PHP echo $cons_rrel ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_rela("") == 0)
	{
	?>
		<input name="nrel" type="text" id="nrel" value="<?PHP echo $cons_nrel ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nrel" type="text" id="nrel" value="<?PHP echo $cons_nrel ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrlic"><?PHP echo $txt_chp_rlics; ?></td>
	<td>
		<input name="rrlic" type="text" id="rrlic" value="<?PHP echo $cons_rrlic ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_rlica("") == 0)
	{
	?>
		<input name="nrlic" type="text" id="nrlic" value="<?PHP echo $cons_nrlic ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nrlic" type="text" id="nrlic" value="<?PHP echo $cons_nrlic ?>" size="10">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrpdt"><?PHP echo $txt_chp_rpdts; ?></td>
	<td>
	<input name="rrpdt" type="text" id="rrpdt" value="<?PHP echo $cons_rrpdt ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_rpdta("") == 0)
	{
	?>
		<input name="nrpdt" type="text" id="nrpdt" value="<?PHP echo $cons_nrpdt ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nrpdt" type="text" id="nrpdt" value="<?PHP echo $cons_nrpdt ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrord"><?PHP echo $txt_chp_ots; ?></td>
	<td>
		<input name="rord" type="text" id="rord" value="<?PHP echo $cons_rord ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_ot("") == 0)
	{
	?>
		<input name="nord" type="text" id="nord" value="<?PHP echo $cons_nord ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nord" type="text" id="nord" value="<?PHP echo $cons_nord ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nretp"><?PHP echo $txt_chp_prs; ?></td>
	<td>
		<input name="rretp" type="text" id="rretp" value="<?PHP echo $cons_rretp ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_retp("") == 0)
	{
	?>
		<input name="nretp" type="text" id="nretp" value="<?PHP echo $cons_nretp ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nretp" type="text" id="nretp" value="<?PHP echo $cons_nretp ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrete"><?PHP echo $txt_chp_erps; ?></td>
	<td>
		<input name="rrete" type="text" id="rrete" value="<?PHP echo $cons_rrete ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_rete("") == 0)
	{
	?>
		<input name="nrete" type="text" id="nrete" value="<?PHP echo $cons_nrete ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nrete" type="text" id="nrete" value="<?PHP echo $cons_nrete ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrloc"><?PHP echo $txt_chp_colocs; ?></td>
	<td>
		<input name="rloc" type="text" id="rloc" value="<?PHP echo $cons_rloc ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_coloc() == 0)
	{
	?>
		<input name="nloc" type="text" id="nloc" value="<?PHP echo $cons_nloc ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="nloc" type="text" id="nloc" value="<?PHP echo $cons_nloc ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrdos"><?PHP echo $txt_chp_doss; ?></td>
	<td>
		<input name="rdos" type="text" id="rdos" value="<?PHP echo $cons_rdos ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_dos() == 0)
	{
	?>
		<input name="ndos" type="text" id="ndos" value="<?PHP echo $cons_ndos ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="ndos" type="text" id="ndos" value="<?PHP echo $cons_ndos ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</td>
</tr>
<tr>
	<td class="rubfrm" align="right" id="f_nrtac"><?PHP echo $txt_chp_tacs; ?></td>
	<td>
		<input name="rtac" type="text" id="rtac" value="<?PHP echo $cons_rtac ?>" size="10">
	</td>
	<td>
	<?PHP
	if (nb_tac(0,'',TRUE) == 0)	{
	?>
		<input name="ntac" type="text" id="ntac" value="<?PHP echo $cons_ntac ?>" size="10">
	<?PHP
	}
	else
	{
	?>
		<input name="ntac" type="text" id="ntac" value="<?PHP echo $cons_ntac ?>" size="10" readonly="1">
	<?PHP
	}
	?>
	</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");
?>
