<?php
 
session_start();
$com = "M";
include("DMMYSQLG.php");
include("DSA3000.php");
require_once("DFJQUERY.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=AL10100_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	if(!isset($_REQUEST['tap2'])){
		include('AL10100_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'];
                if(!isset($reg['id_pro']))$reg['np_desc1']="";
		$_REQUEST['tap2']=$reg['np_desc1'];
                if(!isset($reg['lim_vta1']))$reg['lim_vta1']="";
		$_REQUEST['precio']=$reg['lim_vta1'];
                if(!isset($reg['afe_inv']))$reg['afe_inv']="";
		$_REQUEST['afe_inv']=$reg['afe_inv'];
                if(!isset($reg['cve_iva_ven']))$reg['cve_iva_ven']="";
		$_REQUEST['cve_iva_ven']=$reg['cve_iva_ven'];
                if(!isset($reg['afe_coman']))$reg['afe_coman']="";
		$_REQUEST['afe_coman']=$reg['afe_coman'];
                
		$_REQUEST['select']=$reg['t1'];
                if(!isset($reg['gpo_basico']))$reg['gpo_basico']="";
		$_REQUEST['select2']=$reg['gpo_basico'];
		$_REQUEST['sub']=$reg['sub'];
	}
?>
<style type="text/css">
<!--
.Estilo19 {font-size: 16px}
.Estilo23 {font-size: 12px; font-weight: bold; }
-->
</style>
	
	
<body>
<form name="frm1" method="post" action="" enctype="multipart/form-data">
  
    <input name="bot" type="hidden" value="<?php
 echo $_REQUEST['bot'];?>"> 
  
   <div id="width_wrapper" align="center">
  <table width="475" align="center" >
    <tr>
      <td colspan="2" class="titulo">MODIFICAR DEPARTAMENTO </td>
    </tr>
    <tr>
      <th><span class="Estilo23">CODIGO</span></th>
      <td width="346"><span class="Estilo19">
        <input name="nparte1" type="text" id="nparte1" size="15"
		  <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['nparte1'].'"';
		}
		?> />
      </span></td>
    </tr>
      <tr>
        <th><span class="Estilo23">DESCRIPCION</span></th>
        <td><input name="tap2" id="tap2" type="text" tabindex="2" onBlur="may(this)" size="50"
		 <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['np_desc1'].'"';
		}
		?>></td>
      </tr>
      <tr>
        <th><span class="Estilo23">SUB-ALMACEN</span></th>
        <td><select name="sub" tabindex="25">
          <option value="SI"<?php
 if($_REQUEST['sub']=="SI") echo 'selected';?>>SI</option>
          <option value="NO"<?php
 if($_REQUEST['sub']=="NO") echo 'selected';?>>NO</option>
        </select></td>
      </tr>
      <tr>
        <th><span class="Estilo23">STATUS</span></th>
        <td width="346"><label>
          <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>
        </label></td>
      </tr>
      <tr>
        <td height="29" colspan="2" class="titulo">
          <div align="center">
            <input name="bot1" type="button" class="original" onClick="openpage('AL10100_MC.php','_self')" value="Modificar"/>
            <input name="bot4" type="button" class="bot_WsW" onClick="openpage('AL10100_PR.php','_self')" value="Regresar"/>
			<input type="button" name="bot422" value="Eliminar" class="bot_RjR" onclick="openpage('AL10100_EL.php','_self')"/>
          </div></td>
      </tr>
    </table>
  </div>
</form>
 <?php
 
}
?>
<?php
 mysqli_close($con);?>
</body>
</html>