[calc] if($CGI->{mv_return_table}) { $CGI->{ui_return_to} = 'admin/item'; } $CGI->{mv_data_table} = $Config->{ProductFiles}[0]; $CGI->{ui_return_to} ||= '__UI_BASE__/item'; $Tag->tmpn('tmp_item_id'); $Scratch->{tmp_item_id} = $CGI->{item_id} || $CGI->{item_id_left}; $Scratch->{tmp_item_id} =~ s/\0.*// or $Scratch->{tmp_item_id} =~ s/,.*//; if ($CGI->{ui_new_item}) { $Scratch->{'item_label'} = '[L]New item[/L]'; } else { $Scratch->{'item_label'} = $Scratch->{tmp_item_id}; $CGI->{ui_hide_key} = 1; } return; [/calc] [if cgi ui_new_item] [loop list="__MV_ITEM_TABLES__"] [flag type=write table="[loop-code]"] [/loop] [perl tables="[cgi mv_data_table]"] my $db = $Db{$CGI->{mv_data_table}} or return; if ($CGI->{ui_clone_id}) { $CGI->{ui_clone_tables} = '__UI_CLONE_TABLES__' || '__UI_ITEM_TABLES__'; my $db = $Db{$CGI->{mv_data_table}} or return; return unless $db->record_exists($CGI->{ui_clone_id}); my $ref = $db->row_hash($CGI->{ui_clone_id}); $CGI->{ $db->config('KEY') } = $CGI->{item_id} if defined $CGI->{item_id}; @{$CGI}{ keys %$ref } = values %$ref; } return; [/perl] [/if] [set ui_class]Items[/set] [seti page_title][L]Item editor[/L]: [scratchd item_label][/seti] [set help_name]edit.item[/set] [set icon_name]icon_item.gif[/set] [tmp edit_item_msg] [if cgi ui_new_item] [msg]New item[/msg] [else] [msg arg.0="[scratch tmp_item_id]"]edit item %s[/msg] [/else] [/if] [/tmp] [if-mm super] [tmp page_banner][page href="__UI_BASE__/db_metaconfig" form=' ui_table=[cgi mv_data_table] ui_view=[cgi ui_meta_view] ui_return_to=__UI_BASE__/item mv_return_table=[cgi mv_data_table] start_at=extended.ui_data_fields '][L]Item editor[/L] [scratch edit_item_msg] [/tmp] [else] [tmp page_banner][L]Item editor[/L]: [msg arg.0="[cgi item_id]"]edit item %s[/msg][/tmp] [/else] [/if-mm] @_UI_STD_HEAD_@

[table-editor cgi=1 form_name=item_editor output_map="[scratch ui_style_edit]" ui_style="[scratch ui_style_edit]"] [if-mm super] [L]No meta display[/L] [/if-mm] @_UI_STD_FOOTER_@