[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 = <Entries matching "$ui_text_qualification" EOF } elsif ($ui_text_qualification) { $CGI->{ui_text_qualification} = "se=$CGI->{ui_text_qualification}"; $out_message = <Entries matching "$CGI->{ui_text_qualification}" EOF } else { $CGI->{ui_text_qualification} = "ra=yes"; } $CGI->{ui_sort_field} ||= $meta->{ui_sort_field} || $meta->{lookup} || $Scratch->{keyname}; $CGI->{ui_list_size} = $meta->{height} if ! $CGI->{ui_list_size}; $CGI->{ui_show_fields} ||= $meta->{ui_show_fields} || $meta->{field}; if(! $CGI->{ui_show_fields}) { $CGI->{ui_show_fields} = '*'; $CGI->{ui_description_fields} = join ",", $ref->columns(); } else { $CGI->{ui_show_fields} =~ s/[\0,\s]+/,/g; $CGI->{ui_description_fields} = $CGI->{ui_show_fields}; } return $out_message; [/perl] [if-mm !super] [tmp ui_owner][db-hash table="__UI_ACCESS_TABLE__" column="table_control::[cgi mv_data_table]::owner_field" key="[data session username]"][/tmp] [/if-mm] [if scratch ui_owner] [tmp ui_return_all] sf=[scratch ui_owner] se=[data session username] co=1 op=eq [/tmp] [else] [tmp ui_return_all] ra=yes [/tmp] [/else] [/if] [tmp sparams] fi=[cgi mv_data_table] va=mv_data_table=[cgi mv_data_table] va=mv_arg=[cgi mv_arg] st=db [scratch ui_return_all] un=yes sp=@@MV_PAGE@@ tf=[cgi mv_arg] rf=[cgi mv_arg] [/tmp] [search-region more=1 arg="[scratch sparams]"]

[search-list]
- [either][item-code][or](blank)[/either]
[/search-list]

[more-list]More: [more][/more-list] [/search-region] @_UI_STD_FOOTER_@