File: /home/asjudine/www/listado_citas_sin_contrato.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
require_once("Conectarse.php");
$controlan = mysql_query('SELECT codigo nombre FROM sucursal WHERE nombre = "'.$_GET["sucursal"].'" ');
if (!$controlan) {
die('Invalid query 4 aqui: ' . mysql_error());
}
list($sucursales) = mysql_fetch_row($controlan);
$cont45 = mysql_query("UPDATE solicitud_citas set aprobado = 'SI' WHERE cedula = '".$_GET["cedula"]."' and fecha = '".$_GET["fecha"]."' and sucursal = '".$sucursales."' ");
if (!$cont45) {
die('Invalid query cont45: ' . mysql_error());
}
?>
<!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=iso-8859-1" />
<title>Listado Citas Sin Contrato</title>
<style type="text/css">
<!--
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color:#0000CC; display: block;}
.fecha {font-size: 12px; font-family: Arial; color:#990000; display: block; }
.campo {background-color:#FFFFAA; width: 100px; border:2px solid #990000;}
.lista {font-family: Arial; font-size: 11px; color: #000066;}
.lista2 {font-family: Arial; font-size: 16px; color: #FF6600;}
.boton2 {
font-family: Verdana;
font-size: 8 pt;
color: #000080;
background-color: #C0C0C0;
border-style: solid;
width:90px;
height:22px;
}
body {
background-image: url(ELEMENTOS/azul1.jpg);
}
.Estilo50 {
color: #00F;
font-family: "Arial Narrow";
font-weight: bold;
}
.boton1 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.boton11 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.Estilo54 {color: #333399; font-family: "Arial Narrow"; font-weight: bold; }
.Estilo57 {color: #006600}
.blanco {
color: #FFF;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<center> <img src="ELEMENTOS\CABEZOTE SERVIASJUDINET.jpg" WIDTH=60% > </center>
<form action="" method="post" name="form1" class="provd" id="form1">
<div align="center">
<table width="462" border="8" cellpadding="5" cellspacing="5" bgcolor="black">
<tr>
<td colspan="3" bgcolor="#666666"><div align="center" class="Estilo50"><span class="blanco">LISTADO CITAS SIN CONTRATO</span></div></td>
</tr>
</table>
<p>
<center> <embed wmode="transparent" src="http://www.poodwaddle.com/clock10" width="100" height="100" type="application/x-shockwave-flash" bgcolor="#FFFFFF" /></center>
</p>
<p>
<input name="menu2" type="button" class="Estilo50" id="menu2" onclick="window.location.href='menu_histoser.php'" value="IR AL MENU" />
</p>
</div>
</form>
</body>
</html>
<?php
$control = mysql_query('SELECT cedula,nombre,fecha,sucursal,ingresa,atencion FROM solicitud_citas WHERE aprobado ="NO" order by fecha');
if (!$control) {
die('Invalid query 2: ' . mysql_error());
}
if ((mysql_num_rows($control)!=0))
{
echo "<TABLE width='800' border='8' align='center' cellpadding='2' cellspacing='2' bgcolor='black'>
<TR>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>CEDULA</span></div></TD>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>NOMBRE</span></div></TD>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>FECHA INGRESO</span></div></TD>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>NUMERO ATENCION</span></div></TD>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>SUCURSAL</span></div></TD>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>FUNCIONARIO QUE INGRESA</span></div></TD>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>APROBADO</span></div></TD>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>REQUERIMIENTO</span></div></TD>";
while(list($cedula, $nombres , $fecha, $sucursal, $ingresa,$atencion) = mysql_fetch_row($control))
{
$controla = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "'.$sucursal.'" ');
if (!$controla) {
die('Invalid query 4 aqui: ' . mysql_error());
}
list($sucursal) = mysql_fetch_row($controla);
$controla2 = mysql_query('SELECT Nombre_Completo FROM Usuarios WHERE cedula = "'.$ingresa.'" ');
if (!$controla2) {
die('Invalid query 4 aqui: ' . mysql_error());
}
list($ingresa) = mysql_fetch_row($controla2);
$sum = $sum + 1;
printf("<tr>
<td bgcolor='#FFFFFF'><div align='center' class='lista'>".$cedula."</span></div></td>
<td bgcolor='#FFFFFF'><div align='center' class='lista'>".$nombres."</span></div></td>
<td bgcolor='#FFFFFF'><div align='center' class='lista'>".$fecha."</span></div></td>
<td bgcolor='#FFFFFF'><div align='center' class='lista'><input type='button' value=$atencion name='cedu' class=est_cont1 onClick =window.open('consulta_atencion_sin_contrato.php?id=$cedula&atencion=$atencion','','top=20,left=100,toolbar=no,scrollbars=yes,width=790,height=600,status=yes')></a></span></div></td>
<td bgcolor='#FFFFFF'><div align='center' class='lista'>".$sucursal."</span></div></td>
<td bgcolor='#FFFFFF'><div align='center' class='lista'>".$ingresa."</span></div></td>
<TD bgcolor='#FFFFFF'><div align='center' class='lista'><input type='button' value=APROBADO name='cedu' class=est_cont1 onClick =window.location.href='listado_citas_sin_contrato.php?fecha=$fecha&cedula=$cedula&sucursal=$sucursal'></a></span></div></TD>
<td bgcolor='#FFFFFF'><div align='center' class='lista'><input type='button' value=REQUERIMIENTO name='cedu' class=est_cont1 onClick =window.open('requerimiento_admins_directores_histoser1.php?id=$cedula&atencion=$atencion','','top=20,left=100,toolbar=no,scrollbars=yes,width=790,height=600,status=yes')></a></span></div></td>");
}
echo "</table>";
echo "<TABLE width='200' border='5' align='center' cellpadding='2' cellspacing='2' bgcolor='black'>
<TR>
<TD bgcolor='#666666'><div align='center'><span class='blanco'>TOTAL REGISTROS</span></div></TD></TD>";
printf("<tr>
<td bgcolor='#FFFFFF'><div align='center' class='lista'>".$sum."</span></div></td></td>");
echo "</table>";
}
echo "</form>";
?>