<?
include("../fnc.php");
enlinea_a();
?>
<!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>
</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" bgcolor="#FFFFCC"><?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" 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><div align="center" class="titulo_pagina">
                              <div align="left" class="parrafo">CONTROL DE PAGOS <img src="../images/flecha_3.jpg" width="9" height="9"> Cargo a alumnos en forma global </div>
                          </div></td>
                          <td width="65"><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" 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><form name="form1" method="post" action="<?=$PHP_SELF;?>">
                                  <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
                                    <tr>
                                      <td width="30%" bgcolor="#CFDFEF"><strong>Seleccione un plan de pago </strong></td>
                                      <td width="58%" bgcolor="#ECF2F9">
                                        <select name="txtplan" class="textbox" id="select">
                                          <option value="SV" selected>Seleccione uno...</option>
                                          <?
                               $qalum=mysql_query("select * from cp_planesdepagos order by plan");
                               while($ialum=mysql_fetch_array($qalum)){
                               $sel="";
                               if($txtplan == $ialum[id]){
                                $sel="selected class='selected_option'";
                               }
                                echo "<option value='{$ialum[id]}' $sel>{$ialum[plan]}</option>";
                               }
                               ?>
                                        </select>
                                      </td>
                                      <td width="12%" bgcolor="#ECF2F9"><input name="Submit" type="submit" class="boton_guardar" value="Continuar"></td>
                                    </tr>
                                  </table>
                                  <?
                          if(!$txtplan){
                           exit();
                          }
                          if($txtplan=='SV'){
                            alert("Seleccione un plan de pago","javascript:history.go(-1)");
                          }

                          $qalm=mysql_query("select * from cp_planesdepagos where id = '$txtplan'");
                          if(mysql_num_rows($qalm)==0){
                            alert("ERROR:\\nEl plan de pago no existe","javascript:history.go(-1)");
                          }
                          $iplan=mysql_fetch_array($qalm);
                          ?>
                                </form>
                                  <br>
                                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td><form name="form2" method="post" action="mnt_cargo_group.php?idg=A&op=Add&key=<?=enc("por_plan");?>&cargo=<?=enc("Otros");?>&idp=<?=enc($txtplan);?>" onSubmit="return validar(this.form2);">
                                          <br>
                                          <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#CFDFEF">
                                            <tr bgcolor="#CFDFEF">
                                              <td colspan="2" class="titulo_seccion">Aplicar cargo a todos los alumnos con plan de pago: <?=$iplan[plan];?></td>
                                            </tr>
                                            <tr bgcolor="#CFDFEF">
                                              <td colspan="2"><div align="center"><strong>Otros cargos </strong></div></td>
                                            </tr>
                                            <tr align="center" valign="top" bgcolor="#ECF2F9">
                                              <td width="6%"><div align="left"><img src="../images/ic_otros_cobros.png" width="30" height="30"></div></td>
                                              <td width="94%"><div align="left">
                                                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                      <td width="33%"><input name="txtdesccargo" type="text" class="textbox" id="txtdesccargo3" size="40" maxlength="50"></td>
                                                      <td width="67%"><input name="txtvcargo" type="text" class="font_red_11" id="txtvcargo3" dir="rtl" value="0.00" size="6" maxlength="10"></td>
                                                    </tr>
                                                    <tr class="lbl_campo">
                                                      <td>Ingrese la descripci&oacute;n del cargo</td>
                                                      <td>Valor Q </td>
                                                    </tr>
                                                </table>
                                                  <br>
                                                <input name="Submit2" type="submit" class="boton_guardar" value="Operar cargo">
                                                <input name="idg" type="hidden" id="idg" value="<?=enc("A");?>">
                                              </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>