X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fsvc_acct.cgi;h=c3ddd660bf9c202545af238878fb43f39fa64afb;hb=e92fa2f0535551a4e4cd92d10ccbcf930a5e5e62;hp=09d1177657400aad9e89b382304e52c009a4f97b;hpb=7f4aff45cd6ef2f630d538294fa9d9c4db4ac4aa;p=freeside.git diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index 09d117765..c3ddd660b 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -69,12 +69,12 @@ my $link_cust = sub { my %search_hash = (); my @extra_sql = (); -my @header = ( '#', 'Service', 'Account' ); -my @fields = ( 'svcnum', 'svc', 'email' ); -my @links = ( $link, $link, $link ); -my $align = 'rll'; -my @color = ( '', '', '' ); -my @style = ( '', '', '' ); +my @header = ( 'Service', 'Account' ); +my @fields = ( 'svc', 'email' ); +my @links = ( $link, $link ); +my $align = 'll'; +my @color = ( '', '' ); +my @style = ( '', '' ); my @footer = (); my $conf = new FS::Conf; @@ -91,13 +91,30 @@ if ( $conf->exists('report-showpasswords') #its a terrible idea push @style, ''; } -#maybe hide the UID if a flag isn't passed... its much less useful these days -push @header, 'Real Name', 'UID', 'Last Login'; -push @fields, 'finger', 'uid', 'last_login_text'; -push @links, $link, $link, $link; -$align .= 'llr'; -push @color, '', '', ''; -push @style, '', '', ''; +push @header, 'Real Name'; +push @fields, 'finger'; +push @links, $link; +$align .= 'l'; +push @color, ''; +push @style, ''; + +#hide the UID, its much less useful these days +if ( $cgi->param('show_uid') ) { #XXX add a checkbox + push @header, 'UID'; + push @fields, 'uid'; + push @links, $link; + $align .= 'l'; + push @color, ''; + push @style, ''; +} + +push @header, 'Last Login'; +push @fields, 'last_login_text'; +push @links, $link; +$align .= 'r'; +push @color, ''; +push @style, ''; + for (qw( domain domsvc agentnum custnum popnum svcpart cust_fields )) { $search_hash{$_} = $cgi->param($_) if length($cgi->param($_)); @@ -134,7 +151,7 @@ if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) { push @color, ''; push @style, ''; - @footer = ( '', 'Total', '', '', '', + @footer = ( 'Total', '', '', '', sub { format_time($tot_time) }, #time ); @@ -184,6 +201,8 @@ if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) { ; } + push @footer, '', ''; + } } elsif ( $cgi->param('magic') =~ /^nologin$/ ) { @@ -243,13 +262,13 @@ if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) { } $cgi->param('username') =~ /^([\w\-\.\&]+)$/; #untaint username_text - my $username = $1; + my $username = lc($1); - push @username_sql, "username ILIKE '$username'" + push @username_sql, "LOWER(username) LIKE '$username'" if $username_type{'Exact'} || $username_type{'Fuzzy'}; - push @username_sql, "username ILIKE '\%$username\%'" + push @username_sql, "LOWER(username) LIKE '\%$username\%'" if $username_type{'Substring'} || $username_type{'All'};