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

require_once("Conectarse.php");

$fechast = date("Y-m-d");

$resu = mysql_query('SELECT cedula, apellidos, nombres, grado, libranza_credito, direccion , telefono, celular, ciudad , email, cuenta, banco, numerosolicitud, fecha_solicitud, nombre_padre, nombre_madre, direccion_padres, ciudad_padres, telefono_padres, celular_padres, referencia_compa, celular_compa, valor_anticipo, saldo_pendiente, monto_solicitado  FROM credito_rotativo WHERE cedula = "'.$_GET["ced2"].'"  ');
if (!$resu) {
	die('Invalid query sasa: ' . mysql_error());
} 	

list($cedula, $apellidos, $nombres, $grado, $cred, $direccion, $telefono, $celular, $ciudad, $email, $cuenta, $banco, $numero_solicitud, $fecha_inscribio, $nompadre, $nommadre, $direcpadres, $ciudadpadres, $telpadres, $celpadres, $refcompa, $celcompa, $valor_anticipo, $saldo_pendiente, $montosolicitado) = mysql_fetch_row($resu);

$fullnombre = $apellidos ." ".$nombres;

/*$consultacreditopago = mysql_query('SELECT cedula FROM credito_rotativo WHERE cedula = "'.$_GET["ced2"].'" ');
list($cedulapago) = mysql_fetch_row($consultacreditopago);

if($cedulapago != 0){
	echo "<script>alert('PAGADO');</script>";
	 	
	//estado 5 es = PAGADO!
	$estado5 = mysql_query("UPDATE credito_rotativo SET reportado = 'NO', estado = 5  WHERE cedula= '".$_GET["ced2"]."' ");	
	
	if (!$estado5) {
		die('Invalid query udate: ' . mysql_error());
	}
	
	echo "<script>window.close();</script>";
}
*/

?>	


<!DOCTYPE html>
<html>
<head>

