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

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">
</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.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 width="20%" valign="top" bgcolor="#FFFFCC"><?php include("menu.php"); ?>&nbsp;</td>
          <td width="80%" valign="top" bgcolor="#FFFFFF"><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>ADMINISTRACION DE CURSOS </strong></div></td>
            </tr>
            <tr>
              <td align="left" valign="top" bgcolor="#ECE9D8"><div align="left" class="parrafo">
                <form name="form2" method="post" action="frm_curso.php">
                  <table width="99%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#009900">
                    <tr>
                      <td width="81%" bgcolor="#FFFFE6"><div align="left" class="lbl_buscar"> <strong>Modificar el curso
                            <input name="idcurso" type="text" class="txt_buscar" id="idalumno3" title="Ingrese el c&oacute;digo del curso" dir="rtl" size="15" maxlength="15">
                                <input name="Submit3" type="submit" class="boton_buscar" value="Modificar">
                      </strong></div></td>
                      <td width="19%" bgcolor="#FFFFE6"><div align="center"><a href="frm_buscar_curso.php" class="lbl_buscar"><strong>BUSCAR CURSO </strong></a></div></td>
                    </tr>
                  </table>
                </form>
                <form name="form1" method="post" action="mnt_curso.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="0" bgcolor="#E8E8E8">
                          <tr>
                            <td colspan="2" bgcolor="#B6D3FC" class="titulo_seccion"><div align="left">INFORMACI&Oacute;N DEL CURSO </div></td>
                          </tr>
                          <tr>
                            <td width="21%" align="left" valign="middle" class="lbl_formulario">C&oacute;digo</td>
                            <td><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\"";}?>>
                            </div>                              <div align="right"></div></td>
                            </tr>
                          <tr>
                            <td width="21%" align="left" valign="middle" class="lbl_formulario">Nombre del Curso </td>
                            <td><div align="left">
                              <input name="txtcurso" type="text" class="textbox" id="txtcurso" value="<?=$info[curso];?>" size="60" maxlength="100">
                            </div></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  <table width="100%"  border="0" cellspacing="1" cellpadding="5">
                    <tr>
                      <td width="20%"><input name="sid" type="hidden" id="sid" value="<?=$sid;?>">
                        <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 los cambios">
                      </div></td>
                      <td width="25%"><div align="center">
                        <input name="Submit2" type="reset" class="boton_deshacer" value="Deshacer los cambios">
                      </div></td>
                      <td width="20%">&nbsp;</td>
                    </tr>
                  </table>
                  <br>
                </form>
              </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>