home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/perl
-
- $theme_file = "/cp/htdocs/Scripts/theme_dic_low.txt";
-
- print "Content-type: text/html\n\n";
- print "<html><head><title>Vote for the Golden Medals</title></head>\n";
-
- print "<frameset rows=\"30\%,\*\">\n";
- print "<frame src=\"themes.html\" name=\"themes\" noresize>\n";
-
- print "<frameset cols=\"40%,*\">\n";
-
- if ($#ARGV >= 0) {
- $args = $ENV{'QUERY_STRING'};
- print "<frame src=\"/cgi-bin/Vote/display_pavilions.pl?$args\" name=\"pavilions\" noresize>\n";
- print "<frame src=\"/cgi-bin/Vote/display_votes.pl?$args\" name=\"votes\" noresize>\n";
- }
- else {
- $flag = 0;
- $referer = $ENV{'HTTP_REFERER'};
- if ($referer =~ /^http:\/\/([^\/]*)\/Pavilions\/(.*)/) {
- $theme = $2;
- if( (!($theme eq "")) && (!($theme =~ /^Medal(.*)/)) ) {
- while (($last = chop($theme)) ne '/') { }
- $theme = $theme.$last;
-
- if (open(T_FILE, $theme_file)) {
- while (<T_FILE>) {
- if (/^([^#]*)#$theme#([^#]*)#(.*)/) {
- $theme = $1;
- $theme =~ tr/ /+/;
- $flag = 1;
- }
- }
- }
- }
- close(T_FILE);
- }
- if ($flag == 1) {
- print "<frame src=\"/cgi-bin/Vote/display_pavilions.pl?$theme\" name=\"pavilions\" noresize>\n";
- print "<frame src=\"/cgi-bin/Vote/display_votes.pl?$theme\" name=\"votes\" noresize>\n";
- }
- else {
- print "<frame src=\"pavilions.html\" name=\"pavilions\" noresize>\n";
- print "<frame src=\"votes.html\" name=\"votes\" noresize>\n";
- }
- }
- print "</frameset>\n";
-
- print "<noframes>\n";
- print "</noframes>\n";
- print "</frameset>\n";
- print "</html>\n";
-