<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.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>
<body>
<?php
 
$ayuda = 'DI1300A_PR.php';
include("DYAYUDA.php");
?>
<div align="center">
  <form name="form1" method="post" action="">
    <table width="458"  align="center">
      <tr>
        <th colspan="2">CATALOGO MODULO DE PARAMETROS</th>
      </tr>
      <tr>
        <th width="297"> <input name="r1" type="radio" value="clave" tabindex="1">
          Clave </th>
        <th width="297"><input name="r1" type="radio" value="nombre" tabindex="2">
          Ventas </th>
      </tr>
      <tr>
        <td colspan="2"><input name="tbus" type="text" onBlur="may(this)" size="75"/></td>
      </tr>
      <tr>
        <td colspan="2"><div align="center">
          <input type="submit" name="Submit" value="Buscar" />
        </div></td>
      </tr>
    </table>
  </form>
</div>
<div align="center">
  <form name="frm1" method="post" action="" >
    <?php
 
	@$sql = mysqli_query($con ,"SELECT * FROM dgparame order by key_par");
	include("DE10000.php");
	?>
    <table width="705" border='1'>
      <tr>
        <th colspan="10"> <div align="left">
          <input type="button" name="Submit6" value="Agregar" onClick="openpage('DI13000_AG.php','_self')"/>
          <input type="Submit" name="bot3" value="Consultar"  onClick="openpage('DI13000_MO.php','_self')"/>
          <input type="button" name="bot2" value="Modificar" onClick="openpage('DI13000_MO.php','_self')"/>
          <input type="button" name="bot1" value="Eliminar" onClick=
"openpage('DI13000_EL.php','_self')"/>
          <input type="button" name="bot4" value="Imprimir " onClick="openpage('DI13000_IM.php','_self')"/>
          <input type="button" name="Submit" value="Mostrar todo" onClick="openpage('DI13000_PR.php','_self')"/>
        </div></th>
      </tr>
      <tr>
        <th colspan="10">Concepto Modulo de Parametros</th>
      </tr>
      <tr>
        <th width="19"><div align="center">Sel</div></th>
        <th width="36"><div align="center">Clave</div></th>
        <th width="72"><div align="center">Compras</div></th>
		<th width="96"><div align="center">Dev. Compras</div></th>
        <th width="42"><div align="center">Ventas</div></th>
		<th width="94"><div align="center">Dev. Ventas</div></th>
        <th width="59"><div align="center">Cargo</div></th>
		<th width="84"><div align="center">Dev. Cargo</div></th>
        <th width="59"><div align="center">Caja</div></th>
		<th width="80"><div align="center">Costo/Vtas</div></th>
      </tr>
      <?php

	echo '<input name="txt_bus" type="hidden" value="'.$_POST['tbus'].'">';
	if($_POST['r1']=="clave")
	{
		echo '<input name="tip_bus" type="hidden" value="clave">';
	  	@$sql = mysqli_query($con ,"SELECT * FROM dgparame WHERE key_par = '".$_POST['tbus']."'");
		
	}elseif($_POST['r1']=="nombre")
	{
		echo '<input name="tip_bus" type="hidden" value="nombre">';
		@$sql = mysqli_query($con ,"SELECT * FROM dgparame WHERE tip_pol_ven like '%".$_POST['tbus']."%'");
	}
	while($reg = mysqli_fetch_array($sql))
	{
	  	echo "<tr>";
		echo '<td> <div align="center"><input name="bot" type="radio" value="'. $reg["key_par"].'">&nbsp;</div></td>';
		echo "<td> <div align='center'>" . $reg["key_par"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_com"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_devcom"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_ven"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_devven"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_cint"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_devcint"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_kja"] . "&nbsp;</div></td>";
		echo "<td> <div align='center'>" . $reg["tip_pol_cven"] . "&nbsp;</div></td>";
		echo "</tr>";
	}
	mysqli_close($con);
	?>
    </table>
  </form>
</div>
</body>
</html>