<?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"] <> 4) AND (@$HTTP_SESSION_VARS["niv_log"] <> 3))) header("Location: ../index.php") ?>
<?php include ("../inc/config.inc.php") ?>
<?php require ("../inc/func.inc.php") ?>
<?php require ("../inc/func_log.inc.php") ?>
<?php include ("../inc/fic.inc.php") ?>
<?PHP
	Archivelog(@$HTTP_SESSION_VARS["code_log"]);
?>
<?php
	$coderech = strip_tags(trim($_GET['code']));
	
	if ($coderech <> "")
	{
		// Récupération des informations produit
		$row = lit_enr_pdt($coderech);
		extract ($row);

		$titre = "DETAIL ARTICLE";

	}
?>

<!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 Produit</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 affichages -->
<script language="JavaScript" src="../inc/aff.js"></script>

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


</head>

<body>

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

<p align="center"> <span class="titrepage"><?PHP echo $titre ?></span></p>
<table width="100%"  border="0">
  <tr>
    <td width="33%"><strong><em><a href="pdt_lst.php?ta=m">Retour &agrave; la liste</a></em></strong></td>
    <td width="33%" bgcolor="#FF0000"><div align="center"><span class="titrerubrique1">Descriptif</span></div></td>
    <td width="33%"><div align="right"><strong><em></em> </strong></div></td>
  </tr>
</table>
<form name="pdt_maj" id="pdt_maj" method="post" action="#">
      <input name="titre" type="hidden" id="titre" value="<?PHP echo $titre ?>">

<table width="100%"  border="0">
    <tr>
      <td width="20%" class="tfvNormal" id="f_code"><div align="right">Code</div></td>
      <td>
		  <input name="code" type="text" id="code" value="<?PHP echo $pdt_code ?>" size="20" maxlength="20" readonly="1">
	  </td>
    </tr>
    <tr>
      <td width="20%" class="tfvNormal" id="f_fam"><div align="right">Famille</div></td>
      <td>
          <?PHP
				$conn = mysql_connect(DBHOST, DBUSER, DBPASS);
				mysql_select_db(DBNAME);
				$rech = "SELECT * FROM ".TBFAM." WHERE `fam_code`= '".$pdt_fam."'";
				$rs = mysql_query($rech);
				if (mysql_num_rows($rs) == 1) // Uniquement UN SEUL enregistrement !
				{
					if ($row = mysql_fetch_array($rs)) 
					{
						extract ($row);
					}
				}
				mysql_free_result($rs);
				mysql_close($conn);
			?>
		  <input name="fam" type="text" id="fam" value="<?PHP echo $fam_desc ?>" size="50" maxlength="50" readonly="1">
	  </td>
    </tr>
    <tr>
      <td width="20%" class="tfvNormal" id="f_des"><div align="right">D&eacute;signation</div></td>
      <td>
	  	<input name="des" type="text" id="des" value="<?PHP echo $pdt_des ?>" size="50" maxlength="50" readonly="1"> 
	  </td>
    </tr>
    <tr>
      <td width="20%" class="tfvNormal" id="f_pu"><div align="right">PU TTC </div></td>
      <td>
          <input name="pu" type="text" id="pu" align="right" value="<?PHP echo $pdt_puttc ?>" size="10" maxlength="10" readonly="1"> 
      </td>
    </tr>
    <tr>
      <td class="tfvNormal" id="f_vente"><div align="right">Commercialis&eacute;</div></td>
      <td>
	  	<?PHP 
			if ($pdt_vendu == TRUE)
			{
		?>
          <input name="vendu" type="text" id="vendu" value="Oui" size="3" maxlength="3" readonly="1">
		<?PHP
			}
			else
			{
		?>
          <input name="vendu" type="text" id="vendu" value="Non" size="3" maxlength="3" readonly="1">
		<?PHP
			}
		?>
		</td>
    </tr>
  </table>
  <p align="center">
    <input name="annul" type="button" id="annul" value="Retour Liste" onclick="javascript:; history.back();">
  </p>
</form>
<p>&nbsp;</p>

<?php 
	include_once ("pied.php")
?>

