diff options
Diffstat (limited to 'httemplate/search/svc_phone.cgi')
-rw-r--r-- | httemplate/search/svc_phone.cgi | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/httemplate/search/svc_phone.cgi b/httemplate/search/svc_phone.cgi index 26e2090e6..229dd5d89 100644 --- a/httemplate/search/svc_phone.cgi +++ b/httemplate/search/svc_phone.cgi @@ -1,19 +1,19 @@ -% -% %my $conf = new FS::Conf; % -%my($query)=$cgi->keywords; -%$query ||= ''; #to avoid use of unitialized value errors -% %my $orderby = 'ORDER BY svcnum'; %my %svc_phone = (); %my @extra_sql = (); -%if ( $query eq 'svcnum' ) { -% #$orderby = 'ORDER BY svcnum'; -%} elsif ( $query eq 'phonenum' ) { -% $orderby = 'ORDER BY phonenum'; +%if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) { +% +% push @extra_sql, 'pkgnum IS NULL' +% if $cgi->param('magic') eq 'unlinked'; +% +% if ( $cgi->param('sortby') =~ /^(\w+)$/ ) { +% my $sortby = $1; +% $orderby = "ORDER BY $sortby"; +% } +% %} elsif ( $cgi->param('svcpart') =~ /^(\d+)$/ ) { -% #$orderby = 'ORDER BY svcnum'; % push @extra_sql, "svcpart = $1"; %} else { % $cgi->param('phonenum') =~ /^([\d\- ]+)$/; |