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/cartera_ingresar_datos.php
<?php 
require_once("mainfile.php");
include ("config.php");
global $dbi;
$espacio = ' ';
$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();

$control = mysql_query('SELECT nombres, cedula, codigo, grado, direccion_envio, ciudad_envio, telefono , celular, email, monto_solicitado, salario, numero_cuotas, valor_mensual , cuenta_ahorros, banco_cuenta, empresa, proveedor  FROM creditos WHERE cedula =  "' . $HTTP_GET_VARS["ced2"] . '" ');
		  if (!$control) {
				die('Invalid query 1: ' . mysql_error());
			}
		$num=mysql_num_rows($control); 
		list($apes, $cedula, $codi, $grad, $dire, $ciue, $tele, $celul, $em, $ms, $sal, $nc, $vm, $cah, $bcu, $el, $pro) = mysql_fetch_row($control);

	                                      
		if($num =='0')
			{    
$resul4 = mysql_query('SELECT cedula, nombre, grado, unidad FROM datos_credito WHERE cedula =  "' . $HTTP_GET_VARS["ced2"] . '" ');
			if (!$resul4) {
				die('Invalid query ooo: ' . mysql_error());
			}
	list($cedula, $apes, $grad, $unidad) = mysql_fetch_row($resul4);


$control3 = mysql_query('SELECT nombre FROM entidad_laboral WHERE codigo = "' ."$el". '" ');
	  if (!$control3) {
				die('Invalid query 3: ' . mysql_error());
			}	 
		list($laboral) = mysql_fetch_row($control3);
			
			}		

		
