<?php
 
session_start();
$com = "M";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");

?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=DI11200_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	
	include('DI11200_CL.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$reg=mysqli_fetch_array($res);
?>
<body
<?php
 
if(isset($_POST['bot3'])){
	echo ' onLoad="deshab()"';
}
?>
>
<form  name="frm1" method="post" action="" enctype="multipart/form-data">
<input name="bot" type="hidden" value="<?php
 echo $_POST["bot"]?>">
  <table width="620"  align="center">
        <tr>
          <th colspan="2" class=\"titulo\"><div align="center">CATALOGO DE GRUPOS</div></th>
        </tr>
		<tr>
          <td>Descripcion</td>
          <td><input name="t1" type="text" id="t1"  tabindex="3" size="50"
	  <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['des_basico'].'"';
		}
		?>
	  ></td>
        </tr>
        <tr>
          <td width="136">Rango Vat1 Hasta</td>
          <td><input name="t2" type="text" id="t2"  tabindex="3" size="50"
	  <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['lim_vta1'].'"';
		}
		?>
	  ></td>
        </tr>
        <tr>
          <td>Rango Vat1 Hasta</td>
          <td width="360"><input name="t3" type="text" id="t3"  tabindex="3" size="50"
	  <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['lim_vta2'].'"';
		}
		?>
	  ></td>
        </tr>
		<tr>
          <td>Rango Vat1 Hasta</td>
          <td width="360"><input name="t4" type="text" id="t4"  tabindex="3" size="50"
	  <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['lim_vta3'].'"';
		}
		?>
	  ></td>
        </tr> 
    </tr>
  </table>
  <table width="350"  align="center">
    <tr>
      <td width="350" class="inputcodigo"><div align="center">
          <?php

			$fotografia = 'foto/dgbasico/NO_'. $reg["gpo_basico"] .'.JPG';
			if (file_exists($fotografia)) {
				echo '<img src="foto/dgbasico/NO_'.$reg["gpo_basico"].'.JPG" width="150" height="175">';
			}else{
				echo '<img src="foto/sin_producto.jpg" width="150" height="175">';
			}
		  ?>
      </div></td>
      <div id="capa" align="center"></div>
      </th>
    </tr>
  </table>
  <table width="350"  align="center">
    <tr>
      <td width="350" class="inputcodigo"><div align="center">
        <input type="checkbox" name="ac" value="1" onClick="act_fichero(ac.checked)">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cambiar Fotografia </div></td>
    </tr>
  </table>
  <table width="350"  align="center">
    <tr>
      <td width="350"><div align="center">
        <input name="fichero" type="file" disabled="disabled">
      </div></td>
    </tr>
  </table>
  <table width="350"  align="center">
    <tr>
      <td colspan="2"><div align="center">
        <input type="button" name="Submit2" value="Guardar" onClick="openpage('DI11200_MC.php','_self')"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="button" name="Submit" value="Regresar" onClick="openpage('DI11200_PR.php','_self')"/>
      </div></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</form>
   <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="DI11200_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
?>
 </body>
<?php
 
mysqli_close($con);
}
?>
</html>