Viewing file: esta1.php (43.55 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Módulo General de Estadísticas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
button {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #F2F2F2;
}
input {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #F2F2F2;
border: 1px solid #999999;
}
select {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #F2F2F2;
}
textarea {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #F2F2F2;
}
a {
color: #0099CC;
text-decoration: none;
}
a:hover {
color: #0099CC;
text-decoration: underline;
}<strong></strong>
-->
</style>
</head>
<body text="#000000" link="#0099CC" vlink="#0099CC" alink="#0099CC" topmargin="0">
<table width="100%" border="0" cellpadding="5">
<tr>
<td width="100%" colspan="2"><div align="center">
<p><img src="esta/1.gif" width="750" height="135"></p>
<table width="750" border="1" cellpadding="4" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<?php
require('hoy.php');
$today1 = $mday . "/" . $montho . "/" . $year;
$today = $mday . "/" . $month . "/" . $year;
?>
<td width="50%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Estadísticas
para el día:<strong> <?php echo $today; ?></strong></font></td>
<td width="50%"><div align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Contador
general de visitas para Internet: </font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><img
src="http://fastcounter.linkexchange.com/fastcounter?619753+1239513" border="0" width="90"
height="16"></font></div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<table width="750" border="1" cellpadding="5" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td width="5%" bgcolor="#FFCC00"> <div align="center"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif">1</font></div></td>
<td width="95%"><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr bgcolor="#F2F2F2">
<td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Quejas
y Reclamos vía Web.</strong></font></td>
</tr>
<tr>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='1'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
////////////////////////////////
// Calculo Acumulado
$consul = "SELECT *
FROM esta"
. " order by fecha limit 0,1";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$zxy = $myrow["fecha"];
$rey = explode ("/", $zxy);
$mini = $rey[1];
$plm = $montho - 6;
if ($plm <= 0) {
$ply = $year - 1;
$plm = 12 + $plm;
//echo $plm;
$plm = $plm + 1;
}else{
$ply = $year;
}
for ($i = 0; $i <= 5; $i++) {
$plx = $plm++;
if ($plx == 13) {
$plm = 2;
$plx = 1;
$ply = $ply + 1;
}
$chain1 = $plx . "/" . $ply;
//echo $chain1;
$consul = "SELECT *
FROM esta where fecha like '%$chain1%' and codigo='1'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f3[$i] = 0;
$f4[$i] = $chain1;
while ($myrow = mysql_fetch_array($result))
{
$f5 = $myrow["numero"];
$f3[$i] = $f3[$i] + $f5;
}}
$pro = $f3[0] + $f3[1] + $f3[2] + $f3[3] + $f3[4] + $f3[5];
$pro1 = $pro / 6;
$pro1 = number_format($pro1);
$pro2 = $pro / 180;
$pro2 = number_format($pro2);
//for ($i = 0; $i <= 5; $i++) {
//echo $f3[$i];
//echo "<br>";
//}
/////////////////////////////////
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='1'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Número
de quejas para hoy:<strong> <?php echo $f; ?> </strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Número
de quejas en el mes: <strong><?php echo $f2; ?></strong></font></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#FFCC00"> </td>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="20%" bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[0]; ?></font></strong></div></td>
<td width="10%"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[0]; ?></font></div></td>
<td width="70%" bgcolor="#FDF9DB"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[0] > 0) {
$nada = $f3[0] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[1]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[1]; ?></font></div></td>
<td bgcolor="#FDF9DB"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[1] > 0) {
$nada = $f3[1] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[2]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[2]; ?></font></div></td>
<td bgcolor="#FDF9DB"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[2] > 0) {
$nada = $f3[2] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[3]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[3]; ?></font></div></td>
<td bgcolor="#FDF9DB"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[3] > 0) {
$nada = $f3[3] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[4]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[4]; ?></font></div></td>
<td bgcolor="#FDF9DB"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[4] > 0) {
$nada = $f3[4] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[5]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[5]; ?></font></div></td>
<td bgcolor="#FDF9DB"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[5] > 0) {
$nada = $f3[5] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
</table></td>
<td width="50%" valign="top"> <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Comportamiento
de tráfico durante<br>
los 6 últimos meses</strong></font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Se
registran y comparan los datos acumulados para los últimos
seis meses, los meses que no tienen registros activos se
despliegan con valor "0".</font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>
Promedio mensual*: <strong><?php echo $pro1; ?></strong>
<font color="#FF9900">hits/mes<br>
</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>
Promedio diario*: <strong><?php echo $pro2; ?></strong>
<font color="#FF9900">hits/día<br>
</font></font></font><font color="#FF9900" size="1" face="Verdana, Arial, Helvetica, sans-serif">*
Datos tomados a partir de los seis ultimos meses.</font></p></td>
</tr>
</table></td>
</tr>
<tr>
<td width="5%" bgcolor="#FF9900"> <div align="center"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif">2</font></div></td>
<td width="95%"><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr bgcolor="#F2F2F2">
<td colspan="3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Autoliquidación</strong></font></td>
</tr>
<tr>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='6'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='6'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
$consul = "SELECT *
FROM vali"
. " order by cons DESC";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f88 = $myrow["cons"];
////////////////////////////////
// Calculo Acumulado
$consul = "SELECT *
FROM esta"
. " order by fecha limit 0,1";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$zxy = $myrow["fecha"];
$rey = explode ("/", $zxy);
$mini = $rey[1];
$plm = $montho - 6;
if ($plm <= 0) {
$ply = $year - 1;
$plm = 12 + $plm;
//echo $plm;
$plm = $plm + 1;
}else{
$ply = $year;
}
for ($i = 0; $i <= 5; $i++) {
$plx = $plm++;
if ($plx == 13) {
$plm = 2;
$plx = 1;
$ply = $ply + 1;
}
$chain1 = $plx . "/" . $ply;
//echo $chain1;
$consul = "SELECT *
FROM esta where fecha like '%$chain1%' and codigo='6'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f3[$i] = 0;
$f4[$i] = $chain1;
while ($myrow = mysql_fetch_array($result))
{
$f5 = $myrow["numero"];
$f3[$i] = $f3[$i] + $f5;
}}
$pro = $f3[0] + $f3[1] + $f3[2] + $f3[3] + $f3[4] + $f3[5];
$pro1 = $pro / 6;
$pro1 = number_format($pro1);
$pro2 = $pro / 180;
$pro2 = number_format($pro2);
//for ($i = 0; $i <= 5; $i++) {
//echo $f3[$i];
//echo "<br>";
//}
/////////////////////////////////
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Número
de recibos en el día: <strong><?php echo $f; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Número
de recibos en el mes: <strong><?php echo $f2; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Ultimo
recibo generado: <strong><?php echo $f88; ?></strong></font></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#FF9900"> </td>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="20%" bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[0]; ?></font></strong></div></td>
<td width="10%"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[0]; ?></font></div></td>
<td width="70%" bgcolor="#FFE1CC"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[0] > 0) {
$nada = $f3[0] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[1]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[1]; ?></font></div></td>
<td bgcolor="#FFE1CC"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[1] > 0) {
$nada = $f3[1] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[2]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[2]; ?></font></div></td>
<td bgcolor="#FFE1CC"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[2] > 0) {
$nada = $f3[2] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[3]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[3]; ?></font></div></td>
<td bgcolor="#FFE1CC"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[3] > 0) {
$nada = $f3[3] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[4]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[4]; ?></font></div></td>
<td bgcolor="#FFE1CC"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[4] > 0) {
$nada = $f3[4] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f4[5]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f3[5]; ?></font></div></td>
<td bgcolor="#FFE1CC"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f3[5] > 0) {
$nada = $f3[5] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
</table></td>
<td width="50%" valign="top"> <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Comportamiento
de tráfico durante<br>
los 6 últimos meses</strong></font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Se
registran y comparan los datos acumulados para los últimos
seis meses, los meses que no tienen registros activos se
despliegan con valor "0".</font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>
Promedio mensual*: <strong><?php echo $pro1; ?></strong>
<font color="#FF9900">hits/mes<br>
</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>
Promedio diario*: <strong><?php echo $pro2; ?></strong>
<font color="#FF9900">hits/día<br>
</font></font></font><font color="#FF9900" size="1" face="Verdana, Arial, Helvetica, sans-serif">*
Datos tomados a partir de los seis ultimos meses.</font></p></td>
</tr>
</table></td>
</tr>
<tr>
<td width="5%" bgcolor="#FF3300"> <div align="center"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif">3</font></div></td>
<td width="95%"><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr bgcolor="#F2F2F2">
<td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Tráfico
por Secciones</strong></font></td>
</tr>
<tr>
<td><table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#999999">
<tr bgcolor="#CCCCCC">
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nombre</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tráfico/Día</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tráfico/Mes</font></td>
</tr>
<tr>
<td width="50%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Ecosistemas
estratégicos</font></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='3'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='3'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td width="25%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td width="25%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font></td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Incendios
forestales</font></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='4'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='4'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td width="25%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font></td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Des.
Empresarial Sostenible</font></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='13'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='13'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font></td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Educación
Ambiental</font></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='14'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='14'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font></td>
</tr>
</table></td>
<td><table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#999999">
<tr bgcolor="#CCCCCC">
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nombre</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tráfico/Día</font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tráfico/Mes</font></td>
</tr>
<tr>
<td width="50%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Noticias
Ambientales</font></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='5'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='5'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td width="25%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td width="25%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font></td>
</tr>
<tr>
<td><div align="left"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">PM10
Diario </font></div></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='16'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='16'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td width="25%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr>
<td><div align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Intranet</font></div></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='17'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='17'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font></td>
</tr>
<tr>
<td><div align="left"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Red
del Aire</font></div></td>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM esta where fecha='$today1' and codigo='15'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$f = $myrow["numero"];
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='15'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f; ?>
h</strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $f2; ?>
h</strong></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width="5%" bgcolor="#993300"> <div align="center"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif">4</font></div></td>
<td width="95%"><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr bgcolor="#F2F2F2">
<td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Legislación
Ambiental Colombiana</strong></font></td>
</tr>
<tr>
<?php
$f = 0;
require('conexion3.php');
$consul = "SELECT *
FROM legis";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f3 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f3++;
}
$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM esta where fecha like '%$chain%' and codigo='2'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f2 = 0;
while ($myrow = mysql_fetch_array($result))
{
$f1 = $myrow["numero"];
$f2 = $f2 + $f1;
}
////////////////////////////////
// Calculo Acumulado
$consul = "SELECT *
FROM esta"
. " order by fecha limit 0,1";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$zxy = $myrow["fecha"];
$rey = explode ("/", $zxy);
$mini = $rey[1];
$plm = $montho - 6;
if ($plm <= 0) {
$ply = $year - 1;
$plm = 12 + $plm;
//echo $plm;
$plm = $plm + 1;
}else{
$ply = $year;
}
for ($i = 0; $i <= 5; $i++) {
$plx = $plm++;
if ($plx == 13) {
$plm = 2;
$plx = 1;
$ply = $ply + 1;
}
$chain1 = $plx . "/" . $ply;
//echo $chain1;
$consul = "SELECT *
FROM esta where fecha like '%$chain1%' and codigo='2'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$f33[$i] = 0;
$f44[$i] = $chain1;
while ($myrow = mysql_fetch_array($result))
{
$f55 = $myrow["numero"];
$f33[$i] = $f33[$i] + $f55;
}}
$pro = $f33[0] + $f33[1] + $f33[2] + $f33[3] + $f33[4] + $f33[5];
$pro1 = $pro / 6;
$pro1 = number_format($pro1);
$pro2 = $pro / 180;
$pro2 = number_format($pro2);
//for ($i = 0; $i <= 5; $i++) {
//echo $f3[$i];
//echo "<br>";
//}
/////////////////////////////////
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Número
de normas en la base de datos: <?php echo $f3; ?> </font></td>
<td width="50%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Hits
mes: <?php echo $f2; ?> </font></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#993300"> </td>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="7%" bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f44[0]; ?></font></strong></div></td>
<td width="10%"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f33[0]; ?></font></div></td>
<td width="83%" bgcolor="#E1D7C8"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f33[0] > 0) {
$nada = $f33[0] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f44[1]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f33[1]; ?></font></div></td>
<td bgcolor="#E1D7C8"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f33[1] > 0) {
$nada = $f33[1] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f44[2]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f33[2]; ?></font></div></td>
<td bgcolor="#E1D7C8"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f33[2] > 0) {
$nada = $f33[2] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f44[3]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f33[3]; ?></font></div></td>
<td bgcolor="#E1D7C8"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f33[3] > 0) {
$nada = $f33[3] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f44[4]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f33[4]; ?></font></div></td>
<td bgcolor="#E1D7C8"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f33[4] > 0) {
$nada = $f33[4] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
<tr>
<td bgcolor="#E7F5FE"> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f44[5]; ?></font></strong></div></td>
<td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $f33[5]; ?></font></div></td>
<td bgcolor="#E1D7C8"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif">
<?php
if ($f33[5] > 0) {
$nada = $f33[5] / 10;
$nada = round($nada);
for ($i = 0; $i <= $nada; $i++) {
echo "I";
}
}else{
echo "Sin registros";
}
?>
</font></td>
</tr>
</table>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Comportamiento
de tráfico durante los 6 últimos meses</strong></font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Se
registran y comparan los datos acumulados para los últimos
seis meses, los meses que no tienen registros activos se
despliegan con valor "0".</font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>
Promedio mensual*: <strong><?php echo $pro1; ?></strong>
<font color="#FF9900">hits/mes<br>
</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>
Promedio diario*: <strong><?php echo $pro2; ?></strong>
<font color="#FF9900">hits/día<br>
</font></font></font><font color="#FF9900" size="1" face="Verdana, Arial, Helvetica, sans-serif">*
Datos tomados a partir de los seis ultimos meses.</font></p></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#990066">
<div align="center"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif">5</font></div></td>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td bgcolor="#F2F2F2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Estadísticas
de procesos de evaluación</strong></font></td>
</tr>
<tr>
<td><form name="form1" method="post" action="reqesta22.php">
<table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Seleccione
el proceso:
<select name="id">
<?php
require('conect/conect.php');
$consul = "SELECT *
FROM evaluacion";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
while ($myrow = mysql_fetch_array($result))
{
$uno = $myrow["id"];
$dos = $myrow["nombre"];
echo "<option value=\"$uno\">$dos</option>";
}
?>
</select>
<input type="submit" name="Submit" value="Ver">
</font></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center"><font color="#333333" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>--------------------------------------------------------------------------------------------------------------------------------------------------
</strong><br>
Todos los Derechos Reservados para el DAMA<br>
Departamento Técnico Administrativo del Medio Ambiente.<br>
Subsistema del Sistema de Información Ambiental SIA-DAMA<br>
<strong>2003 - 2004</strong></font></div></td>
</tr>
</table>
<p> </p>
</body>
</html>
|