line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::OptimalQuery::InteractiveQuery2; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
618
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
54
|
|
5
|
1
|
|
|
1
|
|
4
|
no warnings qw( uninitialized ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
6
|
1
|
|
|
1
|
|
3
|
use base 'CGI::OptimalQuery::Base'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
54
|
|
7
|
1
|
|
|
1
|
|
3
|
use CGI(); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1669
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub escapeHTML { |
10
|
0
|
0
|
|
0
|
0
|
|
return defined $_[0] ? CGI::escapeHTML($_[0]) : ''; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub output { |
14
|
|
|
|
|
|
|
my $o = shift; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my %opts = %{ $o->get_opts() }; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# evalulate code refs |
19
|
|
|
|
|
|
|
for (qw(httpHeader htmlFooter htmlHeader OQdocTop |
20
|
|
|
|
|
|
|
OQdocBottom OQformTop OQformBottom )) { |
21
|
|
|
|
|
|
|
$opts{$_} = $opts{$_}->($o) if ref($opts{$_}) eq 'CODE'; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# define defaults |
25
|
|
|
|
|
|
|
$opts{OQdocTop} ||= ''; |
26
|
|
|
|
|
|
|
$opts{OQdocBottom} ||= ''; |
27
|
|
|
|
|
|
|
$opts{OQformTop} ||= ''; |
28
|
|
|
|
|
|
|
$opts{OQformBottom} ||= ''; |
29
|
|
|
|
|
|
|
$opts{editButtonLabel}||= 'edit'; |
30
|
|
|
|
|
|
|
$opts{disable_sort} ||= 0; |
31
|
|
|
|
|
|
|
$opts{disable_filter} ||= 0; |
32
|
|
|
|
|
|
|
$opts{disable_select} ||= 0; |
33
|
|
|
|
|
|
|
$opts{mutateRecord} ||= undef; |
34
|
|
|
|
|
|
|
$opts{editLink} ||= undef; |
35
|
|
|
|
|
|
|
$opts{htmlExtraHead} ||= ""; |
36
|
|
|
|
|
|
|
if (! exists $opts{usePopups}) { |
37
|
|
|
|
|
|
|
$opts{usePopups}=1; |
38
|
|
|
|
|
|
|
} else { |
39
|
|
|
|
|
|
|
$opts{usePopups}=($opts{usePopups}) ? 1 : 0; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
if (! exists $opts{useAjax}) { |
42
|
|
|
|
|
|
|
$opts{useAjax} = $opts{usePopups}; |
43
|
|
|
|
|
|
|
} else { |
44
|
|
|
|
|
|
|
$opts{useAjax}=($opts{useAjax}) ? 1 : 0; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
$opts{httpHeader} = $$o{q}->header(-type=>'text/html',-expires=>'now') |
48
|
|
|
|
|
|
|
unless exists $opts{httpHeader}; |
49
|
|
|
|
|
|
|
$opts{htmlFooter} = " |