[tmp page_perm]techadmin[/tmp] [tmp page_title][L]Administration[/L]: [cgi name=mv_data_table filter=entities keep=1] [L]table information[/L][/tmp] [tmp page_banner][calc]$Config->{CatalogName}[/calc] [L]table information[/L] [if cgi mv_data_table]([cgi name=mv_data_table filter=entities keep=1])[/if][/tmp] [set ui_class]Admin[/set] [tmp help_name]genconfig.main[/tmp] [tmp icon_name]icon_config.gif[/tmp] @_UI_STD_HEAD_@

[perl tables="[list-databases] __UI_META_TABLE__"] my @tables; if($CGI->{mv_data_table}) { @tables = split /[\s,\0]+/, $CGI->{mv_data_table}; } else { @tables = sort keys %{$Config->{Database}}; } my $mdb = $Db{__UI_META_TABLE__}; my %ignore; my @ignore = qw/ Class db_file db_file_extended db_file_extended db_text dir DSN dsn_id Exists_handle EXTENDED file _Insert_h name Object Read_only type Update_handle /; @ignore{@ignore} = @ignore; my %typemap = ( 1 => 'DBM/Memory, auto-detect delimiter', 2 => 'DBM/Memory, LINE delimiter', 3 => 'DBM/Memory, %% delimiter', 4 => 'DBM/Memory, CSV delimiter', 5 => 'DBM/Memory, PIPE delimiter', 6 => 'DBM/Memory, TAB delimiter', 7 => 'This should never appear (old Msql)', 8 => 'DBI/SQL', 9 => 'LDAP', ); my $tcount = 0; for (@tables) { my $tname = $_; my $rclass = ($tcount++ % 2) ? 'rownorm' : 'rowalt'; my $tinfo = ''; if($mdb and $mdb->record_exists($tname) ) { $tinfo = $mdb->field($tname, 'label'); if($tinfo) { $tinfo .= "
($tinfo)"; } } my $ref = $Config->{Database}{$_}; my $class = $ref->{Class}; my $file = $ref->{file}; my $dfile = ($class eq 'DBI' ? $ref->{db_file_extended} : $ref->{db_file}); my $dfn = $dfile; $dfile =~ s:^$Config->{ProductDir}/::o; my $dir = $ref->{DIR} || $Config->{ProductDir}; my %delim_map = ( "|" => 'PIPE', "\t" => 'TAB', "\n" => 'LINE', ); my $delim; $delim = $ref->{delimiter}; $delim = $delim_map{$delim} || $delim; my $type = $typemap{$ref->{type}}; $type .= " DSN=$ref->{DSN}" if $ref->{DSN}; my $fn = "$dir/$file"; $file .= "
`mod date: " . $Tag->file_info( { name => $fn, date => 1 } ); $file .= "
file size: " . $Tag->file_info( { name => $fn, size => 1 } ); $file .= "`"; $dfile .= "
(not significant for DBI types)" if $class eq 'DBI'; $dfile .= "
`mod date: " . $Tag->file_info( { name => $dfn, date => 1 } ); $dfile .= "
file size: " . $Tag->file_info( { name => $dfn, size => 1 } ); $dfile .= "`"; my $obj = $ref->{Object}; $out .= <<EOF;
$tname$tinfo
Type | $type
Class | $class
Directory | $dir
Text File | $file
DB File | $dfile
EOF $out .= <<EOF if $delim;
Delimiter | $delim
EOF $out .= <<EOF;
Parameters
EOF for(sort keys %{$ref}) { next if $ignore{$_}; my $key = $_; my $r = $ref->{$_}; my $o = <<EOF;
$_ | EOF if(! defined $r) { $o .= "undef"; } elsif(ref($r) =~ /^ARRAY/) { my $t = join " ", @$r; $o .= $t || ' '; } elsif(ref($r) =~ /^HASH/) { my $t = ''; for(sort keys %$r) { if (! defined $r->{$_} and $key eq 'NUMERIC') { $t .= "$_ "; next; } $t .= "$_ --> $r->{$_} "; } $o .= $t || ' '; } elsif(! defined $r) { $o .= " "; } elsif(! length($r)) { $o .= " "; } else { $o .= $r; } $o .= <<EOF;
EOF $out .= $o; } $out .= <<EOF; EOF } return $out; [/perl]

@_UI_STD_FOOTER_@