blob: e3d6043e86da1906efbf2c669ef53b002faf4354 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<%
my $title = 'Call Detail Records';
my $hashref = {};
my $count_query = 'SELECT COUNT(*) FROM cdr';
#process params for CDR search, populate $hashref...
# and fixup $count_query
if ( $cgi->param('freesidestatus') eq 'NULL' ) {
my $title = "Unprocessed $title";
$hashref->{'freesidestatus'} = ''; # Record.pm will take care of it
#$count_query .= " AND ( freesidestatus IS NULL OR freesidestatus = '' )";
$count_query .= " WHERE ( freesidestatus IS NULL OR freesidestatus = '' )";
} elsif ( $cgi->param('freesidestatus') =~ /^([\w ]+)$/ ) {
my $title = "Processed $title";
$hashref->{'freesidestatus'} = $1;
#$count_query .= " AND freesidestatus = '$1'";
$count_query .= " WHERE freesidestatus = '$1'";
}
%><%= include( 'elements/search.html',
'title' => $title,
'name' => 'call detail records',
'query' => { 'table' => 'cdr',
'hashref' => $hashref
},
'count_query' => $count_query,
'header' => [ fields('cdr') ], #XXX fill in some nice names
'fields' => [ fields('cdr') ], #XXX fill in some pretty-print
# processing, etc.
)
%>
|