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/www/abogados/listado_atenciones_rechazadas_abogados.php
<!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 Atenciones Rechazadas</title>
<style type="text/css">
	*{margin: 0;padding: 0;}
    body{background-image:url(../ELEMENTS/fondo.jpg);font-family:Geneva, Arial, Helvetica, 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;}
    table{margin: 0 auto;border: 8px solid #bebebe;}
    .divirmenu{text-align: center;}
    .irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 3px;border-radius: 6px;}
    .irmenu:hover{background-color: #67a0d9; color: #000;}
    
    .fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px;}
    td{padding: 1px; border: 1px solid #a0a0a0;}
    .td{background-color: #e5e5e5; padding: 1px 30px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
    .boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text]{border-radius: 5px; padding: 3px;background-color: #fffde8;}
    
    .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;border-radius:5px;}
    .botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
</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>
<header>
    <img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<h3 class="titulo">LISTADO ATENCIONES RECHAZADAS</h3>

<form action="" method="post" name="form1" class="provd" id="form1">
  <div align="center">
    
  
     <p>
   
      <input name="menu2" type="button" class="irmenu" id="menu2" onclick="history.back()" value="REGRESAR" />
      
	
    </p>
  </div>
</form>
</body>
</html>

<?php

global $dbi;
$espacio = ' ';
$linea = '-';

require_once("../Conectarse.php");
		

$control = mysql_query('SELECT cedula, numero_atencion,sucursal FROM record_servicios WHERE (fecha_rechazo >= "' . $_GET["fecha"]  . '" and fecha_rechazo <= "'.$_GET["fecha2"].'") and rechazo!="" and cedula_funcionario = "'.$_GET["cedula"].'"');

	if (!$control) {
		die('Invalid query 2: ' . mysql_error());
	}  

    if ((mysql_num_rows($control)!=0)) 
	{	 
    	echo "<TABLE width='700' border='2' align='center' cellpadding='2' cellspacing='1'>
        <TR>
        	<TD class='tdtitulo'>ATENCION</span></div></TD>
			<TD class='tdtitulo'>CEDULA</span></div></TD>
			<TD class='tdtitulo'>NOMBRE</span></div></TD>
			<TD class='tdtitulo'>SUCURSAL</span></div></TD>";
                           							  
                        
  		while(list($cedula,$id,$sucur) = mysql_fetch_row($control))
        {  
							  
			$control2 = mysql_query('SELECT nombre FROM sucursal WHERE codigo = "'.$sucur.'" ');
			if (!$control2) {
				die('Invalid query: ' . mysql_error());
			} 
     		list($nomsuc) = mysql_fetch_row($control2);
	 
			///////
			$control3 = mysql_query('SELECT nombre FROM cartera_serviasjudinet  WHERE cedula = "' .$cedula. '" ');
			if (!$control3) {
				die('Invalid query: ' . mysql_error());
			}
			$fil = mysql_num_rows($control3);
			
			if ($fil == 0)
			{
				$control3 = mysql_query('SELECT  nombre FROM beneficiarios  WHERE  cedula =  "'.$cedula.'"');
		 		if (!$control3) {
					die('Invalid query 2: ' . mysql_error());
				}
					
				list($nombre) = mysql_fetch_row($control3);
			 
			} 	 
			 
	 		else {
		 
				list($nombre) = mysql_fetch_row($control3);
		 	}
	 
			$sum = $sum + 1;
			
			printf("<tr>    
			<td class='tdfull'><input type='button' value=$id name='id' class='botonnew' onClick =window.open('motivo_cancelacion_atencion.php?ced2=$cedula&id=$id','','top=50,left=70,toolbar=no,scrollbars=yes,width=600,height=200,status=yes')></a></td>    
			<td class='tdfull'>".$cedula."</td>
			<td class='tdfull'>".$nombre."</td>
			<td class='tdfull'>".$nomsuc."</td>");					
		}
                               
		echo "</table>";		  
		echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
        <TR>
        	<TD class='tdtitulo'>TOTAL REGISTROS</TD>";	
					  
			printf("<tr>
            <br>
            <td class='tdfull'>".$sum."</td>"); 
			echo "</table>";	
                        
	}
						
	else {
		echo "<script> alert('No hay Atenciones Rechazadas En Este Mes');</script>";
				
	}


	echo "</form>";


?>