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