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_rec_cart_deb.php
<?php
require_once("mainfile.php");
include ("config.php");
require_once("Conectarse.php");
global $dbi;



if(isset($_POST["consultar"]))
{
	
	$control = mysql_query('SELECT  codigo, nombre, grado, plan, libranza, fecha_libranza, tipo_doc, valor_descuento, cuotas, pagaduria, fechainicio, fechatermino, tipo, codigo_descuento, unidad  FROM reporte_pagadurias  WHERE codigo = "' . $_POST[codig] . '" ');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			} 
	list($codigo, $nombre, $grado, $plan, $libranza, $fecha_libranza, $tipo_doc, $valor_descuento, $cuotas, $pagaduria, $fechaini, $fechater, $tipo, $codis, $unidad) = mysql_fetch_row($control);
}

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

			$cont =  mysql_query("UPDATE reporte_pagadurias   set grado = '" . $_POST[gr] . "',  libranza = '" . $_POST[nl] . "',  fecha_libranza = '" . $_POST[fl] . "',  valor_descuento = '" . $_POST[vd] . "',  cuotas = '" . $_POST[cuo] . "',  pagaduria = '" . $_POST[pag] . "',  fechainicio = '" . $_POST[fechaini] . "',  fechatermino = '" . $_POST[fechater] . "' WHERE  codigo = '" . $_POST[cod] . "'");
	if (!$cont) {
				die('Invalid query update: ' . mysql_error());
			} 
	  
	  echo "<script>alert('Se ha modificado correctamente la informacion');</script>";
}
?> 
<!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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.est_cont2 {font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #333399;
	background-color: #F0F5CF;
	height: 15px;
	width: auto;
	border: thin solid #FABF85;
}
.Estilo12 {font-size: 14px}
.Estilo8 {font-size: 20px;
	font-weight: bold;
}
.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: 16px;
	color: #5151FF;
	background-color: #C4E4FD;
	border: thin solid #009999;
}
.datos2 {font-family: "Courier New", Courier, monospace;
	font-size: 16px;
	font-style: normal;
	font-weight: normal;
	color: #0033FF;
	background-color: #FFE2C6;
	margin: 2px;
	padding: 3px;
	border: medium doble #EEBFEB;
}
.Estilo1 {color: #FF6633;
	font-size: 24px;
	font-style: italic;
}
.Estilo2 {color: #FF6633;
	font-size: 16px;
}
.Estilo3 {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;
}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div align="center">
    <table width="330" border="3" cellpadding="3" cellspacing="3" class="recaudo">
      <caption>
      <span class="Estilo1">SERVIASJUDINET</span>
      </caption>
      <tr>
        <th colspan="2" scope="col"><label>Digite el Numero de Codigo </label></th>
      </tr>
      <tr>
        <td width="162"><div align="center"><span class="Estilo2">CODIGO : </span></div></td>
        <td width="135"><div align="center">
            <input name="codig" type="text" id="codig" size="20" maxlength="20" />
        </div></td>
      </tr>
      <tr>
        <td colspan="2"><div align="center">
            <input name="consultar" type="submit" class="Estilo3" id="consultar" value="Consultar" />
			  <input name="menu2" type="button" class="Estilo3" id="menu2" onClick="window.location.href='menu_reporte_debito.php'" value="Ir al Menu">
        </div></td>
      </tr>
    </table>
    <table width="468" border="3" cellpadding="3" cellspacing="3" class="Estilo12">
      <caption>
      <span class="Estilo8"><br />
        REPORTE MINDEFENSA </span>
      <br />
      </caption>
      <tr>
        <td width="133" class="Estilo50" ><strong class="Estilo12">Apellidos y Nombres: </strong></span></td>
        <td colspan="6"><div align="left">
            <input name="nom" type="text" class="est_cont2" id="nom" value="<?php echo $nombre ?>" size="50" maxlength="50" />
          </div></td>
      </tr>
      <tr>
        <td class="Estilo50" >
          <strong>Codigo : </strong></td>
        <td width="91" ><div align="left">
            <input name="cod" type="text" class="est_cont2" id="cod" value="<?php echo $codigo ?>" size="15" maxlength="15" />
        </div></td>
        <td class="Estilo50"><strong>plan : </strong></td>
        <td><div align="left">
            <input name="plan" type="text" class="est_cont2" id="plan" value="<?php echo $plan ?>" size="10" maxlength="10" />
        </div></td>
        <div align="left"></div>
      </tr>
      <tr>
        <td class="Estilo50">
         <strong>Codigo Descuento  : </strong>      </td>
        <td ><div align="left">
            <input name="codis" type="text" class="est_cont2" id="codis" value="<?php echo $codis ?>" size="15" maxlength="15" />
          </div></td>
        <td class="Estilo50">
         <strong>Grado : </strong></td>
        <td><div align="left">
            <input name="gr" type="text" class="est_cont2" id="gr" value="<?php echo $grado ?>" size="10" maxlength="10" />
          </div></td>
      </tr>
      <tr>
        <td class="Estilo50"><strong>Fecha Libranza  : </strong></td>
        <td ><div align="left">
            <input name="fl" type="text" class="est_cont2" id="fl" value="<?php echo $fecha_libranza ?>" size="15" maxlength="15" />
          </div></td>
        <td class="Estilo50" ><strong> # Libranza: </strong></td>
        <td ><div align="left">
            <input name="nl" type="text" class="est_cont2" id="nl" value="<?php echo $libranza ?>" size="15" maxlength="15" />
          </div></td>
      </tr>
      <tr>
        <td class="Estilo50" ><strong>Valor Descuento  : </strong></td>
        <td ><div align="left">
            <input name="vd" type="text" class="est_cont2" id="vd" value="<?php echo $valor_descuento ?>" size="15" maxlength="15" />
          </div></td>
        <td class="Estilo50" ><strong> # Cuotas: </strong></td>
        <td ><input name="cuo" type="text" class="est_cont2" id="cuo" value="<?php echo $cuotas ?>" size="2" maxlength="2" /></td>
      </tr>
      <tr>
        <td class="Estilo50" ><strong>Fecha inicio: </strong></td>
        <td >
          <input name="fechaini" type="text" class="est_cont2" id="fechaini" value="<?php echo $fechaini ?>" size="14" maxlength="14" />      </td>

     
        <td width="100" class="Estilo50"><strong>Fecha termino: </strong></td>
        <td width="91"><input name="fechater" type="text" class="est_cont2" id="fechater" value="<?php echo $fechater ?>" size="14" maxlength="14" /></td>
      </tr>
      <tr>
        <td height="27" class="Estilo50"><strong>Pagaduria : </strong></td>
        <td colspan="6"><div align="left">
            <input name="pag" type="text" class="est_cont2" id="pag" value="<?php echo $pagaduria ?>" size="30" maxlength="30" />
          </div></td>
      </tr>
    </table>
    <p>
      <input name="grabar" type="submit" class="Estilo3" id="grabar" value="Modificar" />
    </p>
  </div>
</form>
</body>
</html>