__MM_STYLE__
[title-bar size=2][page index]__COMPANY__[/page][/title-bar] [if session arg] [seti arg][data session arg][/seti] [elsif value select_code] [seti arg][value select_code][/seti] [value name=select_code set=""] [/elsif] [else] [set arg][/set] [/else] [/if] [calc] $Config->{NoSearch} = ''; [/calc] [if !scratch arg] [seti arg][value name="[value mvc_data_key_name]"][/seti] [value name="[value mvc_data_key_name]" set=""] [/if] [if cgi mv_data_table] [value name=mvc_data_table set="[value mv_data_table]" hide=1] [else] [value name=mv_data_table set="[value mvc_data_table]" hide=1] [/else] [/if] [if-mm !tables] [bounce href="[area @@MM_BASE@@/table_violation]"] [/if-mm] [if scratch arg] [if-mm function=keys name="[scratch arg]"] [else][bounce href="[area @@MM_BASE@@/key_violation]"][/else] [/if-mm] [/if] [perl tables="[value mv_data_table]"] my $table = $Values->{mv_data_table}; $Values->{mvc_data_key_name} = $Db{$table}->config('KEY'); if ($table ne $Values->{mv_data_table}) { $Values->{mv_data_table} = $table; } $Values->{mvc_data_fields} = $CGI->{mvc_data_fields} || $Values->{"$table:mvc_data_fields"} || '' ; if($table eq delete $Values->{mvc_auto_export}) { return "[set name=export_ok int][tag export $table][/tag][/set]"; } else { return '[set name=export_ok][/set]'; } [/perl] [if !scratch mm_frames] [loop list="[value mvc_data_table]"] [title-bar 500 6][L]Table[/L] [value mv_data_table][if scratch export_ok](exported)[/if][/title-bar]

[title-bar 200 2][L]Database Configuration[/L][/title-bar] [if-mm upload] [L]Upload new ASCII source[/L] [/if-mm] [if-mm journal_update] [L]Upload partial update file[/L] [/if-mm] [if-mm export] [L]Export to ASCII file[/L] [/if-mm] [if-mm advanced add_delete] [L]Add or delete column[/L] [/if-mm] [L]Edit menu[/L] [L]Main menu[/L] | [title-bar 200 2][L]Another Key[/L][/title-bar] [if value mvc_dbedit_autoshow] [/if]

[/loop] [/if] [title-bar size=5][scratch arg][/title-bar] [if scratch mm_failure] [LC] Failed: [/LC] [scratch mm_failure][set mm_failure][/set]
[/if] [set process_filter] [perl] my @filters = grep /^mm_filter:/, keys %$CGI; return unless @filters; foreach my $key (@filters) { my $val = delete $CGI->{$key}; $key =~ s/mm_filter://; next unless $val; next unless defined $CGI->{$key}; $CGI->{$key} = $Tag->filter($val, $CGI->{$key}, $key); } return; [/perl] [/set] [if-key-exists table="[value mv_data_table]" key="[scratch arg]"] [L]Update[/L] [L]Insert[/L] [L]Delete[/L] [L]Yes, delete[/L] [else] [L]Update[/L] [L]Insert[/L] [/else] [/if-key-exists]

[L]Column[/L] | [L]Value[/L]
--- | ---
[seti extra_tables] [query list=1 sql="SELECT DISTINCT db FROM __MINIMATE_META__" table="__MINIMATE_META__"] [sql-code] [/query] [/seti] [mvasp tables="[scratch extra_tables] [value mv_data_table] __MINIMATE_META__ __MINIMATE_TABLE__"] <% my $table = $Values->{mv_data_table}; my $db = $Db{$table}; my $key = $Scratch->{arg}; my (@cols) = split /\s+/, $Tag->db_columns( { name => $table, columns => $Values->{mvc_data_fields}, }); my $super = $Tag->if_mm('super'); #my $super = $Scratch->{is_super}; if($db->record_exists($key)) { #Log("Should work. key=$key table=$table"); } else { $CGI->{$Values->{mvc_data_key_name}} = $key; undef $key; Log("key is undeffed."); } foreach my $col (@cols) { my $label = $Tag->field_label($table, $col); my $meta = ''; if($super) { $meta .= '
'; $meta .= $Tag->page('@@MM_BASE@@/format_meta', "${table}::$col"); $meta .= '[L]meta[/L]'; } my $display = $Tag->display({ table => $table, column => $col, key => $key, }); $Document->write(< | $label$meta | $display EOF } %> [/mvasp]

[calc] my $check = $Values->{mvc_data_fields} || $Tag->db_columns(); return if $check =~ /\b$Values->{mvc_data_key_name}\b/; my $name = $Values->{mvc_data_key_name}; my $val = $Scratch->{arg}; $val =~ s/"/"/g; return qq{}; [/calc]
[if-mm export] [if !value mvc_too_large] [L]Auto-export[/L] [/if] [/if-mm]

[if-mm advanced display_configure] [title-bar 400 2][L]Limit fields to display (changes above will not be made)[/L][/title-bar] [set name=mvc_data_fields_name int][value mv_data_table]:mvc_data_fields[/set]

[if-mm advanced spreadsheet] Column width [L](spreadsheet only)[/L] | [else] |  | [/else] [/if-mm] | [set Display All Fields][scratch mvc_data_fields_name]= mv_todo=return mv_nextpage=@@MV_PAGE@@ [/set] [widget name="[scratch mvc_data_fields_name]" type="checkbox left 2" data="=ALL,[db-columns joiner=',']" ] [/widget]
[if-mm advanced spreadsheet]
[L]Number of rows[/L] [L](spreadsheet only)[/L] |
[/if-mm] [if-mm advanced entities]
[L]Decode HTML entities[/L] |
[/if-mm]

[/if-mm] [value name=mvc_data_fields set=""]