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/apostventas/nove_resumen_diarias.php
<?php
global $dbi;
$espacio = ' ';
$linea = '-';
require_once("../Conectarse.php");


$sql = mysql_query('SELECT * FROM sucursal  ORDER BY nombre ');
if (!$sql) {
	die('Invalid query: ' . mysql_error());
}  
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);  

?>


<!DOCTYPE html>
<html>
<head>

<title>Consulta Novedades Diarias</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:Geneva, Arial, Helvetica, 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: 2px solid #bebebe; text-align: center;}
    .divirmenu{text-align: center;}
    .irmenu{width: 150px;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 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: left;}
    .tdcen{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: center;}
    .tdder{background-color: #EEE; padding: 1px 10px;color: #00135F;font-size: 13px;font-weight: 600; text-align: right;}
	.exp{color:#8A0000; font-size:13px;}
    .boton1{width:150px;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:4px;}
    .boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
    input[type=text]{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
	
	.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 1px; text-align: center; font-size: 12px; font-weight: 600}
    .tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 13px;}
    .botonnew{background-color: #e3dec0;color: #b20606;padding: 1px;}
    .botonnew:hover{background-color: #cbbd6a;color: #000;padding: 1px;}
	
	
	.lista2{background-color:#F4E995; color:#000; font-size:13px;}
	.lista{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 13px;}
</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">RESUMEN NOVEDADES DIARIAS POR FECHA</h3>


<form action="" method="post" name="form1" class="provd" id="form1">
  <div align="center">
<table width="361" border="3" cellpadding="3" cellspacing="3">
<!--<tr>
	<td>RESUMEN NOVEDADES DIARIAS POR FECHA</div></td>
</tr>-->

<tr>
	<td class="tdcen" colspan="2"  align="center">Fecha :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="fecha1" type="text" class="Estilo21" id="fecha1" value="0000-00-00" size="13" maxlength="13" ></td>
	
	  </tr>
    </table>
  
<p align="center">
<input name="menu2" type="button" class="irmenu" id="menu2" onclick="window.location.href='menu_novedades.php'" value="IR AL MENU" />
<input name="consultar" id="consultar" type="submit" class="boton1" value="CONSULTAR">
	  
	  
    </p>

  </div>
</form>
</body>
</html>

<?php

   
if(isset($_POST["consultar"]))
{


	$fecha = date("D");

	if($fecha == "Mon")
	{
		$dias = 3;
	}else
	{
		$dias = 1;
	}
	$fecha2= date("Y-m-d", strtotime("$fecha1 -$dias day")); 

	$control = mysql_query('SELECT id, sucursal, fecha , hora , jornada, respu_requer, funcionario_requi, efectuo_ventas , cuantas, facturas, indique_factu, sistema, fallas_siste, inventario_muebles, estado_mueble, procesos, sucu_proceso, tipo_proceso, quejas, accion_queja, documentacion, num_plantilla, llamadas, horallamada, funcionario_llama, motivo_llama, llamadas_noche, hora_noche, funcionario_noche, motivo_noche, necesidades  FROM novedades_diarias WHERE fecha = "' . $_POST["fecha1"]  . '"  order by sucursal ');
	if (!$control) {
		die('Invalid query 2: ' . mysql_error());
	} 

   	if ((mysql_num_rows($control)!=0)) 
	{	 
		echo "<table width=500 border=1 align=center cellpadding=1 cellspacing=1>
  		<tr>
    		<td colspan=12 class='tdtitulo'>NOVEDADES DIARIAS</div></td>
	
  		</tr>
  
 		<tr align=center>

  		</tr> ";
		echo "
		<td align=center class=tdcen>$fecha2</td></tr>";
		
            
  		while(list($id, $sucursal, $fecha, $hora, $jorna, $respu, $funre, $ventas, $cuantas, $facturas, $indifac, $sistemas, $fallas, $inventario, $estado, $procesos, $sucupro, $tipo, $quejas, $accion, $documentacion, $plantilla, $llamadas, $horallama, $funllam, $mollama, $llamanoc, $horanoc, $funnoc, $monoc, $necesi) = mysql_fetch_row($control)) 
      	{  

			//print( date("H:i:s", strtotime("$hora")) );
			$hora = date("H:i:s", strtotime("$hora"));
			$hora1 = "11:59:00";
			$hora2 = "12:30:00";
			//echo "<br>";
							
			/*	if ($tiempo == "manana" and $hora <= $hora1)
			{*/
			
			$sum = $sum + 1;
			echo "<table width=900 border=1 align=center cellpadding=0 cellspacing=0 >
			<tr align=center>
			<td width='100' class='tdtitulo'>SUCURSAL</td> 
			<td width='100' class='tdtitulo'>HORA</td>  
			<td  width='600' class='tdtitulo'>Jornada Presencial Abogados</td>
			<td class='tdtitulo'>Atenciones</td></tr>";
			
			echo "<tr class=Estilo50>
			<td class='tdfull' align=center>$sucursal</td>
			<td class='tdfull' align=center>$hora</td>
			<td class='tdfull'>$jorna</td>
			
			<td class='tdfull'><input type='button' value=$sucursal name='sucursal' class='botonnew' onClick =window.open('sub_listado_histoser.php?sucu=$sucursal&fecha=$fecha2','','top=50,left=100,toolbar=no,scrollbars=yes,width=900,height=400,status=yes')></a></span></td>
			
			</tr>
			<br><br>";
							  
			echo "<table width=350 border=0 align=center cellpadding= cellspacing=>
			<tr align=center>
			<td width='70' class=fecha></td></tr>";
			echo "<tr class='tdfull'>
			<td align=center></td></tr>";
								
			/*	echo "<table width=550 border=1 align=center cellpadding=1 cellspacing=1>
			<tr align=center>
				<td  class=lista2>Jornada Presencial Abogados</td>
				<td  class=lista2>Atenciones</td></tr>";
				echo "<tr class=lista>
				<td align=center>$jorna</td>
				<td bgcolor='#ECE9D8'><div align='center' class='Estilo54'><input type='button' value=$sucursal name='sucursal' class=Estilo54 onClick =window.open('sub_listado_histoser.php?sucu=$sucursal&fecha=$fecha','','top=50,left=100,toolbar=no,scrollbars=yes,width=900,height=400,status=yes')></a></span></div></td>
			</tr>";*/
								
			
								
								
			if ($respu == "SI") 
	       	{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Ha Recibido Requerimientos por</td>";
				echo "
				<td align=left class=lista>$funre</td></tr>";
			}
			
			if ($ventas == "SI") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Ventas Realizadas</td>  ";
				echo "
				<td align=left class=lista>$cuantas</td></tr>";
			}
			if ($facturas == "SI") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Tiene Facturas de Servicios públicos por pagar :</td>  ";
				echo "
				<td align=left class=lista>$indifac</td></tr>";
			}
							
			if ($sistemas == "NO") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Tiene fallas en el Sistema de Computo: Indique Unidades y Posibles Fallas </td> ";
				echo "
				<td align=left class=lista>$fallas</td></tr>";
			}
			
			if ($inventario == "NO") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Inventario de Muebles y equipos se encuentra en el estado en que las recibio:</td>";
				echo "
				<td align=left class=lista>$estado</td></tr>";
			}
			
			if ($procesos == "SI") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Ha recibido procesos para adelantar en otras sucursales:</td>  ";
				echo "
				<td align=left class=lista>$sucupro--$tipo</td></tr>";
			}
			
			
			if ($quejas == "SI") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>A recibido quejas por parte del Afiliado:</td>";
				echo "
				<td align=left class=lista>$accion--$tipo</td></tr>";
			}
					
			if ($documentacion == "SI") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Ha enviado Documentación a Bogotá:</td>";
				echo "
				<td align=left class=lista>SI : Planilla N° $plantilla</td></tr>";
			}
							
							
			if ($llamadas == "SI") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Ha recibido llamadas de Bogotá Durante el Día:</td>";
				echo "
				<td align=left class=lista>Hora llamada: $horallama ;  Funcionario : $funllam ;  Motivo Llamada:$mollama</td></tr>";
			}
							
			if ($llamanoc == "SI") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Ha recibido llamadas de Bogotá Durante la Noche:</td>";
				echo "
				<td align=left class=lista>Hora llamada: $horanoc ;  Funcionario : $funnoc ;  Motivo Llamada:$monoc</td></tr>";
			}

			if ($necesi != "") 
			{
				echo "<table width=900 border=1 align=center cellpadding=1 cellspacing=1>
				<tr align=center>
				<td width='300' class=lista2>Indique solicitudes de elementos u otras necesidades que considere fundamentales para el buen funcionamiento de la Oficina: </td>";
				echo "
				<td align=left class=lista>$necesi</td></tr>";
			}
			
			echo "<table width=900 border=0 align=center cellpadding= cellspacing=>
			<tr align=center>
			<td width='300' class=fecha></td>";
			echo "
			<td align=center></td></tr><br>";
				
							  
 // <td bgcolor='#DEFEFD'><div align='center' class='lista'><input type='button' value=$id name='id' class=Estilo51 onClick =window.open('nove_consultas.php?id=$id&sucursal=$sucursal','','top=20,left=100,toolbar=no,scrollbars=yes,width=1300,height=800,status=yes')></a></span></div></td>
				
				   /*<select name="tiempo">
            <option value="manana">Mañana</option>
			 <option value="tarde">Tarde</option>
           
          </select>*/				    
								   
		}            								   
   	}
	echo "</table>";		  
	echo "<TABLE width='200' border='0' align='center' cellpadding='0' cellspacing='1'>
    <TR>
    <TD class='tdtitulo'>TOTAL REGISTROS</span></div></TD></TD>";	
							  
	printf("<tr>
                                 
    <td class='tdfull'>".$sum."</span></div></td></td>"); 
	echo "</table>";	


	echo "</form>";

}
?>