MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/public_html/actualizar_info_serviasjudinet_sol.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
$linea = '-';

function Conectarse()
	{
	   if (!($link=@mysql_connect("localhost","asjudine","as2006")))
	   {
		  echo "Error conectando con el servidor.";
		  exit();
	   }
	   $dbname = "asjudinet";
	   if (!@mysql_select_db($dbname,$link))
	   {
		  echo "Error seleccionando la base de datos.";
		  exit();
	   }
	   return $link;
	}
	Conectarse();	


			
$resu = mysql_query('SELECT cedula, ced_ciudad, nombre, fecha, direccion, ciudad, telefono, celular, email, devengado, descuentos, neto, unidad, monto_solicitado, codigo_plan, numero_cuenta, banco, codigo_asesor, codigo_militar, grado, codigo_sucursal, numero_libranza, con_valor_mensual, con_valor_total, fecha_nac, numero_contrato FROM solicitud_credito WHERE cedula = "' . $HTTP_GET_VARS["ced2"] . '" ');
			if (!$resu) {
				die('Invalid query: ' . mysql_error());
			}	 
			list($cedu, $ced_ciudad, $apeno, $fecafi,$dire, $ciue, $tele, $celul, $em, $deven, $desc, $sala, $uni, $mon, $codigo_plan, $cuent, $banc, $codigo_asesor, $codi, $grado, $codigo_sucursal, $numero_libranza, $vmm, $vmt, $fecna, $numero_contrato) = mysql_fetch_row($resu);
			
				$resd = mysql_query('SELECT grado FROM solicitud_credito WHERE cedula = "' ."$cedu". '" ');
		if (!$resd) {
				die('Invalid query: ' . mysql_error());
		}	 
		list( $grad) = mysql_fetch_row($resd);
					

		//$sqlnoms2 = "select nombre from datos_empresa where cedula = '$ced2'";
		//$controls2 = mysql_query($sqlnoms2, $dbi) or die(mysql_error());
		$resu2 = mysql_query('SELECT nombre FROM datos_empresa WHERE cedula = "' . $HTTP_GET_VARS["ced2"] . '" ');
			if (!$resu2) {
				die('Invalid query: ' . mysql_error());
			}	 
		list($el) = mysql_fetch_row($resu2);
		

		$controls3 = mysql_query('SELECT codigo_contrato, valor_mensual, valor_total FROM planes_contratos WHERE codigo = "' ."$codigo_plan". '" ');
			if (!$controls3) {
				die('Invalid query: ' . mysql_error());
			}	 
		list( $plans, $val_cuotas, $val_conta) = mysql_fetch_row($controls3);
		
	//	$sqlnoms4 = "select vendedor from vendedores where codigo = '$codigo_asesor'";
	//	$controls4 = mysql_query($sqlnoms4, $dbi) or die(mysql_error());
	$controls4 = mysql_query('SELECT * FROM vendedores WHERE codigo = "' ."$codigo_asesor". '" ');
			if (!$controls4) {
				die('Invalid query: ' . mysql_error());
			}	 
		list($cod, $vendedor, $estad) = mysql_fetch_row($controls4);
		
		//$sqlnom6 = "select nombre from sucursal where codigo = '$codigo_sucursal'";
		//$control6 = mysql_query($sqlnom6, $dbi) or die(mysql_error());
		$control6 = mysql_query('SELECT * FROM sucursal WHERE codigo = "' ."$codigo_sucursal". '" ');
			if (!$control6) {
				die('Invalid query: ' . mysql_error());
			}	 
		list($cod, $nombre_sucursal, $direc, $celu, $tip) = mysql_fetch_row($control6);

