[L]Table[/L] [value mv_data_table]: [L]Upload/Download/Export[/L]

[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]
[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]

[title-bar][L]Table[/L] [value mv_data_table]: [L]Upload/Download/Export[/L][/title-bar]

[L]Edit Menu for table[/L] [value mv_data_table]
[scratch menu]

[rotate-database] [set Export] mvc_export_database=1 mv_nextpage=@@MM_BASE@@/export mvc_data_field= [/set] [title-bar][L]Export[/L][/title-bar] [L]Export as[/L]
[L]Export to file[/L]
([L]leave empty for default file[/L])
[if-mm advanced add_field] [set Export and add field] mvc_export_database=1 mv_nextpage=@@MM_BASE@@/add_field [/set] [set Export and delete field] mv_data_function=delete mv_nextpage=@@MM_BASE@@/delete_field [/set] [title-bar][L]Add or delete field[/L][/title-bar] [L]Field name[/L]:
[/if-mm] [set name=mvc_data_file interpolate=1][dbinfo table="[value mv_data_table]" attribute=file][/set] [if type=explicit compare="[value-extended name=upload_file test=isfile]"] [title-bar][L]Uploaded file[/L] [value mvc_data_file]: [value-extended name=upload_file outfile="upload/[value mvc_data_file]" yes=Succeeded no=FAILED ][/title-bar]

[/if] [title-bar][L]Restore or use new database text source file[/L][/title-bar] [check-upload file="[scratch mvc_data_file]"] [if type=file term="products/[scratch mvc_data_file]+"] [set name="Rotate in new database" int] mvc_rotate_database=[cgi mvc_data_file] [/set]
[else][L]No new files available[/L][/else] [/if] [if type=file term="products/[scratch mvc_data_file]-"] [set name="Return to saved database" int] mvc_rotate_database=[scratch mvc_data_file] mvc_rotate_direction=unsave [/set] [else]
[L]No saved files available[/L][/else] [/if]

[if scratch mvc_data_file] [title-bar][L]Upload new database text source file[/L][/title-bar]
ASCII Binary [/if] [if-mm advanced journal_update] [title-bar 400 5][L]Upload updates text file[/L][/title-bar]
Update only Add records
ASCII Binary
[if type=file term="upload/[value mv_data_table].update"] [check-upload file="[value mv_data_table].update" same=1] [/if] [if type=file term="upload/[value mv_data_table].add"] [check-upload file="[value mv_data_table].add" same=1] [/if] [if type=file term="products/[value mv_data_table].update"] [tag op="flag write" interpolate=1][value mv_data_table][/tag] [import-fields table="[value mv_data_table]" move=1] [/if] [if type=file term="products/[value mv_data_table].add"] [tag op="flag write" interpolate=1][value mv_data_table][/tag] [import-fields table="[value mv_data_table]" file="products/[value mv_data_table].add" move=1 add=1] [/if] [/if-mm]

[L]Edit Menu for table[/L] [value mv_data_table]
[scratch menu]