home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet 1996 World Exposition
/
park.org.s3.amazonaws.com.7z
/
park.org.s3.amazonaws.com
/
cgi-bin
/
Japan
/
KDD
/
nph-switch_j
< prev
next >
Wrap
Text File
|
2017-09-21
|
1KB
|
39 lines
#!/usr/local/bin/perl
$|=1;
$year_day = (localtime)[7]; # days of year
$first_day = 94; # first day of seimei (April 4)
$moon_day = $year_day - $first_day + 1; # day of sekki
# $moon_day = 48; # for DEBUG
@sekki = ('seimei','koku-u','rikka','shouman','boushu','geshi','shousho',
'taisho','risshu','shosho','hakuro','shubun','kanro','soukou',
'rittou','shousetsu','taisetsu','touji');
@dsekki = (16,15,16,15,16,16,15,16,16,15,16,15,15,15,15,15,14,10);
$csekki = 0; # sekki counter
$cmoon_day = $moon_day; # moon day counter
while ($cmoon_day > 0) {
$cmoon_day = $cmoon_day - $dsekki[$csekki];
$csekki = $csekki + 1;
}
$dir = $sekki[$csekki - 1];
$month_html = join('',"SEKKI/",$dir,"/indexj.html");
# print "$month_html\n"; # for DEBUG
print "HTTP/1.0 200 Okey\n";
print "Content-type: multipart/x-mixed-replace;boundary=sometext\n";
print "\n";
print "--sometext\n";
print "Content-type: text/html\n";
print "\n";
open (S, "$month_html");
print (<S>);
close S;
print "\n";
print "--sometext--\n";