File: /home/asjudine/www/aprobacion_email-policia.php
<?php
require_once("mainfile.php");
include ("config.php");
require_once("Conectarse.php");
$dia = date("d");
$mes = date("m");
$ano = date("Y");
$res = mysql_query('SELECT apellidos, nombres, cedula, celular, email,empresa_laboral, direccion_residencia,ciudad_residencia FROM consultorio_juridico WHERE cedula = "'.$_GET["cedula"].'" and apellidos= "'.$_GET["apellidos"].'" and nombres= "'.$_GET["nombre"].'" and celular= "'.$_GET["celular"].'" ');
if (!$res) {
die('Invalid query: ' . mysql_error());
}
list($apellidos, $nombres, $cedula, $celular, $email,$empresa, $direccion,$ciudad_residencia) = mysql_fetch_row($res);
if(isset($_POST["concretado"]))
{
////CAMBIA A ESTADO 0 CUANDO SE REALIZA EL ENVIO DE EMAIL
$modificarcob = mysql_query("UPDATE consultorio_juridico set motivo_consulta = '".$_POST["gestion"]."', fecha_consulta = '".$_POST["fecha"]."', estado = '0' WHERE cedula = '".$_GET[cedula]."'and celular= '".$_GET["celular"]."' and apellidos= '".$_GET["apellidos"]."' ");
if (! $modificarcob) {
die('Invalid query telemaprueba 78: ' . mysql_error());
}
echo "<script>alert('Email Enviado Correctamente');</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='enviar_email_consultorio.php'</SCRIPT>";
}
?>
<html>
<head>
<title>Enviar Email</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton { background-color: #FFCCCC; color:#FFFFFF; width:150px; border: 4px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #FFFFCC; font-size: 13px; font-family: Arial; color:#0000CC; display: block;}
.fecha {background-color: #CCFFCC; font-size: 12px; font-family: Arial; color: #000099; width:10px display: block;}
.campo {background-color: #99FFCC; border:1px solid #990000;}
.lista { background-color:#99FFFF; font-family: Arial; font-size: 11px; color: #990000;}
.label {background-color: #CCFFFF ; font-size: 14px; font-family: Arial; color:#0000CC; display: block;}
.labe2 {background-color: #CCFFFF ; font-size: 14px; font-family: Arial; color:#0000CC; }
.area {background-color: #CCFFCC; font-size: 13px; width:40px font-family: Arial; color:#0000CC; display: block;}
.variables {background-color: #CCFFCC; font-size: 12px; font-family: Arial; color: #003333 ; width:10px display: block; border: 2px solid #006633;}
.sel { background-color:#DDFFFF; width:400px; border: 1px solid #0099FF; font-family:Arial; font-style:italic; color:#990000 }
.seleccion { background-color: #CCFFCC; width:340px; border: 1px solid #0099FF; font-family:Arial; color:#990000;}
.boton2 {font-family: Verdana; font-size: 8 pt; color: #000080; background-color: #C0C0C0; border-style: solid; }
body {
background-image: url(ELEMENTOS/gris-blanco.jpg);
}
.boton1 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.Estilo1 {color: #00CCFF}
.Estilo2 {color: red}
.Estilo3 {color: #0000CC}
.Estilo8 {background-color: #CCFFFF; font-size: 14px; font-family: Arial; color: #003366; display: block; }
.Estilo10 {background-color: #FFFFCC; font-size: 13px; font-family: Arial; color: #990066; display: block; }
.Estilo11 {
color: #000066;
font-weight: bold;
}
-->
</style>
<script languaje="JavaScript">
function Mostrar_Fecha()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
document.write("<b><font face='Arial, Helvetica, sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}
</script>
<script Language="JavaScript">
<!--
function validar(formulario)
{
if (formulario.fechavis.value == "0000-00-00")
{
alert("Falta digitar Fecha Visita");
formulario.fechavis.focus();
return (false);
}
if (formulario.horavis.value == "00-00")
{
alert("Falta digitar Hora visita");
formulario.horavis.focus();
return (false);
}
return (true);
}
//--></script>
<SCRIPT LANGUAGE='JavaScript'>
var default1 = "VENTANA PARA LA MODIFICACION DE REVISTAS PREJURIDICAS"; // only shown once at page load
var text1 = "El primer encabezado muestra en detalle los datos del proceso seleccionado";
var text2 = "la segunda parte muestra el record de actuaciones";
var text3 = "Revise bien las actuaciones y los número de folios";
var changeRate = 3000; // 1000 = 1 second
var messageNumber = 0;
function changeStatus()
{
if (messageNumber == 0) {
window.status=default1;
document.title=default1;
}
else if (messageNumber == 1) {
window.status=text1;
}
else if (messageNumber == 2) {
window.status=text2;
}
else if (messageNumber == 3) {
window.status=text3;
messageNumber = 0;
}
messageNumber++;
setTimeout("changeStatus();",changeRate);
}
changeStatus(); // leave here to run right away
// -->
</SCRIPT>
</head>
<body leftmargin="5" topmargin="5" marginwidth="5" marginheight="5" onLoad="document.formulario.folio1.focus()">
<form name="consulta" method="post" action="<?php echo $editFormAction; ?>" onSubmit="return validar(this)">
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<table width="668" border="6" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#CCFFFF">
<td width="731" bgcolor="#DDDDDD" class="Estilo11" align="center">ENVIAR EMAIL </div></td>
</tr>
<tr bgcolor="#FFCC99">
<td height="19" bgcolor="#BBBBBB" class="fecha"><span class="Estilo1"></span>
<div align="center" bgcolor="#DDDDDD">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td height="50" bgcolor="#FFFFFF"><fieldset>
<table width="656" border="3" cellspacing="3" cellpadding="3">
<tr bgcolor="#FFFFFF">
<th width="191" colspan="1" align="left" bgcolor="#DDDDDD"><span class="Estilo11">Cedula</span></th>
<td width="516" align="left" bgcolor="#BBBBBB"><input name="cedul" type="text" class="Estilo11" id="cedul" value="<?php echo $cedula; ?>" size="15" maxlength="15" readonly > </td>
</tr>
<tr bgcolor="#FFFFFF">
<th align="left" bgcolor="#DDDDDD"><span class="Estilo11">Nombres:</span></th>
<td bgcolor="#BBBBBB"><input name="razon" type="text" class="Estilo11" id="razon" value="<?php echo $apellidos; echo" "; echo $nombres;?>" size="50" maxlength="50" readonly></td>
</tr>
<tr bgcolor="#FFFFFF">
<th align="left" bgcolor="#DDDDDD"><span class="Estilo11">Dirección:</span></th>
<td colspan="1" bgcolor="#BBBBBB"><input name="direc" type="text" class="Estilo11" id="direc" value="<?php echo $direccion; ?>" size="50" maxlength="50" readonly></td>
</tr>
<tr bgcolor="#FFFFFF">
<th align="left" bgcolor="#DDDDDD"><span class="Estilo11">Email:</span><span class="Estilo11"></span></th>
<td colspan="1" bgcolor="#BBBBBB"><input name="email" type="text" class="Estilo11" id="email" value="<?php echo $email; ?>" size="50" maxlength="50" readonly></td>
</tr>
<tr bgcolor="#FFFFFF">
<th align="left" bgcolor="#DDDDDD"><span class="Estilo11">Celular:</span><span class="Estilo11"></span></th>
<td bgcolor="#BBBBBB"><input name="tel" type="text" class="Estilo11" id="tel" value="<?php echo $celular; ?>" size="10" maxlength="10" readonly></td>
</tr>
<tr bgcolor="#FFFFFF">
<th align="left" bgcolor="#DDDDDD"><span class="Estilo11">Ciudad </span></th>
<td colspan="1" bgcolor="#BBBBBB"><input name="repre" type="text" class="Estilo11" id="repre" value="<?php echo $ciudad_residencia; ?>" size="50" maxlength="50" ></td>
</tr>
<tr>
<th align="left" bgcolor="#DDDDDD"><span class="Estilo11">Empresa Laboral:</span></th>
<td colspan="1" align="left" bgcolor="#BBBBBB"><input name="descri" cols="70" rows="5" type="text" class="Estilo11" id="descri" value="<?php echo $empresa; ?>" size="50" maxlength="50" ></td>
</tr>
<tr>
<th height="50" align="left" bgcolor="#DDDDDD"><span class="Estilo11">Fecha Gestion:</span></th>
<td colspan="1" bgcolor="#BBBBBB"><input name="fecha" type="text" class="Estilo11" id="fecha" value="<?php echo $ano.'-'.$mes.'-'.$dia; ?>" size="12" maxlength="12" readonly ></td>
</tr>
<tr >
<th align="center" bgcolor="#DDDDDD"><span class="Estilo11">Gestion:</span></th>
<td colspan="2" align="center" nowrap bgcolor="#BBBBBB"><textarea name="gestion" cols="60" rows="5" id="gestion"></textarea></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
<tr bgcolor="#FFCC99">
<td height="20" bgcolor="#99CCFF"><div align="center">
<input name="concretado" type="submit" class="Estilo2" value ="GUARDAR" >
<input name="menu" type="button" class="Estilo11" id="menu" onClick=window.open("http://webmail.asjudinet.com/imp/login.php") value="Enviar Email" />
</div></td>
</tr>
<br>
<br>
</table>
</form>
</body>
<p align="center">
<input name="menu" type="button" class="Estilo3" id="menu" onClick="window.location.href='enviar_email_consultorio_policia.php'" value="LISTADO ENVIAR EMAIL"/>
<input name="menu" type="button" class="Estilo3" id="menu" onClick="window.location.href='menu_consultorio_policia.php'" value="MENU CONSULTORIO POLICIA" />
</p>