File: /home/asjudine/public_html/adirectoress/modificar_atencion.php
<?php
global $dbi;
require_once("../Conectarse.php");
//$sql2 = "select id, cedula, numero_atencion, fecha_servicio, hora_servicio, sucursal, nombre_funcionario, tipo from record_servicios where cedula = $id and numero_atencion = $atencion ";
//$control2 = mysql_query($sql2, $dbi) or die(mysql_error());
$control2 = mysql_query('SELECT id, cedula, numero_atencion, fecha_servicio, hora_servicio, sucursal, nombre_funcionario, tipo FROM record_servicios WHERE cedula = "' . $_GET["id"] . '" and numero_atencion = "' . $_GET["atencion"] . '" ');
if (!$control2) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($control2)!=0))
{
list($id, $cedula, $numero_atencion, $fecha_servicio, $hora_servicio, $sucur, $nombre_funcionario, $tipo) = mysql_fetch_row($control2);
// $sqlnom = "select nombre from asjudinet_cartera where cedula = $cedula";
// $control = mysql_query($sqlnom, $dbi) or die(mysql_error());
$con45 = mysql_query('SELECT nombre FROM cartera_serviasjudinet WHERE cedula = "' ."$cedula". '" ');
if (!$con45) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($con45)==0))
{
$con45 = mysql_query('SELECT nombre FROM beneficiarios WHERE cedula = "' ."$cedula". '" ');
if (!$con45) {
die('Invalid query: ' . mysql_error());
}
}
list($nombre_completo) = mysql_fetch_row($con45);
// $sqlnom2 = "select nombre from sucursal where codigo = '$sucur'";
// $control2 = mysql_query($sqlnom2, $dbi) or die(mysql_error());
$control2 = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "' ."$sucur". '" ');
if (!$control2) {
die('Invalid query: ' . mysql_error());
}
list($nomsuc) = mysql_fetch_row($control2);
}
?>
<html>
<head>
<title>MODIFICAR ATENCION</title>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--meta http-equiv="Content-Type" content="text/html; charset=utf-8" />-->
<style type="text/css">
*{margin: 0;padding: 0;}
body{background-color:#EAEAEA;font-family:Verdana, Geneva, sans-serif;}
header {background-color: #B7271F; text-align: center;}
.cerrarsesion{width: auto;height: 20px;background-color: #DBD8C9;color: #000;font-size: 13px;position:absolute;top: 15px;right:10px;z-index:0;padding: 10px;border-radius: 10px;cursor: pointer;}
.cerrarsesion:hover{background-color: #ffffff;color: #000;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
.subtitulo{width: 100%;text-align: center;background-color: #;color: #B00000;padding: 3px 0;font-size: 16px;}
table{margin: 0 auto;border: 2px solid #bebebe; text-align: center;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 2px;border-radius: 6px; border:2px solid #C0C0C0;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{}
.tdizq{background-color: #F4F4F4; padding: 1px 10px;color: #454545;font-size: 13px;font-weight: 600; text-align: left;}
.tdcen{background-color: #F4F4F4; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
.tdder{background-color: #F4F4F4; padding: 1px 10px;color: #454545;font-size: 13px;font-weight: 600; text-align: right;}
.exp{color:#8A0000; font-size:12px;}
.boton1{width:200px;background-color: #FFF;color: #000; padding: 3px; border:2px solid #7D0000;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
.direcciona{background-color: #B32225;color: #fff; padding: 3px;}
.direcciona:hover{background-color: #67a0d9; color: #000;}
input[type=text], select{ padding: 1px;}
.tdtitulo{background-color: #d6e08b; color: #000; padding: 2px; text-align: center; font-size: 12px; font-weight: 500}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
textarea{font-weight:200; color:#000;}
</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()
{
var uf, pf, sf=0;
uf = formulario.ultimo_folio.value;
pf = formulario.folio1.value;
sf = parseInt(formulario.ultimo_folio.value)+1;
if(!(pf == uf || pf == sf))
{
alert('El folio ingresado debe ser igual o inmediatamente posterior al último');
formulario.folio1.focus();
return (false);
}
if (formulario.folio2.value == "")
{
alert("Falta ingresar el Folio2");
formulario.folio2.focus();
return (false);
}
if(formulario.folio2.value < pf)
{
alert('El folio2 no debe ser menor que el folio1');
formulario.folio2.focus();
return (false);
}
if (formulario.actuacion.value == "")
{
alert("Falta ingresar la actuación");
formulario.actuacion.focus();
return (false);
}
if (formulario.codigo_funcionario.value == "")
{
alert("Falta seleccionar el nombre del funcionario");
formulario.codigo_funcionario.focus();
return (false);
}
return (true);
}
//--></script>
<SCRIPT LANGUAGE='JavaScript'>
var default1 = "VENTANA PARA VISUALIZAR DATOS DE LA ATENCION SELECCIONADA"; // only shown once at page load
var text1 = "El primer encabezado muestra en detalle los datos de la atencion";
var text2 = "la segunda parte muestra el record de actuaciones";
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="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="document.formulario.folio1.focus()">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">VISUALIZACION DE DATOS DE ATENCION SELECCIONADA</h3>
<form name="consulta" action="" method="post">
<table width="700" height="207" border="0" align="center" cellpadding="2" cellspacing="2">
<!--<tr bgcolor="#FFFFCC">
<td width="600" class="titulos"><div align="center">VISUALIZACION DE DATOS DE ATENCION SELECCIONADA </div></td>
</tr>-->
<tr>
<td class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr>
<td height="42" class="exp"><fieldset>
<legend>Datos del proceso:</legend>
<table width="700" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tdder">Cédula (Titular-Beneficiario):</td>
<td class="tdizq" colspan="2"><input name="cedula" type="text" class="campo" id="cedula" value="<?php echo $cedula; ?>" size="15" maxlength="15" readonly=""></td>
<td class="tdder">Numero Atencion:</td>
<td class="tdizq"><input name="numero_proceso" type="text" class="campo" id="numero_atencion" value="<?php echo $numero_atencion; ?>" size="15" maxlength="15" readonly=""></td>
</tr>
<tr>
<td class="tdder">Nombre completo:</td>
<td class="tdizq" colspan="4"><input name="nombre" type="text" class="campo" id="nombre" value="<?php echo $nombre_completo; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr>
<td class="tdder">Fecha servicio:</td>
<td class="tdizq" colspan="2"><input name="tipo_proceso" type="text" class="campo" id="tipo_proceso" value="<?php echo $fecha_servicio; ?>" size="20" maxlength="20" readonly=""></td>
<td class="tdder">Hora servicio:</td>
<td class="tdizq"><input name="numero_proceso2" type="text" class="campo" id="numero_proceso" value="<?php echo $hora_servicio; ?>" size="12" maxlength="12" readonly=""></td>
</tr>
<tr>
<td class="tdder">Tipo:</td>
<td class="tdizq" colspan="2">
<input name="sucursal" type="text" class="campo" id="sucursal" value="<?php echo $tipo; ?>" size="30" maxlength="30" readonly=""></td>
<td class="tdder">Sucursal:</td>
<td class="tdizq" colspan="2">
<input name="sucursal2" type="text" class="campo" id="sucursal" value="<?php echo $nomsuc; ?>" size="25" maxlength="25" readonly=""></td>
</tr>
<tr>
<td class="tdder">Nombre funcionario :</td>
<td class="tdizq" colspan="4"><input name="clase_negocio" type="text" class="campo" id="clase_negocio" value="<?php echo $nombre_funcionario; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<p align="center">
<?php
$id = $_GET["id"] ;
$numero_atencion = $_GET["atencion"] ;
echo "<input type='button' value='Modificar datos del servicio' name=boton class=direcciona onClick =window.open('modificar_datos_atencion.php?id=$cedula&atencion=$numero_atencion','','top=50,left=100,toolbar=no,scrollbars=yes,width=790,height=520,status=yes')></a>"; ?>
<input name="button2" type="button" class="boton1" onClick="window.location.reload()" value="Actualizar">
</p>
</form>
<?php
//$msql = "select id, numero_atencion, nombre_funcionario ,asesoria, solucion, documentos_re,documentos_ap, concepto, observaciones from actuaciones_servicios where cedula = $cedula and numero_atencion = '$numero_atencion' ";
//$result = mysql_query($msql, $dbi);
$result = mysql_query('SELECT id, numero_atencion, nombre_funcionario ,asesoria, solucion, documentos_re,documentos_ap, concepto, observaciones FROM actuaciones_servicios WHERE cedula = "' . $_GET["id"] . '" and numero_atencion = "' . $_GET["atencion"] . '" ');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
if(mysql_num_rows($result) != 0)
{ // <td width="600" class="titulos"><div align="center">VISUALIZACION DE DATOS DE ATENCION SELECCIONADA </div></td>
while(list($id, $numero_atencion, $nombre_fun, $asesoria, $solucion, $documentos_re, $documentos_ap, $concepto, $observaciones) = mysql_fetch_row($result))
{
// $sqlnom = "select tipo_orden, concepto_servicio from accion_tomada where cedula_afiliado = '$cedula' and numero_atencion = '$numero_atencion'";
// $control = mysql_query($sqlnom, $dbi) or die(mysql_error());
$control = mysql_query('SELECT tipo_orden, concepto_servicio, existe_proceso, no_proceso, recibe_documentos, no_orden, elaboro_poder, no_trabajo, diligencia_sucursal, cual_sucursal, diligencia_ejecutar FROM accion_tomada WHERE cedula_afiliado = "' . $_GET["id"] . '" and numero_atencion = "' . $_GET["atencion"] . '" ');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
list($tipor, $conser, $existepro, $numpro, $recidoc, $numdoc, $poder, $podel, $sucur, $sucul, $diligencia) = mysql_fetch_row($control);
echo "<table width=700 border=1 align=center cellpadding=1 cellspacing=1>
<tr>
<td colspan=8 class='subtitulo'>ASESORIA SOLICITADA Y SOLUCION</div></td>
</tr>
<tr align=center>
<td class='tdtitulo'>ASESORIA</td>
<td class='tdtitulo'>SOLUCION</td>
</tr>";
echo "<tr>
<td class='tdfull'>$asesoria</td>
<td class='tdfull'>$solucion</td>
</tr>";
echo "<table width=700 border=1 align=center cellpadding=1 cellspacing=1>
<tr>
<td colspan=8 class='subtitulo'>DOCUMENTOS REQUERIDOS Y APORTADOS</div></td>
</tr>
<tr align=center>
<td class='tdtitulo'>DOCUMENTOS REQUERIDOS</td>
<td class='tdtitulo'>DOCUMENTOS APORTADOS</td>
</tr>";
echo "<tr>
<td class='tdfull'>$documentos_re</td>
<td class='tdfull'>$documentos_ap</td>
</tr>";
echo "<table width=700 border=1 align=center cellpadding=1 cellspacing=1>
<tr>
<td colspan=8 class='subtitulo'>CONCEPTO Y OBSERVACIONES</div></td>
</tr>
<tr align=center>
<td class='tdtitulo'>CONCEPTO</td>
<td class='tdtitulo'>OBSERVACIONES</td>
</tr>";
echo "<tr>
<td class='tdfull'>$concepto</td>
<td class='tdfull'>$observaciones</td>
</tr>";
echo "<table width=700 border=1 align=center cellpadding=1 cellspacing=1>
<tr>
<td colspan=8 class='subtitulo'>ACCION TOMADA</div></td>
</tr>
<tr align=center>
<td class='tdtitulo'>TIPO ORDEN</td>
<td class='tdtitulo'>CONCEPTO SERVICIO</td>
</tr>";
echo "<tr>
<td class='tdfull'>$tipor</td>
<td class='tdfull'>$conser</td></tr>";
echo "<table width=700 border=1 align=center cellpadding=1 cellspacing=1>
<tr align=center>
<td class='tdtitulo'>Existe Proceso Juridco ------Número de Proceso </td>
<td class='tdtitulo'>Se reciben Documentos ------#orden de trabajo o Proceso </td>
</tr>";
echo "<tr class=lista>
<td class='tdfull'>$existepro--------------------------$numpro</td>
<td class='tdfull'>$recidoc--------------------------$numdoc</td>
</tr>";
//$tipor, $conser, $existepro, $numpro, $recidoc, $numdoc, $poder, $podel, $sucur, $sucul, $diligencia
echo "<table width=700 border=1 align=center cellpadding=1 cellspacing=1>
<tr align=center>
<td class='tdtitulo'>Se Elaboro Poder ------Número Orden de Trabajo </td>
<td class='tdtitulo'>El proceso se ejecuta en esta Sucursal------En Cual </td>
</tr>";
echo "<tr class=lista>
<td class='tdfull'>$poder--------------------------$podel</td>
<td class='tdfull'>$sucur--------------------------$sucul</td>
</tr>";
echo "<table width=700 border=1 align=center cellpadding=1 cellspacing=1>
<tr>
<td class='tdtitulo'>Que diligencia a Efectuado para tramitar y ejecutar el proceso que el afiliado solicita</td>
</tr>";
echo "<tr class=lista>
<td class='tdfull'>$diligencia</td>
</tr>";
}
}
?>
</table>