<?
include("../fnc.php");
enlinea_alumno();
if(!$idev or !$idp){
  alert("Parámetros incorrectos","frm_login.php");
}
$id_ev=dec($idev);
$id_pr=dec($idp);
$qev=mysql_query("select ec_evaluaciones.*, fecha_inicio as fechai, fecha_fin as fechaf 
                  from ec_evaluaciones
                  where id = $id_ev");
if(mysql_num_rows($qev)==0){
  alert("La evaluación no existe","inicio.php");
}else{
 $iev=mysql_fetch_array($qev);
}
$qpr=mysql_query("select * from ec_preguntas where id = $id_pr and evaluacion = $id_ev");
if(mysql_num_rows($qpr)==0){
  alert("La pregunta no existe","frm_login.php");
}else{
 $ipr=mysql_fetch_array($qpr);
}
?>
<!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">
</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_alumno.gif" bgcolor="#FFFFFF"><div align="right" class="usuario_nombre_enc"><strong><?echo "$unombre $uapellido";?><br>
          </strong>Tiene <?=mensajes($uuser);?> 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 valign="top" bgcolor="#FFFFCC">            <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#333333">
              <tr align="center" valign="middle" bgcolor="#FFFFCC">
                <td height="20" class="titulo_pagina"><div align="center" class="titulo_pagina"><strong>Evaluación a catedrático(s)</strong></div></td>
              </tr>
              <tr>
                <td align="left" valign="top" bgcolor="#FFFFCC"><div align="left" class="parrafo">
                  <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#333333">
                    <tr>
                      <td bgcolor="#FFFFFF"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td align="center" valign="top"><table width="417"  border="0" cellspacing="0" cellpadding="1">
                            <tr>
                              <td width="59" valign="top" class="titulo_pagina"><div align="right">Progreso: </div></td>
                              <td width="354"><div align="left">
                                <table width="354"  border="0" align="left" cellpadding="1" cellspacing="0">
                                  <tr>
                                    <td width="16">0% </td>
                                    <td width="304"><table width="300"  border="0" cellpadding="1" cellspacing="1" bgcolor="#45ADDD">
                                      <tr>
                                        <td bgcolor="#FFFFFF"><img src="../images/barra_estado.gif" width="<?=round($prog*3,0);?>" height="15"></td>
                                      </tr>
                                    </table></td>
                                    <td width="28">100%</td>
                                  </tr>
                                  <tr>
                                    <td>&nbsp;</td>
                                    <td><div align="center"><?=$prog;?>%</div></td>
                                    <td>&nbsp;</td>
                                  </tr>
                                </table>
                              </div></td>
                            </tr>
                          </table>
                            <br>
                            <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td><form name="form2" method="post" action="">
                                  <table width="75%"  border="0" align="center" cellpadding="1" cellspacing="1">
                                    <tr bgcolor="#6699CC">
                                      <td colspan="2" class="titulo_formulario"><div align="left">Informaci&oacute;n de la evaluaci&oacute;n </div></td>
                                    </tr>
                                    <tr>
                                      <td width="16%" bgcolor="#CFDFEF"><div align="left">Nombre:</div></td>
                                      <td width="84%" bgcolor="#ECF2F9"><div align="left"><strong>
                                          <?=$iev[nombre];?>
                                      </strong></div></td>
                                    </tr>
                                    <tr>
                                      <td bgcolor="#CFDFEF"><div align="left">Fechas de activaci&oacute;n: </div></td>
                                      <td bgcolor="#ECF2F9"><div align="left"><strong>Del:
                                                <?=fechalarga($iev[fechai]);?>
        Al:
        <?=fechalarga($iev[fechaf]);?>
                                      </strong></div></td>
                                    </tr>
                                  </table>
                                </form></td>
                              </tr>
                            </table>
                            <span class="lbl_formulario"><strong><br>
                            USTED EST&Aacute; EVALUANDO A:
                            <?=strtoupper(nombre_usuario(dec($idcat),"Ca"));?>
                            <br>CURSO:  <?=gcurso($idc);?>
                            </strong></span><br>
                            <br>
                            <table width="75%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#0099FF">
                              <tr>
                                <td bgcolor="#FFFFFF"><form name="form1" method="post" action="mnt_ec_mprg.php">
                                  <table width="100%"  border="0" cellspacing="1" cellpadding="1">
                                    <tr bgcolor="#CFDFEF">
                                      <td colspan="2"><div align="left"><strong>Pregunta: </strong><span class="lbl_formulario">
                                        <?=$ipr[pregunta];?>
                                            <input name="idev" type="hidden" id="idev" value="<?=$idev;?>">
                                            <input name="idp" type="hidden" id="idp" value="<?=$idp;?>">
</span>                                            
                                          <input name="idcat" type="hidden" id="idcat" value="<?=$idcat;?>">
                                          <input name="idc" type="hidden" id="idc" value="<?=$idc;?>">
                                      </div>
                                      <div align="left" class="lbl_formulario"></div></td>
                                      </tr>
                                    <?
                                    $qop=mysql_query("select * from ec_opciones
                                                      where pregunta='$id_pr'
                                                      order by id");
                                    while($iop=mysql_fetch_array($qop)){
                                    ?>
                                    <tr bgcolor="#ECF2F9">
                                      <td width="4%"><div align="right">
                                        <input name="id_re" type="radio" value="<?=$iop[id];?>">
                                      </div></td>
                                      <td width="96%"><div align="justify" class="parrafo"><strong>
                                        <?=$iop[opcion];?>
                                        </strong></div></td>
                                    </tr>
                                    <?
                                    }
                                    ?>
                                  </table>
                                  <div align="center">
                                    <table width="100%"  border="0" cellspacing="0" cellpadding="1">
                                      <tr>
                                        <td>                                            <div align="center">
                                              <input name="imageField" type="image" src="../images/guardar.png" width="32" height="32" border="0">
                                              <br>
                                              <strong>Guardar mi respuesta</strong> </div></td>
                                      </tr>
                                    </table>
</div>
                                </form></td>
                              </tr>
                            </table></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  </div></td>
              </tr>
            </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