if(isset($_POST["grabar"]))
{
    
	$resu9 = mysql_query('SELECT * FROM info_asjudinet WHERE cedula = "' . $_POST["cedb"] . '" ');
			
	$num=mysql_num_rows($resu9); 
	if($num==0)
	{
	$mt = floor(($mes_inicio + $numcuo)/12);
	$submt = (($mes_inicio + $numcuo)%12)-1;
	$at = $mt + $año_inicio;
	if($submt==0)
	{
		$submt = 12;
		$at = $at-1;
	}
	
			//$sqlnom3 = "select codigo, unidad from descuentos where id = '$unidt2'";
			//$control3 = mysql_query($sqlnom3, $dbi) or die(mysql_error());
		$control3 = mysql_query('SELECT codigo, unidad FROM descuentos WHERE id = "' . "$unidt2". '" ');
			if (!$control3) {
				die('Invalid query: ' . mysql_error());
			}		 
			list($codcd, $unidt) = mysql_fetch_row($control3);
			
			$control4 = mysql_query('SELECT codigo FROM entidad_laboral  WHERE codigo = "' . "$pag". '" ');
			if (!$control4) {
				die('Invalid query: ' . mysql_error());
			}		 
			list($codi) = mysql_fetch_row($control4);
			
			$control5 = mysql_query('SELECT codigo FROM descuentos  WHERE codigo = "' . "$entrec". '" ');
			if (!$control5) {
				die('Invalid query: ' . mysql_error());
			}		 
			list($coden) = mysql_fetch_row($control5);
			
			$controls8 = mysql_query('SELECT * FROM vendedores WHERE codigo = "' ."$codigo_asesor". '" ');
			if (!$controls8) {
				die('Invalid query: ' . mysql_error());
			}	 
		list($codss, $vendedor, $estad) = mysql_fetch_row($controls8);
		
		$control6 = mysql_query('SELECT * FROM sucursal WHERE codigo = "' ."$codigo_sucursal". '" ');
			if (!$control6) {
				die('Invalid query: ' . mysql_error());
			}	 
		list($codrr, $nombre_sucursal, $direc, $celu, $tip) = mysql_fetch_row($control6);
		

		
		$re = mysql_query("UPDATE  solicitud_credito  set cedula = '" . $_POST[cedb] . "', ced_ciudad= '" . $_POST[ciuced] . "', nombre = '" . $_POST[apenom] . "', direccion = '" . $_POST[dire] . "', telefono = '" . $_POST[tel] . "', celular = '" . $_POST[cel] . "', email = '" . $_POST[email] . "',  codigo_director = '" . $_POST[cod_dir] . "', codigo_asesor = '" . $_POST[ase] . "',  grado = '" . $_POST[gra] . "',  estado = '2' , entidad_laboral = '" . $_POST[enti] . "' WHERE cedula = '" . $_POST[cedb] . "' || cedula = '" . $_POST[cod] . "' ");
			if (!$re) {
				die('No se actualizó la BD :  ' . mysql_error());
			}
    
    
	$res = mysql_query('SELECT cedula, nombre  FROM asjudinet_cartera  WHERE cedula = "' . $HTTP_GET_VARS["ced2"]  . '" ');
		if (!$res) {
				die('Invalid query: ' . mysql_error());
		}	 
		list($cedud, $nombr) = mysql_fetch_row($res);
		
	
	if ($cedud == $cedb )
	{
	 		 $mssql3 = mysql_query("UPDATE  asjudinet_cartera  set nombre   = '" . $_POST[apenom] . "', numerocontrato   = '" . $_POST[numcon] . "', tipocontrato  = '" . $_POST[tipc] . "',  codigo_sucursal = '" .$codrr. "', direccion= '" . $_POST[dire] . "', telefono = '" . $_POST[tel] . "', celular = '" . $_POST[cel] . "', email = '" . $_POST[email] . "', diaafiliacion = '" . $_POST[dis] . "', mesafiliacion = '" . $_POST[mes] . "', anoafiliacion = '" . $_POST[anos] . "', valorcontrato = '" . $_POST[valcon] . "' , numerocuotas = '" . $_POST[numcuo] . "' , valorcuota = '" . $_POST[valcuo] . "', mescomienzopago = '" . $_POST[mes_inicio] . "', anocomienzopago = '" . $_POST[ano_inicio] . "', saldoanteior = '" . $_POST[valcon] . "', cuotaspendientes = '" . $_POST[numcuo] . "', cuotasdescontadas = '0', saldonuevo = '" . $_POST[valcon] . "', mesultimopago = '" . $submt. "', anoultimopago = '" .$at. "'  WHERE cedula = '" . $_POST[cedb] . "'");
            if (!$mssql3) {
				die('Invalid query asjudinet_cartera MODIFICAR: ' . mysql_error());
			}   
	}
	else
	{
	
	$mssql4 = mysql_query("INSERT INTO  asjudinet_cartera (cedula, nombre, numerocontrato, tipocontrato, codigo_sucursal, direccion, telefono, celular, ciudad,  email, diaafiliacion, mesafiliacion, anoafiliacion, valorcontrato, numerocuotas, valorcuota, mescomienzopago, anocomienzopago , saldoanteior, cuotaspendientes, cuotasdescontadas, saldonuevo, mesultimopago, anoultimopago) VALUES ('" . $_POST["cedb"]  . "','" . $_POST["apenom"]  . "', '" . $_POST["numcon"]  . "', '" . $_POST["tipc"]  . "' ,'" . "$codrr". "' , '" . $_POST["dire"]  . "', '" . $_POST["tel"]  . "', '" . $_POST["cel"]  . "', '" . $_POST["ciud"]  . "', '" . $_POST["email"]  . "', '" . $_POST["dis"]  . "', '" . $_POST["mes"]  . "', '" . $_POST["anos"]  . "', '" . $_POST["valcon"]  . "', '" . $_POST["numcuo"]  . "', '" . $_POST["valcuo"]  . "', '" . $_POST["mes_inicio"]  . "', '" . $_POST["ano_inicio"]  . "', '" . $_POST["valcon"]  . "', '" . $_POST["numcuo"]  . "', '0', '" . $_POST["valcon"]  . "', '" . "$submt". "', '" ."$at". "')");
	if (!$mssql4) {
				die('Invalid query asjudinet_cartera insertar: ' . mysql_error());
			}   
	
	}		
			 $mssql4 = mysql_query("UPDATE  cartera_datos   set nombre   = '" . $_POST[apenom] . "', direccion= '" . $_POST[dire] . "', telefono = '" . $_POST[tel] . "', celular = '" . $_POST[cel] . "', email = '" . $_POST[email] . "' WHERE cedula = '" . $_POST[cedb] . "'");
            if (!$mssql4) {
				die('Invalid query cartera datos: ' . mysql_error());
			}  
			
	
mysql_query("INSERT INTO info_asjudinet (cedula, sucursal, pagaduria, unidad_desc, cod_desc, entidad_recaudo, libranza, fecha_libranza, val_contrato, cuotas, valor_cuota, contrato, tipo_contrato, beneficiarios, mes_inicio, ano_inicio, mes_termino, ano_termino, vendedor, renovacion) VALUES ('" . $_POST["cedb"]  . "','" . "$codrr" . "','" . "$codi" . "','" . "$unidt" . "','" . "$codcd" . "','" . "$coden" . "','" . $_POST["numlib"]  . "','" . $_POST["fecha_lib"]  . "','" . $_POST["valcon"]  . "','" . $_POST["numcuo"]  . "','" . $_POST["valcuo"]  . "','" . $_POST["numcon"]  . "','" . $_POST["tipc"]  . "','" . $_POST["numben"]  . "','" . $_POST["mes_inicio"]  . "','" . $_POST["ano_inicio"]  . "','" . "$submt" . "','" . "$at" . "','" . "$codss" . "','SI')");

			
mysql_query("INSERT INTO datos_basicos_rc(cedula, apellidos_noms, codigo, grado, direccion, celular, telefono, ciudad, email, entidad_laboral, fecha_nacimiento) VALUES ('" . $_POST["cedb"]  . "','" . $_POST["apenom"]  . "','" . $_POST["cod"]  . "','" . $_POST["gra"]  . "','" . $_POST["dir"]  . "','" . $_POST["cel"]  . "','" . $_POST["tel"]  . "','" . $_POST["ciud"]  . "','" . $_POST["email"]  . "','" . "$codi" . "','" . $_POST["fecna"]  . "')");	
        	  
/*			
mysql_query("INSERT INTO reporte_mindefensa(codigo, cedula, nombre, grado, cod_desc, libranza, fecha_libranza, tipo_doc, valor_descuento, cuotas, pagaduria, mes_inicio, ano_inicio, mes_termino, ano_termino, proveedor) VALUES ('" . $_POST["cod"]  . "','" . $_POST["cedb"]  . "','" . $_POST["apenom"]  . "','" . $_POST["gra"]  . "','" . "$codcd" . "','" . $_POST["numlib"]  . "','" . $_POST["fecha_lib"]  . "','LIB','" . $_POST["valcuo"]  . "','" . $_POST["numcuo"]  . "','" ."$codi"  . "','" . $_POST["mes_inicio"]  . "','" . $_POST["año_inicio"]  . "','" . $_POST["submt"]  . "','" . $_POST["at"]  . "','SERVIASJUDINET')");
*/

	$control6 = mysql_query('SELECT codigo FROM planes_contratos  WHERE   codigo_contrato  = "' . "$planc". '" ');
			if (!$control6) {
				die('Invalid query: ' . mysql_error());
							}	 
			list($cod_p) = mysql_fetch_row($control6);
			
			
				$resut6 = mysql_query('SELECT valor_comision FROM valor_comisiones_planes WHERE codigo_plan = "' . "$cod_p". '" ');
			if (!$resut6) {
				die('Invalid query: ' . mysql_error());
			}		 
			list($valorcomip) = mysql_fetch_row($resut6);

							mysql_query("INSERT INTO comisiones_ventas(cedula, valor_comision, estado, codigo_asesor, codigo_dir_nacional, codigo_dir_regional, fecha_afiliacion) VALUES ('" . $_POST["ced"]  . "','" . "$valorcomip" . "', '0','" . $_POST["ase"]  . "', '" . $_POST["cod_dir"]  . "', '" . $_POST["cod_reg"]  . "', '" . $_POST["fecha_lib"]  . "')");		
	
	
			$salant=$numcuo*$valcuo;
			
mysql_query("INSERT INTO estado_contable(codigo, saldo_ant, cuotas_pend, nuevo_saldo, cuotas_desc, fecha_udesc, tipo_pago) VALUES ('" . $_POST["cedb"]  . "','" . "$salant". "','" . $_POST["numcuo"]  . "','" . "$salant". "','0','','" . $_POST["fecha_lib"]  . "','JUR')");
            		
            
            echo "<script>alert('La informacion fue grabada correctamente');</script>";
	}else{
		echo "<script>alert('Tiene un PLAN de JURIDICA pendiente');</script>";
	}
				 
}


