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