summaryrefslogtreecommitdiff
path: root/httemplate/graph/money_time-graph.cgi
diff options
context:
space:
mode:
authorivan <ivan>2002-12-16 10:47:38 +0000
committerivan <ivan>2002-12-16 10:47:38 +0000
commit7b636e0d0a90e05e37ebe778bde29709f3323813 (patch)
treece056634f5382ec0d9af98b509046692f8d6be6c /httemplate/graph/money_time-graph.cgi
parentedbcab06936c79a4f8d4edc0d0222139fa8c312c (diff)
working date range selector that defaults to the past year!
Diffstat (limited to 'httemplate/graph/money_time-graph.cgi')
-rwxr-xr-xhttemplate/graph/money_time-graph.cgi12
1 files changed, 8 insertions, 4 deletions
diff --git a/httemplate/graph/money_time-graph.cgi b/httemplate/graph/money_time-graph.cgi
index ca8f6e86b..944019a7a 100755
--- a/httemplate/graph/money_time-graph.cgi
+++ b/httemplate/graph/money_time-graph.cgi
@@ -1,12 +1,16 @@
<%
+#my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+my ($curmon,$curyear) = (localtime(time))[4,5];
+
#find first month
-my $syear = 2001;
-my $smonth = 8;
+my $syear = $cgi->param('syear') || 1899+$curyear;
+my $smonth = $cgi->param('smonth') || $curmon+1;
#find last month
-my $eyear = 2002;
-my $emonth = 12;
+my $eyear = $cgi->param('eyear') || 1900+$curyear;
+my $emonth = $cgi->param('emonth') || $curmon+1;
+if ( $emonth++>12 ) { $emonth-=12; $eyear++; }
my @labels;
my %data;