File: /home/asjudine/public_html/formulario_ingresar_credito_inter.php
<?php
require_once("../Conectarse.php");
global $dbi;
$espacio = ' ';
$linea = '-';
/*$control = mysql_query('SELECT 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, beneficiarios, renovacion, causal_terminacion, fecha_terminacion, estado FROM cartera_serviasjudinet WHERE cedula = "' . $_GET["ced2"] . '" and numerocontrato = "' . $_GET["numcon"] . '" ');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($cedula, $codi, $apes, $grado, $numcon, $plan, $num_lib, $titular, $codigosu, $dire, $tele, $celul, $ciudad, $email, $cue, $ban, $enti, $unides, $codides, $entre, $fecna, $fechafil, $valcon, $numcuo, $valcuo, $fechainicio, $fechatermino, $fechaul, $mesini, $anoini, $mesfin, $anofin, $salant, $cupen, $cudesc, $salnue, $ven, $director, $bene, $renova, $causal, $fechater, $esta) = mysql_fetch_row($control);
$inipag = $anoini.'-'.$mesini;
*/
//////////////////////////////////
// INFORMACION DE CREDITO ROTATIVO
//////////////////////////////////
$consultar_rotativo = mysql_query('SELECT cedula, apellidos, nombres, grado, rango, libranza_credito, direccion, telefono, celular, ciudad, email, cuenta, banco, entidad, escuela, numerosolicitud, fecha_solicitud, nombre_padre, nombre_madre, direccion_padres, ciudad_padres, telefono_padres, celular_padres, referencia_compa, celular_compa, monto_solicitado, fecha_reporte FROM credito_rotativo WHERE cedula = "'.$_GET["ced2"].'" ');
if (!$consultar_rotativo) {
die('Invalid query: ' . mysql_error());
}
list($cedula, $apellidos, $nombres, $grado, $rango, $cred, $direccion, $telefono, $celular, $ciudad, $email, $cuenta, $banco, $entidad, $escuela, $numerosolicitud, $fechasolicitud, $nompadre, $nommadre, $direcpadres, $ciudadpadres, $telpadres, $celpadres, $refcompa, $celcompa, $montosolicitado, $fecha_reporte)=mysql_fetch_row($consultar_rotativo);
$fullnombre = $apellidos ." ".$nombres;
if($cedula!=0)
{
$cre = "SI";
}
else
{
$cre = "NO";
}
/*
//Segun el Grado Coloca EL Monto
if( $grado == "SLP")
{
$montosolicitado = "500000";
//$contador=$contador+5;
?>
<script languaje="javascript">
function proba(){
var bono6 = document.getElementById("bono6").disabled = true;
var bono7 = document.getElementById("bono7").disabled = true;
var bono8 = document.getElementById("bono8").disabled = true;
var bono9 = document.getElementById("bono9").disabled = true;
var bono10 = document.getElementById("bono10").disabled = true;
var bono11 = document.getElementById("bono11").disabled = true;
var bono12 = document.getElementById("bono12").disabled = true;
var bono13 = document.getElementById("bono13").disabled = true;
var bono14 = document.getElementById("bono14").disabled = true;
var bono15 = document.getElementById("bono15").disabled = true;
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "AL" || $grado == "PT")
{
$montosolicitado = "1000000";
//$contador=$contador+10;
?>
<script languaje="javascript">
function proba(){
var bono11 = document.getElementById("bono11").disabled = true;
var bono12 = document.getElementById("bono12").disabled = true;
var bono13 = document.getElementById("bono13").disabled = true;
var bono14 = document.getElementById("bono14").disabled = true;
var bono15 = document.getElementById("bono15").disabled = true;
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "C3" || $grado == "SC" || $grado == "CS" || $grado == "CP" || $grado == "SS" || $grado == "SV" || $grado == "SB" || $grado == "SP" || $grado == "SM" || $grado == "IJ")
{
$montosolicitado = "1500000";
//$contador=$contador+15;
?>
<script languaje="javascript">
function proba(){
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "ST" || $grado == "TE" || $grado == "CP" || $grado == "MY")
{
$montosolicitado = "2000000";
//$contador=$contador+20;
?>
<script languaje="javascript">
function proba(){
}
</script><?php
}
*/
if($_GET["n"]==1)
{
$valor = 100000;
$saldo_pendiente = $montosolicitado - $valor;
}
if($_GET["n"]==2)
{
$valor = 200000;
$saldo_pendiente = $montosolicitado - $valor;
}
if($_GET["n"]==3)
{
$valor = 300000;
$saldo_pendiente = $montosolicitado - $valor;
}
if($_GET["n"]==4)
{
$valor = 400000;
$saldo_pendiente = $montosolicitado - $valor;
}
if($_GET["n"]==5)
{
$valor = 500000;
$saldo_pendiente = $montosolicitado - $valor;
}
if($_GET["n"]==6)
{
$valor = 600000;
$saldo_pendiente = $montosolicitado - $valor;
}
if($_GET["n"]==7)
{
$valor = 700000;
$saldo_pendiente = $montosolicitado - $valor;
}
if($_GET["n"]==8)
{
$valor = 800000;
$saldo_pendiente = $montosolicitado - $valor;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Solicitud Credito Rotativo</title>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
*{margin: 0;padding: 0;}
body{background-color:#FFF;font-family:Geneva, Arial, Helvetica, sans-serif; text-align:center;}
header {background-color: #B7271F; text-align: center;}
.cerrarsesion{width: auto;background-color: #DBD8C9;color: #000;font-size: 13px;position:absolute;top: 15px;right:10px;z-index:0;padding: 10px;border-radius: 10px;cursor: pointer;}
.cerrarsesion:hover{background-color: #ffffff;color: #000;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.direcciona{width: 200px;background-color: #B7271F;color: #fff; padding: 4px;border-radius: 3px;}
.direcciona:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #8A0003;font-size: 15px; text-align: center;font-weight:600;}
td{border:#D6D6D6 solid 1px;}
.tdizq{background-color: #EEE; padding: 0px 4px;color: #00135F;font-size: 13px;font-weight: 600; text-align: left;}
.tdcen{background-color: #EEE; padding: 0px 4px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
.tdder{background-color: #EEE; padding: 0px 4px;color: #00135F;font-size: 13px;font-weight: 600; text-align: right;}
.exp{color:#8A0000; font-size:10px;}
.rojo{color:#C60000;}
.fuerte{font-weight:400;}
.boton1{width:200px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
input[type=text], select{padding: 1px 3px; height:22px; background-color: #FFFFFF;}
/*Estilo Complementario*/
.tdi{background-color: #F9FBC8; padding: 1px 4px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
.tdc{background-color: #F9FBC8; padding: 1px 4px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.tdd{background-color: #F9FBC8; padding: 1px 4px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
.tdrojai{background-color: #EEE; color: #8A0002; padding: 1px 4px;font-size: 12px;font-weight: 600; text-align: left;}
.tdrojad{background-color: #EEE; color: #8A0002; padding: 1px 4px;font-size: 12px;font-weight: 600; text-align: right;}
.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 13px;}
.botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;border-radius:5px;}
.botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
input[type=text].corta{width: 40px;text-align:left;padding: 3px;}
.marquee{padding: 0 30px}
.marca{width:80%; color:#C24548; text-transform:uppercase;}
.sel3{color:#B62326;}
</style>
<script>
function Verificar(){
if(document.form1.email.value=="" || document.form1.email.value == "-")
{
alert("EMAIL Invalido. Por favor 1º MODIFICAR los primeros datos")
document.form1.email.focus()
return (false);
}
if(document.form1.cel.value == "" || document.form1.cel.value == "-")
{
alert("CELULAR INVALIDO. Por favor 1º MODIFICAR los primeros datos")
document.form1.cel.focus()
return (false);
}
if (document.form1.valor_anticipo.value==""){
alert("SELECCIONE ANTICIPO")
document.form1.valor_anticipo.focus()
return (false);
}
if (document.form1.anos.value=="0000" || document.form1.anos.value ==""){
alert("ESCRIBA EL AÑO")
document.form1.anos.focus()
return (false);
}
if (document.form1.mesi.value=="00" || document.form1.mesi.value ==""){
alert("ESCRIBA EL MES")
document.form1.mesi.focus()
return (false);
}
if (document.form1.dias.value=="00" || document.form1.dias.value ==""){
alert("ESCRIBA EL DIA")
document.form1.dias.focus()
return (false);
}
if (document.form1.libranza_credito.value==""){
alert("ESCRIBA EL NUMERO DE LIBRANZA")
document.form1.libranza_credito.focus()
return (false);
}
/*if(document.form1.cue.value == document.form1.num_cuenta.value)
{
}else
{
alert("LOS NUMEROS DE CUENTA NO SON IGUALES, MODIFIQUE LOS DATOS DANDO CLICK EN MODIFICAR O VERIFIQUE QUE ESTE BIEN ESCRITOS")
document.form1.cue.focus()
return (false);
}*/
return (true);
}
</script>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function anade() {
/*recep = document.anadir['receptores[]'];
for (i = 0; checkbox = recep[i]; i++) {
if (checkbox.checked ) {
return true;
}
}*/
}
//-->
</script>
<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
}
}
</script>
</head>
<body proba()>
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">SOLICITUD CREDITO ROTATIVO POLICIA</h3>
<form action="" method="post" onSubmit="return Verificar()" name="form1" id="form1">
<!--<div align="center">
<div class="Estilo1">SOLICITUD CARTERA JURIDICA</div>-->
<table width="1110" border="2" cellpadding="1" cellspacing="1" class="sol_cre1">
<tr>
<td class="fecha" colspan="6">INFORMACION DEL ANTICIPO</td>
</tr>
<tr>
<!--<td class="tdder">FECHA</td>
<td class="tdrojai">
DIA<input type="text" class="corta" id="dia" name="dia" value="<?php echo date("d"); ?>" size="2" readonly>
MES<input type="text" class="corta" id="mes" name="mes" value="<?php echo date("m"); ?>" siez="2" readonly>
AÑO<input type="text" class="corta" id="año" name="año" value="<?php echo date("Y"); ?>" size="6" readonly>
</td>-->
<!--<td class="tdder">Email</td>
<td class="tdizq" colspan="3"><input name="email" type="text" id="email" value="" size="30" maxlength="30" /></td>-->
<!--<td class="tdder" colspan="3">FECHA INSCRIPCION</td>
<td class="tdizq" colspan="3"><input name="fecha_insc" type="text" class="rojo" id="fecha_insc" value="<?php echo $fecha_inscribio ?>" size="30" maxlength="30" readonly/></td>-->
</tr>
<!--<tr>
<td class="tdder">Direccion</td>
<td class="tdizq"><input name="direccion" type="text" id="direccion" value="" size="12" maxlength="12" /></td>
<td class="tdder">Ciudad</td>
<td class="tdizq"><input name="ciudad" type="text" id="ciudad" value="" size="30" maxlength="30" /></td>
<td class="tdder">Telefono</td>
<td class="tdizq"><input name="telefono" type="text" id="telefono" value="" size="30" maxlength="30" /></td>
</tr>
<tr>
<td class="tdder">Celular</td>
<td class="tdizq"><input name="celular" type="text" id="celular" value="" size="30" maxlength="30" /></td>
<td class="tdder">Cuenta Nº</td>
<td class="tdizq"><input name="numero_cuenta" type="text" id="numero_cuenta" value="" size="20" maxlength="20" /></td>
<td class="tdder">Banco</td>
<td class="tdizq"><input name="banco" type="text" id="banco" value="" size="30" maxlength="30" /></td>
</tr>-->
<tr>
<!--<td class="tdder">Nombre Padre</td>
<td class="tdizq" colspan="2"><input name="nom_padre" type="text" id="nom_padre" value="<?php echo $nompadre ?>" size="40" maxlength="40" /></td>
<td class="tdder">Nombre Madre</td>
<td class="tdizq" colspan="2"><input name="nom_madre" type="text" id="nom_madre" value="<?php echo $nommadre ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder">Direccion de Padres</td>
<td class="tdizq" colspan="2"><input name="dir_padres" type="text" id="dir_padres" value="<?php echo $direcpadres ?>" size="40" maxlength="40" /></td>
<td class="tdder">Ciudad</td>
<td class="tdizq" colspan="2"><input name="ciudad_padres" type="text" id="ciudad_padres" value="<?php echo $ciudadpadres ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder">Telefono Padres</td>
<td class="tdizq" colspan="2"><input name="tel_padres" type="text" id="tel_padres" value="<?php echo $telpadres ?>" size="40" maxlength="40" /></td>
<td class="tdder">Celular Padres</td>
<td class="tdizq" colspan="2"><input name="cel_padres" type="text" id="cel_padres" value="<?php echo $celpadres ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder" >Referencia <br>
De Compañero</td>
<td class="tdizq" colspan="2"><input name="ref_compa" type="text" id="ref_compa" value="<?php echo $refcompa ?>" size="40" maxlength="40" /></td>
<td class="tdder">Nº Celular Compañero</td>
<td class="tdizq" colspan="2"><input name="cel_compa" type="text" id="cel_compa" value="<?php echo $celcompa ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder" >NUMERO DE CUENTA</td>
<td class="tdizq" colspan="2"><input name="num_cuenta" type="text" id="num_cuenta" value="<?php echo $cuenta ?>" size="40" maxlength="40" /></td>
<td class="tdder">BANCO</td>
<td class="tdizq" colspan="2"><input name="banco" type="text" id="banco" value="<?php echo $banco ?>" size="40" maxlength="40" /></td>-->
</tr>
<!--<tr>
<td class="tdder" >ENTIDAD</td>
<td class="tdizq" colspan="2">
<select name="entidad" id="entidad">
<option value="">--Seleccione</option>
<option value="EJERCITO">EJERCITO</option>
<option value="POLICIA">POLICIA</option>
</select>
</td>
<td class="tdder">ESCUELA DE FORMACION</td>
<td class="tdizq" colspan="2">
<select name="escuela">
<option value="">--SELECCIONE ESCUELA</option>
<option value="RAFAEL MUÑEZ">RAFAEL MUÑEZ</option>
<option value="ANTONIO NARIÑO">ANTONIO NARIÑO</option>
<option value="VELEZ SANTANDER">VELEZ SANTANDER</option>
<option value="SIMON BOLIVAR">SIMON BOLIVAR</option>
<option value="EDUARDO CUEVAS">EDUARDO CUEVAS</option>
<option value="GABRIEL GONZALEZ">GABRIEL GONZALEZ</option>
<option value="CARLOS E RESTREPO">CARLOS E RESTREPO</option>
<option value="RAFAEL REYES">RAFAEL REYES</option>
<option value="SUMAPAZ">SUMAPAZ</option>
<option value="CARABINEROS FACA">CARABINEROS FACA</option>
<option value="METROPOLITANA DE BOGOTA">METROPOLITANA DE BOGOTA</option>
<option value="ESPRO NILO">ESPRO NILO</option>
<option value="INOCENCIO CHINCA">INOCENCIO CHINCA</option>
<option value="SUOFICIALES FUERZA AEREA">SUBOFICIALES FUERZA AEREA</option>
</select>
</td>
</tr>-->
<tr>
<td class="tdder" >FECHA ANTICIPO</td>
<td class="tdizq">
<input name="anos" class="sel3" type="text" value="0000" size="4" maxlength="4">-<select name="mesi" class="sel3">
<option value="00">00</option>
<option value="01">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>-<select name="dias" class="sel3">
<option value="00">00</option>
<option value="01">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>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</td>
<td class="tdder" colspan="5">
</tr>
<tr>
<td class="tdder" >ENTIDAD</td>
<td class="tdizq" colspan="2"><input name="entidad" type="text" id="entidad" value="<?php echo $entidad ?>" size="40" maxlength="40" readonly/></td>
<td class="tdder">ESCUELA</td>
<td class="tdizq" colspan="2"><input name="escuela" type="text" id="escuela" value="<?php echo $escuela ?>" size="40" maxlength="40" readonly/></td>
</tr>
<tr>
<td class="tdrojad" >CUPO ASIGNADO</td>
<!--<td class="tdizq" colspan="2"><input name="monto_solicitado" type="text" id="monto_solicitado" value="<?php echo $montosolicitado ?>" size="40" maxlength="40" readonly/></td>-->
<td class="tdizq" colspan="2"><input name="monto_solicitado" type="text" id="monto_solicitado" value="<?php echo $montosolicitado ?>" size="40" maxlength="40" readonly/></td>
<td class="tdrojad">SALDO PENDIENTE</td>
<td class="tdizq" colspan="2"><input name="saldo_pendiente" type="text" id="saldo_pendiente" value="<?php echo $saldo_pendiente ?>" size="40" maxlength="40" readonly/></td>
</tr>
<tr>
<td class="tdrojad" >VALOR ANTICIPO</td>
<td class="tdizq" colspan="2">
<select name="seleccionnumerobonos" onChange="MM_jumpMenu('parent',this,0)">
<OPTION value="">--Cantidad--</OPTION>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=1">100000</option>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=2">200000</option>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=3">300000</option>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=4">400000</option>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=5">500000</option>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=6">600000</option>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=7">700000</option>
<option value="formulario_ingresar_credito_inter.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&n=8">800000</option>
</select>
<input type="text" name="valor_anticipo" id="valor_anticipo" value="<?php echo $valor ?>" readonly>
</td>
<td class="tdder">Libranza Credito</td>
<td class="tdizq"><input name="libranza_credito" type="text" class="rojo" id="libranza_credito" value="<?php echo $cred ?>" size="30" maxlength="30"/></td>
</tr>
<tr align="center">
<td colspan="6"></td>
</TR>
</table>
<p align="center">
<input name="enviar" type="submit" class="direcciona" id="enviar" value="ENVIAR">
<input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='consulta_cedula_credito_inter.php'" value="IR AL MENU">
</p>
<table width="850" border="2" cellpadding="1" cellspacing="1" class="sol_cre1">
<tr>
<td class="fecha" colspan="6">DATOS DEL TITULAR</td>
</tr>
<tr>
<td class="tdder">Fecha Solicitud</td>
<td class="tdizq"><input name="fechas" class="rojo" type="text" id="fechas" value="<?php echo $fechasolicitud ?>" size="10" maxlength="10" readonly /></td>
<td class="tdcen">CREDITO</td>
<td class="tdizq"><input name="cre" type="text" class="rojo" id="cre" value="<?php echo $cre ?>" size="4" maxlength="4" readonly />
- <input name="vigente" type="text" class="Estilo50" id="vigente" value="<?php echo $vigente ?>" size="4" maxlength="4" readonly />
<input name="credito_numero" type="text" class="rojo" id="credito_numero" value="<?php echo $numerosolicitud ?>" size="8" maxlength="8" readonly/>
</td>
</tr>
<tr>
<td class="tdder">Cedula No</td>
<td class="tdizq"><input name="cedula" type="text" id="cedb" value="<?php echo $cedula ?>" size="20" maxlength="20" readonly /></td>
<td class="tdder">Grado</td>
<td class="tdizq"><input name="grado" type="text" id="grado" value="<?php echo $grado ?>" size="12" maxlength="10" /></td>
</tr>
<tr>
<td class="tdder">Apellidos</td>
<td class="tdizq"><input name="apellidos" type="text" id="apellidos" value="<?php echo $apellidos ?>" size="45" maxlength="45" />
</td>
<td class="tdder">Nombres</td>
<td class="tdizq"><input name="nombres" type="text" id="nombres" value="<?php echo $nombres ?>" size="45" maxlength="45" />
</td>
</tr>
<tr>
<td class="tdder">Direccion </td>
<td class="tdizq"><input name="direccion" type="text" id="direccion" value="<?php echo $direccion ?>" size="45" maxlength="45" /></td>
<td class="tdder">E-mail :</td>
<td class="tdizq"><input name="email" type="text" id="email" value="<?php echo $email ?>" size="40" maxlength="50" /></td>
</tr>
<tr>
<td class="tdder">Cuidad</td>
<td class="tdizq"><input name="ciudad" type="text" id="ciudad" value="<?php echo $ciudad ?>" size="14" maxlength="20" /></td>
<td class="tdder">Telefono </td>
<td class="tdizq"><input name="telefono" type="text" id="telefono" value="<?php echo $telefono ?>" size="10" maxlength="20" /></td>
</tr>
<tr>
<td class="tdder">Cuenta No :</td>
<td class="tdizq"><input name="cuenta" type="text" id="cuenta" value="<?php echo $cuenta ?>" size="20" maxlength="20" readonly/></td>
<td class="tdder">Banco</td>
<td class="tdizq" colspan="2"><input name="banco" type="text" id="banco" value="<?php echo $banco ?>" size="20" maxlength="20" readonly/></td>
</tr>
<tr>
<td class="tdder">Numero libranza</td>
<td class="tdizq"><input name="creditolibranza" type="text" id="creditolibranza" value="<?php echo $cred ?>" size="12" maxlength="12" readonly/></td>
<td class="tdder">Celular</td>
<td class="tdizq"><input name="celular" type="text" id="celular" value="<?php echo $celular ?>" size="20" maxlength="20" /></td>
</tr>
</table>
<!--<div align="center">
<?php
$ced2 = $_GET["ced2"];
$numcon = $_GET["numcon"];
$plan = $_GET["tipo"];
echo "<input type='button' value='MODIFICAR DATOS' name=boton class='boton1' onClick =window.location.href='formulario_modificar_cartera_credito_rotativo.php?ced2=$ced2&numcon=$numcon&tipo=$plan','','top=50,left=100,toolbar=no,scrollbars=yes,width=1100,height=530,status=yes'></a>"; ?>
</div>
-->
<!--
<br>
<div class="marquee">
<marquee behavior="alternate" scrolldelay="100">
<p class="marca" >Actualice los datos de ser necesario dando CLICK al boton MODIFICAR DATOS</p></marquee>
</div>-->
<br>
<table width="850" border="2" cellpadding="1" cellspacing="1" class="sol_cre1">
<tr>
<td class="fecha" colspan="6">INFORMACION COMPLEMENTARIA</td>
</tr>
<tr>
</tr>
<tr>
<td class="tdder">Nombre Padre</td>
<td class="tdizq" colspan="2"><input name="nom_padre" type="text" id="nom_padre" value="<?php echo $nompadre ?>" size="40" maxlength="40" /></td>
<td class="tdder">Nombre Madre</td>
<td class="tdizq" colspan="2"><input name="nom_madre" type="text" id="nom_madre" value="<?php echo $nommadre ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder">Direccion de Padres</td>
<td class="tdizq" colspan="2"><input name="dir_padres" type="text" id="dir_padres" value="<?php echo $direcpadres ?>" size="40" maxlength="40" /></td>
<td class="tdder">Ciudad</td>
<td class="tdizq" colspan="2"><input name="ciudad_padres" type="text" id="ciudad_padres" value="<?php echo $ciudadpadres ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder">Telefono Padres</td>
<td class="tdizq" colspan="2"><input name="tel_padres" type="text" id="tel_padres" value="<?php echo $telpadres ?>" size="40" maxlength="40" /></td>
<td class="tdder">Celular Padres</td>
<td class="tdizq" colspan="2"><input name="cel_padres" type="text" id="cel_padres" value="<?php echo $celpadres ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder" >Referencia <br> COMPAÑERO</td>
<td class="tdizq" colspan="2"><input name="ref_compa" type="text" id="ref_compa" value="<?php echo $refcompa ?>" size="40" maxlength="40" /></td>
<td class="tdder">Nº Celular Compañero</td>
<td class="tdizq" colspan="2"><input name="cel_compa" type="text" id="cel_compa" value="<?php echo $celcompa ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder" >Nº CUENTA</td>
<td class="tdizq" colspan="2"><input name="num_cuenta" type="text" id="num_cuenta" value="<?php echo $cuenta ?>" size="40" maxlength="40" /></td>
<td class="tdder">BANCO</td>
<td class="tdizq" colspan="2"><input name="banco" type="text" id="banco" value="<?php echo $banco ?>" size="40" maxlength="40" /></td>
</tr>
</table>
<br>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST["enviar"]))
{
require_once("../Conectarse.php");
$fecha_anticipo = date("Y-m-d");
$fechas_anticipo = $_POST["anos"].'-'.$_POST["mesi"].'-'.$_POST["dias"] ;
//$fecha_nacimiento = $_POST[anoss].'-'.$_POST[mess].'-'.$_POST[diass] ;
$consulta = mysql_query('SELECT cedula FROM credito_rotativo WHERE cedula = "'.$_GET["ced2"].'" ');
if(!$consulta){
die('Invalid query 1: ' . mysql_error());
}
list($cedula_creditorotativo)=mysql_fetch_row($consulta);
if($cedula_creditorotativo != 0)
{
$update = mysql_query('UPDATE credito_rotativo SET apellidos = "'.$_POST["apellidos"].'", nombres = "'.$_POST["nombres"].'", grado = "'.$_POST["grado"].'", direccion = "'.$_POST["direccion"].'", telefono = "'.$_POST["telefono"].'", celular = "'.$_POST["celular"].'", ciudad = "'.$_POST["ciudad"].'", email = "'.$_POST["email"].'", cuenta = "'.$_POST["num_cuenta"].'", banco = "'.$_POST["banco"].'", nombre_padre = "'.$_POST["nom_padre"].'", nombre_madre = "'.$_POST["nom_madre"].'", direccion_padres = "'.$_POST["dir_padres"].'", ciudad_padres = "'.$_POST["ciudad_padres"].'", telefono_padres = "'.$_POST["tel_padres"].'", celular_padres = "'.$_POST["cel_padres"].'", referencia_compa = "'.$_POST["ref_compa"].'", celular_compa = "'.$_POST["cel_compa"].'",
valor_anticipo = "'.$_POST["valor_anticipo"].'", fecha_anticipo = "'.$fechas_anticipo.'", saldo_pendiente = "'.$_POST["saldo_pendiente"].'", estado = 2 WHERE cedula = "'.$_GET["ced2"].'" ');
if (!$update) {
die('Invalid quer en el update: ' . mysql_error());
}
///Ingresa el anticipo en estado de aprobacion 2
$inserta = mysql_query('INSERT INTO credito_rotativo_solicitud (cedula, apellidos, nombres, grado, rango, cuenta, banco, libranza_credito, numerosolicitud, tipoo, solicitud1, fecha1, desembolso1, actuaciones, aprobado, fecha_aproba, fecha_reporte, estado, fecha_transaccion) VALUES ("'.$_POST["cedula"].'", "'.$_POST["apellidos"].'", "'.$_POST["nombres"].'", "'.$_POST["grado"].'", "'.$rango.'", "'.$_POST["num_cuenta"].'", "'.$_POST["banco"].'", "'.$_POST["creditolibranza"].'", "'.$numerosolicitud.'","ANTICIPO", "SI", "'.$fechas_anticipo.'", "'.$_POST["valor_anticipo"].'", "ANTICIPO", "SI", "'.$fechas_anticipo.'", "'.$fecha_reporte.'", "1", "'.$fechas_anticipo.'")');
if (!$inserta) {
die('Invalid quer en el insert: ' . mysql_error());
}
echo $_POST["valor_anticipo"];
/*$inserta = mysql_query('INSERT INTO credito_rotativo(cedula, codigo_militar, nombre, grado, numerocontrato, tipocontrato, numero_libranza, libranza_credito, direccion, telefono, celular, ciudad, email, cuenta, banco, entidad, escuela, numerosolicitud, fecha_anticipo, valor_anticipo, saldo_pendiente, monto_solicitado, permanencia, estado) VALUES("'.$cedula.'", "'.$codi.'", "'.$apes.'", "'.$grado.'", "'.$numcon.'", "'.$plan.'", "'.$num_lib.'", "'.$_POST["libranza_credito"].'", "'.$dire.'", "'.$tele.'", "'.$celul.'", "'.$ciudad.'", "'.$email.'", "'.$cue.'", "'.$ban.'", "'.$_POST["entidad"].'", "'.$_POST["escuela"].'", "'.$consecutivo.'", "'.$fecha_anticipo.'", "'.$_POST["valor_anticipo"].'", "'.$_POST["saldo_pendiente"].'", "'.$_POST["monto_solicitado"].'", "24", "0")');
if(!$inserta){
die('Invalid query 1: ' . mysql_error());
}
*/
/*$insertaredimir = mysql_query('INSERT INTO redimir_bonos (cedula, codigo_militar, nombre, direccion, ciudad, telefono, celular, email, numero_cuenta, banco, grado, escuela, entidad, libranza_credito, numero_contrato, fecha_anticipo, valor_anticipo, saldo_pendiente, monto_solicitado, permanencia) VALUES("'.$cedula.'", "'.$codi.'", "'.$apes.'", "'.$dire.'", "'.$ciudad.'", "'.$tele.'", "'.$celul.'", "'.$email.'", "'.$cue.'", "'.$ban.'", "'.$grado.'", "'.$_POST["escuela"].'", "'.$_POST["entidad"].'", "'.$_POST["libranza_credito"].'", "'.$numcon.'", "'.$fecha_anticipo.'", "'.$_POST["valor_anticipo"].'", "'.$_POST["saldo_pendiente"].'", "'.$_POST["monto_solicitado"].'", "24" )');
if(!$insertaredimir){
die('Invalid query 2: ' . mysql_error());
}*/
echo "<script>alert('Datos Guardados');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.location.href = 'consulta_cedula_credito_inter.php';</script>";
}
else{
echo "<script>alert('Esta cedula ya tiene una solicitud, Datos no modificables');</script>";
}
}
?>