MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/public_html/adirectoress/consulta_atenre_director.php
<!DOCTYPE HTML>
<html>
<head>
<title>Consulta Atenciones Rechazadas por Sucursal</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">
    
<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;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;}
    table{margin: 0 auto;border: 1px solid #bebebe; text-align: center;}
    .divirmenu{text-align: center;}
    .irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
    .irmenu:hover{background-color: #67a0d9; color: #000;}
    
    .fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
    td{border: #969696 solid 1px;}
    .tdizq{background-color: #EEE; padding: 1px 4px;color: #00135F;font-size: 14px;font-weight: 600; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 4px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 4px;color: #00135F;font-size: 14px;font-weight: 600; text-align: right;}
	.tdi{background-color: #EEE; padding: 1px 4px;color: #00135F;font-size: 14px;font-weight: 600; text-align: left;}
	.tdc{background-color: #EEE; padding: 1px 4px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
	.tdd{background-color: #EEE; padding: 1px 4px;color: #DB282D;font-size: 14px;font-weight: 600; text-align: right;}
	
	.exp{color:#8A0000; font-size:13px;}
    .boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text],select{padding: 3px; font-size:14px;}
	
	.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;}
    .botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;}
    .botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;}
	.botondelete{width: 90px; background-color: #FDFBD9;color: #C11E22;padding: 1px;}
	.botondelete:hover{width: 90px; background-color: #910407;color: #FFF;padding: 1px;}
	
</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 AbreGral()
{ 
    var menu;   
	menu=window.open("mostrar_ingreso.php","","toolbar=no,scrollbars=no,width=800,height=500,status=yes");  
	menu.focus();  
	var ventana = window.self;  
	ventana.opener = window.self;  
	ventana.close();
}
</script>
</head>



<?php
   
global $dbi;
require_once("../Conectarse.php");

	
$sql = mysql_query('SELECT * FROM sucursal order by nombre ');
if (!$sql) {
	die('Invalid query 1: ' . mysql_error());
}
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);  
?>



<body onLoad="document.formulario.cedula.focus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">ATENCIONES RECHAZADAS POR SUCURSAL </h3>


<form name="formulario" action="" method="post">
<table width="671" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
	<td><fieldset>
    <table width="669" border="0" align="center" cellpadding="2" cellspacing="2">
  <!--<tr bgcolor="#FFFFCC">
    <td class="titulos"><div align="center">ATENCIONES RECHAZADAS POR SUCURSAL </div></td>
  </tr>-->
<tr>
	<td height="22" class="fecha"><div align="center">
      <script languaje="JavaScript">Mostrar_Fecha()</script>
    </div></td>
</tr>


<tr>
	<td height="42"><fieldset>
   	<legend><span class="exp">Seleccion Sucursal:</span></legend>
   	<table width="671" border="0" cellspacing="0" cellpadding="0">

	<tr>
   		<td class="tdcen" width="255">Sucursal:</td>
       	<td class="tdcen" width="287"><select name="ced_funcionario" id="ced_funcionario">
        <option>SELECCIONE SUCURSAL</option>
        <?php
     	do {  
		?>
        <option value="<?php echo $row_sql['codigo'];?>"><?php echo $row_sql['nombre']?></option>
        <?php
		} while ($row_sql = mysql_fetch_assoc($sql));
  		$rows = mysql_num_rows($sql);
  		if($rows > 0) {
      	mysql_data_seek($sql, 0);
       	$row_sql = mysql_fetch_assoc($sql);
  		}
		?>
     	</select></td>
     </tr>
   	</table>
   	</fieldset></td></tr>
	
    
    <tr>
	 	<td class="tdcen"><strong>Rango  Desde </strong>:  
	      <input name="fecha1" type="text" class="Estilo66" id="fecha1" value="0000-00-00" size="13" maxlength="13"  /> 
	    <span class="Estilo53"><strong>Hasta</strong></span> 
	    <input name="fecha2" type="text" class="Estilo66" id="fecha2" value="0000-00-00" size="13" maxlength="13"  /> 
	    </td>
	</tr>
  
  	<tr>
    	<td>
        <input name="consultar" id="consultar" type="submit" class="boton1" value="Consultar">
      	<input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='../menu_admin.php'" value="IR AL MENU">
    	</td>
  	</tr>
</table>
</fieldset></td>
</tr>
</table>
</form>
</body>
</html>

<?php
if(isset($_POST["consultar"]))
{
    echo "<form name='form' action='' method='post'>";
    global $dbi;
	
	$control = mysql_query('SELECT id, cedula, numero_atencion, fecha_servicio, hora_servicio, sucursal, nombre_funcionario, tipo, rechazo FROM record_servicios WHERE sucursal = "' . $_POST[ced_funcionario] . '" and (fecha_rechazo >= "' . $_POST[fecha1] . '" and fecha_rechazo <= "' . $_POST[fecha2] . '" ) and rechazo != "" ');
	if (!$control) {
		die('Invalid query: 555 ' . mysql_error());
	}
    
	if ((mysql_num_rows($control)!=0)) 
	{	 
     	echo "<TABLE width='1000' border='0' align='center' cellpadding='0' cellspacing='1'>
      	<TR>
        <TD class='tdtitulo'>NUMERO ATENCION</span></div></TD>
        <TD class='tdtitulo'>CEDULA</span></div></TD>	
        <TD class='tdtitulo'>FECHA SERVICIO</span></div></TD>
        <TD class='tdtitulo'>HORA SERVICIO</span></div></TD>
		<TD class='tdtitulo'>FUNCIONARIO</span></div></TD>
		<TD class='tdtitulo'>TIPO</span></div></TD>
		<TD class='tdtitulo'>RECHAZO</span></div></TD>";		 		  
                              
     
       	while(list($id, $cedula, $numero_atencion, $fecha_servicio, $hora_servicio, $sucursal, $nombre_funcionario, $tipo, $rechazo) = mysql_fetch_row($control)) 
       	{
			$control8 = mysql_query('SELECT estado FROM actuaciones_servicios WHERE cedula = "' ."$cedula". '" and numero_atencion = "' ."$numero_atencion". '" ');
			if (!$control8) {
				die('Invalid query: ' . mysql_error());
			}
     		list($est) = mysql_fetch_row($control8);					   
   									
			
			$total = $total + 1;
			printf("<tr>
			<td class='tdfull'><input type='button' value=$numero_atencion name='cedu' class=botonnew onClick =window.open('modificar_atencion.php?id=$cedula&atencion=$numero_atencion','','top=50,left=100,toolbar=yes,scrollbars=yes,width=800,height=700,status=yes')></a></span></div></td>
					               
          	<td class='tdfull'>".$cedula."</a></span></div></td>
			<td class='tdfull'>".$fecha_servicio."</span></div></td>
			<td class='tdfull'>".$hora_servicio."</span></div></td>
			<td class='tdfull'>".$nombre_funcionario."</span></div></td>
			<td class='tdfull'>".$tipo."</span></div></td>
			<td class='tdfull'>".$rechazo."</span></div></td>");
        }
		echo "</table>";		  
								
		echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
        <TR>
		<TD class='tdtitulo'>Total</span></div></TD>";		
		printf("<tr>
		<td class='tdfull'>".$total."</span></div></td>");
    }
	else
	{
         echo "<script>alert('No tiene atenciones Rechazadas en este rango');</script>";
	}
}

echo "</form>";
?>