<{if $viewType eq 'input'}>
	<input type="file" name="<{$fileName}>" size="50">
	<{if empty($value) && $fileId=="none"}>
		<input type="hidden" name="<{$fieldName}>" value="">
	<{else}>
		<{if !empty($fileInfo)}>
			<{foreach item=file from=$fileInfo}>
				<br><{$file.original_file_name}>(<{$file.file_size}> Bytes)
			<{/foreach}>
			<br><input class="formButton" type="button" name="btnDel" value="<{$smarty.const._MD_XOONIPS_ITEM_DELETE_BUTTON_LABEL}>" onclick="<{$dirname}>Edit.deleteFile('<{$fieldName}>', '<{$fileId}>');"/>
			<input type="hidden" name="<{$fieldName}>" value="<{$fileId}>">
		<{/if}>
	<{/if}>
<{elseif $viewType eq 'confirm'}>
	<{if empty($value) && $fileId=="none"}>
		<input type="hidden" name="<{$fieldName}>" value="">
	<{else}>
		<{if !empty($fileInfo)}>
			<{foreach item=file from=$fileInfo}>
				<{$file.original_file_name}><br />
				<table>
					<tr>
						<td><{$smarty.const._MD_XOONIPS_ITEM_TYPE_LABEL}></td>
						<td>:<{$file.mime_type}></td>
					</tr>
					<tr>
						<td><{$smarty.const._MD_XOONIPS_ITEM_SIZE_LABEL}></td>
						<td>:<{if intval($file.file_size) >= 1024 * 1024}><{$file.file_size/1048576|string_format:"%01.1f MB"}>
							<{elseif intval($file.file_size) >= 1024}><{$file.file_size/1024|string_format:"%01.1f KB"}>
							<{else}><{$file.file_size|string_format:"%d bytes"}><{/if}></td>
					</tr>
					<tr>
						<td><{$smarty.const._MD_XOONIPS_ITEM_LAST_UPDATED_LABEL}></td>
						<td>:<{$file.timestamp|date_format}></td>
					</tr>
				</table>
			<{/foreach}>
			<input type="hidden" name="<{$fieldName}>" value="<{$fileId}>">
		<{/if}>
	<{/if}>
<{elseif $viewType eq 'detail'}>
	<{if !empty($fileInfo)}>
		<{foreach item=file from=$fileInfo}>
			<{$file.original_file_name}><br />
			<table>
				<tr>
					<td><{$smarty.const._MD_XOONIPS_ITEM_TYPE_LABEL}></td>
					<td>:<{$file.mime_type}></td>
					<{if $display}>
					<td rowspan="4" style="vertical-align:middle;">
					<{else}>
					<td rowspan="4" style="vertical-align:middle;display:none">
					<{/if}>
					<span class="<{$dirname}>_no_print_span">
						<a href="<{$xoops_url}>/modules/<{$dirname}>/download.php?file_id=<{$fileId}>"
						onfocus="<{$dirname}>Edit.changeDownloadButton('focus','<{$fileId}>')"
						onblur="<{$dirname}>Edit.changeDownloadButton('blur','<{$fileId}>')"
						onmousedown="<{$dirname}>Edit.changeDownloadButton('down','<{$fileId}>')"
						onmouseover="<{$dirname}>Edit.changeDownloadButton('over','<{$fileId}>')"
						onmouseout="<{$dirname}>Edit.changeDownloadButton('out','<{$fileId}>')"
						onkeypress="<{$dirname}>Edit.changeDownloadButton('down','<{$fileId}>')"
						<{if $file.notify}>
							onclick="return xoonipsDownloadConfirmation('<{$fileId}>')"
						<{/if}>
					></span>
					<{if $file.limit}>
						<img src="<{$xoops_url}>/modules/<{$dirname}>/iconbutton.php?label=download&amp;mode=normal" alt="<{$smarty.const._MD_XOONIPS_ITEM_DOWNLOAD_LABEL}>" id="<{$dirname}>_download_button_<{$fileId}>"/>
					<{/if}>
					</td>
				</tr>
				<tr>
					<td><{$smarty.const._MD_XOONIPS_ITEM_SIZE_LABEL}></td>
					<td>:<{if intval($file.file_size) >= 1024 * 1024}><{$file.file_size/1048576|string_format:"%01.1f MB"}>
						<{elseif intval($file.file_size) >= 1024}><{$file.file_size/1024|string_format:"%01.1f KB"}>
						<{else}><{$file.file_size|string_format:"%d bytes"}><{/if}></td>
				</tr>
				<tr>
					<td><{$smarty.const._MD_XOONIPS_ITEM_LAST_UPDATED_LABEL}></td>
					<td>:<{$file.timestamp|date_format}></td>
				</tr>
				<tr>
					<td><{$smarty.const._MD_XOONIPS_ITEM_DOWNLOAD_COUNT_LABEL}></td>
					<td>: <{$file.download_count}></td>
				</tr>
			</table>
			<br />
			<{$smarty.const._MD_XOONIPS_ITEM_TOTAL_DOWNLOAD_COUNT_SINCE_LABEL}><{$file.timestamp|date_format}> : <{$file.download_count}><br />
		<{/foreach}>
	<{/if}>
<{elseif $viewType eq 'search'}>
	<input type="text" name="<{$fieldName}>" size="50" value="">
<{elseif $viewType eq 'fileUpload'}>
	<{if empty($value) && $fileId!="none"}>
		<input type="text" id="<{$dirname}>_fileId" name="<{$fieldName}>" value="<{$fileId}>">
	<{/if}>
<{elseif $viewType eq 'default'}>
	<input type="hidden" name="default_value" value="<{$value}>" />
<{/if}>