<?

include("../fnc.php");

enlinea_a();

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>e-Ducativo - Bienvenido</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../estilo1.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
body {
	background-image: url(../images/tema/bg_pagina.png);
}
-->
</style></head>



<body>

<table width="750" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#333333">

  <tr>

    <td bgcolor="#336699">    <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E5E5E5">

      <tr bgcolor="#FFFFFF">

        <td width="40%"><img src="../images/logo_5.gif" width="300" height="50"></td>

        <td width="60%" background="../images/back_header_admin.gif" bgcolor="#FFFFFF"><div align="right" class="usuario_nombre_enc"><strong><?echo "$unombre $uapellido";?><br>

          </strong>Tiene <?=mensajes(1);?> mensaje(s) sin leer</div></td>

      </tr>

      <tr bgcolor="#FFFFFF">

        <td height="15" colspan="2" background="../images/barra_encabezado.gif">&nbsp;</td>

        </tr>

    </table>

      <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">

        <tr>

          <td width="20%" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><?php include("menu.php"); ?>&nbsp;</td>

          <td width="80%" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFFF"><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#333333">

            <tr align="center" valign="middle" bgcolor="#FFFFCC">

              <td height="20" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC" class="titulo_pagina"><div align="center" class="titulo_pagina"><strong>BUSQUEDA DE ALUMNOS</strong></div></td>

            </tr>

            <tr>

              <td align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#ECE9D8"><div align="left" class="parrafo">

                <form name="form2" method="post" action="frm_buscar_alumno.php">

                  <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6699CC">

                    <tr>

                      <td bgcolor="#6699CC"><div align="left" class="lbl_campo">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="6%" background="../images/tema/bg_titulo_frm.png"><img src="../images/tema/ic_buscar.png" width="35" height="32"></td>
                            <td width="94%" background="../images/tema/bg_titulo_frm.png"><span class="titulo_formulario"><strong> Llene los datos que desea incluir en la b&uacute;squeda</strong></span></td>
                          </tr>
                        </table>
                        <table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">

                            <tr>

                              <td width="11%" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo">Nombre:</td>

                              <td width="89%" background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9"><input name="txtnombre" type="text" class="textbox" id="txtnombre" size="50" maxlength="50"></td>

                            </tr>

                            <tr>

                              <td background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo">Apellido:</td>

                              <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9"><input name="txtapellido" type="text" class="textbox" id="txtapellido" size="50" maxlength="50"></td>

                            </tr>

                            <tr bgcolor="#CFDFEF">

                              <td background="../images/tema/bg_frm_campos.png" class="lbl_formulario"><input name="busqueda" type="hidden" id="busqueda" value="1"></td>

                              <td background="../images/tema/bg_frm_campos.png"><input name="Submit" type="submit" class="boton_guardar" value="D&eacute; clic para iniciar la b&uacute;squeda"> </td>

                            </tr>

                          </table>

                          <strong>                          </strong><strong><a href="#" class="lbl_buscar"></a></strong></div>                        </td>

                      </tr>

                  </table>

                </form>

                <?

                if(!$busqueda){exit();}

                $sqlb="select * from alumnos where 1";

                if($txtnombre){

                 $sqlb.=" and nombre like '%$txtnombre%' ";

                }

                if($txtapellido){

                 $sqlb.=" and apellido like '%$txtapellido%' ";

                }

                $sqlb.=" order by apellido";

                $qbusqueda=mysql_query($sqlb);

                $encontrados=mysql_num_rows($qbusqueda);

                ?>

                <br>
                <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CFDFEF">

                  <tr bgcolor="#336699" class="enc_tabla_blanco">
                    <td colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="6%" height="32" background="../images/tema/bg_titulo_frm.png"><img src="../images/tema/ic_editar.png" width="35" height="32"></td>
                        <td width="94%" background="../images/tema/bg_titulo_frm.png" class="titulo_formulario"><strong>Resultados de la b&uacute;squeda: Se encontraron                              <?=$encontrados?> alumno(s). </strong></td>
                      </tr>
                    </table></td>
                    </tr>
                  <tr bgcolor="#336699" class="enc_tabla_blanco">

                    <td width="11%"><div align="center"><strong>CARNET</strong></div></td>

                    <td width="41%"><div align="center"><strong>APELLIDOS</strong></div></td>

                    <td width="33%" bgcolor="#336699"><div align="center"><strong>NOMBRES</strong></div></td>

                    <td width="15%" bgcolor="#336699"><div align="center"><strong>OPCIONES</strong></div></td>
                  </tr>

                  <?

                  $i=0;

                  while($ibusqueda=mysql_fetch_array($qbusqueda)){
                  ?>

                  <tr bgcolor="<?=color_fila($i);?>">

                    <td valign="middle"><?=$ibusqueda[carnet];?>

                      <div align="left"></div></td>

                    <td valign="middle"><?=$ibusqueda[apellido];?>

                      <div align="left"></div></td>

                    <td valign="middle"><?=$ibusqueda[nombre];?>

                      <div align="left"></div></td>

                    <td><div align="center"><a href="frm_alumno.php?idalumno=<?=$ibusqueda[carnet];?>" class="link_dt_add"><strong>MODIFICAR</strong></a></div></td>
                  </tr>

                  <?

                  $i++;

                  }

                  ?>
                </table>

              </div></td>

              </tr>

          </table></td>

        </tr>

    </table>    </td>

  </tr>

</table>

</body>

</html>