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

$p_alumno=dec($ida);
$qalm=mysql_query("select * from alumnos where carnet = '$p_alumno'");
if(mysql_num_rows($qalm)==0){
  alert("El alumno no existe","javascript:history.go(-1)");
}

$ialm=mysql_fetch_array($qalm);
$qvam=mysql_query("select jornadas.jornada, niveles.nivel, grados.grado
                   from grados inner join jornadas on grados.jornada = jornadas.id
                   inner join niveles on grados.nivel = niveles.id
                   where grados.id = {$ialm[grado_estudio]}");
if(mysql_num_rows($qvam)==0){
  alert("ERROR:\\nEl alumno no está inscrito en ningun grado","javascript:history.go(-1)");
}
$ivam=mysql_fetch_array($qvam);

$id_ca=dec($idc);
$qcargo=mysql_query("select * from cp_cargos where id = $id_ca");
  if(mysql_num_rows($qcargo)==0){
    param_inc();
  }
  $icargo=mysql_fetch_array($qcargo);

?>
<!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 language="javascript">
function validar(formulario){
 if(document.form2.txtdesccargo.value==""){
   alert("Ingrese la descripción del cargo");
   document.form2.txtdesccargo.focus();
   return (false);
 }

 if(document.form2.txtvcargo.value==""){
   alert("Ingrese el valor del cargo");
   document.form2.txtvcargo.focus();
   return (false);
 }

return (true);
}
</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($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" bgcolor="#FFFFCC">
        <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 height="20" bgcolor="#FFFFCC" class="titulo_pagina"><div align="center" class="titulo_seccion">
                <div align="left">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td background="../images/tema/bg_contenido.png"><div align="center" class="titulo_pagina">
                        <div align="left" class="parrafo">CONTROL DE PAGOS <img src="../images/flecha_3.jpg" width="9" height="9"> Modificaci&oacute;n de cargo a alumno</div>
                      </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>
              </div></td>
            </tr>
            <tr>
              <td align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><div align="left" class="parrafo">
                <table width="100%"  border="0" cellspacing="0" cellpadding="1">
                  <tr>
                    <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>                            <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td>                                    <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#CFDFEF">
                                        <tr>
                                          <td width="20%" bgcolor="#CFDFEF"><strong># Carn&eacute;:</strong></td>
                                          <td width="80%" bgcolor="#ECF2F9" class="lbl_formulario"><?=$ialm[carnet];?></td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#CFDFEF"><strong>Alumno:</strong></td>
                                          <td bgcolor="#ECF2F9"><span class="lbl_formulario">
                                            <?=$ialm[apellido].", ".$ialm[nombre];?>
                                          </span></td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#CFDFEF"><strong>Grado:</strong></td>
                                          <td bgcolor="#ECF2F9"><span class="lbl_formulario">
                                          <?=$ivam[jornada]." | ".$ivam[nivel]." | ".$ivam[grado];?>
                                          </span></td>
                                        </tr>
                                    </table>
                                    <hr size="1">
                                    <form name="form1" method="post" action="mnt_cp_updcargo.php">
                                      <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                        <tr>
                                          <td width="20%" bgcolor="#CFDFEF"><strong>Tipo:</strong></td>
                                          <td width="80%" bgcolor="#ECF2F9" class="font_blue_11"><?=$icargo[tipo];?></td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#CFDFEF"><strong>Fecha del cargo: </strong></td>
                                          <td bgcolor="#ECF2F9" class="font_blue_11"><?=fechalarga($icargo[fecha_cargo]);?></td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#CFDFEF"><strong>Descripci&oacute;n:</strong></td>
                                          <td bgcolor="#ECF2F9"><input name="txtdescripcion" type="text" class="textbox" id="txtdescripcion" value="<?=$icargo[descripcion];?>" size="50" maxlength="50"></td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#CFDFEF"><strong>Valor:</strong></td>
                                          <td bgcolor="#ECF2F9"><input name="txtvalor" type="text" class="textbox" id="txtvalor" dir="rtl" value="<?=$icargo[saldo];?>" size="10" maxlength="10"></td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#CFDFEF"><strong>Doc. Pago: </strong></td>
                                          <td bgcolor="#ECF2F9"><input name="txtdocumento" type="text" class="textbox" id="txtdocumento" value="<?=$icargo[documento];?>" size="11" maxlength="11">
                                            <strong>Tipo:</strong>                                            <select name="txttipodoc" class="textbox" id="txttipodoc">
                                              <option value="SV">Seleccione uno...</option>
                                              <option value="DP">Dep&oacute;sito Bancario</option>
                                              <option value="RC">Recibo de caja</option>
                                            </select></td>
                                        </tr>
                                        <tr>
                                          <td bgcolor="#CFDFEF"><strong>Fecha pago: </strong></td>
                                          <td bgcolor="#ECF2F9">
                                            <input name="txtdia" type="text" class="textbox" id="txtdia" value="<?=day_of_date($icargo[fecha_pago]);?>" size="3" maxlength="2">
                                            -
                                            <input name="txtmes" type="text" class="textbox" id="txtmes" value="<?=month_of_date($icargo[fecha_pago]);?>" size="3" maxlength="2">
                                            -
                                            <input name="txtyear" type="text" class="textbox" id="txtyear" value="<?=year_of_date($icargo[fecha_pago]);?>" size="5" maxlength="4">
                                            <span class="font_red_11"><em>[d&iacute;a-mes-a&ntilde;o] </em></span></td>
                                        </tr>
                                        <tr>
                                          <td colspan="2" bgcolor="#CFDFEF"><div align="center">
                                            <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                              <tr>
                                                <td width="17%"><a href="frm_cp_cargoindividual.php?txtalumno=<?=$p_alumno;?>"><img src="../images/regresar_c.png" width="32" height="32" border="0"></a><br>
                                                  Salir sin guardar los cambios </td>
                                                <td width="19%"><input name="idc" type="hidden" id="idc" value="<?=$idc;?>">
                                                  <input name="ida" type="hidden" id="ida" value="<?=$ida;?>"></td>
                                                <td width="58%"><div align="left">
                                                  <input name="Submit" type="submit" class="boton_guardar" value="Guardar los cambios">
                                                </div></td>
                                                <td width="6%">&nbsp;</td>
                                              </tr>
                                            </table>
                                          </div></td>
                                        </tr>
                                      </table>
                                    </form></td>
                              </tr>
                          </table></td></tr>
                    </table></td>
                    </tr>
                </table>
                </div></td>
              </tr>
          </table></td>
        </tr>
    </table>    </td>
  </tr>
</table>
</body>
</html>
