diff options
author | ivan <ivan> | 2006-12-29 08:51:34 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-12-29 08:51:34 +0000 |
commit | 633c48448d9468690b7ad77eb6ff7c660a286658 (patch) | |
tree | 4e08051f8d805e7e95c8dffe5e3e73b0c360f965 /httemplate/search/svc_phone.cgi | |
parent | 6cb5c702b17b98be46adea4539e15d5f312e5be1 (diff) |
service refactor!
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\- ]+)$/; |