<?
include("../fnc.php");
enlinea_a();
if(!$idalumno){
 alert("Parámetros incorrectos","javascript:history.go(-1)");
}
if($idalumno){
$qver=mysql_query("select * from alumnos where carnet = '$idalumno'");
 if(mysql_num_rows($qver)==0){
  alert("El número de carnet no existe","frm_alumno.php");
 }else{
  $info=mysql_fetch_array($qver);
  $tipo="Add";
  $link_foto="";
  if(file_exists("../fotos_usr/{$info[carnet]}.jpg")){
    $foto=rd_imagen("../fotos_usr/",$info[carnet].".jpg",125,"border='0'?$fechahora");
   //$foto="<img src=\"../fotos_usr/{$info[carnet]}.jpg\" width=\"95\" height=\"125\" border=\"1\">";
  }else{
    $foto=rd_imagen("../fotos_usr/","sin_foto.jpg",125,"border='0'");
   //$foto="<img src=\"../fotos_usr/sin_foto.jpg\" width=\"95\" height=\"125\" border=\"1\">";
  }
 }
}else{
 $tipo="Add";
 $foto="";
 $link_foto="";
}
?>
<!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">
<script type="text/javascript" src="../jsincludes/overlib.js"></script>
<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="#FFFFCC"><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#333333">
            <tr align="center" valign="middle" bgcolor="#FFFFCC">
              <td width="65" height="20" background="../images/tema/bg_contenido.png" class="titulo_pagina"><div align="center" class="titulo_pagina"></div></td>
              <td width="433" background="../images/tema/bg_contenido.png" class="titulo_pagina"><strong>ADMINISTRACION DE ALUMNOS</strong></td>
              <td width="65" align="center" valign="middle" background="../images/tema/bg_contenido.png" class="titulo_pagina"><a href="inicio.php" class="link_parrafo">Inicio<img src="../images/ic_home.png" width="21" height="21" border="0"></a></td>
            </tr>
            <tr>
              <td colspan="3" align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><div align="left" class="parrafo">
                    <form action="mnt_alumno_foto.php" method="post" enctype="multipart/form-data" name="form1">
                                  <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000099">
                    <tr>
                      <td bgcolor="#ECE9D8"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                          <tr bgcolor="#6699CC">
                            <td colspan="3" class="titulo_seccion"><div align="left" class="titulo_formulario">
                              <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_formularios.png" width="35" height="32"></td>
                                  <td width="94%" background="../images/tema/bg_titulo_frm.png">Informaci&oacute;n general del alumno </td>
                                </tr>
                              </table>
                            </div></td>
                          </tr>
                          <tr bgcolor="#E8E8E8">
                            <td width="15%" align="left" valign="middle" bgcolor="#CFDFEF" class="lbl_campo">No. de Carnet</td>
                            <td width="58%" bgcolor="#ECF2F9"><div align="left">
                              <input name="txtcarnet" type="text" class="textbox" id="txtcarnet3" value="<?=$info[carnet];?>" size="15" maxlength="15" readonly="true" <?if($tipo=="Update"){echo "readonly=\"true\"";}?>>
                            </div>
                              <div align="right"></div></td>
                            <td width="27%" rowspan="4" align="center" valign="top" bgcolor="#ECF2F9"><?=$foto;?>&nbsp;<br>
                              <?=$link_foto;?></td>
                          </tr>
                          <tr bgcolor="#E8E8E8">
                            <td width="15%" align="left" valign="middle" bgcolor="#CFDFEF" class="lbl_campo">Nombre(s)</td>
                            <td bgcolor="#ECF2F9"><div align="left">
                              <input name="txtnombre" type="text" class="textbox" id="txtnombre" value="<?=$info[nombre];?>" size="60" maxlength="100" readonly="true">
                            </div></td>
                            </tr>
                          <tr bgcolor="#E8E8E8">
                            <td width="15%" align="left" valign="middle" bgcolor="#CFDFEF" class="lbl_campo">Apellido(s)</td>
                            <td bgcolor="#ECF2F9"><div align="left">
                              <input name="txtapellido" type="text" class="textbox" id="txtapellido" value="<?=$info[apellido];?>" size="60" maxlength="100" readonly="true">
                            </div></td>
                            </tr>
                          <tr bgcolor="#E8E8E8">
                            <td height="30" colspan="2" align="left" valign="middle" bgcolor="#ECF2F9" class="lbl_campo">&nbsp;</td>
                            </tr>
                          <tr bgcolor="#E8E8E8">
                            <td width="15%" align="left" valign="middle" bgcolor="#FFCC00" class="lbl_campo">Cargar Foto: </td>
                            <td colspan="2" bgcolor="#FFCC00"><input name="txtarchivo" type="file" class="textbox" id="txtarchivo" size="50"></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                                  <table width="99%"  border="0" align="center" cellpadding="5" cellspacing="1">
                    <tr>
                      <td width="20%">                          <input name="tipo_trn" type="hidden" id="tipo_trn" value="<?=$tipo;?>"></td><td width="25%"><div align="center">
                        <input name="Submit" type="submit" class="boton_guardar" value="Guardar Foto">
                      </div></td>
                      <td width="25%"><div align="center">
                        <input name="Submit2" type="button" class="boton_deshacer" value="Regresar" onClick="self.location='frm_alumno.php?idalumno=<?=$idalumno;?>'">
                      </div></td>
                      <td width="20%">&nbsp;</td>
                    </tr>
                  </table>
                  </form>
              </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