$sql = mysql_query('SELECT * FROM entidad_laboral order by nombre ');
			if (!$sql) {
				die('Invalid query: ' . mysql_error());
			}	
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);  

$sql2 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql2) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);  


$sql3 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql3) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql3 = mysql_fetch_assoc($sql3);
$totalRows_sql3 = mysql_num_rows($sql3);


$sql4 = mysql_query('SELECT * FROM vendedores WHERE estado = "1" order by vendedor');
			if (!$sql4) {
				die('Invalid query: ' . mysql_error());
			}
		$row_sql4 = mysql_fetch_assoc($sql4);
		$totalRows_sql4 = mysql_num_rows($sql4);


$sql5 = mysql_query('SELECT * FROM sucursal order by nombre ');
			if (!$sql5) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql5 = mysql_fetch_assoc($sql5);
$totalRows_sql5 = mysql_num_rows($sql5); 


$sql6 = mysql_query('SELECT * FROM descuentos order by codigo ');
			if (!$sql6) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql6 = mysql_fetch_assoc($sql6);
$totalRows_sql6 = mysql_num_rows($sql6); 

$sql7 = mysql_query('SELECT * FROM director_ventas WHERE estado = "1" order by nombre');
			if (!$sql7) {
				die('Invalid query: ' . mysql_error());
			}	
		$row_sql7 = mysql_fetch_assoc($sql7);
		$totalRows_sql7 = mysql_num_rows($sql7); 

