From: ivan Date: Mon, 16 Dec 2002 10:47:38 +0000 (+0000) Subject: working date range selector that defaults to the past year! X-Git-Tag: freeside_1_5_0pre1~96 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=7b636e0d0a90e05e37ebe778bde29709f3323813 working date range selector that defaults to the past year! --- 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; diff --git a/httemplate/graph/money_time.cgi b/httemplate/graph/money_time.cgi index d6c35434b..e24157ccb 100644 --- a/httemplate/graph/money_time.cgi +++ b/httemplate/graph/money_time.cgi @@ -1,9 +1,25 @@ +