Ver Mensaje Individual
  #10 (permalink)  
Antiguo 18/03/2003, 13:16
Avatar de pereztroff
pereztroff
 
Fecha de Ingreso: junio-2002
Ubicación: En la Internet.
Mensajes: 4.068
Antigüedad: 21 años, 10 meses
Puntos: 5
****no me funciono cluster****** ¿¿¿¿?????


este es el archivo de resultados:

Código PHP:
<body bgcolor="#EFECFD">
<?php
require('variables.php');    
$file_array file($RESULT_FILE_NAME);


// Visualizar los resultados de la encuesta

    
while (list($key$val) = each($file_array)) {
        
$total += $val;
    }

    echo 
"Resultados:";
    echo 
"<TABLE CELLSPACING=2 CELLPADDING=1 BORDER=0>";
    echo 
"<tr><th>Opción</th><th>Porcentaje</th><th>Votos</th></tr>";

while (list(
$key$val) = each($ANSWER)) {
        
$percent =  $file_array[$key] * 100 $total;
        
$percent_int floor($percent);
        
$percent_float number_format($percent1);
        
$tp += $percent_float;
        echo 
"<tr><td> $ANSWER[$key] </td><td><img height=9 src=\"vote_left.gif\"><img height=9 width=\"$percent_int\" src=\"vote_middle.gif\"><img height=9 src=\"vote_right.gif\"> $percent_float % </td><td>$file_array[$key]</td></tr>";
    }


    echo 
"</TABLE><br>";


?>