?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo10 {	font-size: 14px;
	font-weight: bold;
}
.Estilo12 {
	font-size: 10px;
	font-family: "Times New Roman", Times, serif;
}
.Estilo15 {	font-size: 12px;
	color: #000000;
	font-weight: bold;
}
.campo1 {	background-color: #B7FFFF;
	border: thin dashed #B6B6B6;
}
.campo1 {	font-family: "Courier New", Courier, monospace;
	font-size: 16px;
	font-style: normal;
	font-weight: bold;
	background-color: #E1EFFD;
	border: thin doble #009999;
}
.campo1 {
	font-family: "Times New Roman", Times, serif;
	font-size: 10px;
	color: #5151FF;
	background-color: #C4E4FD;
	border: thin solid #009999;
	height: 16px;
	width: auto;
	font-weight: bold;
}
.datos3 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #FF3300;
	background-color: #A6ECD7;
	margin: 1px;
	padding: 2px;
	border: medium groove #CCCCFF;
}
body {
	background-color: #DCFAF3;
}
.campo {background-color: #FFFFCC; border:1px solid #990000; font-family:Arial;  font-size:11px; height: inherit}
.Estilo3 {	color: #2492FF;
	font-weight: bold;
}
.recaudo {	font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	font-variant: normal;
	color: #000000;
	background-color: #B6CBDC;
	margin: 4px;
	padding: 8px;
	width: auto;
	border: medium outset #339966;
}
.datos2 {
	font-family: "Courier New", Courier, monospace;
	font-size: 10px;
	font-style: normal;
	font-weight: normal;
	color: #0033FF;
	background-color: #FFE2C6;
	margin: 1px;
	padding: 2px;
	border: medium doble #EEBFEB;
}
.go {
	font-family: "Times New Roman", Times, serif;
	font-size: 9px;
	font-style: normal;
	color: #FF6633;
	background-color: #FBDCBD;
	padding: 1px;
	height: auto;
	width: auto;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
}
.Estilo8 {	font-size: 20px;
	font-weight: bold;
}
.datos1 {	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-style: normal;
	text-decoration: blink;
	background-color: #CCFFCC;
	margin: 5px;
	padding: 7px;
	height: auto;
	width: auto;
	border: thin solid #0099FF;
}
.datos1 {	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 16px;
	background-color: #FDE0C1;
	margin: 2px;
	padding: 3px;
	border: medium doble #DBAED7;
}
.datos1 {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	font-weight: normal;
	background-color: #B8F5E8;
	margin: 4px;
	padding: 5px;
	border: thin outset #009999;
}
.Estilo51 {font-size: 16px}
.Estilo55 {
	font-size: 10px;
	font-weight: bold;
	font-family: "Times New Roman", Times, serif;
}
.Estilo56 {font-size: 11px}
.Estilo58 {font-size: 14px}
.Estilo64 {	font-size: 8px;
	font-weight: bold;
	color: #000000;
}
.est_cont2 {	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #2B39EC;
	background-color: #F0F5CF;
	height: 18px;
	width: auto;
	border: thin solid #FABF85;
}
.Estilo68 {font-size: 10px; font-weight: bold; }
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div align="center">
    <table width="663" border="3" cellpadding="3" cellspacing="3" class="datos3">
      <caption>
      <div align="center"><strong><span class="Estilo12"><br />
        </span></strong><strong><span class="Estilo58">INFORMACION SERVIASJUDINET</span><br />
        </strong>
        <table width="554" border="3" cellpadding="3" cellspacing="3" class="datos2">
<caption>
            <span class="Estilo8"><br />
              <span class="Estilo58">DATOS BASICOS </span></span>
          </caption>
          <tr>
              <td width="93"><div align="left"><span class="Estilo55">Apellidos y Nombres :</span></div></td>
<td colspan="4"><div align="left">
                  <input name="apenom" type="text" class="campo1" id="apenom" value="<?php echo $apeno ?>" size="50" maxlength="50" />
              </div></td>
          </tr>
                      <tr>
              <td><div align="center" class="Estilo55">
                <div align="right">Cedula : </div>
              </div></td>
        <td width="142"><div align="left">
                  <input name="cedb" type="text" class="campo1" id="cedb" value="<?php echo $cedu ?>" size="15" maxlength="15" />
              </div></td>
              <td width="93"><div align="center" class="Estilo55">
                <div align="right">Codigo : </div>
              </div></td>
<td colspan="2"><div align="left">
                  <input name="cod" type="text" class="campo1" id="cod" value="<?php echo $codi ?>" size="15" maxlength="15" />
              </div></td>
          </tr>
                      <tr>
              <td><div align="center" class="Estilo55">
                <div align="right">Grado : </div>
              </div></td>
        <td><div align="left">
                  <input name="gra" type="text" class="campo1" id="gra" value="<?php echo $grad ?>" size="15" maxlength="15" />
              </div></td>
              <td><div align="center" class="Estilo55">
                <div align="right">Direccion : </div>
              </div></td>
              <td colspan="2"><div align="left">
                  <input name="dire" type="text" class="campo1" id="dire" value="<?php echo $dire ?>" size="40" maxlength="40" />
              </div></td>
                      </tr>
                      <tr>
              <td><div align="center" class="Estilo55">
                <div align="right">Celular : </div>
              </div></td>
        <td><div align="left">
                  <input name="cel" type="text" class="campo1" id="cel" value="<?php echo $celul ?>" size="15" maxlength="15" />
              </div></td>
              <td><div align="center" class="Estilo55">
                <div align="right">Telefono : </div>
              </div></td>
              <td colspan="2"><div align="left">
                  <input name="tel" type="text" class="campo1" id="tel" value="<?php echo $tele ?>" size="15" maxlength="15" />
              </div></td>
                      </tr>
                      <tr>
                        <td><div align="center" class="Estilo55">
                          <div align="right">Fecha Nacimiento : </div>
                        </div></td>
                        <td><div align="left"><span class="Estilo64">MES-DIA </span>
                            <input name="fecna" type="text" class="campo1" id="fecna" value="<?php echo $fecna ?>" size="2" maxlength="5" />

                        </div></td>
                        <td><div align="center" class="Estilo55">
                          <div align="right">Entidad Laboral: </div>
                        </div></td>
                        <td colspan="2"><select name="enti" class="est_cont2" id="enti">
                          <option value="">--SELECCIONE ENTIDAD--</option>
                          <?php
     do {  
?>
                          <option value="<?php echo $row_sql['codigo'];?>"><?php echo $row_sql['nombre']?></option>
                          <?php
} while ($row_sql = mysql_fetch_assoc($sql));
  $rows = mysql_num_rows($sql);
  if($rows > 0) {
      mysql_data_seek($sql, 0);
       $row_sql = mysql_fetch_assoc($sql);
  }
?>
                        </select>						</td>
                      </tr>
                      <tr>
              <td><div align="center" class="Estilo55">
                <div align="right">Ciudad : </div>
              </div></td>
              <td colspan="2"><div align="left">
                <input name="ciud" type="text" class="campo1" id="ciud" value="<?php echo $ciue ?>" size="25" maxlength="25" />
              </div></td>
              <td width="47"><div align="center" class="Estilo55">
                <div align="right">Email : </div>
              </div></td>
              <td width="113"><div align="left">
                <input name="email" type="text" class="campo1" id="email" value="<?php echo $em ?>" size="25" maxlength="40" />
              </div></td>
          </tr>
        </table>
        <strong><br />
        <br />
        <span class="Estilo51">INFORMACION SERVIASJUDINET </span><br />
        <br />
        </strong>      
        <label></label>
      </div>
      </caption>
      <tr>
        <th width="103" class="Estilo12" scope="col"><div align="right"><span class="Estilo12">Sucursal : </span></div></th>
        <th width="186" scope="col"><div align="left">
          <input name="suc" type="text" class="campo1" id="suc" value="<?php echo $nombre_sucursal ?>" size="30" maxlength="45"  readonly=""/>
        </div></th>
        <th width="90" scope="col"><div align="right"><span class="Estilo12">Pagaduria : </span></div></th>
        <th width="229" scope="col"><div align="left">
          <select name="pag" class="est_cont2" id="pag">
            <option value="">--SELECCIONE PAGADURIA--</option>
            <?php
     do {  
?>
            <option value="<?php echo $row_sql['codigo'];?>"><?php echo $row_sql['nombre']?></option>
            <?php
} while ($row_sql = mysql_fetch_assoc($sql));
  $rows = mysql_num_rows($sql);
  if($rows > 0) {
      mysql_data_seek($sql, 0);
       $row_sql = mysql_fetch_assoc($sql);
  }
?>
          </select>
        </div></th>
      </tr>
      <tr>
        <td height="31" class="Estilo12"><div align="center" class="Estilo12">
          <div align="right"><strong>Unidad y Codigo Descuento  :</strong></div>
        </div></td>
        <td><label>
        </label>
          <div align="left">
            <select name="unidt2" class="est_cont2" id="unidt2">
              <option value="">--SELECIONE UNIDAD--</option>
              <?php
     do {  
?>
              <option value="<?php echo $row_sql2['id'];?>"><?php echo $row_sql2['unidad'].'-'.$row_sql2['codigo']?></option>
              <?php
} while ($row_sql2 = mysql_fetch_assoc($sql2));
  $rows2 = mysql_num_rows($sql2);
  if($rows2 > 0) {
      mysql_data_seek($sql2, 0);
       $row_sql2 = mysql_fetch_assoc($sql2);
  }
?>
            </select>
        </div></td>
        <td><div align="center" class="Estilo56">
          <div align="right" class="Estilo12"><strong>Entidad Recaudo   :</strong></div>
        </div></td>
        <td><div align="left">
          <select name="entrec" class="est_cont2" id="entrec">
            <option value="">--SELECIONE ENTIDAD--</option>
            <?php
     do {  
?>
            <option value="<?php echo $row_sql6['codigo'];?>"><?php echo $row_sql6['concepto']?></option>
            <?php
} while ($row_sql6 = mysql_fetch_assoc($sql6));
  $rows6 = mysql_num_rows($sql6);
  if($rows6 > 0) {
      mysql_data_seek($sql6, 0);
       $row_sql6 = mysql_fetch_assoc($sql6);
  }
  
?>
          </select>
        </div>        <label>
        </label></td>
      </tr>
      <tr>
        <td height="31" class="Estilo12"><div align="center" class="Estilo56">
          <div align="right" class="Estilo12"><strong>Numero Libranza : </strong></div>
        </div></td>
        <td><div align="left">
          <input name="numlib" type="text" class="campo1" id="numlib" value="<?php echo $numero_libranza ?>" size="15" maxlength="15" />
        </div>        <label></label></td>
        <td><div align="center" class="Estilo12">
          <div align="right"><strong> Vendedor  :</strong></div>
        </div></td>
        <td><div align="left">
          <input name="vend" type="text" class="campo1" id="vend" value="<?php echo $vendedor ?>" size="30" maxlength="45" readonly=""/>
        </div></td>
      </tr>
      <tr>
        <td class="Estilo12"><div align="center" class="Estilo12">
          <div align="right"><strong>Numero  Cuotas : </strong></div>
        </div></td>
        <td><div align="left">
          <input name="numcuo" type="text" class="campo1" id="numcuo" value="<?php echo $meses ?>" size="4" maxlength="2" />
        </div></td>
        <td><div align="center" class="Estilo12">
          <div align="right"><strong>Valor Contrato : </strong></div>
        </div></td>
        <td><div align="left">
          <input name="valcon" type="text" class="campo1" id="valcon" value="<?php echo $vmt ?>" size="15" maxlength="15" />
        </div></td>
      </tr>
      <tr>
        <td class="Estilo12"><div align="center" class="Estilo56">
          <div align="right" class="Estilo12"><strong>Numero Contrato : </strong></div>
        </div></td>
        <td><div align="left">
          <input name="numcon" type="text" class="campo1" id="numcon" value="<?php echo $numero_contrato ?>" size="15" maxlength="15" />
        </div></td>
        <td><div align="center" class="Estilo12">
          <div align="right"><strong>Valor Cuota: </strong></div>
        </div></td>
        <td><div align="left">
          <input name="valcuo" type="text" class="campo1" id="valcuo" value="<?php echo $vmm ?>" size="15" maxlength="15" />
        </div></td>
      </tr>
      <tr>
        <td height="32" class="Estilo12"><div align="center" class="Estilo56">
          <div align="right" class="Estilo12"><strong>Inicio Pagos  :</strong></div>
        </div></td>
        <td><div align="left"><span class="Estilo15">MES</span>-
            <label>
            <select name="mes_inicio" class="est_cont2" id="mes_inicio">
              <option value="01" selected="selected">01</option>
              <option value="02">02</option>
              <option value="03">03</option>
              <option value="04">04</option>
              <option value="05">05</option>
              <option value="06">06</option>
              <option value="07">07</option>
              <option value="08">08</option>
              <option value="09">09</option>
              <option value="10">10</option>
              <option value="11">11</option>
              <option value="12">12</option>
            </select>
            </label>
-<span class="Estilo15">A&Ntilde;O</span>-
<input name="ano_inicio" type="text" class="campo1" id="ano_inicio" value="0000" size="5" maxlength="4" />
        </div>
        <label></label></td>
        <td><div align="center" class="Estilo12">
          <div align="right"><strong>Tipo Contrato : </strong></div>
        </div></td>
        <td><div align="left">
          <input name="tipc" type="text" class="campo1" id="tipc" value="<?php echo $plans ?>" size="8" maxlength="8" />
        </div></td>
      </tr>
      <tr>
        <td class="Estilo12"><div align="center" class="Estilo10">
          <div align="right" class="Estilo12">Fecha Termino :</div>
        </div></td>
        <td><div align="left"><span class="Estilo15">MES</span>-
            <input name="mes_term" type="text" class="campo1" id="mes_term" value="<?php echo $submt ?>" size="2" maxlength="2"  readonly=""/>
-<span class="Estilo15">A&Ntilde;O</span>-
<input name="ano_term" type="text" class="campo1" id="ano_term" value="<?php echo $at ?>" size="5" maxlength="4"  readonly=""/>
        </div></td>
        <td><div align="center" class="Estilo56">
          <p align="right" class="Estilo12"><strong>Fecha Afiliacion:</strong></p>
        </div></td>
        <td><div align="left"> AÑO-MES-DIA
          <input name="anos" type="text" class="campo1" id="anos" value="<?php echo $anos ?>" size="4" maxlength="4" />
		  <input name="mes" type="text" class="campo1" id="mes" value="<?php echo $mes ?>" size="2" maxlength="2" />
		  <input name="dis" type="text" class="campo1" id="dis" value="<?php echo $dis ?>" size="2" maxlength="2" />
        </div></td>
      </tr>
      <tr>

        <td><div align="right"><strong>Director :</strong></div></td>
        <td ><div align="left">
          <select name="cod_dir" class="est_cont2" id="cod_dir">
            <option value="">-SELECCIONE DIRECTOR-</option>
            <?php
     do {  
?>
            <option value="<?php echo $row_sql7['codigo'];?>"><?php echo $row_sql7['nombre']?></option>
            <?php
} while ($row_sql7 = mysql_fetch_assoc($sql7));
  $rows7 = mysql_num_rows($sql7);
  if($rows7 > 0) {
      mysql_data_seek($sql7, 0);
       $row_sql7 = mysql_fetch_assoc($sql7);
  }
?>
          </select>
        </div></td>
     
        <td><div align="center" class="Estilo12">
          <div align="right"><strong>Numero Beneficiarios : </strong></div>
        </div></td>
        <td><div align="left">
          <input name="numben" type="text" class="campo1" id="numben" value="<?php echo $nbf ?>" size="4" maxlength="2" />
        </div></td>
      </tr>
	  <td><div align="center" class="Estilo12">
          <div align="right"><strong>Vendedor : </strong></div>
        </div></td>
	  
	  <td ><div align="left">
          <select name="ase" class="est_cont2" id="ase">
            <option value="0">-SELECCIONE ASESOR-</option>
            <?php
     do {  
?>
            <option value="<?php echo $row_sql4['codigo'];?>"><?php echo $row_sql4['vendedor']?></option>
            <?php
} while ($row_sql4 = mysql_fetch_assoc($sql4));
  $rows4 = mysql_num_rows($sql4);
  if($rows4 > 0) {
      mysql_data_seek($sql4, 0);
       $row_sql4 = mysql_fetch_assoc($sql4);
  }
?>
          </select>
        </div></td>
	  </tr>
    </table>
  </div>
  <p align="center">
    <input name="grabar" type="submit" class="Estilo3" id="grabar" value="Enviar" />
  </p>
  <p align="center">&nbsp;</p>
</form>
</body>
</html>