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

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




  
 		 $result = 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 cobranzas WHERE cedula =  "' . $HTTP_GET_VARS["id"]  . '" and numero_carpeta =  "' . $HTTP_GET_VARS["carpeta"]  . '"  ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}

       if ((mysql_num_rows($result)!=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, $codiges ) = mysql_fetch_row($result);

          } 
  
 

if ($_POST[modificar])	
{

	     $nombre_completo = strtoupper($nombre_completo);		 
	     $tc = strtoupper($_POST[tc]);		 		 

			$result = mysql_query("UPDATE cobranzas set nombre_completo = '" . $_POST[nombre] . "', numero = '" . $_POST[con] . "', tipo = '" . $tc . "', numero_carpeta = '" . $_POST[nc] ."', capital_periodo = '" . $_POST[cp] . "', capital_renovacion = '" . $_POST[cr] . "', interes_prejuridico = '" . $_POST[icp] . "', interes_cobroejecutivo = '" . $_POST[ice] . "', capital_clausula = '" . $_POST[ccl] . "', deuda_total = '" . $_POST[dt] . "', oficio_numero = '" . $_POST[on] . "',  fecha_oficio = '" . $_POST[fecha_oficio] . "', cedula_funcionario = '" . $_POST[cf] . "', unidad = '" . $_POST[un] . "', codigo_gestion  = '" . $_POST[codiges] . "'  WHERE cedula =  '" . $HTTP_GET_VARS["id"]  . "' and numero_carpeta =  '" . $HTTP_GET_VARS["carpeta"]  . "' ");
			if (!$result) {
				die('No se actualizó la BD :  ' . mysql_error());
			}

        
		  $result = 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 FROM cobranzas WHERE cedula = "' . "$id" . '" ');
			if (!$result) {
				die('Invalid query: ' . mysql_error());
			}
	 
        if ((mysql_num_rows($result)!=0)) 
          {	 
                 list($numero_carpeta, $cedula, $nombre_completo, $numero, $tipo, $capital_periodo, $capital_renovacion, $interes_prejuridico, $interes_cobroejecutivo,$capital_clausula, $deuda_total, $oficio_numero, $fecha, $unidad ) = mysql_fetch_row($result);

          } 
		
		  echo "<script>alert('Datos Modificados Correctamente');</script>";			
	 				 
}
?>
<html>
<head>
<title>Modificar Cobranzas Gestion Juridica</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Estilo1 {font-family: "Arial Narrow"}
.Estilo2 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.Estilo10 {font-weight: bold}
.Estilo17 {font-size: 14}
.Estilo18 {font-family: "Arial Narrow"; font-weight: bold; font-size: 14; }
.Estilo19 {font-family: "Arial Narrow"; font-weight: bold; }
.Estilo21 {font-family: "Arial Narrow"; font-weight: bold; font-size: 14; color: #FF0000; }
.Estilo23 {font-family: "Arial Narrow"; color: #FF0000; }
.Estilo24 {color: #FF0000}
.Estilo25 {
	color: #FFFFFF;
	font-weight: bold;
}
.Estilo26 {
	color: #000000;
	font-weight: bold;
}
.Estilo29 {font-family: Tahoma; font-size: 12px; }
-->
</style>

<script Language="JavaScript"><!--
function validar(formulario)
{
  if (formulario.dia_act.value > 31)
  {
    alert("El número de día no se debe exceder de 31");
    formulario.dia_act.focus();
    return (false);
  }

  if (formulario.mes_act.value > 12)
  {
    alert("El número del mes no se debe exceder de 12");
    formulario.mes_act.focus();
    return (false);
  }
  return (true);
}
//--></script>

<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>
</head>
<body onLoad="document.formulario.cedula.focus()">
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
  <table width="711" border="0" align="center" cellpadding="3" cellspacing="3">
    <tr valign="baseline" bgcolor="#0099FF">
      <td colspan="6" align="right" nowrap><div align="center"><span class="Estilo2">GENERAR LIQUIDACION DEUDA</span></div></td>
    </tr>
    <tr valign="baseline" bgcolor="#0099FF">
      <td colspan="6" align="right" nowrap><div align="center" class="Estilo2">
          <script languaje="JavaScript">Mostrar_Fecha()</script>
      </div></td>
    </tr>

    <tr valign="baseline" bgcolor="#0099FF">
      <td><div align="right"><span class="Estilo1 Estilo5"><strong>N&uacute;mero c&eacute;dula:</strong></span></div></td>
      <td><input name="id" type="text" id="id" value="<?php echo $cedula ?>" size="15" maxlength="15" readonly=""></td>
      <td colspan="4"><input name="nombre" type="text" id="nombre" value="<?php echo $nombre_completo; ?>" size="50" maxlength="50" readonly="" ></td>
    </tr>
    <tr valign="baseline" bgcolor="#0099FF">
      <td><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
          <div align="right"><span class="Estilo5">N&uacute;mero de Contrato:</span></div>
      </div></td>
      <td width="96"><input name="con" type="text" id="con" value="<?php echo $numero; ?>" size="6" maxlength="6" readonly="" ></td>
      <td width="130"><div align="right" class="Estilo18">Tipo:</div></td>
      <td width="79"><input name="tc" type="text" id="tc" value="<?php echo $tipo; ?>" size="4" maxlength="4" readonly="" ></td>
      <td width="59"><span class="Estilo18">Carpeta:</span></td>
      <td width="99"><input name="nc" type="text" id="nc" value="<?php echo $numero_carpeta; ?>" size="4" maxlength="4" ></td>
    </tr>
    <tr valign="baseline" bgcolor="#0099FF">
      <td align="right" nowrap><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
          <div align="right"><span class="Estilo5">Capital Per&iacute;odo actual </span></div>
      </div></td>
      <td><input name="cp" type="text" id="cp" value="<?php echo $capital_periodo; ?>" size="10" maxlength="10" readonly="" ></td>
      <td colspan="2"><div align="right" class="Estilo18">Capital renovaci&oacute;n Autom&aacute;tica: </div></td>
      <td colspan="2"><input name="cr" type="text" id="cr" value="<?php echo $capital_renovacion; ?>" size="10" maxlength="10" ></td>
    </tr>
    <tr valign="baseline" bgcolor="#0099FF">
      <td align="right" nowrap><span class="Estilo18">Intereses Cobro Prejur&iacute;dico </span></td>
      <td><input name="icp" type="text" id="icp" value="<?php echo $interes_prejuridico; ?>" size="10" maxlength="10" ></td>
      <td colspan="2"><div align="right" class="Estilo18">Honorarios: </div></td>
      <td colspan="2"><input name="ice" type="text" id="ice" value="<?php echo $interes_cobroejecutivo; ?>" size="10" maxlength="10" ></td>
    </tr>
    <tr valign="baseline" bgcolor="#0099FF">
      <td align="right" nowrap><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
          <div align="right"><span class="Estilo5">Capital cl&aacute;usula penal:</span></div>
      </div></td>
      <td><input name="ccl" type="text" id="cc" value="<?php echo $capital_clausula; ?>" size="10" maxlength="10" ></td>
      <td colspan="2"><div align="right" class="Estilo18"><span class="Estilo5">Deuda Total:</span></div></td>
      <td colspan="2"><input name="dt" type="text" id="dt" value="<?php echo $deuda_total; ?>" size="10" maxlength="10"  ></td>
    </tr>
       <tr valign="baseline" bgcolor="#0099FF">
      <td align="right" nowrap><span class="Estilo18">Unidad Juridica</span></td>
      <td bgcolor="#0099FF"><input name="un" type="text" id="un" value="<?php echo $unidad; ?>" size="5" maxlength="5" readonly=""></td>
    <td align="right" nowrap><span class="Estilo18">Codigo Juridico</span></td>
	 <td bgcolor="#0099FF"><input name="codiges" type="text" id="codiges" value="<?php echo $codiges; ?>" size="5" maxlength="5"></td>
	
      <td colspan="2" ><span class="Estilo18"><?php echo $fecha_oficio ?> </span></td>
    </tr>
  </table>
  <table width="711" height="60" align="center">
  <tr>
    <td height="26" bgcolor="#0099FF"><div align="center">
        <input name="modificar" type="submit" id="modificar" value ="Modificar" style="font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid">
        <input name="button" type="button" style="font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid" onClick="window.location.href='menu_cobranzas_jur.php'" value="Atr&aacute;s">
        <input name="button" type="button" style="font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid" onClick="window.location.reload()" value="Actualizar">
    </div></td>
  </tr>
  <tr>
    <td height="26" bgcolor="#0099FF"><div align="center" class="Estilo1 Estilo24">Luego ub&iacute;que el puntero del mouse sobre el campo que desea modificar, reemplace y haga click en <span class="Estilo25">Modificar </span></div></td>
  </tr>
</table>
</form>  
</body>
</html>
<?PHP 

/* <tr valign="baseline" bgcolor="#0099FF">
      <td align="right" nowrap><span class="Estilo18">Oficio de env&oacute; No. </span></td>
      <td bgcolor="#0099FF"><input name="on" type="text" id="on" value="<?php echo $oficio_numero; ?>" size="4" maxlength="4"></td>
      <td colspan="2"><div align="right" class="Estilo19">Fecha aaaa/mm/dd:</div></td>
      <td colspan="2"><span class="Estilo18">
    <input name="fecha_oficio" type="text" class="campo" id="fecha_oficio" value="0000-00-00" size="13" maxlength="10" >
      </span></td>
    </tr>