File: /home/asjudine/public_html/mostrar_inconstencias.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
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();
$control = mysql_query('SELECT codigo, nombre, grado, plan, libranza, fecha_libranza, valor_descuento, cuotas, pagaduria, mesini_pago, anoini_pago , mesfin_pago, anofin_pago, codigo_descuento, unidad FROM reporte_pagadurias WHERE codigo = "' . $HTTP_GET_VARS["ced2"] . '" and id = "' . $HTTP_GET_VARS["id"] . '" ');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
list($codigo, $nombre, $grado, $plan, $libranza, $fecha_libranza, $valor_descuento, $cuotas, $pagaduria, $mesini, $anoini, $mesfin, $anofin, $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 = '" . $HTTP_GET_VARS[ced2] . "' and id = '" . $HTTP_GET_VARS[id] . "'");
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í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: #418BAF;
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="608" border="3" cellpadding="3" cellspacing="3" >
<caption>
<span class="Estilo8"><br />
REPORTE MINDEFENSA </span> <br />
</caption>
<tr>
<td colspan="2" class="Estilo50"><span class="Estilo50"><strong>Apellidos y Nombres: </strong></span></td>
<td colspan="6" align="left"><input name="nom" type="text" class="est_cont2" id="nom" value="<?php echo $nombre ?>" size="50" maxlength="50" />
</td>
</tr>
<tr>
<td colspan="2" class="Estilo50"><strong>Codigo : </strong> </td>
<td colspan="2"><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 colspan="2"><div align="left">
<input name="plan" type="text" class="est_cont2" id="plan" value="<?php echo $plan ?>" size="15" maxlength="15" />
</div></td>
</tr>
<tr>
<td colspan="2" class="Estilo50"><strong>Codigo Descuento : </strong> </td>
<td colspan="2"><div align="left">
<input name="codis" type="text" class="est_cont2" id="codis" value="<?php echo $codis ?>" size="15" maxlength="15" readonly=""/>
</div></td>
<td class="Estilo50" ><strong>Grado : </strong> </td>
<td colspan="2"><input name="gr" type="text" class="est_cont2" id="gr" value="<?php echo $grado ?>" size="10" maxlength="10" />
</td>
</tr>
<tr>
<td colspan="2" class="Estilo50"><strong>Fecha Libranza : </strong> </td>
<td colspan="2"><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 width="136" colspan="2"><input name="nl" type="text" class="est_cont2" id="nl" value="<?php echo $libranza ?>" size="15" maxlength="15" /></td>
</tr>
<tr>
<td colspan="2" class="Estilo50"><strong>Valor Descuento : </strong> </td>
<td colspan="2"><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 colspan="2" class="Estilo50"><strong>Fecha Inicio: </strong> </td>
<td width="156" ><input name="fechaini" type="text" class="est_cont2" id="fechaini" value="<?php echo $fechaini ?>" size="14" maxlength="14" /></td>
<td colspan="2" ><strong class="Estilo50">Fecha termino : </strong></td>
<td width="136" ><input name="fechater" type="text" class="est_cont2" id="fechater" value="<?php echo $fechater ?>" size="14" maxlength="14" />
</td>
</tr>
<tr>
<td colspan="2" class="Estilo50"><strong>Pagaduria : </strong> </td>
<td colspan="6" align="left"><input name="pag" type="text" class="est_cont2" id="pag" value="<?php echo $pagaduria ?>" size="30" maxlength="30" />
</td>
</tr>
</table>
<p>
<input name="grabar" type="submit" class="Estilo3" id="grabar" value="Enviar" />
</p>
</div>
</form>
</body>
</html>