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/listado_histoser_general.php
<?php 
require_once("mainfile.php");
include ("config.php");
global $dbi;

function Conectarse()
	{
	
	   if (!($link=@mysql_connect("localhost","asjudine","as2006")))
	   {
		  echo "Error conectando con el servidor.";
		  exit();
	   }
	   $dbname = "asjudinet";
	   if (!@mysql_select_db($dbname,$link))
	   {
		  echo "Error seleccionando la base de datos.";
		  exit();
	   }
	   return $link;
	}
	Conectarse();

//$query_sql4 = "SELECT * FROM director_ventas where estado = '1' and (tipo = 'R' || tipo = 'M')order by nombre";
//$sql4 = mysql_query($query_sql4, $dbi) or die(mysql_error());
$sql4 = mysql_query('SELECT * FROM director_ventas WHERE estado =  "1" and (tipo = "R" || tipo = "M")order by nombre');
			if (!$sql4) {
				die('Invalid query: ' . mysql_error());
			}
$row_sql4 = mysql_fetch_assoc($sql4);
$totalRows_sql4 = mysql_num_rows($sql4); 
?>
<!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=utf-8" />
<title>Listado de Atenciones Rechazadas</title>
<style type="text/css">
<!--
.lista {font-family: Arial; font-size: 12px;	color: #CC0000; }
.texto {background-color: #CCFFCC; font-size: 11px; font-family: Arial; color:#0000CC; display: block;}
.recaudo {font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	font-variant: normal;
	color: #000000;
	background-color: #B6CBDC;
	margin: 4px;
	padding: 8px;
	width: auto;
	border: medium outset #339966;
}
.est_cont1 {
	font-family: "Times New Roman", Times, serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #4068F4;
	background-color: #E6FFF1;
	margin: 1px;
	padding: 1px;
	height: auto;
	width: auto;
	border: thin double #33CC66;
}
.est_cont2 {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #418BAF;
	background-color: #F0F5CF;
	height: 15px;
	width: auto;
	border: thin solid #FABF85;
}
.est_cont3 {
	font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #EA261C;
	background-color: #DEDDE8;
	height: auto;
	width: auto;
	border: thin outset #FC9F67;
}
.est_cont5 {
	font-family: "Courier New", Courier, monospace;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	background-color: #99FFCC;
	margin: 2px;
	padding: 2px;
	height: auto;
	width: auto;
	border: thin solid #FABF85;
	color: #000066;
}
.Estilo50 {color: #CC3333;
	font-family: "Arial Narrow";
	font-weight: bold;
}
.fecha {font-size: 12px; font-family: Arial; color:#990000; display: block; }
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.col_cre2 {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	color: #F92F0B;
	background-color: #B3D9F0;
	height: auto;
	width: auto;
	border: medium groove #FC9227;
}
.est_cont21 {	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	color: #2B39EC;
	background-color: #F0F5CF;
	height: 18px;
	width: auto;
	border: thin solid #FABF85;
}
.Estilo54 {color: #0000FF}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <div align="center">
    <table width="669" border="0" align="center" cellpadding="2" cellspacing="2">
      <tr bgcolor="#66FFCC">
        <td colspan="2" class="titulos"><div align="center" class="Estilo54">LISTADO REVISION HISTOSER GENERAL </div></td>
      </tr>
      <tr bgcolor="#CCFF66">


        <td colspan="2"><div align="center">
            <input name="menu2" type="button" class="Estilo50" id="menu2" onclick="window.location.href='menu_histoser.php'" value="IR AL MENU" />
            <label></label>
        </div></td>
      </tr>
    </table>
    <div align="left"></div>
    <div align="left"></div>
    <div align="right"></div> 
  </div>
</form>
</body>
</html>
<?php

echo "<form id='form2' name='form2' method='post' action=''>";


require_once("mainfile.php");
include ("config.php");
global $dbi;

   $mssql = mysql_query('SELECT * FROM record_servicios  ');
			if (!$mssql) {
				die('Invalid query: ' . mysql_error());
			}
   if($mssql)
   {

         $filas = mysql_num_rows($mssql);
         if ($filas > 0)
         {
		
             
     $control = mysql_query('SELECT cedula, numero_atencion FROM record_servicios WHERE estado = "0" ORDER BY nombre_funcionario');
			if (!$control) {
				die('Invalid query: ' . mysql_error());
			}  
                       if ((mysql_num_rows($control)!=0)) 
	                    {	 
                              echo "<TABLE width='1000' border='0' align='center' cellpadding='0' cellspacing='1'>
                              <TR>
                              <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>CEDULA</span></div></TD>
                              <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>NOMBRE</span></div></TD>		 
                              <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>NUMERO ATENCION</span></div></TD>
                              <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>FECHA SERVICIO</span></div></TD>		 		  
                              <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>NOMBRE FUNCIONARIO</span></div></TD>		 		  
                              <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TIPO</span></div></TD>";		  

                while(list($cedulas, $numero_atencion) = mysql_fetch_row($control)) 
                              {  

   $control4 = mysql_query('SELECT nombre FROM cartera_serviasjudinet  WHERE cedula = "' .$cedulas. '"  ');
			if (!$control4) {
				die('Invalid query: ' . mysql_error());
			} 	 
	if((mysql_num_rows($control4)==0))
	{
		  $control2 = mysql_query('SELECT nombre FROM beneficiarios WHERE cedula = "' .$cedulas. '" ');
			if (!$control4) {
				die('Invalid query: ' . mysql_error());
			}
	}		
   list($nombre) = mysql_fetch_row($control4);	

   $control3 = mysql_query('SELECT nombre_funcionario, fecha_servicio, tipo FROM record_servicios WHERE cedula = "' .$cedulas. '" and numero_atencion = "' .$numero_atencion. '" ');
			if (!$control3) {
				die('Invalid query: ' . mysql_error());
			} 	 
   list($nombre_funcionario, $fecha_servicio, $tipo) = mysql_fetch_row($control3);	
                                   $sum = $sum + 1;								   						  								printf("<tr>
                                   <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$cedulas."</span></div></td>
                                   <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$nombre."</span></div></td>
								   <td bgcolor='#ECE9D8'><div align='center' class='lista'><input type='button' value=$numero_atencion name='atencion' class=boton2 onClick =window.open('modificar_atencion_revision.php?id=$cedulas&atencion=$numero_atencion','','top=50,left=100,toolbar=yes,scrollbars=yes,width=790,height=521,status=yes')></a></span></div></td>								   
		                           <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$fecha_servicio."</span></div></td>								   								   
		                           <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$nombre_funcionario."</span></div></td>
		                           <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$tipo."</span></div></td>");              								   
                               }
			                       echo "</table>";		  
                        
								   
								   echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
                              <TR>
                              <TD bgcolor='#FFFFCC'><div align='center'><span class='texto'>TOTAL</span></div></TD>";		
							  
							  printf("<tr>
                                  
								   <td bgcolor='#C5D6FC'><div align='center' class='lista'>".$sum."</span></div></td>");    
                        }
						
					
		       
	      }
     }
    

echo "</form>";


?>