File: /home/asjudine/www/ingresar_resul_deb.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();
if(isset($_POST["consultar"]))
{
$control4 = mysql_query('SELECT cedula, nombres, dirrecion, telefono, celular, ciudad, email, entidad_laboral, banco, cuenta, valor_credito, valor_juridica, valor_debitar, cuota_debitar, unidad_desc, codigo_desc, debito_jur, debito_cre, cuotas_pend, fecha_registro, causal_rechazo, fecha_rechazo, estado FROM debitos WHERE cedula = "' . $_POST[ced] . '" ');
if (!$control4) {
die('Invalid query 4 aqui: ' . mysql_error());
}
list($cedulab, $apellidos_nomsb, $direccionb, $telefonob, $celularb, $ciudadb, $emailb, $entidad_laboral, $banco, $cuenta, $valcre, $valjur, $val_deb, $cuo_deb, $unidad_desc, $codigo_desc, $debito_jur, $debito_cre, $cuotas_pend, $fecha_registro, $causal_rechazo, $fecha_rechazo, $esta) = mysql_fetch_row($control4);
$resu = mysql_query('SELECT causal FROM debito_causal WHERE codigo = "' ."$causal_rechazo". '" ');
if (!$resu) {
die('Invalid query: ' . mysql_error());
}
list($causala) = mysql_fetch_row($resu);
}
if(isset($_POST["grabar"]))
{
$resu3 = mysql_query('SELECT UNIDAD, CODIGO FROM debitos_unidad WHERE ID = "' ."$unidt2". '" ');
if (!$resu3) {
die('Invalid query: ' . mysql_error());
}
list($unidad_desc, $codigo_desc ) = mysql_fetch_row($resu3);
$resu4 = mysql_query('SELECT codigo FROM debito_causal WHERE codigo = "' ."$causal2". '" ');
if (!$resu4) {
die('Invalid query: ' . mysql_error());
}
list($causal) = mysql_fetch_row($resu4);
$msql = mysql_query("UPDATE debitos set nombres = '" . $_POST[apenom] . "', dirrecion = '" . $_POST[dir] . "', telefono = '" . $_POST[tel] . "' , celular = '" . $_POST[celu] . "', ciudad = '" . $_POST[ciu] . "', email = '" . $_POST[ema] . "', entidad_laboral = '" . $_POST[entlab] . "', banco = '" . $_POST[ban] . "', cuenta = '" . $_POST[cuen] . "', debito_cre = '" . $_POST[val_cre] . "', debito_jur = '" . $_POST[val_jur] . "', cuotas_pend = '" . $_POST[cuotas_pend] . "', fecha_registro = '" . $_POST[fecha_registro] . "' WHERE cedula = '" . $_POST[cedb] . "' ");
$control4 = mysql_query('SELECT cedula, nombres, dirrecion, telefono, celular, ciudad, email, entidad_laboral, banco, cuenta, valor_credito, valor_juridica, valor_debitar, cuota_debitar, unidad_desc, codigo_desc, debito_jur, debito_cre, cuotas_pend, fecha_registro, causal_rechazo, fecha_rechazo, estado FROM debitos WHERE cedula = "' . $_POST[ced] . '" ');
if (!$control4) {
die('Invalid query 4 aqui: ' . mysql_error());
}
list($cedulab, $apellidos_nomsb, $direccionb, $telefonob, $celularb, $ciudadb, $emailb, $entidad_laboral, $banco, $cuenta, $valcre, $valjur, $val_deb, $cuo_deb, $unidad_desc, $codigo_desc, $debito_jur, $debito_cre, $cuotas_pend, $fecha_registro, $causal_rechazo, $fecha_rechazo, $esta) = mysql_fetch_row($control4);
}
$sql2 = mysql_query('SELECT * FROM debitos_unidad order by CODIGO ');
if (!$sql2) {
die('Invalid query: ' . mysql_error());
}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);
$sql6 = mysql_query('SELECT * FROM debito_causal order by codigo ');
if (!$sql6) {
die('Invalid query: ' . mysql_error());
}
$row_sql6 = mysql_fetch_assoc($sql6);
$totalRows_sql6 = mysql_num_rows($sql6);
?>
<!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=utf-8" />
<title>Ingresar Resultados Debito</title>
<style type="text/css">
<!--
.Estilo10 { font-size: 14px;
font-weight: bold;
}
.Estilo12 {
font-size: 11px
}
.Estilo15 { font-size: 12px;
color: #000000;
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: 11px;
color: #5151FF;
background-color: #C4E4FD;
border: thin solid #009999;
height: 18px;
width: auto;
}
.datos3 {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
font-weight: normal;
color: #FF3300;
background-color: #A6ECD7;
margin: 4px;
padding: 4px;
border: medium groove #CCCCFF;
height: auto;
width: auto;
}
body {
background-color: #DCFAF3;
}
.campo {background-color: #FFFFCC; border:1px solid #990000; font-family:Arial; font-size:11px; height: inherit}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
.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;
}
.datos2 {
font-family: "Courier New", Courier, monospace;
font-size: 10px;
font-style: normal;
font-weight: normal;
color: #0033FF;
background-color: #FFE2C6;
margin: 2px;
padding: 3px;
border: medium doble #EEBFEB;
}
.go {
font-family: "Times New Roman", Times, serif;
font-size: 9px;
font-style: normal;
color: #FF6633;
background-color: #FBDCBD;
padding: 1px;
height: auto;
width: auto;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
}
.Estilo8 { font-size: 20px;
font-weight: bold;
}
.datos1 { font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
text-decoration: blink;
background-color: #CCFFCC;
margin: 5px;
padding: 7px;
height: auto;
width: auto;
border: thin solid #0099FF;
}
.datos1 { font-family: Georgia, "Times New Roman", Times, serif;
font-size: 16px;
background-color: #FDE0C1;
margin: 2px;
padding: 3px;
border: medium doble #DBAED7;
}
.datos1 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 11px;
font-weight: normal;
background-color: #B8F5E8;
margin: 4px;
padding: 5px;
border: thin outset #009999;
}
.Estilo51 {font-size: 16px}
.Estilo54 {
color: #FF3300;
font-weight: bold;
}
.Estilo55 {
font-size: 11px;
font-weight: bold;
}
.Estilo56 {font-size: 11px}
.Estilo59 {font-size: 15px}
.campo11 {background-color: #B7FFFF;
border: thin dashed #B6B6B6;
}
.campo11 {font-family: "Courier New", Courier, monospace;
font-size: 16px;
font-style: normal;
font-weight: bold;
background-color: #E1EFFD;
border: thin doble #009999;
}
.campo11 {font-family: "Courier New", Courier, monospace;
font-size: 12px;
color: #5151FF;
background-color: #C4E4FD;
border: thin solid #009999;
height: 20px;
width: auto;
}
.datos21 {font-family: "Courier New", Courier, monospace;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #0033FF;
background-color: #FFE2C6;
margin: 2px;
padding: 3px;
border: medium doble #EEBFEB;
}
.est_cont2 {font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #2B39EC;
background-color: #F0F5CF;
height: 18px;
width: auto;
border: thin solid #FABF85;
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<table width="755" border="3" cellpadding="3" cellspacing="3" class="datos3">
<caption>
<div align="center"><strong><span class="Estilo12"><br />
</span></strong>
<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 Cedula </label></th>
</tr>
<tr>
<td width="162"><div align="center"><span class="Estilo2">CEDULA : </span></div></td>
<td width="135"><div align="center">
<input name="ced" type="text" id="ced" 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" />
</div></td>
</tr>
</table>
<table width="655" border="3" cellpadding="3" cellspacing="3" class="datos21">
<caption>
<span class="Estilo8"><br />
<span class="Estilo51">DATOS BASICOS </span></span>
</caption>
<tr>
<td width="88"><span class="Estilo56"><strong>Apellidos y Nombres </strong></span></td>
<td colspan="3"><div align="left">
<input name="apenom" type="text" class="campo11" id="apenom" value="<?php echo $apellidos_nomsb ?>" size="75" maxlength="75">
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo56"><strong>Cedula : </strong></div></td>
<td width="109"><input name="cedb" type="text" class="campo11" id="cedb" value="<?php echo $cedulab ?>" size="15" maxlength="15" readonly="" /> </td>
</tr>
<tr>
<td><div align="center" class="Estilo56"><strong>Ciudad : </strong></div></td>
<td><input name="ciu" type="text" class="campo11" id="ciu" value="<?php echo $ciudadb ?>" size="15" maxlength="15"></td>
<td><div align="center" class="Estilo56"><strong>Direccion : </strong></div></td>
<td><input name="dir" type="text" class="campo11" id="dir" value="<?php echo $direccionb ?>" size="45" maxlength="45"></td>
</tr>
<tr>
<td><div align="center" class="Estilo56"><strong>Celular : </strong></div></td>
<td><input name="celu" type="text" class="campo11" id="celu" value="<?php echo $celularb ?>" size="15" maxlength="15" /></td>
<td><div align="center" class="Estilo56"><strong>Telefono : </strong></div></td>
<td><div align="left">
<input name="tel" type="text" class="campo11" id="tel" value="<?php echo $telefonob ?>" size="15" maxlength="15"/>
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo56"><strong>Banco : </strong></div></td>
<td><input name="ban" type="text" class="campo11" id="ban" value="<?php echo $banco ?>" size="15" maxlength="15" /></td>
<td><div align="center" class="Estilo56"><strong>Cuenta N° : </strong></div></td>
<td><div align="left">
<input name="cuen" type="text" class="campo11" id="cuen" value="<?php echo $cuenta ?>" size="15" maxlength="15"/>
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo56"><strong>Valor Credito : </strong></div></td>
<td><input name="cre" type="text" class="campo11" id="cre" value="<?php echo $valcre ?>" size="15" maxlength="15" /></td>
<td><div align="center" class="Estilo56"><strong>Valor Juridica : </strong></div></td>
<td><div align="left">
<input name="jur" type="text" class="campo11" id="jur" value="<?php echo $valjur ?>" size="15" maxlength="15"/>
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo56"><strong>Email : </strong></div></td>
<td colspan="3"><div align="left">
<input name="ema" type="text" class="campo11" id="ema" value="<?php echo $emailb ?>" size="35" maxlength="35">
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo55">
<div align="right">Entidad Laboral: </div>
</div></td>
<td colspan="3"><div align="left">
<input name="entlab" type="text" class="campo1" id="entlab" value="<?php echo $entidad_laboral ?>" size="45" maxlength="45" />
</div></td>
</tr>
</table>
<table width="620" border="3" cellpadding="3" cellspacing="3" class="datos3">
<caption>
<strong><br />
<br />
<span class="Estilo51">INGRESAR RESULTADOS </span><br />
<br />
</strong>
<label></label>
</caption>
<tr>
<td><div align="center" class="Estilo12">
<div align="right"><strong> Valor Juridica: </strong></div>
</div></td>
<td><div align="left">
<input name="val_jur" type="text" class="campo1" id="val_jur" value="<?php echo $debito_jur ?>" size="15" maxlength="15" />
</div></td>
<td><div align="center" class="Estilo12">
<div align="right"><strong> Valor Credito: </strong></div>
</div></td>
<td><div align="left">
<input name="val_cre" type="text" class="campo1" id="val_cre" value="<?php echo $debito_cre ?>" size="15" maxlength="15" />
</div></td>
</tr>
<tr>
<td><div align="center" class="Estilo12">
<div align="right"><strong>Cuotas Pendientes: </strong></div>
</div></td>
<td><div align="left">
<input name="cuotas_pend" type="text" class="campo1" id="cuotas_pend" value="<?php echo $cuotas_pend ?>" size="4" maxlength="2" />
</div></td>
<td height="32"><div align="center" class="Estilo12">
<p align="right"><strong>Fecha Registro</strong><strong>:</strong></p>
</div></td>
<td bordercolor="#1941A5"><label> </label>
<div align="left">
<input name="fecha_registro" type="text" class="campo1" id="fecha_registro" value="<?php echo $fecha_registro ?>" size="12" maxlength="10" />
</td>
</tr>
</table>
</div>
<p align="center">
<input name="grabar" type="submit" class="Estilo3" id="grabar" value="INGRESAR RESULTADO" />
</p>
<p align="center">
<input name="menu2" type="button" class="Estilo50" id="menu2" onclick="window.location.href='menu_deb.php'" value="IR AL MENU" />
</p>
</form>
</body>
</html>