I Ciclo de Conferencias del Canal #Cosmologia

"; if (!($havotado or $accion=="votar")) { if (file_exists("tema$i.log.html")) { echo ""; } else { echo ""; } } if (file_exists("tema$i.html")) { echo ""; } else { echo ""; } if ($havotado or $accion=="votar") { if (file_exists("tema$i.log.html")) { echo ""; } else { $g = 7*$todo[1][$i]; echo ""; } } echo ""; } echo "
El objetivo de las charlas es poder aprender y posteriormente debatir sobre temas que nos interesan a los habituales del canal y que esperamos que sean de interés para todos los aficionados a la ciencia en general. Los temas propuestos hasta el momento son muchos y variados. Podeis pinchar en el tema que os guste y consultar información que iremos preparando. Señalad los que más os interesen y votad por ellos.

Se pueden marcar todos los que quieras


"; $temas = file("charlas.txt"); if (file_exists("puntos.txt")) $puntos = file("puntos.txt"); $puntos = array_map(chop, $puntos); if (file_exists("votantes.txt")) $votantes = file("votantes.txt"); $votantes = array_map(chop, $votantes); /* Comprueba si quiere votar y ya ha votado, o si simplemente ya ha votado */ if ($accion=="Ver resultados") { $havotado = 1; /* se comporta igual */ } elseif (!$havotado and isset($votantes)){ // if (in_array($REMOTE_ADDR, $votantes)) $havotado = 1; // Puto proxy-web de los cojones, esto... de telefonica } if ($accion=="votar" and !$havotado) { $archvot = fopen("votantes.txt","a"); fputs($archvot,"$REMOTE_ADDR : "); } /* Lee y actualiza las puntuaciones */ $archpu = fopen ("puntos.txt","w"); for($i=0; $i < count($temas); $i++) { $todo[0][$i] = $temas[$i]; if (isset($puntos[$i])){ $todo[1][$i] = $puntos[$i]; } else { $todo[1][$i] = 0; } if ($accion == "votar" and (! $havotado) and isset($tema[$i])) { $todo[1][$i]++; fputs($archvot,"$i "); } fputs ($archpu,"{$todo[1][$i]}\n"); } fclose($archpu); if ($accion=="votar" and !$havotado) { fputs($archvot,"\n"); fclose($archvot); } // if ($accion=="votar" or $havotado) multisort($todo,0); /* Todo = nš tema : nombre tema : puntos */ for($i=0; $i < count($todo[0]); $i++) { echo "
Ver el log{$todo[0][$i]}{$todo[0][$i]}Ver el log{$todo[1][$i]} votos


"; if (!($havotado or $accion=="votar")) { echo "   "; echo ""; echo "   "; } echo "

"; if ($accion=="votar") { if (!$havotado) { echo "Hemos apuntado tu opinión, gracias."; } else { echo "Tus preferencias ya han sido tenidas en cuenta con anterioridad."; } } echo "
"; ?>
© CanalCosmologia 2003 by SVERG (PHP by MiKatp)