<?
include("../fnc.php");
enlinea_c();

if(!$pid){
 alert("Parámetros incorrectos","javascript:history.go(-1)");
}
$id_pr=dec($pid);

if($confirm=="OK" and $pid){
  $qdelo=mysql_query("delete from ev_m_opciones where pregunta = '$id_pr'");
  $qdelp=mysql_query("delete from ev_m_preguntas where id = '$id_pr'");
  alert("Pregunta ELIMINADA","frm_preguntas_evaluacion.php?ide=$ide");
}



$qpr=mysql_query("select * from ev_m_preguntas where id = $id_pr");
if(mysql_num_rows($qpr)==0){
  alert("La pregunta no existe","frm_login.php");
}else{
  $info=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_cat.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 bgcolor="#FFFFCC">
          <td width="20%" valign="top"><?php include("menu.php"); ?>&nbsp;</td>
          <td width="80%" 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> ELIMINAR PREGUNTA</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="99%"  border="0" align="center" cellpadding="1" cellspacing="1">
                      <tr bgcolor="#C6DCFB">
                        <td colspan="2" class="titulo_seccion"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="18%">Evaluaci&oacute;n:</td>
                            <td width="82%"><strong>
                              <?=$nev;?>
                            </strong> </td>
                          </tr>
                          <tr>
                            <td>Curso:</td>
                            <td><strong>
                              <?=$curso;?>
                            </strong> </td>
                          </tr>
                        </table>                          </td>
                      </tr>
                      <tr>
                        <td colspan="2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="2" class="font_red_11"><strong>&iquest;Est&aacute; seguro de borrar la siguiente pregunta?</strong></td>
                        </tr>
                      <tr bgcolor="#E9F2FE">
                        <td colspan="2" class="parrafo"><strong>
                          <img src="../images/flecha_1.png" width="9" height="9">
                          <?=$info[pregunta];?>
                        </strong></td>
                        </tr>
                      <tr>
                        <td width="50%"><div align="center">
                          <table width="10%"  border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><a href="frm_preguntas_evaluacion.php?ide=<?=$ide;?>"><img src="../images/regresar_c.png" width="32" height="32" border="0"></a></td>
                            </tr>
                            <tr>
                              <td><div align="center" class="boton_deshacer">NO</div></td>
                            </tr>
                          </table>
                        </div></td>
                        <td width="51%" class="boton_deshacer"><div align="center">
                          <table width="10%"  border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><a href="frm_eliminar_pregunta.php?pid=<?=$pid."&ide=$ide&confirm=OK";?>"><img src="../images/siguiente.png" width="32" height="32" border="0"></a></td>
                            </tr>
                            <tr>
                              <td><div align="center" class="boton_deshacer">SI</div></td>
                            </tr>
                          </table>
                        </div></td>
                      </tr>
                    </table></td>
                  </tr>
                </table>&nbsp;
                </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>