<?php
 
session_start();
$com = "E";
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=DI21100_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
?>
<body>
<form name="frm1" id="frm1" method="post" action="">
  <table width="542" border='1' align="center">
    <tr>
        <th width="58"><div align="center">Clave</div></th>
        <th width="293"><div align="center">Producto</div></th>
		<th width="86"><div align="center"> Disponible</div></th>
		<th width="115"><div align="center">Tipo de Moneda</div></th>
		<th width="80"><div align="center">Precio</div></th>
		<th width="80"><div align="center">Foto/Producto</div></th>
    </tr>
    <tr>
	<?php

	include('DI21100_CL.php');
	$varible_clase = new clase();
	$varible_clase->tip_car=$_POST["bot"];
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$reg=mysqli_fetch_array($res);
		echo "<td> <div align='center'>" . $reg["nparte1"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["np_desc1"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["exi_dis"] . "&nbsp;</div></td>";
		if($reg["tip_mon"]==0){
			$tp = "NACIONAL";
		}else{
			$tp = "EXTRANJERA";		
		}
		echo "<td> <div align='center'>" . $tp . "&nbsp;</div></td>";
		echo "<td> <div align='center'>$ " .  number_format($reg['lim_vta1'], 2, '.', ',') . "&nbsp;</div></td>";
		$fotografia = 'foto/dginvent/NO_'. $reg["nparte1"] .'.JPG';
		if (file_exists($fotografia)) {
			echo '<td class="inputcodigo"><div align="center"><img src="foto/dginvent/NO_'.$reg["nparte1"].'.JPG" width="32" height="40">&nbsp</div></td>';
		}else{
			echo '<td class="inputcodigo"><div align="center"><img src="foto/sin_producto.jpg" width="40" height="40">&nbsp</div></td>';
		}
	mysqli_close($con);
	?>
    </tr>
  </table>
  <input name="bot" type="hidden" value="<?php
 echo $_REQUEST['bot'] ?>"/>
  <div align="center">
	<input type="button" name="Submit" value="Eliminar" onClick="openpage('DI21100_EC.php','_self')">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="button" name="Submit2" value="Regresar" onClick="openpage('DI21100_PR.php','_self')">
  </div>
</form>
</body>
<?php
 }?>
</html>