[if-mm super] [calc] $Config->{NoSearch} =~ s/\b$CGI->{mv_data_table}\|?//; return; [/calc] [/if-mm] [if !cgi mv_data_table] [bounce page="__UI_BASE__/gentable"] [/if] [tmp tmp_ftitle][either][data table=mv_metadata col=label key="[cgi mv_data_table]::[cgi mv_arg]" ][or][cgi mv_arg][/either][/tmp] [set ui_class]Admin[/set] [tmp page_title]Display table [cgi mv_data_table] by group [scratch tmp_ftitle][/tmp] [tmp page_banner] Table [cgi mv_data_table] group by [scratch tmp_ftitle] [/tmp] [set table_perm]=v[/set] [set help_name]flex.select[/set] [set icon_name]icon_config.gif[/set] @_UI_STD_HEAD_@ [if scratch ui_message]
[scratchd ui_message]
[/if]
[perl tables="[cgi mv_data_table] __UI_META_TABLE__"]
$CGI->{mv_arg} = 'category' if ! $CGI->{mv_arg};
my $ref = $Db{$CGI->{mv_data_table}};
my $mref = $Db{__UI_META_TABLE__};
if (! $ref) {
$Scratch->{keypos} = 0;
return;
}
elsif (! $mref) {
$Scratch->{keypos} = 0;
}
my $meta;
if($mref and $mref->record_exists($CGI->{mv_data_table}) ) {
$meta = $mref->row_hash($CGI->{mv_data_table});
}
else {
$meta = {};
}
if($CGI->{ui_flex_key}) {
$Scratch->{keypos} = $CGI->{ui_flex_key};
}
else {
$Scratch->{keyname} = $ref->config('KEY');
$Scratch->{keypos} = $ref->config('KEY_INDEX');
}
$Config->{NoSearch} = '';
$ui_text_qualification = $CGI->{ui_text_qualification};
if ($ui_text_qualification and $CGI->{ui_text_qualification} =~ /[\^]/ ) {
$CGI->{ui_text_qualification} = "co=1\n";
my @entries = split /\s+(and|or)\s+/i, $ui_text_qualification;
my $or;
for(@entries) {
if(/^or$/i) {
$or = 1;
$CGI->{ui_text_qualification} .= "os=1\n";
next;
}
elsif(/^and$/i) {
$or = 0;
$CGI->{ui_text_qualification} .= "os=0\n";
next;
}
my ($f, $op, $s) = split /\s*([<=!>\^]+)\s*/, $_, 2;
$op = "eq" if $op eq "==";
$op = "rm" if $op eq "=";
if($op eq '^') {
$op = 'rm';
$CGI->{ui_text_qualification} .= "bs=1\nsu=1\n";
}
else {
$CGI->{ui_text_qualification} .= "bs=0\nsu=0\n";
}
$CGI->{ui_text_qualification} .= "se=$s\nsf=$f\nop=$op\n";
if($op =~ /[<>]/ and $s =~ /^[\d.]+$/) {
$CGI->{ui_text_qualification} .= "nu=1\n";
}
else {
$CGI->{ui_text_qualification} .= "nu=0\n";
}
}
if(defined $or) {
$CGI->{ui_text_qualification} .= $or ? "os=1\n" : "os=0\n";
}
$out_message = <
[search-list]
[more-list]More: [more][/more-list]
[/search-region]
@_UI_STD_FOOTER_@