<title>ACTUALIZACION CUENTA BANCARIA</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:#EAEAEA;font-family:Verdana, Geneva, sans-serif;}
    header {background-color: #B7271F; text-align: center;}
    .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;}
    
    .fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
    td{padding: 1px; border: 1px solid #a0a0a0;}
    .tdizq{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
    .tdcen{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
    .tdder{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
    .boton1{width:200px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text], select{border-radius: 5px; padding: 3px;background-color: #FFF;}
	
	.tdc{background-color: #FCF8D8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
    
    .marquee{background-color: #ffffff; color: #912828; font-size: 15px; width:400px;}
    .tdlittle{background-color: #e5e5e5; font-size: 11px; text-align: center;}
	.tdbig{width:150px;}
	
	.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: 12px;}
	.tdfulljusti{background-color: #fff; color: #000; padding: 1px 4px; text-align: left; font-size: 12px;}
    
    
</style>



<script>

function Verificar(){

	//////////////////////////////////////////////////////////////
	
	if (document.form1.modo_pago.value==""){
		alert("Seleccione Modo Pago")
		document.form1.modo_pago.focus()
		return (false);
	}
	if (document.form1.consignacion.value==""){
		alert("Numero de Consignacion")
		document.form1.consignacion.focus()
		return (false);
	}
	if (document.form1.numeroegreso.value==""){
		alert("Numero de Egreso")
		document.form1.numeroegreso.focus()
		return (false);
	}
	if (document.form1.archivito.value==""){
		alert("Seleccione Archivo")
		document.form1.archivito.focus()
		return (false);
	}
	
	
	
	return (true);
}



/*
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 >
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">INGRESAR INFORMACION DEL BONO</h3>
<!--<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>   -->
<form action="" method="post" onSubmit="return Verificar()" enctype="multipart/form-data" name="form1"  id="form1"  >

    <!--<div class="Estilo83">INGRESAR INFORMACION DEL BONO</div>-->
<table width="750" border="2" cellpadding="1" cellspacing="1" class="est_cont5">
<!--<caption>
<div align="center"><br />
<span class="Estilo2">DATOS BASICOS</span><br />
</div>
</caption>-->
    
<tr>
	<td class="tdcen">Apellidos y Nombres:</td>
    <td class="tdizq">
    <input name="ape" type="text" class="Estilo74" id="ape" value="<?php echo $fullnombre ?>" size="50" maxlength="50" readonly=""/>   
	<td class="tdcen">CEDULA No:</td>
    <td class="tdizq"><input name="cedula" type="text" class="Estilo76" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" readonly=""/></td>
        

<tr>
	<td height="21" class="tdcen">NUMERO DE SOLICITUD:</td>
    <td class="tdizq"><input name="valor" type="text" class="Estilo75" id="valor" value="<?php echo $numero_solicitud ?>" size="20" maxlength="20" readonly/></td>
   	<td class="tdcen">NUMERO CONSIGNACION:</td>
   	<td class="tdizq">
        <input name="consignacion" type="text" class="Estilo76" id="consignacion" value="<?php echo $numero_consignacion ?>" size="20" maxlength="20" /></td>
</tr>
        
<tr>
	<td class="tdcen">VALOR DESEMBOLSO</td>
        <!--<td class="tdcen" class="Estilo67"><div align="left" class="Estilo70"><input name="valorbono" type="text" class="Estilo75" id="valorbono" value="100000" size="20" maxlength="20" readonly/></div></td>-->
	<td class="tdizq"><input name="desembolso" type="text" class="Estilo76" id="desembolso" value="<?php echo $montosolicitado ?>" size="20" maxlength="20"/></td>
        
	<td height="21" class="tdcen">Numero Egreso</td>
    <td class="tdizq"><input name="numeroegreso" type="text" class="Estilo75" id="numeroegreso" value="<?php echo $numero_egreso ?>" size="20" maxlength="20" /></td>
</tr>
        
        
        
<tr>
	<td class="tdcen" >MODO DE PAGO</td>
	<td class="tdizq" >
    <select name="modo_pago" class="Estilo66" id="modo_pago">
    	<option value="">--SELECIONE --</option>
        <option value="PAGO EFECTIVO">PAGO EFECTIVO</option>
		<option value="GIRO">GIRO</option>
        <option value="CONSIGNACION BANCO">CONSIGNACION BANCO</option>
       	<option value="RECIBO_EGRESO">RECIBO_EGRESO</option>
	</select>
	<td colspan="2" class="tdcen"><strong> FECHA DE TRANSACCION</strong>
    <!--<input name="fechatra" type="text" id="fechatra" value="0000-00-00" size="10" maxlength="10" />-->
    <input name="fechatra" type="text" id="fechatra" value="<?php echo $fechast ?>" size="10" maxlength="10" />
	</td>
      
      
	<tr>
        <td class="tdcen">CUENTA:</div></td>
        <td class="tdizq">
            <input name="cuenta" type="text" class="Estilo74" id="cuenta" value="<?php echo $cuenta ?>" size="40" maxlength="40" readonly/>
        </div>   
               
        <td class="tdcen">BANCO:</td>
        <td class="tdizq">
            <input name="banco" type="text" class="Estilo76" id="banco" value="<?php echo $banco ?>" size="20" maxlength="20" readonly=""/></td>
        
      
      
      </tr>
      

      <tr>
	<td colspan="8" class="marquee"><marquee behavior="alternate" scrolldelay="100">El archivo debe pesar menos de 1MB</marquee></td>
</tr>
<tr>
  	<td class="tdc">Seleccione El Archivo</td>
 	<td class="tdc" colspan="4"><input name="archivito" type="file" class="polici3" size="40" maxlength="40"></td>
</tr>

</table>

<p align="center">
<label>
<input name="guardar" type="submit" class="boton1" id="guardar" value="GUARDAR" />
</label>

      
    </p>

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


<?php

if(isset($_POST["guardar"]))
{
	$archivo = $_FILES["archivito"]["tmp_name"]; 
	$tamanio = $_FILES["archivito"]["size"];
	$tipo    = $_FILES["archivito"]["type"];
	$nombre_archivo  = $_FILES["archivito"]["name"];
	
	if($archivo == ""){
		echo "<script>alert('Seleccione Archivo');</script>";	
	}
	
	else
	{
		$fp = fopen($archivo, "rb");
		$contenido = fread($fp, $tamanio);
		$contenido = addslashes($contenido);
		fclose($fp);
	
	
	
		$fechast = date("y").'-'.date("m").'-'.date("d");
	
	$mssql = mysql_query("UPDATE  credito_rotativo set numero_consignacion = '".$_POST["consignacion"]."', modo_pago='".$_POST["modo_pago"]."', fecha_transaccion='".$_POST["fechatra"]."', numero_egreso = '".$_POST["numeroegreso"]."', reportada = 'NO', nombre = '".$nombre_archivo."', contenido='".$contenido."', tipo='".$tipo."', estado = 5 WHERE cedula= '".$_GET[ced2]."'  ");	
	
	if (!$mssql) {
		die('Invalid query udate: ' . mysql_error());
	}
							
	echo "<script>alert('INFORMACION INGRESADA SATISFACTORIAMENTE');</script>";
	echo "<script languaje='javascript'>window.close();</script>";
	}
}



?>