<?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=AL10400_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	if(!isset($_REQUEST['tap2'])){
		include('AL10400_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'];
                if(!isset($reg['lim_vta1']))$reg['lim_vta1']="";
		$_REQUEST['precio']=$reg['lim_vta1'];
		$_REQUEST['descripcion']=$reg['descripcion'];
		$_REQUEST['n_reg']=$reg['n_reg'];
		$_REQUEST['select']=$reg['t1'];
		$_REQUEST['paso']=$reg['paso'];
		
		
		
	}
?>
<style type="text/css">
<!--
.Estilo19 {font-size: 16px}
.Estilo23 {font-size: 11px; font-weight: bold; }
-->
</style>
<script language="javascript">
function ocultaMuestra(divVent){
	if(divVent.style.display=='none'){
		divVent.style.display='';

	}else{
		divVent.style.display='none';

	}
}	
	</script>
	
	
<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="475" border="0" align="center" bordercolor="#FFCC00" bordercolordark="#FFCC00">
    <tr>
      <td colspan="2" class="titulo">MODIFICAR AGRUPADOR </td>
    </tr>
    <tr>
      <th width="113" style="#FFCC00"><div align="left"><span class="Estilo23">CODIGO</span></div></th>
      <td width="346"><span class="Estilo19">
        <input name="codigo" type="text" id="codigo" tabindex="20" size="25" value="<?php
 echo isset($_REQUEST['n_reg'])?$_REQUEST['n_reg']:"";?>">
      </span></td>
    </tr>
  
      <tr>
        <th width="113" style="#FFCC00"><div align="left"><span class="Estilo23">DESCRIPCION</span></div></th>
        <td width="346"><label>
        <input name="tap2" id="tap2" type="text" tabindex="2" 
		  onBlur="may(this)" size="50"
		 <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['np_desc1'].'"';
		}
		?>>
        </label></td>
      </tr>
      
      
      <tr>
        <th height="29" style="#FFCC00"><div align="left"><span class="Estilo23">ALMACEN</span></div></th>
        <td height="29"><select name="descripcion" id="descripcion" tabindex="9">
          <option value="">-----SELECCIONE-----</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM falmacen WHERE t1 = 'ACTIVO'");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['descripcion']==$reg['nparte1'] ){
		echo '<option value="' . $reg['nparte1'] . '" selected>' . $reg['np_desc1'] . '</option>';
	}else{
		echo '<option value="' . $reg['nparte1'] . '">' . $reg['np_desc1'] . '</option>';
	}
}

?>
        </select></td>
      </tr>
      <tr>
        <th height="29" style="#FFCC00"><div align="left"><span class="Estilo23">PASO</span></div></th>
        <td height="29"><label>
          <input type="checkbox" name="paso" value="1" id="paso" <?php
 if($_REQUEST['paso']) echo 'checked';?> />
        </label></td>
      </tr>
      <tr>
        <th height="29" style="#FFCC00"><div align="left"><span class="Estilo23">STATUS</span></div></th>
        <td height="29"><select name="select" tabindex="18">
          <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 colspan="2" class="titulo">
          <div align="center">
            <input name="bot1" type="button" class="original" onClick="openpage('AL10400_MC.php','_self')" value="Modificar"/>
            <input name="bot4" type="button" class="bot_WsW" onClick="openpage('AL10400_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="AL10400_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
?>
 <?php
 
}
?>
</body>
</html>
<?php
 mysqli_close($con);?>

</body>
</html>



