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/acreditos/seguimiento_cobranza_cre.php
<?php

require_once("../Conectarse.php");
		
	
$control = mysql_query('SELECT numero_carpeta,cedula,nombre_completo,numero,tipo,capital_periodo,capital_renovacion,interes_prejuridico,interes_cobroejecutivo,capital_clausula,deuda_total,oficio_numero,fecha_oficio,unidad,codigo_gestion  FROM cabranzas_credito WHERE cedula = "'.$_GET["id"].'" and numero_carpeta = "' . $_GET["carpeta"] . '"');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}

if ((mysql_num_rows($control)!=0)) 
{	 
    list($numero_carpeta,$cedula,$nombre_completo,$numero,$tipo,$capital_periodo,$capital_renovacion,$interes_prejuridico,$interes_cobroejecutivo,$capital_clausula,$deuda_total,$oficio_numero,$fecha_oficio,$unidad,$codgest)  = mysql_fetch_row($control);

		$eldia = $_POST[dia_act];
		$elmes = $_POST[mes_act];
		$elano = $_POST[ano_act];
		$fec = ($_POST[eldia]."-".$_POST[elmes]."-".$_POST[elano]);
		//$fec = ($eldia."-".$elmes."-".$elano);
									   
}

			$resul = mysql_query('SELECT Nombre_Completo FROM Usuarios WHERE cedula = "' . $_GET["ced"] . '" ');
			if (!$resul) {
				die('Invalid query: ' . mysql_error());
			}


if ((mysql_num_rows($resul)!=0)) 
{	 
    list($nom) = mysql_fetch_row($resul);
}

if ($_POST[guardar])	
{
		//$fec = $dia_act."-".$mes_act."-".$ano_act;
		$fec = ($_POST[dia_act]."-".$_POST[mes_act]."-".$_POST[ano_act]);
		$eldia = $_POST[dia_act];
		$elmes = $_POST[mes_act];
		$elano = $_POST[ano_act];
		$fec = ($_POST[eldia]."-".$_POST[elmes]."-".$_POST[elano]);
		
		// Aqui se soluciona lo de la fecha
		$nuevafecha = $_POST[ano_act]."-".$_POST[mes_act]."-".$_POST[dia_act];
		


 $actua =  mysql_query("INSERT INTO actuaciones_cobranzas_cre (cedula,numero_carpeta,oficio_numero,actuacion,fecha,cedula_usuario,codigo_gestion) VALUES ('" . $_GET[id]  . "','" . $_GET[carpeta]  . "','" . $_POST["oficio_numero"]  . "','" . $_POST["actuacion"]  . "','$nuevafecha','1105678304','" . $_POST["codigo3"]  . "')");
	 if (! $actua) {
				die('Invalid query actuaciones_cobranzas_cre: ' . mysql_error());
			}


	
		$modificarcob = mysql_query("UPDATE cabranzas_credito  set  codigo_gestion = '" . $_POST[codigo3] . "' ,fecha_gestion = ' $nuevafecha ' ,estado = '1' WHERE cedula = '" . $_GET[id] . "' ");
			if (! $modificarcob) {
				die('Invalid query: ' . mysql_error());
			}

	 	 
     echo "<script>alert('Registro grabado correctamante')</scrpt>";
	 echo "<SCRIPT LANGUAGE='javascript'>window.location.href='listar_carpetas_cre.php?ced2=$ced2&numcon=$numcon'</SCRIPT>";
}


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

?>


