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