File: /home/asjudine/public_html/comercial/formulario_consultorio_policia_A.php
<?php
require_once("../Conectarse.php");
$control = mysql_query('SELECT apellidos,nombres,cedula,celular,email,grado,estado_civil,unidad,direccion_residencia,
ciudad_residencia,actuaciones,correo_alterno FROM consultorio_policia WHERE cedula = "'.$_GET["ced"].'" ');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($ape, $nom, $cedu, $celular, $email, $grado,$ecivil, $unidad, $dirresidencia,$ciuresidencia,$actuaciones,$correoalt) = mysql_fetch_row($control);
if(isset($_POST["guardar"]))
{
$fecha_asignac = date("Y")."-".date("m")."-".date("d");
$nombre_completo =$_POST["nombre"]." ".$_POST["apellidos"] ;
$csql = mysql_query("SELECT cedula FROM consultorio_policia WHERE cedula= '".$_POST["ced"]. "' || apellidos= '".$_POST["apellidos"]. "' and nombres= '".$_POST["nombre"]. "' ");
if (!$csql) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($csql)!=0))
{
$cedal=$_POST["ced"].'A';
echo $_POST["condicion"];
echo $_POST["proceso"];
echo $cedal;
$csql6 = mysql_query("INSERT INTO consultorio_policia (apellidos,nombres,cedula,celular,email,grado,
estado_civil,unidad,direccion_residencia,ciudad_residencia,actuaciones,estado,correo_alterno,tipo_proceso)
VALUES ('".$_POST["apellidos"]."','".$_POST["nombre"]."','".$cedal."','".$_POST["celular"]."','".$_POST["email"]."','".$_POST["grado"]."','".$_POST["ecivil"]."','" .$_POST["unidad"]. "', '" .$_POST["direccion"]. "', '".$_POST["ciudad"]."','".$_POST["mensaje"]."','".$_POST["condicion"]."','".$_POST["emailalt"]."' ,'".$_POST["proceso"]."')");
if (!$csql6) { // esto es para que aparescan los errores
die('Invalid query csql: ' . mysql_error());
}
echo "<script>alert('Los datos fueron grabados correctamente');</script>";
}
}
?>
<html>
<head>
<title>Registro de Formulario Subsidio</title>
<style type="text/css">
*{margin: 0;padding: 0;}
body{background-color: #F1F1F1;font-family:Geneva, Arial, Helvetica, sans-serif;}
header {background-color: #B7271F; text-align: center;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
.tdizq{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
.tdcen{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.tdder{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
.boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
input[type=text], select{border-radius: 5px; padding: 3px;background-color: #fffef7;}
.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
</style>
</head>
<body bgcolor="#EFEFEF" text="#000000" topmargin="0" leftmargin="0">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<table width="100%" height="75%" bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" valign="top">
<table width="70%" border="0" cellspacing="0" cellpadding="0">
</table>
</td>
</tr>
<tr>
<td align="center">
<table width="44%" bgcolor="#EFEFEF" align="center" border="0" cellspacing="0" cellpadding="6">
<tr>
<td align="center" bgcolor="#306090"><big style="color:#FFFFFF"><b>DUPLICAR AFILIADO</b></big></td>
</tr>
<tr>
<td align="center" colspan="2">
<script>
function Verificar() {
if(document.frm.apellidos.value == "") {
alert("Por Favor Escriba Los Apellidos");
document.frm.apellidos.focus();
return false;
}
if(document.frm.nombre.value == "") {
alert("Por Favor Escriba El Nombre");
document.frm.nombre.focus();
return false;
}
if(document.frm.ced.value == "") {
alert("Por Favor Escriba El Numero De Cedula");
document.frm.ced.focus();
return false;
}
if(document.frm.ecivil.value == "") {
alert("Por Favor Escriba El Estado Civil");
document.frm.ecivil.focus();
return false;
}
return true;
}
</script>
<form method="post" name="frm" onSubmit="return Verificar()">
<table border="1" bgcolor="#EFEFEF" cellspacing="2">
<tr>
<td class="tdder">Apellidos:</td>
<td class="tdizq"><input type="text" name="apellidos" value="<?php echo $ape ?>" size="50" maxlength="40"></td>
</tr>
<tr>
<td class="tdder">Nombres:</td>
<td class="tdizq"><input type="text" name="nombre" value="<?php echo $nom ?>" size="50" maxlength="40"></td>
</tr>
<tr>
<td class="tdder">Cedula de Ciudadania:</td>
<td class="tdizq"><input type="text" name="ced" value="<?php echo $cedu ?>" size="50" maxlength="40"></td>
</tr>
<tr>
<td class="tdder">Celular:</td>
<td class="tdizq"><input type="text" name="celular" value="<?php echo $celular ?>" size="50" maxlength="40"></td>
</tr>
<tr>
<td class="tdder">Correo Electronico:</td>
<td class="tdizq"><input type="text" name="email" value="<?php echo $email ?>" size="50"></td>
</tr>
<tr>
<td class="tdder">Correo Alterno:</td>
<td class="tdizq"><input type="text" name="emailalt" value="<?php echo $correoalt ?>" size="50"></td>
</tr>
<tr>
<td class="tdder">Grado:</td>
<td class="tdizq"><input type="text" name="grado" value="<?php echo $grado ?>" size="50"></td>
</tr>
<tr>
<td class="tdder">Estado Civil:</td>
<td class="tdizq"><input type="text" name="ecivil" value="<?php echo $ecivil ?>" size="5"></td>
</tr>
<tr>
<td class="tdder">Unidad:</td>
<td class="tdizq"><input type="text" name="unidad" value="<?php echo $unidad ?>" size="50"></td>
</tr>
<tr>
<td class="tdder">Direccion Residencia:</td>
<td class="tdizq"><input type="text" name="direccion" value="<?php echo $dirresidencia ?>" size="50"></td>
</tr>
<tr>
<td class="tdder">Ciudad Residencia:</td>
<td class="tdizq"><input type="text" name="ciudad" value="<?php echo $ciuresidencia ?>" size="50"></td>
</tr>
<tr>
<td div class="tdder">Agregar Letra:</td>
<td class="tdizq">
<select name="letra" id="letra">
<option value="">--Letra--</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
</select>
</td>
</tr>
<tr>
<td div class="tdder">Tipo De Proceso:</td>
<td class="tdizq">
<select name="proceso" id="proceso">
<option value="">--Tipo Proceso--</option>
<option value="SUBSIDIO FAMILIAR">SUBSIDIO FAMILIAR</option>
<option value="I.P.C.">I.P.C.</option>
<option value="RELIQUIDACION PRESTACIONES">RELIQUIDACION PRESTACIONES</option>
<option value="ASCENSO SUPERIOR">ASCENSO SUPERIOR</option>
<option value="NIVELACION SALARIAL">NIVELACION SALARIAL</option>
<option value="RETIRO DISCRECIONAL">RETIRO DISCRECIONAL</option>
</select>
</td>
</tr>
<tr>
<td div class="tdder">Condicion Contraactual:</td>
<td class="tdizq">
<select name="condicion" id="condicion">
<option value="">--Condicion Contraactual--</option>
<option value="6">Afiliado</option>
<option value="4">Interesado</option>
</select>
</td>
</tr>
</table>
</table><br>
<b>Gestion De Telemercadeo</b><br>
<textarea name="mensaje" cols="100" rows="8"><? echo $moticonsu?></textarea><br><br>
<input name="menu2" type="button" class="boton1" id="menu2" onClick="window.location.href='consulta_ced_ventas_telemercadeo.php'" value="REGRESAR" />
<input name="guardar" type="submit" class="boton1" id="guardar" value="ENVIAR " /></td>
</tr>
</table><br>
</td>
</tr>
<tr>
<td height="10" align="center" bgcolor="#000052"><b style="font-size:7.5p;color:#FFFFFF">Registro Formulario Juridico</b></td>
</tr>
</table>
</body>
</html>