AutoVariable <<EOF
	DefaultShipping
	DescriptionField
	ImageDir
	ImageDirSecure
	MailOrderTo
	PriceField
	ProductFiles
	ProductDir
	SecureURL
	VendURL
EOF

ifdef @UI

UserDB ui database   access
UserDB ui crypt      1
UserDB ui bcrypt     1
UserDB ui promote    1
UserDB ui cost       13
UserDB ui bcrypt_pepper  __BCRYPT_PEPPER__
UserDB ui time_field last_login
UserDB ui admin 1
UserDB default admin 0

ParseVariables Yes

ActionMap ui_download <<EOR
sub {
	my $status;
	$CGI->{mv_nextpage} =~ s:^ui_download/::;
	$CGI->{mv_nextpage} .= $Session->{extension};
	if($Tag->if_mm('files', $CGI->{mv_nextpage}) ) {
		# Take care of MSIE brain damage
		if($Session->{browser} =~ /msie/i) {
			$Document->header("Content-type: application/x-foolmsie");
		}
		else {
			$Document->header("Content-type: application/octet-stream");
		}
		$Document->hot(1);
		HTML ( $Tag->file($CGI->{mv_nextpage}) );
		$status = 0;
	}
	else {
		my $file = $Tag->filter('encode_entities', $CGI->{mv_nextpage});
		$Scratch->{ui_error} = "Not authorized for file $file";
		$CGI->{mv_nextpage} = '__UI_BASE__/error';
		$status = 1;
	}
	return $status;
}
EOR

endif
