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

if($idcurso){
 $qver=mysql_query("select * from cursos where codigo = '$idcurso'");
 if(mysql_num_rows($qver)==0){
  alert("El curso no existe","javascript:history.go(-1)");
 }else{
  $info=mysql_fetch_array($qver);
  $tipo="Update";
 }
}else{
 $tipo="Add";
}
?>
<!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="#FFFFCC">    <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.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"><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">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="65" background="../images/tema/bg_contenido.png">&nbsp;</td>
                    <td background="../images/tema/bg_contenido.png"><div align="center" class="titulo_pagina"><strong>ADMINISTRACION DE CURSOS </strong></div></td>
                    <td width="65" background="../images/tema/bg_contenido.png"><div align="right"><a href="inicio.php" class="link_parrafo">Inicio<img src="../images/ic_home.png" width="21" height="21" border="0"></a></div></td>
                  </tr>
                </table>
              </div></td>
            </tr>
            <tr>
              <td align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><div align="left" class="parrafo">
                <form name="form1" method="post" action="mnt_curso_grado.php">
                  <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="1" cellspacing="1" bgcolor="#FFFFFF">
                          <tr bgcolor="#6699CC">
                            <td colspan="2" class="titulo_seccion"><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"><div align="left" class="titulo_formulario">Informaci&oacute;n del curso </div></td>
                              </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td width="29%" align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo">C&oacute;digo</td>
                            <td width="71%" background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9">
                              <div align="left">
                               <input name="txtcodigo" type="text" class="textbox" id="txtcarnet3" value="<?=$info[codigo];?>" size="10" maxlength="10" <?if($tipo=="Update"){echo "readonly=\"true\"";}?>>
                               <img src="../images/con_info.png" width="16" height="16" border="0" onMouseOver="return overlib('El c&oacute;digo puede tener letras y n&uacute;meros.');" onmouseout="return nd();"> </div></td>
                            </tr>
                          <tr>
                           <td height="19" align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo">Nombre del Curso </td>
                           <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9"><div align="left">
                             <input name="txtcurso" type="text" class="textbox" id="txtcurso" value="<?=$info[curso];?>" size="60" maxlength="100">
                               <img src="../images/con_info.png" width="16" height="16" border="0" onMouseOver="return overlib('Ingrese un nombre que identifique al curso.<br><br><strong>Ejemplos:</strong><br>-Idioma espa&ntilde;ol 1 (primaria)<br>-Idioma espa&ntilde;ol 1 (básicos)');" onMouseOut="return nd();"></div>
                           </td>
                           <?
                           $chkb=$chko=$chkp="";
                           if($info[boleta]=="S"){ $chkb="checked"; }
                           if($info[oficial]=="S"){ $chko="checked"; }
                           if($info[promocion]=="S"){ $chkp="checked"; }
                           ?>
                          </tr>
                          <tr>
                            <td align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo"><div align="left">Se imprime en boleta<br>
                              de calificaciones ? </div></td>
                            <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9">
                                <div align="left">
                                  <input name="txtboleta" type="checkbox" id="txtboleta" value="S" <?=$chkb;?>>
                                </div></td>
                          </tr>
                          <tr>
                            <td align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo"><div align="left">Curso oficial del <br>
                              Ministerio de Educaci&oacute;n? </div></td>
                            <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9">
                                <div align="left">
                                  <input name="txtoficial" type="checkbox" id="txtoficial" value="S" <?=$chko;?>>
                                </div></td>
                          </tr>
                          <tr>
                            <td align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo"><div align="left">Es curso de promoci&oacute;n?</div></td>
                            <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9">
                                <div align="left">
                                  <input name="txtpromocion" type="checkbox" id="txtboleta3" value="S" <?=$chkp;?>>
                                </div></td>
                          </tr>
                          <tr>
                            <td align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo"><div align="left">N&uacute;mero de posici&oacute;n en el certificado:</div></td>
                            <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9">
                                <div align="left">
                                  <input name="txtposicioncertificado" type="text"  value="<?=$info[posicion_certificado];?>" class="textbox" id="txtposicioncertificado" size="5" maxlength="5">
                                </div></td>
                          </tr>
                          <tr>
                            <td align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo"><div align="left">N&uacute;mero de posici&oacute;n en la boleta de calificaciones: </div></td>
                            <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9">
                                <div align="left">
                                  <input name="txtposicionboleta" type="text" class="textbox"  value="<?=$info[posicion_boleta];?>" id="txtposicionboleta" size="5" maxlength="5">
                                </div></td>
                          </tr>
                          <tr>
                            <td align="left" valign="middle" background="../images/tema/bg_frm_campos.png" bgcolor="#CFDFEF" class="lbl_campo"><div align="left">Punteo m&iacute;nimo de aprobaci&oacute;n:</div></td>
                            <td background="../images/tema/bg_frm_campos.png" bgcolor="#ECF2F9">
                                <div align="left">
                                  <input name="txtpunteoaprobacion" type="text" class="textbox"  value="<?=$info[punteo_aprobacion];?>" id="txtpunteoaprobacion" size="5" maxlength="5">
                                </div></td>
                          </tr>
                           <tr bgcolor="#CFDFEF">
                             <td colspan="2" align="left" valign="middle" background="../images/tema/bg_frm_campos.png" class="lbl_campo"><table width="100%"  border="0" cellspacing="1" cellpadding="5">
                               <tr>
                                 <td width="20%" background="../images/tema/bg_frm_campos.png"><input name="sid" type="hidden" id="sid" value="<?=$sid;?>">
                                     <input name="tipo_trn" type="hidden" id="tipo_trn" value="<?=$tipo;?>">
                                     <input name="idgrado" type="hidden" id="idgrado" value="<?=$idgrado;?>"></td>
                                 <td width="25%" background="../images/tema/bg_frm_campos.png"><div align="center">
                                     <input name="Submit" type="submit" class="boton_guardar" value="Guardar los cambios">
                                 </div></td>
                                 <td width="25%" background="../images/tema/bg_frm_campos.png"><div align="center">
                                     <input name="Submit2" type="reset" class="boton_deshacer" value="Deshacer los cambios">
                                 </div></td>
                                 <td width="20%" background="../images/tema/bg_frm_campos.png">&nbsp;</td>
                               </tr>
                             </table></td>
                             </tr>
                          <tr bgcolor="#CFDFEF">
                            <td colspan="2" align="left" valign="middle" background="../images/tema/bg_frm_campos.png" class="lbl_campo">&nbsp;</td>
                          </tr>
                         </table></td>
                       </tr>
                     </table>
                     <br>
                   </form>
                   <a href="javascript:history.go(-1)"><img src="../images/regresar_c.png" width="32" height="32" border="0"></a><br>
                <strong>Salir</strong> </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>