<?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>
<div align="center">
  <form name="form1" method="post" action="">
    <table width="315"  align="center">
      <tr>
			<th colspan="2">TIPOS DE CLIENTE </th>
      </tr>
      <tr>
        <td width="151" class="estilotabla"> <div align="center">
            <input name="r1" type="radio" tabindex="1" value="id" <?php
 if($_POST["id_medicos"]=="id_medico") echo 'checked'?>>
            <span class="Estilo2">Clave</span></div></td>
        <td width="148" class="estilotabla"><div align="center">
            <input name="r1" type="radio" value="nombre" tabindex="2" <?php
 if($_POST["nom_med"]=="nom_med") echo 'checked'?>>
        <span class="Estilo2">        Nombre</span></div></td>
      </tr>
      <tr>
        <td colspan="2"><input name="t1" type="text" id="t1" size="75"/></td>
      </tr>
       <tr>
        <td colspan="2"><div align="center">
          <input type="submit" name="Submit32" value="Buscar" openpage('DG71200_PR.php','_self')/>
        </div></td>
      </tr>
    </table>
  </form>
</div>
<div align="center">
  <form name="frm1" method="post" action="" >
    <p>
    </p>
    <table  align="center">
      <tr>
        <th colspan="6" nowrap><div align="left">
          <input type="button" name="Submit6" value="Agregar" onClick="openpage('DG71200_AG.php','_self')"/>
          <input type="Submit" name="bot3" value="Consultar"  onClick="openpage('DG71200_CO.php','_self')"/>
          <input type="button" name="bot2" value="Modificar" onClick="openpage('DG71200_MO.php','_self')"/>
          <input type="button" name="bot1" value="Eliminar" onClick="openpage('DG71200_EL.php','_self')"/>
          <input type="button" name="bot4" value="Imprimir " onClick="openpage('DG71200_IM.php','_self')"/>
        </div></th>
      </tr>
      <tr>
        <th nowrap><div align="center">Sel</div></th>
        <th nowrap>Descripci&oacute;n</th>
		<th nowrap><div align="center">Puntos</div></th>
	  </tr>
<?php


	if($_POST['r1']=="id"){
		$sq="SELECT * FROM dgtipcli WHERE id_tipcli = '".$_POST['t1']."' ORDER BY num_pun";
	}elseif($_POST['r1']=="nombre"){
		$sq="SELECT * FROM dgtipcli WHERE des_tipcli like '%".$_POST['t1']."%' order by num_pun";
	}else{
		$sq="SELECT * FROM dgtipcli order by num_pun";
	}
	@$sql = mysqli_query($con ,$sq);
	while($reg = mysqli_fetch_array($sql)){
	  	echo "<tr>";
		echo '<td><div align="center"><input name="bot" type="radio" value="'. $reg["id_tipcli"].'">&nbsp</div></td>';
		echo '<td><div align="left">' . $reg["des_tipcli"] . '&nbsp</div></td>';
		echo '<td><div align="left">' . $reg["num_pun"] . '&nbsp</div></td>';
		echo "</tr>";
	}
	mysqli_close($con);
	?>
    </table>
  </form>
</div>
</body>
</html>