<div align="right" id="formulario" style="display:none;"></div>

<div align="center">
  <form name="form1" method="post" action="">
     <table  align="center" bordercolor="#FF6600" bordercolordark="#FF6600">
            <th colspan="2">PEDIDO SOBRE RECETAS </th>
      </tr>
      
      <tr>
        <th>BUSQUEDA      </th>
      </tr>
    
      <tr>
        <td colspan="2"><input type="submit" name="Submit" value="Buscar" class="bot_WsW"/>
        <input name="tbus" type="text" onBlur="may(this)" size="30"/></td>
      </tr>
      <tr>
        <th colspan="2">DESCRIPCION </th>
      </tr>
      <tr>
        <td colspan="2"><div align="center">
          <input name="tbus2" type="text" id="tbus" onBlur="may(this)" size="50"
		<?php

			if(isset($_POST['tbus'])){ 
				echo 'value="' . $_POST['tbus'] .  '"';
			}
		?>
		/>
        </div></td>
      </tr>   
    </table>
  </form>
</div>
<form name="frm1" method="post" action="" >
<body>
<div align="center">
<?php
 
	$sql = mysqli_query($con ,"SELECT * FROM cos_ped order by np_desc1");
	include("DE10000.php");
	?>
<table width="532" border='1' bordercolor="#FF6600" bordercolordark="#FF6600">
      <tr>
        <td colspan="4"> 
          <div align="center"> 
			<input name="det_inv" type="button" id="det_inv" value="Agregar Pedido" onClick="openpage('CO10300_AG-DET.php','_self')" class="original">
            <input type="button" name="bot2" value="Modificar" onClick="openpage('CO10300_MO.php','_self')" class="bot_WsW"/>
            <input type="button" name="bot4" value="Imprimir " onClick="openpage('CO10300_IM.php','_self')" class="original"/>
            <!--input type="button" name="bot42" value="Exporta Exel" onClick="openpage('CO10300_EX.php','_self')" class="bot_WsW"/-->
          </div >
   		</td></tr>
<tr>
      <th width="21"  nowrap><div align="center">SEL</div></th>
        <th width="125"  nowrap><div align="center">CLAVE PEDIDO</div></th>
        <th width="274"  nowrap><div align="center">DESCRIPCION</div></th>
		<th width="88"  nowrap>FECHA</th>
    </tr>
	  <?php

	echo '<input name="txt_bus" type="hidden" value="'.$_POST['tbus'].'">';
	if($_POST['r1']=="")
	{
		echo '<input name="tip_bus" type="hidden" value="nombre">';
		@$sql = mysqli_query($con ,"SELECT * FROM cos_ped WHERE np_desc1 like '%".$_POST['tbus']."%'");
	}
	while($reg = mysqli_fetch_array($sql))
	{
	  	echo "<tr>";
		echo '<td> <div align="center" style="background-color:'.$reg["almacen"].';"><input name="bot" type="radio" value="'. $reg["n_reg"].'"></div></td>';
		echo "<td> <div align='center' style=' '>" . $reg["n_reg"] . "&nbsp;</div></td>";
		
		echo "<td> <div align='center' style=' '>" . $reg["np_desc1"] . "&nbsp;</div></td>";
		
		
		$fec1=$reg["fecha"];
		include('DF20000.php');
		echo "<td> <div align='center' style=' '>" . $f_f . "&nbsp</div></td>";
		
		
		echo "</tr>";
	}
	mysqli_close($con);
	?>
  </table>
</div>
</body>
</form>