Viewing file: esta2.php (11.51 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: "Times New Roman", Times, serif;
font-size: 12px;
color: #000000;
background-color: #99CCFF;
}
input {
font-family: "Times New Roman", Times, serif;
font-size: 14px;
color: #000000;
background-color: #E6F2FF;
border: 1px solid #999999;
}
select {
font-family: "Times New Roman", Times, serif;
font-size: 14px;
color: #000000;
background-color: #E6F2FF;
}
textarea {
font-family: "Times New Roman", Times, serif;
font-size: 14px;
color: #000000;
background-color: #E6F2FF;
}
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;
include('conect/conect.php');
$consul = "SELECT *
FROM evaluacion
WHERE id ='$id'";
$result = mysql_query($consul,$db);
$myrow = mysql_fetch_array($result);
$nombre = $myrow["nombre"];
$descripcion = $myrow["descripcion"];
$f1 = $myrow["fechaini"];
$trans = $f1;
require('fechanew.php');
$fechapresentar8 = $fechapresentar;
$f2 = $myrow["fechaend"];
$trans = $f2;
require('fechanew.php');
$res = $myrow["res"];
?>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Estadísticas
hasta el día:<strong> <?php echo $today; ?><br>
</strong>Nombre del proceso de evaluación:<strong> <?php echo $nombre; ?><br>
</strong><font size="1">Vigente desde:<strong> <?php echo $fechapresentar8; ?>
</strong>hasta:<strong> <?php echo $fechapresentar; ?></strong></font></font>
<div align="right"></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">
<?php if ($res == 0) { ?>
<tr>
<td width="5%" bgcolor="#33CC00"> <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>Estadísticas
para evaluaciones públicas.</strong></font></td>
</tr>
<tr>
<?php
$f = 0;
//$chain = $montho . "/" . $year;
$consul = "SELECT *
FROM resultados where codeval ='$id'";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$fval = 0;
$sval = 0;
$fnoval = 0;
$snoval = 0;
while ($myrow = mysql_fetch_array($result))
{
$x1 = $myrow["nota"];
$x2 = $myrow["timlin"];
$x3 = $myrow["timint"];
if ($x2 >= $x3) {
$fval++;
$sval = $sval + $x1;
}else{
$fnoval++;
$snoval = $snoval + $x1;
}
}
if ($fval == 0) {
$pval = 0;
}else{
$pval = $sval / $fval;
$pval = round($pval);
}
if ($fnoval == 0) {
$pnoval = 0;
}else{
$pnoval = $snoval / $fnoval;
$pnoval = round($pnoval);
}
$ftotal = $fval + $fnoval;
if ($fnoval == 0 and $fval == 0) {
$promedio = 0;
}else{
$promedio = ($sval + $snoval) / $ftotal;
$promedio = round($promedio);
}
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">No.
de evaluaciones dentro del tiempo:<strong> <?php echo $fval; ?><br>
</strong> <font color="#999999">Incluye usuarios con datos
registrados y sin datos</font></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">No.
de evaluaciones fuera de tiempo: <strong><?php echo $fnoval; ?><br>
</strong><font color="#999999">Incluye usuarios con datos
registrados y sin datos</font><strong> </strong></font></td>
</tr>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Promedio
Válido Total</strong>:<strong> <?php echo $pval; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>No.
Total de Evaluaciones Aplicadas</strong>:<strong> <?php echo $ftotal; ?></strong></font></td>
</tr>
<tr bgcolor="#E6FEE2">
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr bgcolor="#B0FCA3">
<?php
$consul = "SELECT *
FROM resultados where codeval ='$id' and usuario != ''";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$fval = 0;
$sval = 0;
$fnoval = 0;
$snoval = 0;
$f = 0;
?>
<td colspan="3"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Evaluaciones
aplicadas por usuarios que registraron datos...</strong></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nombre
de Usuario</font></strong></div></td>
<td> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Mail</font></strong></div></td>
<td> <div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Calificación</font></strong></div></td>
</tr>
<?php
while ($myrow = mysql_fetch_array($result))
{
$x1 = $myrow["nota"];
$x2 = $myrow["timlin"];
$x3 = $myrow["timint"];
$x4 = $myrow["usuario"];
$x5 = $myrow["mail"];
if ($x2 >= $x3) {
$x6 = "OK";
$fval++;
$f++;
$sval = $sval + $x1;
}else{
$x6 = "TO";
$f++;
}
?>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>:
<strong><?php echo $x4; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>:
<strong><?php echo $x5; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>:
<strong><?php echo $x1; ?> <?php echo $x6; ?></strong></font></td>
</tr>
<?php
}
if ($fval == 0) {
$pval = 0;
}else{
$pval = $sval / $fval;
$pval = round($pval);
}
?>
</table></td>
</tr>
<tr bgcolor="#E6FEE2">
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Promedio
Válido Total de Usuarios con datos</strong>:<strong>
<?php echo $pval; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>No.
Total de Evaluaciones Aplicadas por Usuarios con datos</strong>:<strong>
<?php echo $f; ?></strong></font></td>
</tr>
</table></td>
</tr>
<?php }else{ ?>
<tr>
<td width="5%" bgcolor="#6699CC"> <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>Estadísticas
para evaluaciones con usuarios registrados.</strong></font></td>
</tr>
<tr bgcolor="#E7F5FE">
<td> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Nombre
de Usuario</strong></font></div></td>
<td> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Calificación</strong></font></div></td>
<td> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Fecha</strong></font></div></td>
</tr>
<tr>
<?php
$f = 0;
$consul = "SELECT *
FROM resultados where codeval ='$id' and usuario != ''";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$fval = 0;
$sval = 0;
$fnoval = 0;
$snoval = 0;
$f = 0;
while ($myrow = mysql_fetch_array($result))
{
$x1 = $myrow["nota"];
$x2 = $myrow["timlin"];
$x3 = $myrow["timint"];
$x4 = $myrow["usuario"];
$x7 = $myrow["fecha"];
$trans = $x7;
require('fechanew.php');
$x5 = $myrow["mail"];
if ($x2 >= $x3) {
$x6 = "OK";
$fval++;
$f++;
$sval = $sval + $x1;
}else{
$x6 = "TO";
$f++;
}
?>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>:
<strong><?php echo $x4; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>:
<strong><?php echo $x1; ?> <?php echo $x6; ?></strong></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">>>:
<strong><?php echo $fechapresentar; ?></strong></font></td>
</tr>
<?php }
if ($fval == 0) {
$pval = 0;
}else{
$pval = $sval / $fval;
$pval = round($pval);
}
?>
<tr bgcolor="#A4D1FF">
<td colspan="3"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Promedio
Total</strong>:<strong> <?php echo $pval; ?></strong></font></td>
</tr>
<?php } ?>
</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">
Todos los Derechos Reservados para el DAMA<br>
Departamento Técnico Administrativo del Medio Ambiente.<br>
Su hbsistema del Sistema de Información Ambiental SIA-DAMA<br>
<strong>2003 - 2004</strong></font></div></td>
</tr>
</table>
<p> </p>
</body>
</html>
|