[if session arg] [value scratch=1 name=mvc_data_table set="[data session arg]" hide=1] [/if] [if-mm !tables] [bounce href="[area @@MM_BASE@@/violation]"] [/if-mm] [if-mm advanced add_delete] [else] [bounce href="[area @@MM_BASE@@/violation]"] [/else] [/if-mm]
[title-bar size=2][page index]__COMPANY__[/page][/title-bar] [set [L]Add[/L]] [calc] my $type = $CGI->{mvc_data_field_type}; my $size = $CGI->{mvc_data_field_size}; my $index = $CGI->{mvc_data_field_index}; $size =~ s/^[\s\0]+//; $size =~ s/\0.*//; if(! $index) { $index = ""; } else { $index = "DEFAULT '' NOT NULL, index($CGI->{mvc_data_field})" } if(! $type) { $type = 'CHAR'; } if(! $size and $type =~ /(?:var)?char/i) { $size = '(128)'; } $CGI->{mvc_data_field} .= " $type$size $index"; $CGI->{mvc_data_field} =~ s/\s+$//; $CGI->{mvc_data_field} =~ s/^\s+//; $Values->{mvc_data_field} = $CGI->{mvc_data_field}; return; [/calc] mvc_export_database=1 mv_nextpage=@@MM_BASE@@/add_field [/set] [title-bar][L]Table[/L] [value mv_data_table]: [L]Add column[/L][/title-bar]

[L]Name[/L]: |
[try] [perl tables="[value mvc_data_table]"] my $db; return unless $db = $Sql{$Values->{mvc_data_table}}; my $info = $db->type_info_all() or return; my $ptr = shift @$info; my $out = < | [L]Type[/L]: |
[L]Size[/L]: |
[L]Index[/L]: |
EOF $Values->{SQLmenu} = $out; [/perl] [/try] [perl tables="[value mvc_data_table]"] return if $Values->{SQLmenu}; return unless $Sql{$Values->{mvc_data_table}}; return(< | [L]Type[/L]: |
[L]Size[/L]: |
[L]Index[/L]: |
EOF [/perl]

[set [L]Delete[/L]] mv_data_function=delete mv_nextpage=@@MM_BASE@@/delete_field [/set] [title-bar][L]Table[/L] [value mv_data_table]: [L]Delete column[/L][/title-bar]

[L]Name[/L]: |

[loop list="[value mv_data_table]"]

[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] | [if-mm advanced search] [title-bar 200 2][L]Search by keyword for records[/L][/title-bar] [if type=explicit compare="[calc] q{[dbinfo table='[value mv_data_table]' attribute=type]} eq '8'; [/calc]"] [elsif type=file term="products/[value mv_data_table].ks"] [/elsif] [else] [/else] [/if] [/if-mm]
[scratch menu]

[/loop]