@_UI_STD_INIT_@[set page_title][L]Upload File[/L][/set] [set page_banner][L]Upload File[/L][/set] [set ui_class]Content[/set] [set page_perm]files[/set] [set icon_name]icon_config.gif[/set] [if-mm function="!files" name="[data session arg]"] [seti ui_error][msg arg.0="[data session arg]"]Not authorized to upload file %s.[/msg][/seti] [bounce page="__UI_BASE__/error"] [/if-mm] @_UI_STD_HEAD_@
[return-to][comment]This passes the right form vars for return processing[/comment] [set existing][/set] [if type=explicit compare=`$CGI->{ui_image_preview} =~ m{[^/]$}`] [set existing]1[/set] [/if]
[if type=explicit compare=`$Session->{arg} =~ m{[^/]$}`] Uploading file [data session arg] [elsif session arg] Uploading file to [data session arg] [comment] File to upload
[/comment] [/elsif] [else] File to upload
[/else] [/if]
Preview:
Local file

Upload mode

[if session arg =~ /\.(gif|jpe?g|png)$/i] [or cgi ui_upload_binary]  ASCII
 Binary

[if scratch existing]  Use new file name
 Use existing file name [/if] [else]  ASCII
 Binary [/else] [/if]

[L]Backup mode[/L]

[if cgi ui_backup]  Back up
 NO backup [else]  Back up
 NO backup [/else] [/if]

[button text="[L]Upload[/L]" src="upload.gif"] [calc] if( $CGI->{ui_upload_newfn} or $CGI->{ui_upload_fn} =~ m:/$:) { my $image = $CGI->{ui_upload_file}; $image =~ s:.*[\\/]::; $CGI->{ui_upload_fn} =~ s:/[^/]*$:/:; $CGI->{ui_upload_fn} .= $image; $Session->{ui_message} = sprintf ("[L]Uploaded file: %s[/L]", $image); if($CGI->{ui_preload}) { my $pre = $CGI->{ui_preload} =~ /:/ ? $CGI->{ui_preload} : "$Values->{mv_data_table}:$CGI->{ui_preload}"; #Log("preloading $pre=$image"); $CGI->{ui_return_to} .= "\0ui_preload:$pre=$image"; #Log(qq{actual preload: CGI->{"ui_preload:$pre"} = $CGI->{"ui_preload:$pre"}}); } } $regex = q{@_UI_CONST_IMAGE_REGEX_@} || '\.(?:gif|jpe?g|png)$'; if( $CGI->{ui_upload_fn} =~ m{$regex}i) { $CGI->{ui_upload_umask} = '022'; } return; [/calc] [/button]

@_UI_STD_FOOTER_@