File: /home/asjudine/www/consultas_cifin_debitos.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
$espacio = ' ';
$linea = '-';
require_once("Conectarse.php");
$cedulad=$_GET["ced"];
$nombcom=$_GET["nom"];
$cedulad2=$_GET["ced2"];
$resu= mysql_query('SELECT Cedula,Nombre_Completo FROM Usuarios WHERE (Cedula = "'.$cedulad.'" || Cedula = "'.$cedulad2.'")');
if (!$resu) {
die('Invalid query 2: ' . mysql_error());
}
list($cedula, $apes) = mysql_fetch_row($resu);
if(isset($_POST["guardar"]))
{
$ced = $_GET["ced"] ;
if ($ced == "" )
{
$ced = $_GET["ced2"];
}
$fechas = $_POST[ano].'-'.$_POST[mes].'-'.$_POST[dia] ;
if ($ced == "" )
{
$ced = $_GET["ced2"];
}
if (($_POST[numconsul] == "0") || ($_POST[numconsul] == " "))
{
echo "<script>alert('POR FAVOR ESCRIBA EL NUMERO DE CONSULTAS');</script>";
}
else {
$csql = mysql_query("INSERT INTO consultas_cifin (funcionario,fecha,numeroconsultas,dependencia) VALUES ('".$_POST["funcionario"]."','".$fechas."','" .$_POST["numconsul"]."' ,'DEBITOS' )");
if (!$csql) {
die('Invalid query update 1222: ' . mysql_error());
}
echo "<script>alert('REGISTRO GUARDADO SATISFACTORIAMENTE');</script>";
}
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='consultas_cifin_debitos.php?ced2=$ced'</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=utf-8" />
<title>Registro De Consultas A La Cifin</title>
<style type="text/css">
<!--
.est_cont5 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
font-weight: bold;
background-color: #EDFAF4;
margin: 2px;
padding: 2px;
height: auto;
width: auto;
border: thin groove #E9AAF0;
color: #00F;
}
.color_fondo_sc {
background-color: #DCE0E4;
}
.Estilo1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
font-weight: bold;
background-color: #D6ECFE;
margin: 2px;
padding: 2px;
height: auto;
width: auto;
border: thin groove #E9AAF0;
color: #00F;
}
body {
background-image: url(ELEMENTOS/beig.jpg);
}
.Estilo2 {
font-size: 14px;
font-weight: bold;
color: #00F;
}
.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;
}
.est_cont6 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 11px;
font-style: normal;
font-weight: normal;
color: #006262;
background-color: #EDFED3;
margin: 1px;
padding: 1px;
height: auto;
width: auto;
border: thin solid #D9B6F8;
}
.sol_cre1 {
font-family: "Times New Roman", Times, serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #0B3495;
background-color: #E6FAFF;
margin: 1px;
padding: 1px;
height: 18px;
width: auto;
border: thin outset #56AD95;
}
.col_cre2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: bold;
color: #F92F0B;
background-color: #B3D9F0;
height: auto;
width: auto;
border: medium groove #FC9227;
}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
.Estilo53 {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;
}
.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;
}
.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;
}
.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;
}
.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;
}
.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;
}
.Estilo66 {
font-size: 12px;
font-weight: bold;
}
.label {background-color: #FFFFCC; font-size: 16px; font-family: Arial; color:#0000CC; display: block;}
.Estilo67 {color: #000066}
.Estilo68 {color: #000066; font-weight: bold; }
.Estilo70 {
font-weight: bold;
font-size: 10px;
}
.Estilo71 {font-size: 10px}
.Estilo72 {font-weight: bold}
.Estilo73 {color: #000066; font-weight: bold; font-size: 12px; }
.Estilo74 {font-weight: bold}
.Estilo75 {font-weight: bold}
.Estilo76 {font-weight: bold}
.Estilo77 {font-weight: bold}
.Estilo78 {font-weight: bold}
.Estilo79 {font-weight: bold}
.Estilo80 {font-weight: bold}
.Estilo81 {font-weight: bold}
.Estilo82 {font-weight: bold}
.Estilo83 {font-weight: bold}
.Estilo84 {color: #000000; font-weight: bold;}
.Estilo85 {font-weight: bold}
-->
</style>
<script Language="JavaScript">
function validarEntero(valor){
//intento convertir a entero.
//si era un entero no le afecta, si no lo era lo intenta convertir
valor = parseInt(valor)
//Compruebo si es un valor numérico
if (isNaN(valor)) {
//entonces (no es numero) devuelvo el valor cadena vacia
return ""
}else{
//En caso contrario (Si era un número) devuelvo el valor
return valor
}
}
function valida_envia(){
//valido la fecha solicitud
if (document.form1.numconsu0l.value==''){
alert("Tiene que escribir la Fecha de Solicitud")
document.form1.numconsu0l.focus()
return (false);
}
if (document.form1.codigo_sucursal.value==""){
alert("Tiene que seleccionar sucursal")
document.form1.codigo_sucursal.focus()
return (false);
}
//valido LOS APELLIDOS
if (document.form1.ape.value==""){
alert("Tiene que escribir sus apellidos")
document.form1.ape.focus()
return (false);
}
//valido la cedula
if (document.form1.ced.value==""){
alert("Tiene que escribir el numero de cedula")
document.form1.ced.focus()
return (false);
}
//valido la fecha grado
if (document.form1.gra.value==""){
alert("Tiene que escribir el Grado")
document.form1.gra.focus()
return (false);
}
if (document.form1.plan.value==""){
alert("Falta seleccionar plan")
document.form1.plan.focus()
return (false);
}
//valido la fecha dia de nacimiento
if (document.form1.fechanac.value==""){
alert("FECHA DE NACIMIENTO")
document.form1.fechanac.focus()
return (false);
}
// valida cuotas
if (document.form1.cuotas.value==''){
alert("Tiene que escribir la Renovacion Cuotas")
document.form1.cuotas.focus()
return (false);
}
//valido VENDEDOR
if (document.form1.ase.value==""){
alert("Falta seleccionar vendedor")
document.form1.ase.focus()
return (false);
}
//valido la fecha dia de nacimiento
return (true);
}
</script>
</head>
<body >
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<form action="" method="post" onsubmit="return valida_envia()" enctype="multipart/form-data" name="form1" class="" id="form1">
<br></br>
<div align="center">
<div class="Estilo83">REGISTRO DE CONSULTAS A LA CIFIN</div>
<table width="814" border="2" cellpadding="1" cellspacing="1" class="Estilo71">
<caption>
<div align="center"><br />
<span class="Estilo2">DATOS BASICOS</span><br />
</div>
</caption>
<tr>
<td width="158" bgcolor="#DDDDDD"><div align="right" class="Estilo73">FUNCIONARIO:</div></td>
<td width="296" bgcolor="#DDDDDD"><div align="left" class="Estilo71">
<input name="funcionario" type="text" class="Estilo74" id="funcionario" value="<?php echo $apes ?>" size="40" maxlength="40" readonly=""/>
</div>
<td width="161" bgcolor="#DDDDDD"><div align="right" class="Estilo73">CEDULA No:</div></td>
<td width="174" bgcolor="#DDDDDD"><div align="left" class="Estilo71">
<input name="cedula" type="text" class="Estilo76" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" readonly=""/>
</div></td>
<tr>
<tr>
<td width="158" bgcolor="#DDDDDD" class="Estilo73"><div align="right" class="Estilo73"> FECHA DE REGISTRO:</div></td>
<td bgcolor="#DDDDDD"> <input name="dia" type="text" id="dia2" value="<?php echo date("d"); ?>" size="2" maxlength="2" readonly="readonly" >
<input name="mes" type="text" id="mes2" value="<?php echo date("m"); ?>" size="2" maxlength="2" readonly="readonly">
<input name="ano" type="text" id="ano2" value="<?php echo date("Y"); ?>" size="4" maxlength="4" readonly="readonly">
</td>
<td width="161" bgcolor="#DDDDDD" class="Estilo73"><div align="right" class="Estilo73">INGRESE LA CANTIDAD DE CONSULTAS</div></td>
<td bgcolor="#DDDDDD" align="left" > <input name="numconsul" type="text" id="numconsul" value=" " size="4" maxlength="4" />
</td>
</tr>
</table>
<p>
<label>
<input name="guardar" type="submit" class="Estilo53" id="guardar" value="GUARDAR" />
</label>
<label>
<input name="menu2" type="button" class="Estilo53" id="menu2" onClick="window.location.href='menu_cartera_debito.php'" value="IR AL MENU">
</label>
</p>
</div>
</form>
</body>
</html>