1 |
#!/usr/bin/perl |
2 |
|
3 |
(undef, undef, undef, undef, $m, $y) = localtime; $m++; |
4 |
|
5 |
$y += 1900 if $y < 1000; |
6 |
$m = sprintf('%02d', $m); |
7 |
|
8 |
my $myuri = 'http://'.$main::ENV{SERVER_NAME}.':'.$main::ENV{SERVER_PORT}. |
9 |
'/okuchuu/blue-oceans/'; |
10 |
my $localpart; |
11 |
|
12 |
if ($main::ENV{QUERY_STRING} eq 'year') { |
13 |
$localpart = $y.'/'; |
14 |
} elsif ($main::ENV{QUERY_STRING} eq 'theme') { |
15 |
$localpart = $y.'/theme'; |
16 |
} elsif ($main::ENV{QUERY_STRING} eq 'taikai') { |
17 |
$localpart = $y.'/taikai'; |
18 |
} elsif ($main::ENV{QUERY_STRING} eq 'part') { |
19 |
$localpart = $y.'/part/'; |
20 |
} elsif ($main::ENV{QUERY_STRING} eq 'newmember') { |
21 |
$localpart = $y.'/newmember'; |
22 |
} else { |
23 |
$localpart = $y.'/'.$m; |
24 |
} |
25 |
|
26 |
print "Location: ${myuri}${localpart}\n\n"; |