<?php
 
session_start();
$com = "M";
include("DMMYSQLG.php");
include("DSA3000.php");
include("JQUERY.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php

if ($_REQUEST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=AL10300_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	if(!isset($_REQUEST['tap2'])){
		include('AL10300_CL.php');
		$varible_clase = new clase();
		$res=$varible_clase->lista_busqueda($_REQUEST["bot"]);
		$reg=mysqli_fetch_array($res);
                if(!isset($reg['id_pro']))$reg['id_pro']="";
		$_REQUEST['id_pro']=$reg['id_pro'];
		$_REQUEST['tap2']=$reg['np_desc1'];
		$_REQUEST['precio']=$reg['lim_vta1'];
		$_REQUEST['afe_inv']=$reg['afe_inv'];
		$_REQUEST['cve_iva_ven']=$reg['cve_iva_ven'];
		$_REQUEST['afe_coman']=$reg['afe_coman'];
		$_REQUEST['select']=$reg['linea'];
		$_REQUEST['select2']=$reg['gpo_basico'];
		$_REQUEST['tap4']=$reg['exi_min'];
		$_REQUEST['tap5']=$reg['exi_max'];
		$_REQUEST['tap18']=$reg['tip_mon'];
		$_REQUEST['tap14']=$reg['cve_uni_com'];
		$_REQUEST['capacidad']=$reg['capacidad'];
		$_REQUEST['tap15']=$reg['cve_uni_vta'];
		$_REQUEST['tap8']=$reg['cve_marca'];
		$_REQUEST['tap9']=$reg['cve_iva'];
		$_REQUEST['es_inv']=$reg['es_inv'];
		$_REQUEST['cos_prom']=$reg['cos_prom'];
		$_REQUEST['cod_var']=$reg['cod_var'];
		$_REQUEST['fic_tec']=$reg['fic_tec'];
		$_REQUEST['potacio']=$reg['potacio'];
		$_REQUEST['proteinas']=$reg['proteinas'];
		$_REQUEST['lipidos']=$reg['lipidos'];
		$_REQUEST['kcalorias']=$reg['kcalorias'];
		$_REQUEST['calcio']=$reg['calcio'];
		$_REQUEST['carboidratos']=$reg['carboidratos'];
		$_REQUEST['sodio']=$reg['sodio'];
		$_REQUEST['fac_rend']=$reg['fac_rend'];
		$_REQUEST['temperatura']=$reg['temperatura'];
		$_REQUEST['dias_alm']=$reg['dias_alm'];
		$_REQUEST['casillero']=$reg['casillero'];
		$_REQUEST['afe_coman']=$reg['afe_coman'];
		$_REQUEST['des_cor']=$reg['des_cor'];
		$_REQUEST['select']=$reg['t1'];
		$_REQUEST['pos_pun_ven']=$reg['pos_pun_ven'];
                if(!isset($reg['status']))$reg['status']="";
		$_REQUEST['status']=$reg['status'];
	}
?>
<style type="text/css">
<!--
.Estilo19 {font-size: 16px}
.Estilo21 {
	font-size: 11px;
	font-weight: bold;
}
-->
</style>

	
	
<body>
<form name="frm1" method="post" action="" enctype="multipart/form-data">
  <p>
    <input name="bot" type="hidden" value="<?php
 echo $_REQUEST['bot'];?>"> 
  </p>
  <p>&nbsp;</p>
  <div id="width_wrapper" align="center">
  <table width="406" border="0" align="center" bordercolor="#FFCC00" bordercolordark="#FFCC00">
    <tr>
      <td colspan="4" class="titulo">MODIFICAR UNIDAD DE MEDIDA </td>
    </tr>
    <tr>
      <th width="94" style="#FFCC00"><div align="left"><span class="Estilo21">CODIGO</span></div></th>
      <td width="302"><span class="Estilo19">
        <input name="codigo" type="text" id="codigo" size="15"
		  <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['codigo'].'"';
		}
		?>
		
		>
      </span></td>
    </tr>
  
      <tr>
        <th width="94" style="#FFCC00"><div align="left"><span class="Estilo21">DESCRIPCION</span></div></th>
        <td width="302"><label>
        <input name="tap2" id="tap2" type="text" tabindex="2"
		  onBlur="may(this)" size="30"
		 <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['np_desc1'].'"';
		}
		?>>
        </label></td>
      </tr>
      
      
      <tr>
        <th height="29" style="#FFCC00"><div align="left"><span class="Estilo21">STATUS</span></div></th>
        <td height="29"><select name="select">
          <option value="ACTIVO"<?php
 if($_REQUEST['select']=="ACTIVO") echo 'selected';?>>ACTIVO</option>
          <option value="INACTIVO"<?php
 if($_REQUEST['select']=="INACTIVO") echo 'selected';?>>INACTIVO</option>
        </select></td>
      </tr>
      <tr>
        <td height="29" colspan="2" class="titulo">
          <div align="center">
            <input name="bot1" type="button" class="original" onClick="openpage('AL10300_MC.php','_self')" value="Modificar"/>
            <input name="bot4" type="button" class="bot_WsW" onClick="openpage('AL10300_PR.php','_self')" value="Regresar"/>
          </div></td>
      </tr>
    </table>
  </div>
  <div id="divArt" style="display:none">
</form>
    <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center"
<?php
 mysqli_close($con);?>>
	<form id="form1" name="form1" action="AL10300_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
?>
 <?php
 
}
?>
</body>
</html>
<?php
 mysqli_close($con);?>

</body>
</html>