if(isset($_POST["guardar"]))
{

$dis = date("d");
$mes = date("m");
$anos = date("Y");

$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 + $ano_inicio;
	if($submt==0)
	{
		$submt = 12;
		$at = $at-1;
	}

		$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);
			
    
	$resu9 = mysql_query('SELECT cedula, nombre  FROM asjudinet_cartera  WHERE cedula = "' . $HTTP_GET_VARS["ced2"]  . '" ');
		if (!$resu9) {
				die('Invalid query YA CASI: ' . mysql_error());
		}	 
		$numt=mysql_num_rows($resu9); 
		list($cedud, $nombr) = mysql_fetch_row($resu9);
	
	/*if ($numt == '0' )
	{
	 		 $mssql3 = mysql_query("UPDATE  asjudinet_cartera  set nombre   = '" . $_POST[apenom] . "', numerocontrato   = '" . $_POST[numcont] . "', tipocontrato  = '" . $_POST[plan] . "',  codigo_sucursal = '" .$_POST[codigo_sucursal]. "', direccion= '" . $_POST[dire] . "', telefono = '" . $_POST[tel] . "', celular = '" . $_POST[cel] . "', email = '" . $_POST[email] . "', diaafiliacion = '" .$dis. "', mesafiliacion = '" .$mes. "', anoafiliacion = '" .$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, tipo_afiliado, 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["numcont"]  . "', '" . $_POST["plan"]  . "' , 'TITULAR', '" . $_POST["codigo_sucursal"]  . "' , '" . $_POST["dire"]  . "', '" . $_POST["tel"]  . "', '" . $_POST["cel"]  . "', '" . $_POST["ciud"]  . "', '" . $_POST["email"]  . "', '" ."$dis". "', '" ."$mes". "', '" ."$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());
			}   
	
	//}		
			
			$res = mysql_query('SELECT cedula, nombre  FROM cartera_serviasjudinet WHERE cedula = "' . $HTTP_GET_VARS["ced2"]  . '" ');
		if (!$res) {
				die('Invalid query PES: ' . mysql_error());
		}	 
		$rest=mysql_num_rows($res);
		list($cedud, $nombr) = mysql_fetch_row($res);
	
	
			$inipag =  $_POST[ano_inicio] .'-'.$_POST[mes_inicio];
			$finpag =  $at.'-'.$submt;
	


										$mssql4 = mysql_query("INSERT INTO cartera_serviasjudinet (cedula, codigo_militar, nombre, grado , numerocontrato, tipocontrato, numero_libranza, tipo_afiliado, codigo_sucursal, direccion, telefono, celular, ciudad, email, cuenta, banco, entidad_laboral, unidad_descuento, codigo_descuento, entidad_recaudo, fecha_nacimiento, fecha_afiliacion, valorcontrato, numerocuotas, valorcuota, fecha_inicio_contrato, fecha_termino_contrato, fecha_ultimo_registro, mes_inicio, ano_inicio, mes_termino, ano_termino, saldoanteior, cuotaspendientes, cuotasdescontadas, saldonuevo, vendedor, director, renovacion, causal_terminacion, estado) VALUES ('" . $_POST["cedb"]  . "', '" . $_POST["cod"] . "', '" . $_POST["apenom"]  . "', '" . $_POST["gra"] . "', '" . $_POST["numcont"]  . "', '" . $_POST["plan"]  . "', '" . $_POST["num_lib"] . "', 'TITULAR', '" . $_POST["codigo_sucursal"]  . "' , '" . $_POST["dire"]  . "', '" . $_POST["tel"]  . "', '" . $_POST["cel"]  . "', '" . $_POST["ciud"]  . "', '" . $_POST["email"]  . "', '" .$_POST["cue"]  . "', '" .$_POST["ban"]  . "', '" . $_POST["enti"] . "', '" ."$unidt". "', '" ."$codcd". "', '" . $_POST["entrec"] . "', '" . $_POST["fecna"] . "', '" . $_POST["fechas"]  . "', '" . $_POST["valcon"]  . "', '" . $_POST["numcuo"]  . "', '" . $_POST["valcuo"]  . "', '" . $_POST["fechainicio"]  . "',  '" . $_POST["fechatermino"]  . "', '', '" . $_POST["mes_inicio"]  . "', '" . $_POST["ano_inicio"]  . "',  '" ."$submt". "', '" ."$at". "', '" . $_POST["valcon"]  . "', '" . $_POST["numcuo"]  . "', '0', '" . $_POST["valcon"]  . "', '" . $_POST["ase"]  . "', '" . $_POST["cod_dir"]  . "', 'S', '', '1')");
	if (!$mssql4) {
				die('Invalid query cartera_serviasjudinet insertar: ' . mysql_error());
			}   
	
	//}	
			
			$sert = mysql_query("INSERT INTO cartera_datos (cedula, nombre, direccion, telefono, celular, ciudad, email, codigo, grado, entidad_laboral) VALUES ('" . $_POST["cedb"]  . "', '" . $_POST["apenom"]  . "', '" . $_POST["dire"]  . "', '" . $_POST["tel"]  . "', '" . $_POST["cel"]  . "', '" . $_POST["ciud"]  . "', '" . $_POST["email"]  . "', '" . $_POST["cod"]  . "', '" . $_POST["gra"]  . "', '" . $_POST["enti"]  . "')");	
        	  if (!$sert) {
				die('Invalid query cartera_datos insertar: ' . mysql_error());
			}   
	
	$control6 = mysql_query('SELECT codigo, numero_bene FROM planes_contratos  WHERE   codigo_contrato  = "' . $_POST["plan"]  . '"');
			if (!$control6) {
				die('Invalid query BIEN: ' . mysql_error());
							}	 
			list($cod_p, $numben) = mysql_fetch_row($control6);
			
	
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"]  . "', '" . $_POST["codigo_sucursal"]  . "','" . $_POST["enti"]  . "','" . "$unidt" . "','" . "$codcd" . "', '" . $_POST["entrec"] . "', '" . $_POST["num_lib"]  . "','" . $_POST["fechas"]  . "','" . $_POST["valcon"]  . "','" . $_POST["numcuo"]  . "','" . $_POST["valcuo"]  . "','" . $_POST["numcont"]  . "','" . $_POST["plan"]  . "','" ."$numben". "','" . $_POST["mes_inicio"]  . "','" . $_POST["ano_inicio"]  . "','" . "$submt" . "','" . "$at" . "', '" . $_POST["ase"]  . "','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["dire"]  . "','" . $_POST["cel"]  . "','" . $_POST["tel"]  . "','" . $_POST["ciud"]  . "','" . $_POST["email"]  . "','" . $_POST["enti"]  . "','" . $_POST["fecna"]  . "')");	

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

			$comis= mysql_query("INSERT INTO comisiones_ventas (cedula, valor_comision, estado, codigo_asesor, codigo_dir_nacional, codigo_dir_regional, fecha_afiliacion) VALUES ('" . $_POST["cedb"]  . "','" . "$valorcomip" . "', '0', '" . $_POST["ase"]  . "', '" . $_POST["cod_dir"]  . "', '" . $_POST["cod_reg"]  . "', '" . $_POST["fechas"]  . "')");		
			if (!$comis) {
				die('Invalid query comisiones ventas: ' . mysql_error());
			}		 
		
		$per =	mysql_query("INSERT INTO estado_contable (codigo, saldo_ant, cuotas_pend, nuevo_saldo, cuotas_desc, fecha_udesc, tipo_pago) VALUES ('" . $_POST["cedb"]  . "', '" . $_POST["valcon"]  . "', '" . $_POST["numcuo"]  . "', '" . $_POST["valcon"]. "','0','','JUR')");
            		if (!$per) {
				die('Invalid query estado_contable : ' . mysql_error());
			}	
            
            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 proveedores order by nombre ');
			if (!$sql2) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);

$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); 




?>
<!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=utf-8" />
<title>INGRESAR SOLICITUD CARTERA</title>


<style type="text/css">
<!--
.est_cont5 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	font-style: normal;
	font-weight: normal;
	background-color: #EDFAF4;
	margin: 2px;
	padding: 2px;
	height: auto;
	width: auto;
	border: thin groove #E9AAF0;
	color: #C72350;
}
.color_fondo_sc {
	background-color: #DCE0E4;
}
.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;
}
.est_cont6 {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #006262;
	background-color: #EDFED3;
	margin: 1px;
	padding: 1px;
	height: auto;
	width: auto;
	border: thin solid #D9B6F8;
}
.sol_cre1 {
	font-family: "Times New Roman", Times, serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #0B3495;
	background-color: #E6FAFF;
	margin: 1px;
	padding: 1px;
	height: 18px;
	width: auto;
	border: thin outset #56AD95;
}
.col_cre2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	color: #F92F0B;
	background-color: #B3D9F0;
	height: auto;
	width: auto;
	border: medium groove #FC9227;
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.Estilo53 {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;
}
.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: "Courier New", Courier, monospace;
	font-size: 11px;
	color: #5151FF;
	background-color: #C4E4FD;
	border: thin solid #009999;
	height: 18px;
	width: auto;
}
.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;
}
.datos2 {	font-family: "Courier New", Courier, monospace;
	font-size: 10px;
	font-style: normal;
	font-weight: normal;
	color: #0033FF;
	background-color: #FFE2C6;
	margin: 2px;
	padding: 3px;
	border: medium doble #EEBFEB;
}
.datos3 {	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #FF3300;
	background-color: #A6ECD7;
	margin: 4px;
	padding: 4px;
	border: medium groove #CCCCFF;
}
.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;
}
.Estilo66 {
	font-size: 10px;
	font-weight: bold;
}
.label {background-color: #FFFFCC; font-size: 16px; font-family: Arial; color:#0000CC; display: block;}
.Estilo67 {font-size: 18px}
.Estilo70 {color: #000066; }
.Estilo71 {font-size: 10px; font-weight: bold; color: #000066; }
-->
</style>
<script Language="JavaScript">

function validarEntero(valor){ 
      //intento convertir a entero. 
     //si era un entero no le afecta, si no lo era lo intenta convertir 
     valor = parseInt(valor) 

      //Compruebo si es un valor numérico 
      if (isNaN(valor)) { 
            //entonces (no es numero) devuelvo el valor cadena vacia 
            return "" 
      }else{ 
            //En caso contrario (Si era un número) devuelvo el valor 
            return valor 
      } 
} 

function valida_envia(){
	//valido LOS APELLIDOS
	if (document.form1.ape.value.length==0){
		alert("Tiene que escribir sus apellidos")
		document.form1.ape.focus()
		return (false);
	}
	
		//valido el nombre
	if (document.form1.noms.value.length==0){
		alert("Tiene que escribir sus nombres")
		document.form1.noms.focus()
		return (false);
	}

		//valido la cedula
	if (document.form1.ced.value.length==0){
		alert("Tiene que escribir el numero de cedula")
		document.form1.ced.focus()
		return (false);
	}

	return (true);
}
</script>
</head>
<body >

<form action=""  method="post" onsubmit="return valida_envia()" enctype="multipart/form-data" name="form1"  id="form1">
  <div align="center">
    <div class="Estilo50 Estilo67">SOLICITUD INGRESAR CREDITO </div>
	<br />
	<table width="702" border="2"  cellpadding="1" cellspacing="1" class="sol_cre1">
      <tr bgcolor="#F7FFE1" >
        <th width="75" bgcolor="#F7FFE1" scope="col"><div align="right" class="Estilo70">
            <div align="right"><strong>Fecha Solicitud :</strong></div>
        </div></th>
        <th width="127" bgcolor="#F7FFE1" scope="col"><div align="left" class="Estilo70">
          <input name="fecha" type="text" class="Estilo66" id="fecha" value="<?php echo date("Y-m-d"); ?>" size="10" maxlength="10" />
        </div></th>
        <td  align="right" bgcolor="#F7FFE1" ><span class="Estilo70"><strong>Apellidos y Nombres:</strong></span></td>
        <td colspan="3" align="left" bgcolor="#F7FFE1"><input name="nombre" type="text" class="Estilo66" id="nombre" value="<?php echo $nombre ?>" size="60" maxlength="65" />        </td>
      </tr>
      <tr>
        <td width="75" height="21" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cedula No:</strong></div></td>
        <td width="127" bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="cedula" type="text" class="Estilo66" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" />
        </div></td>
        <td width="109" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cogido Militar :</strong></div></td>
        <td width="100" bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="codigo" type="text" class="Estilo66" id="codigo" value="<?php echo $codigo ?>" size="14" maxlength="20" />
        </div></td>
        <td width="84" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Grado :</strong></div></td>
        <td width="172" bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="grado" type="text" class="Estilo66" id="grado" value="<?php echo $grado ?>" size="12" maxlength="10" />
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Direccion :</strong></div></td>
        <td colspan="2" bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="direccion" type="text" class="Estilo66" id="direccion" value="<?php echo $direccion ?>" size="45" maxlength="45" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>E-mail :</strong></div></td>
        <td colspan="2" bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="email" type="text" class="Estilo66" id="email" value="<?php echo $email ?>" size="35" maxlength="35" />
        </div></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Ciudad :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="ciudad" type="text" class="Estilo66" id="ciudad" value="<?php echo $ciudad ?>" size="14" maxlength="20" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Telefono :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="telefono" type="text" class="Estilo66" id="telefono" value="<?php echo $telefono ?>" size="10" maxlength="20" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Celular :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="celular" type="text" class="Estilo66" id="celular" value="<?php echo $celular ?>" size="20" maxlength="20" />
        </div></td>
      </tr>
      <tr >
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Cuenta No :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="cuenta" type="text" class="Estilo66" id="cuenta" value="<?php echo $cuenta ?>" size="20" maxlength="20" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Banco :</strong></div></td>
        <td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="banco" type="text" class="Estilo66" id="banco" value="<?php echo $banco ?>" size="20" maxlength="20" />
        </div></td>
		 <th width="84" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Sucursal :</strong></div></th>
        <th colspan="3" bgcolor="#F7FFE1" scope="col"><div align="left" class="Estilo70">
            <select name="sucursal" class="Estilo66">
              <option value="">--SELECCIONE SUCURSAL--</option>
              <?php
     do {  
?>
              <option value="<?php echo $row_sql5['nombre'];?>"><?php echo $row_sql5['nombre']?></option>
              <?php
} while ($row_sql5 = mysql_fetch_assoc($sql5));
  $rows5 = mysql_num_rows($sql5);
  if($rows5 > 0) {
      mysql_data_seek($sql5, 0);
       $row_sql5 = mysql_fetch_assoc($sql5);
  }
?>
            </select>
        </div></th>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Numero libranza:</strong></div></td>
        <td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="numlib" type="text" class="Estilo66" id="numlib" value="<?php echo $numlib ?>" size="12" maxlength="12" />
        </div></td>
        <td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Monto Solicitado  :</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
          <input name="monto" type="text" class="Estilo66" id="monto" value="<?php echo $monto ?>" size="12" maxlength="10" />
        </div></td>
		 <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Numero de Cuotas:</strong></div></td>
        <td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="numcuo" type="text" class="Estilo66" id="numcuo" value="<?php echo $numcuo ?>" size="12" maxlength="12" />
        </div></td>
       
      </tr>
      <tr>
       
        <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Valor Mensual:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="valcuo" type="text" class="Estilo66" id="valcuo" value="<?php echo $valcuo ?>" size="12" maxlength="12" />
        </div></td>
		     <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Neto Consignar:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="neto" type="text" class="Estilo66" id="neto" value="<?php echo $neto ?>" size="12" maxlength="12" />
        </div></td>
		   <td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Interes Deducible:</strong></div></td>
        <td bgcolor="#F7FFE1">
            <input name="interes" type="text" class="Estilo66" id="interes" value="<?php echo $interes ?>" size="12" maxlength="12" />
      </tr>
      <tr>
        <td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Fecha Inicio Contrato:</strong></div></td>
        <td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
            <input name="fechainicio" type="text" class="Estilo66" id="fechainicio" value="0000-00-00" size="10" maxlength="14" />
        </div></td>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Fecha Termino Contrato:</strong></div></td>
        <td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
            <input name="fechatermino" type="text" class="Estilo66" id="fechatermino" value="0000-00-00" size="10" maxlength="14" />
        </div></td>
        <td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Fecha Inicio Pagos:</strong></div></td>
        <td bgcolor="#F7FFE1"><span class="Estilo71">MES</span><span class="Estilo70">-
            <label>
            <select name="mes_inicio" class="Estilo66" 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>
          <strong>-A&Ntilde;o</strong>
          <input name="ano_inicio" type="text" class="Estilo66" id="ano_inicio" value="0000" size="5" maxlength="4" />
        </span></td>
      </tr>
      <tr>
        <td bgcolor="#F7FFE1"><span class="Estilo70"></span></td>
        <td bgcolor="#F7FFE1"><div align="center" class="Estilo55 Estilo70">
            <div align="right"> <strong>Empresa: </strong></div>
        </div></td>
        <td colspan="2" align="left" bgcolor="#F7FFE1">
<select name="emp" id="emp">
         <option value="0">--SELECCIONE LA EMPRESA--</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>
        <td bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Proveedor :</strong></div></td>
        <td align="left" bgcolor="#F7FFE1" >
		<select name="proveedor" id="proveedor">
         <option value="0">--SELECCIONE PROVEEDOR--</option>
         <?php
     do {  
?>
         <option value="<?php echo $row_sql2['codigo'];?>"><?php echo $row_sql2['nombre']?></option>
         <?php
} while ($row_sql2 = mysql_fetch_assoc($sql2));
  $rows2 = mysql_num_rows($sql);
  if($rows2 > 0) {
      mysql_data_seek($sql2, 0);
       $row_sql2 = mysql_fetch_assoc($sql2);
  }
?>
       </select></td>
      </tr>
    </table>
	<p>
      <label>
   <input name="guardar" type="submit" class="Estilo53" id="guardar" value="Guardar"  />
      </label>
    </p>

  </div>
</form>
</body>
</html>