<!DOCTYPE HTML>
<html>
<head>
<title>Capturar Gestion Cobranzas Creditos</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">
<script languaje="JavaScript">
function Mostrar_Fecha()
{
         var mydate=new Date()
         var year=mydate.getYear()
         if (year < 1000)
                 year+=1900
                 var day=mydate.getDay()
                 var month=mydate.getMonth()
                 var daym=mydate.getDate()
                 if (daym<10)
                    daym="0"+daym
                    var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
                    var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
                    document.write("<b><font face='Arial,Helvetica,sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}					
</script>

<script Language="JavaScript"><!--
function validar_campos(form)
{

  if (form.dia_act.value == "")
  {
    alert("Ingrese el día de la actuación");
    form.dia_act.focus();
    return (false);
  }

  if (form.mes_act.value == "")
  {
    alert("Ingrese el mes de la actuación");
    form.mes_act.focus();
    return (false);
  }

  if (form.ano_act.value == "")
  {
    alert("Ingrese el año de la actuación");
    form.ano_act.focus();
    return (false);
  }


  if (form.actuacion.value == "")
  {
    alert("Escriba el texto correspondiente a la actuación de cobranza");
    form.actuacion.focus();
    return (false);
  }


  if (form.dia_act.value > 31)
  {
    alert("El número de día no se debe exceder de 31");
    form.dia_act.focus();
    return (false);
  }

  if (form.mes_act.value > 12)
  {
    alert("El número del mes no se debe exceder de 12");
    form.mes_act.focus();
    return (false);
  }

  return (true);
}
//--></script>

<style type="text/css">
    *{margin: 0;padding: 0;}
    body{background-color:#EAEAEA;font-family:Geneva,Arial,Helvetica,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; 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: #D4090C;color: #fff; padding: 4px;border-radius: 3px;}
	.direcciona:hover{background-color: #67a0d9; color: #000;}    
    .fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
    td{padding: 1px; border: 1px solid #a0a0a0;}
    .td{background-color: #e5e5e5; padding: 1px 30px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
    .boton1{width:30%;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]{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
	
	.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;}
    .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;}
	.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 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
	.tddered{background-color: #e5e5e5; padding: 1px 2px;color: #D40609;font-size: 12px;font-weight: 600; text-align: right;}
	.tdbono{background-color: #FFFFCC; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
	/*Estilo Complementario*/
	.tdi{background-color: #F9FBC8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
	.tdc{background-color: #F9FBC8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
    .tdd{background-color: #F9FBC8; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
	
</style>

</head>
<body onload="document.form.actuacion.focus()">
<form method="post" name="formulario" action="">
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>	
<table width="651" border="0" align="center" cellpadding="3" cellspacing="3">    
  
	<tr>
    <td colspan="6" class="titulo">CAPTURA GESTION DE COBRANZAS CREDITOS</td>
  </tr>
	
  <tr>
    <td colspan="6" align="right" nowrap bgcolor="#FFFFCC"><div align="center" class="Estilo2"><script languaje="JavaScript">Mostrar_Fecha()</script></div></td>
  </tr>
  <tr>
    <td class="tdder">C&eacute;dula,apellidos y nombres</td>
    <td class="tdizq"><input name="identi" type="text" id="identi" value="<?php echo $cedula; ?>" size="15" maxlength="15" readonly=""></td>
    <td class="tdizq" colspan="4"><input name="nombre_completo" type="text" id="nombre_completo3" value="<?php echo $nombre_completo; ?>" size="50" maxlength="50" readonly=""></td>
    </tr>
  <tr>
      <td class="tdder">N&uacute;mero de Contrato:</td>
      <td class="tdizq"><input name="numero" type="text" id="numero" value="<?php echo $numero; ?>" size="6" maxlength="6" readonly=""></td>
      <td class="tdder">Carpeta:</td>
      <td class="tdizq">
          <input name="numero_carpeta" type="text" id="numero_carpeta" value="<?php echo $carpeta; ?>" size="4" maxlength="4" readonly="">
      </div></td>
      <td class="tdder">Tipo:</td>
      <td class="tdizq"><input name="tipo" type="text" id="tipo" value="<?php echo $tipo; ?>" size="4" maxlength="4" readonly=""></td>
  </tr>
    <tr>
      <td class="tdder">Capital Per&iacute;odo actual:</td>
      <td class="tdizq"><input name="capital_periodo" type="text" id="capital_periodo" value="<?php echo $capital_periodo; ?>" size="10" maxlength="10" readonly=""></td>
    <td class="tdder">Intereses Cobro Prejur&iacute;dico:</td>
      <td class="tdizq" colspan="3"><input name="interes_prejuridico" type="text" id="interes_prejuridico" value="<?php echo $interes_prejuridico; ?>" size="10" maxlength="10" readonly=""></td>
    </tr>
    <tr>
     
      <td class="tdder">Honorarios:</td>
      <td class="tdizq"><input name="interes_cobroejecutivo" type="text" id="interes_cobroejecutivo" value="<?php echo $interes_cobroejecutivo; ?>" size="10" maxlength="10" readonly=""></td>
	  
	   <td class="tdder">Deuda Total:</td>
       <td class="tdizq" colspan="3"><input name="deuda_total" type="text" id="deuda_total3" value="<?php echo $deuda_total; ?>" size="10" maxlength="10" readonly=""></td>
    </tr>

    <tr>
      <td class="tdder">Oficio de env&oacute; No.:</td>
      <td class="tdizq"><input name="oficio_numero" type="text" id="oficio_numero" value="<?php echo $oficio_numero; ?>" size="4" maxlength="4" readonly=""></td>
      <td class="tdder">Fecha <span>dd/mm/aaaa:</td>
      <td class="tdizq" colspan="3">
	    <span class="Estilo29">
      <input name="fecha_oficio" type="text" id="fecha_oficio" value="<?php echo $fecha; ?>" size="10" maxlength="10" readonly="">
     </td>
    </tr>
	<tr>
      <td class="tdder">Unidad Credito:</td>
      <td class="tdizq"><input name="un" type="text" id="un" value="<?php echo $unidad; ?>" size="5" maxlength="5" readonly=""></td>

      <td class="tdder">Cod  Credito:</td>
      <td class="tdizq" colspan="3"><input name="codg" type="text" id="un2" value="<?php echo $codgest; ?>" size="5" maxlength="2" readonly=""> </td>
    </tr>
	<tr>
	<td colspan="6" align="center">
	
	 <?php echo "<input type='button' value='CONTRATO CREDITO' name=boton class=Estilo41 onClick =window.open('cobranza_credito_listado.php?ced2=$id&numlib=$numlib','','top=50,left=70,toolbar=no,scrollbars=yes,width=910,height=530,status=yes')></a>"; ?></td>
	</tr>
  </table>
</form>  
		
<form method="post" name="form" action="" onSubmit="return validar_campos(this)">	
<table width="750" border="0" align="center" cellpadding="3" cellspacing="3">    
    <tr>
      <td colspan="4" class="tdtitulo">INGRESAR GESTION DE COBRANZAS</td>
    </tr>
    <tr>
      <td class="tdder">FECHA DE LA GESTION:</td>
      <td class="tdizq">
		<input name="dia_act" type="text" id="dia" value="<?php echo date("d"); ?>" size="2" maxlength="2" readonly="">
		-
        <input name="mes_act" type="text" id="mes" value="<?php echo date("m"); ?>" size="2" maxlength="2" readonly="">
		-
        <input name="ano_act" type="text" id="ano" value="<?php echo date("Y"); ?>" size="4" maxlength="4" readonly="">
  <span class="tdder">dd/mm/aaaa</span></td>
      <td class="tdder">CODIGO CREDITO:</td>
      <td class="tdizq">
	  <select name="codigo3" id="codigo3">
          <option value="">--SELECIONE CODIGO--</option>
          <?php
     do {  
?>
          <option value="<?php echo $row_sql3['codigo'];?>"><?php echo $row_sql3['concepto']?></option>
          <?php
} while ($row_sql3 = mysql_fetch_assoc($sql3));
  $rows3 = mysql_num_rows($sql3);
  if($rows3 > 0) {
      mysql_data_seek($sql3,0);
       $row_sql3 = mysql_fetch_assoc($sql3);
  }
?>
        </select>
	  </td>
    </tr>
    <tr>
      <td colspan="4" align="right">
      <textarea name="actuacion" cols="70" rows="5" id="actuacion"></textarea></td>
    </tr>
    <tr>
      <td colspan="4">
		  
          <input name="guardar" type="submit" id="guardar" value ="Guardar" class="direcciona">   
		  
          <input name="button" type="button" class="irmenu" onclick="window.location.href='menu_cobranzas_cre.php'" value="Volver al Menú">
          <span class="Estilo10">
         
                 		  
      </div></td>
    </tr>
  </table>
<table width="651" align="center">
  <tr>
    <td class="tddered">Nombre del usuario:</td>
    <td class="tdizq"><select name="usuario">
     <option value="">--------SELECCIONE USUARIO--------</option>
    <option value="53031083">CRUZ GUERRA CLAUDIA LILIANA</option>
    <option value="52843157">GARCIA YENNY PAOLA</option>
    <option value="52529183">SANTIESTEBAN GAMBOA HAAEL</option>

   </select></td>
  </tr>
</table>
</form>  
</body>
</html>