From 0f579c6dd47814599dc0c056820265e794890b8b Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 9 Oct 2004 10:57:15 +0000 Subject: [PATCH] rearrange things a bit and clean up the RADIUS session data, link to the detail search --- httemplate/view/svc_acct.cgi | 110 +++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 1322a69fd..48d050ee6 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -86,33 +86,55 @@ if ( $part_svc->part_export('sqlradius') $last_bill, time, 'AcctOutputOctets' ) / 1048576; - if ( $seconds ) { - print "Online $hourh $minm $secs"; - } else { - print 'Has not logged on'; - } +%> - if ( $cust_pkg ) { - print ' since last bill ('. time2str("%C", $last_bill). ')'. - print ' - '. $plandata{recur_included_hours}. ' total hours in plan
' - if length($plandata{recur_included_hours}); - } else { - print ' (no billing cycle available for unaudited account)
'; - } + RADIUS session information
+ <%= ntable('#cccccc',2) %> + - print 'Input: '. sprintf("%.3f", $input). ' megabytes
'; - print 'Output: '. sprintf("%.3f", $output). ' megabytes
'; + <% if ( $seconds ) { %> + Online <%= $hour %>h <%= $min %>m <%= $sec %>s + <% } else { %> + Has not logged on + <% } %> - my $href = qq!all sessions!; + <% if ( $cust_pkg ) { %> + since last bill (<%= time2str('%a %b %o %Y', $last_bill) %>) + <% if ( length($plandata{recur_included_hours}) ) { %> + - <%= $plandata{recur_included_hours} %> total hours in plan + <% } %> +
+ <% } else { %> + (no billing cycle available for unaudited account)
+ <% } %> - print '
'; + Upload: <%= sprintf("%.3f", $input) %> megabytes
+ Download: <%= sprintf("%.3f", $output) %> megabytes
-} + <% my $href = qq!this billing cycle + | <%= $href %>;begin=<%= time-15552000 %>">past six months + | <%= $href %>">all sessions -#print qq!
Send account information!; +
-%> +<% } %> + + +
+ + + +<% #print qq!
Send account information!; %> <% my @part_svc = (); @@ -127,21 +149,13 @@ if ( $part_svc->part_export('sqlradius') svcpart => { op=>'!=', value=>$part_svc->svcpart }, } ); } - if ( @part_svc ) { %> - - - - - <% foreach my $part_svc ( @part_svc ) { %> @@ -149,25 +163,21 @@ if ( $part_svc->part_export('sqlradius') <% } %> -
<% } %> -<% - -print qq!Edit this information
!. - &ntable("#cccccc"). ''. &ntable("#cccccc",2). - "Service number". - "$svcnum". - "Service". - "". $part_svc->svc. "". - "Username". - "". $svc_acct->username. "" -; +<%= &ntable("#cccccc") %><%= &ntable("#cccccc",2) %> +Service number + <%= $svcnum %> +Service + <%= $part_svc->svc %> +Username + <%= $svc_acct->username %> +Domain + <%= $domain %> -print "Domain". - "". $domain, ""; +Password + <% -print "Password"; my $password = $svc_acct->_password; if ( $password =~ /^\*\w+\* (.*)$/ ) { $password = $1; @@ -251,7 +261,7 @@ foreach (sort { $a cmp $b } $svc_acct->virtual_fields) { "\n"; } %> - + <% print '

'; -- 2.11.0