X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fgraph%2Fmoney_time-graph.cgi;h=944019a7a0ce1dce96b3b37f8098b41cb24916b1;hp=ca8f6e86bb1e926ee40bd3ad76193cd0feca1525;hb=7b636e0d0a90e05e37ebe778bde29709f3323813;hpb=d2f7bc5bcdb39f689d4a72946f0728325d0c09c8 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;