|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/mandarintools/cgi-bin/ |
Upload File : |
#!/usr/bin/perl -- # -*- perl -*-
require "cgi-lib.pl";
require "callib.pl";
# Options: use characters, use trad or simp,
&ReadParse(*values);
print "Content-type: text/html\n\n";
$gmonth = $values{"month"};
$gyear = $values{"year"};
$gera = $values{"era"};
$gday = $values{"day"};
($jera, $jyear, $jmonth, $jday) =
&Gregorian2Julian($gera, $gyear, $gmonth, $gday);
$juliandate = JulianPeriod($jera, $jyear, $jmonth, $jday);
#print "Day in the Julian Period: $juliandate <BR>\n";
($dyn, $ruler, $title, $ryear, $cyear, $cmonthtype, $cmonthcycle, $cday) =
julian_day_to_chinese($juliandate);
$ystem = ($cyear % 10) - 1;
$ybranch = ($cyear % 12) - 1;
#print "<HR>\n<H3>Chinese Date</H3>\n";
#print "<IMG ALIGN=ABSMIDDLE SRC=\"http://www.mandarintools.com/cgi-bin/ugif/$stems[$ystem].gif\"><IMG ALIGN=ABSMIDDLE SRC=\"http://www.mandarintools.com/cgi-bin/ugif/$branches[$ybranch].gif\"> ";
print "$stemsu8[$ystem]$branchesu8[$ybranch] ";
#print "Lunar Month: ";
if ($cmonthtype eq "L") { print " $run";}
$lmval = ($cmonthcycle + 10) % 12;
if ($lmval == 0) { print " $calnumbers[12]$yue"; }
else {print "$calnumbers[$lmval]$yue"; }
#$mstem = ($cmonthcycle % 10) - 1;
#$mbranch = ($cmonthcycle % 12) - 1;
#print "Cyclical Month: <IMG ALIGN=ABSMIDDLE SRC=\"ugif/$stems[$mstem].gif\"><IMG ALIGN=ABSMIDDLE SRC=\"ugif/$branches[$mbranch].gif\"> <BR>";
#print "Leap month: ";
print "$calnumbers[$cday]$ri";
#($dstem, $dbranch) = cyclical_day($jera, $jyear, $jmonth, $jday);
#print "Cyclical Day: <IMG ALIGN=ABSMIDDLE SRC=\"ugif/$stems[$dstem].gif\"><IMG ALIGN=ABSMIDDLE SRC=\"ugif/$branches[$dbranch].gif\"> <BR>";
#print "<P>This date is in the Year of the $signs[$ybranch] " .
# "<IMG ALIGN=ABSMIDDLE SRC=\"ugif/$signuni[$ybranch].gif\">.";