les dejo el codigo.
muchas gracias
Código PHP:
<form name="form1" method="post" action="">
<table width="100%" border="0">
<tr>
<td width="7%"> </td>
<td width="10%">Folio:</td>
<td width="17%"><input type="text" size=5 maxlength=5 name="f_folio"></td>
<td width="25%"> </td>
<td width="21%"> </td>
<td width="10%"><? echo "<input type=\"submit\" align=\"center\" name=\"submit_dato\" value=\"".lg_BtIngre."\" >"; ?></td>
<td width="10%"> </td>
</tr>
<tr>
<td> </td>
<td>Fecha Ingreso: </td>
<td><input type="text" size=10 maxlength=10 name="f_fecing">
añomesdia </td>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit2" value="Consultar"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Estado:</td>
<td><div align="center">Por Inspeccionar</div></td>
<td><div align="center">Aprobados</div></td>
<td><div align="center">Reinspeccionar</div></td>
<td><div align="center">Reprobados</div></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td height="21"> </td>
<td><div align="center">
<input name="f_estado" type="radio" value="Q">
</div></td>
<td><div align="center">
<input name="f_estado" type="radio" value="C">
</div></td>
<td><div align="center">
<input name="f_estado" type="radio" value="I">
</div></td>
<td><div align="center">
<input name="f_estado" type="radio" value="B">
</div></td>
<td> </td>
</tr>
<tr>
<td colspan="3"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="7"><hr><strong>Reinspeccionar:</strong><hr></td>
</tr>
<tr>
<td> </td>
<td><div align="center"><strong>Folio</strong></div></td>
<td><div align="center"><strong>Fecha Ingreso </strong></div></td>
<td><div align="center"><strong>Equipo a Inspeccionar</strong></div></td>
<td><div align="center"><strong>Estado</strong></div></td>
<td><div align="center"><strong>Intentos</strong></div></td>
</tr>
<?php
//Solicitud de inspección
//$result=mysql_query
//$rs2 = mysql_query( $consulta2) or die ( mysql_error() );
$palabra = $_POST['palabra'];
$f_folio = $_POST['f_folio'];
$f_fecing = $_POST['f_fecing'];
$f_estado = $_POST['f_estado'];
$consulta = "SELECT * FROM (am_inspeccion,am_rl_equins) where ins_folio=rei_folio and (ins_folio like '%".$palabra."%') and (ins_digito = '".$session["name"]."') and (ins_proyecto like '$f_proyecto') and ((ins_estado like 'E') or (ins_estado like 'N')) ORDER BY ins_folio DESC";
if ( $f_folio == 'ins_folio' )
$consulta = "SELECT * FROM (am_inspeccion,am_rl_equins) where ins_folio=rei_folio and (ins_folio like '%".$palabra."%') and (ins_proyecto like '$f_proyecto') ORDER BY ins_folio DESC";
elseif ( $f_fecing == 'ins_fecing' )
$consulta = "SELECT * FROM (am_inspeccion,am_rl_equins) where ins_folio=rei_folio and (ins_fecing like '%".$palabra."%') and (ins_proyecto like '$f_proyecto') ORDER BY ins_folio DESC";
elseif ( $f_estado == 'ins_estado' )
$consulta = "SELECT * FROM (am_inspeccion,am_rl_equins) where ins_folio=rei_folio and (ins_estado like '%".$palabra."%') and (ins_proyecto like '$f_proyecto') ORDER BY ins_folio DESC";
$query_Rs = mysql_query($consulta) or die(mysql_error());
//while($row=mysql_fetch_row($consulta)){
while ( $row= mysql_fetch_array( $query_Rs ) )
{
$row[1] = substr($row["1"],6,2)."/".substr($row["1"],4,2)."/".substr($row["1"],0,4);
switch($row[13]) {
case "Q":
$row[13] =(rd_Q);
break;
case "A":
$row[13] =(rd_A);
break;
case "R":
$row[13] =(rd_R);
break;
case "T":
$row[13] =(rd_T);
break;
case "I":
$row[13] =(rd_I);
break;
case "E":
$row[13] =(rd_E);
break;
case "N":
$row[13] =(rd_N);
break;
case "L":
$row[13] =(rd_L);
break;
case "F":
$row[13] =(rd_F);
break;
case "C":
$row[13] =(rd_C);
break;
case "B":
$row[13] =(rd_B);
break;
}
echo " <tr>";
echo " <td><a href=\"contratista.php?id_insmod=$row[0]\" target=\"_parent\"><img src=\"am_modules/downloads/derec.gif\" width=16 height=16 alt=\"click\" border=0 align=left></a></td>";
echo " <td><div align=\"center\">$row[0]</a></div></td>";
echo " <td><div align=\"center\">$row[1]</a></div></td>";
echo " <td><div align=\"center\">$row[33]</a></div></td>";
echo " <td><div align=\"center\">$row[13]</a></div></td>";
echo " <td><div align=\"center\">$row[26] de 3</a></div></td>";
echo " </tr>";
// $consulta2="select count(*) from am_inspeccion ";
// $rs2=mysql_query($consulta2);
}
?>
<tr>
<td colspan="7"><hr> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>