File: /home/asjudine/www/formulario_consultorio_juridico4_policia.php
<?php
require_once("mainfile.php");
include ("config.php");
require_once("Conectarse.php");
$control = mysql_query('SELECT apellidos,nombres,cedula,celular,email, grado,unidad,direccion_residencia,ciudad_residencia,actuaciones FROM consultorio_policia WHERE cedula = "' . $_GET["cedula"] . '" and celular = "' . $_GET["celular"] . '"');
if (!$control) {
die('Invalid query 1: ' . mysql_error());
}
$num=mysql_num_rows($control);
list($ape, $nom, $cedu, $celular, $email, $grado, $unidad, $dirresidencia,$ciuresidencia,$actuaciones) = mysql_fetch_row($control);
?>
<html>
<head>
<title>Registro de Formulario Juridico</title>
<style type="text/css">
<!--
img {border: 0}
body,td {font-family: Verdana,Arial; font-size: 8pt; color: #000000}
input,select {font-family: Verdana,Arial; font-size: 7.5pt}
a:link, a:visited {text-decoration: none; color: #2030F0}
a:hover, a:active {text-decoration: underline; color: #D02010}
body table tr td table tr td form table {
font-size: 14px;
font-family: Georgia, "Times New Roman", Times, serif;
}
body table tr td table tr td form table tr td div strong {
font-size: 10pt;
}
body table tr td table tr td form table tr td div strong {
font-size: 9pt;
}
body table tr td table tr td form table tr td b {
font-size: 9pt;
}
body table tr td table tr td form table tr td div {
font-size: 7pt;
}
-->
</style>
</head>
<body bgcolor="#EFEFEF" text="#000000" topmargin="0" leftmargin="0">
<br>
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<br>
<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>INGRESAR CONSULTA JURIDICA</b></big></td>
</tr>
<tr>
<td align="center" colspan="2">
<script>
function Verificar() {
if(document.frm.nombre.value == "") {
alert("Por favor Escriba el nombre");
document.frm.nombre.focus();
return false;
}
return true;
}
</script>
<form method="post" name="frm" onSubmit="return Verificar()">
<table border="0" bgcolor="#EFEFEF" cellspacing="5">
<tr>
<td align="right"><b>Apellidos:</b></td>
<td><input type="text" name="apellidos" value="<? echo $ape?>"size="50" maxlength="40"></td>
</tr>
<tr>
<td align="right"><b>Nombres:</b></td>
<td><input type="text" name="nombre" value="<? echo $nom?>"size="50" maxlength="40"></td>
</tr>
<tr>
<td align="right"><b>Cedula de Ciudadania:</b></td>
<td><input type="text" name="ced" value="<? echo $cedu?>"size="50" maxlength="40"></td>
</tr>
<tr>
<td align="right"><b>Celular:</b></td>
<td><input type="text" name="celu" value="<?echo $celular?>"size="15" maxlength="15"></td>
</tr>
<tr>
<td align="right"><b>Correo Electronico:</b></td>
<td><input type="text" name="email" value="<? echo $email?>"size="50"></td>
</tr>
<tr>
<td align="right"><b>Grado:</b></td>
<td><input type="text" name="grado" value="<? echo $grado?> "size="10"></td>
</tr>
<tr>
<td align="right"><b>Unidad:</b></td>
<td><input type="text" name="unidad" value="<? echo $unidad ?>"size="10"></td>
</tr>
<tr>
<td align="right"><b>Direccion Residencia:</b></td>
<td><input type="text" name="dirresidencia" value="<? echo $dirresidencia ?>"size="50"></td>
</tr>
<tr>
<td align="right"><b>Ciudad Residencia:</b></td>
<td><input type="text" name="ciuresidencia" value="<? echo $ciuresidencia ?>"size="50"></td>
</tr>
<td><div align="right"><strong> Fecha Consulta </strong>dia/mes/ano</div></td>
<td><div align="left">
<input name="dia" type="text" id="dia2" value=""size="2" maxlength="2" >
<input name="mes" type="text" id="mes2" value=""size="2" maxlength="2" >
<input name="ano" type="text" id="ano2" value=""size="4" maxlength="4" >
</div></td></tr>
</table><br>
<b>Gestion De Telemercadeo</b><br>
<textarea name="mensaje" cols="100" rows="10"><? echo $actuaciones?></textarea><br><br>
<input name="guardar5" type="submit" class="Estilo53" id="guardar" value="Sin Contacto " />
<input name="guardar" type="submit" class="Estilo53" id="guardar" value="Afiliado" />
<input name="guardar4" type="submit" class="Estilo53" id="guardar" value="Interesado " />
<input name="guardar6" type="submit" class="Estilo53" id="guardar" value="Enviar Contrato" />
<input name="guardar2" type="submit" class="Estilo53" id="guardar" value="Sin Interes " />
<input name="guardar3" type="submit" class="Estilo53" id="guardar" value="Pendiente " />
</form>
</td>
</tr>
</table><br>
</td>
</tr>
<td height="22" colspan="2" bgcolor="#EFEFEF" class="fecha"><div align="center">
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='listado_pendiente_policia.php'" value="REGRESAR AL LISTADO">
</div></td>
<br>
<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>
<?
if(isset($_POST["guardar"]))
{
if ($cedu==$_GET["cedula"]);
$mssql3 = mysql_query("UPDATE consultorio_policia set apellidos = '" . $_POST[apellidos] . "', nombres = '" . $_POST[nombre] . "', cedula = '" . $_POST[ced] . "', celular = '" . $_POST[celu] . "' , email = '" . $_POST[email] . "', grado = '" . $_POST[grado] . "', unidad = '" . $_POST[unidad] . "', direccion_residencia= '" . $_POST[dirresidencia] . "' , ciudad_residencia= '" . $_POST[ciuresidencia] . "' , actuaciones= '" . $_POST[mensaje] . "',estado= '6' WHERE cedula = '" . $_GET["cedula"] . "' " );
if (!$mssql3) {
die('Invalid query cartera_serviasjudinet MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Los datos fueron Guardados');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
}
if(isset($_POST["guardar4"]))
{
if ($cedu==$_GET["cedula"]);
$mssql3 = mysql_query("UPDATE consultorio_policia set apellidos = '" . $_POST[apellidos] . "', nombres = '" . $_POST[nombre] . "', cedula = '" . $_POST[ced] . "', celular = '" . $_POST[celu] . "' , email = '" . $_POST[email] . "', grado = '" . $_POST[grado] . "', unidad = '" . $_POST[unidad] . "', direccion_residencia= '" . $_POST[dirresidencia] . "' , ciudad_residencia= '" . $_POST[ciuresidencia] . "' , actuaciones= '" . $_POST[mensaje] . "',estado= '2' WHERE cedula = '" . $_GET["cedula"] . "' " );
if (!$mssql3) {
die('Invalid query cartera_serviasjudinet MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Los datos fueron Guardados');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
}
if(isset($_POST["guardar2"]))
{
if ($cedu==$_GET["cedula"]);
$mssql3 = mysql_query("UPDATE consultorio_policia set apellidos = '" . $_POST[apellidos] . "', nombres = '" . $_POST[nombre] . "', cedula = '" . $_POST[ced] . "', celular = '" . $_POST[celu] . "' , email = '" . $_POST[email] . "', grado = '" . $_POST[grado] . "', unidad = '" . $_POST[unidad] . "', direccion_residencia= '" . $_POST[dirresidencia] . "' , ciudad_residencia= '" . $_POST[ciuresidencia] . "' , actuaciones= '" . $_POST[mensaje] . "',estado= '3' WHERE cedula = '" . $_GET["cedula"] . "' " );
if (!$mssql3) {
die('Invalid query cartera_serviasjudinet MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Los datos fueron Guardados');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
}
if(isset($_POST["guardar3"]))
{
if ($cedu==$_GET["cedula"]);
$mssql3 = mysql_query("UPDATE consultorio_policia set apellidos = '" . $_POST[apellidos] . "', nombres = '" . $_POST[nombre] . "', cedula = '" . $_POST[ced] . "', celular = '" . $_POST[celu] . "' , email = '" . $_POST[email] . "', grado = '" . $_POST[grado] . "', unidad = '" . $_POST[unidad] . "', direccion_residencia= '" . $_POST[dirresidencia] . "' , ciudad_residencia= '" . $_POST[ciuresidencia] . "' , actuaciones= '" . $_POST[mensaje] . "',estado= '2' WHERE cedula = '" . $_GET["cedula"] . "' " );
if (!$mssql3) {
die('Invalid query cartera_serviasjudinet MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Los datos fueron Guardados');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
}
if(isset($_POST["guardar5"]))
{
if ($cedu==$_GET["cedula"]);
$mssql3 = mysql_query("UPDATE consultorio_policia set apellidos = '" . $_POST[apellidos] . "', nombres = '" . $_POST[nombre] . "', cedula = '" . $_POST[ced] . "', celular = '" . $_POST[celu] . "' , email = '" . $_POST[email] . "', grado = '" . $_POST[grado] . "', unidad = '" . $_POST[unidad] . "', direccion_residencia= '" . $_POST[dirresidencia] . "' , ciudad_residencia= '" . $_POST[ciuresidencia] . "' , actuaciones= '" . $_POST[mensaje] . "',estado= '1' WHERE cedula = '" . $_GET["cedula"] . "' " );
if (!$mssql3) {
die('Invalid query cartera_serviasjudinet MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Los datos fueron Guardados');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
}
if(isset($_POST["guardar6"]))
{
if ($cedu==$_GET["cedula"]);
$mssql3 = mysql_query("UPDATE consultorio_policia set apellidos = '" . $_POST[apellidos] . "', nombres = '" . $_POST[nombre] . "', cedula = '" . $_POST[ced] . "', celular = '" . $_POST[celu] . "' , email = '" . $_POST[email] . "', grado = '" . $_POST[grado] . "', unidad = '" . $_POST[unidad] . "', direccion_residencia= '" . $_POST[dirresidencia] . "' , ciudad_residencia= '" . $_POST[ciuresidencia] . "' , actuaciones= '" . $_POST[mensaje] . "',estado= '5' WHERE cedula = '" . $_GET["cedula"] . "' " );
if (!$mssql3) {
die('Invalid query cartera_serviasjudinet MODIFICAR: ' . mysql_error());
}
echo "<script>alert('Los datos fueron Guardados');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
}
?>