[Compbench-web-devel] compbenchmarks-web/lib topic.pl,NONE,1.1
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2006-11-28 21:48:03
|
Update of /cvsroot/compbench/compbenchmarks-web/lib In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24151 Added Files: topic.pl Log Message: First import. --- NEW FILE: topic.pl --- # ----------------------------------------------------------------------------- # $Id: topic.pl,v 1.1 2006/11/28 21:47:55 xfred Exp $ # # This is free software. # For details, see the GNU Public License in the COPYING file, or # Look http://www.fsf.org # ----------------------------------------------------------------------------- use strict; our $topic; our $tab; our $req; sub topic_start_former { my $topics = shift; my $order = shift; my $first = 1; if (!defined($topic)) { $topic=$order->[0]; } print "<table class='topic'><tr>"; print "<td class='topic_active'>Topic : </td>"; foreach(@{$order}) { if ($topic ne $_) { print "<td class='topic_inactive'>"; } else { print "<td class='topic_active'>"; } if (! $first) { print " </td>"; if ($topic ne $_) { print "<td class='topic_inactive'>"; } else { print "<td class='topic_active'>"; } } print "<a href='?tab=$tab&topic=$_'>$topics->{$_}</a></td></tr>"; $first=0; } print "</table>"; print "<h2>$topics->{$topic}</h2>"; } sub topic_start { my $topics = shift; my $order = shift; my $first = 1; if (!defined($topic)) { $topic=$order->[0]; } print "<table class='topic' width='100%'><tr><td><table><tr>"; foreach(@{$order}) { if ($topic ne $_) { print "<td class='topic_inactive'>"; } else { print "<td class='topic_active'><b>"; } print "<a href='?tab=$tab&topic=$_'>$topics->{$_}</a>"; if ($topic eq $_) { print "</b>"; } print "</td>"; } print "</tr></table></td>"; print "</tr></table>"; } 1; |