<h1 class="align-center">Downloads</h1>
<{* トップのカテゴリ選択リストの表示 *}>
<div class="box blue">
	<form name="cid_select" action="<{$mod_url}>/index.php?cid=<{$cid}>" method="get" style="margin:0px;text-align:center;">
		<select name="cid" onchange="submit();">
			<option value=""><{$lang_directcatsel}></option>
			<{html_options options=$category}><br />
		</select> &nbsp; &nbsp;
		<{$download_total_num}>
		<{if $module_admin && $invisible_num}>
			<{$invisible_link}>
		<{/if}>
		<{if $module_admin && $broken_num}>
			<{$broken_link}>
		<{/if}>
		<{if $module_admin && $unapproval_num}>
			<{$unapproval_link}>
		<{/if}>
	</form>
</div>

<{include file="db:`$mydirname`_inc_viewcat.html"}>

<{if $mod_config.top_message}>
	<div class="d3downloads_top_message">
		<{$mod_config.top_message}>
	</div>
<{/if}>

<{*管理者向けの設定*}>
<{if $module_admin || $category_for_post}>
<br />
	<form name="for_admin" action="<{$mod_url}>/index.php" method="post">
		<div class="box white">
			<div class="row align-center">
			<{if $module_admin || $category_for_post}>
				<div class="one fourth half-padded">
					<select name="category_select" id="category_select" class="wmax">
						<option value=""><{$lang_directcatsel}></option>
							<{html_options options=$category_for_post}>
					</select>
				</div>
				<div class="one fourth half-padded">
					<input type="submit" class="d3downloads_submit wmax asphalt" name="file_post" value="<{$smarty.const._MD_D3DOWNLOADS_NEWSUBMIT}>" />
				</div>
				<{/if}>
			<{if $module_admin}>
				<div class="one fourth half-padded">
					<input type="submit" class="d3downloads_submit wmax green" name="cat_edit" value="<{$smarty.const._MD_D3DOWNLOADS_CAT_EDIT}>" />
				</div>
				<div class="one fourth half-padded">
					<a href="<{$mod_url}>/admin/index.php?page=categoryedit&amp;cid=0"><input type="button" class="pink wmax" value="<{$smarty.const._MD_D3DOWNLOADS_ADMIN_NEWCATEGORY}>"></a>&nbsp;&nbsp;
				</div>
			<{/if}>
			</div>
		</div>
	</form>
<{/if}>

<{if $file}>
	<h4 class="d3downh4"><{$smarty.const._MD_D3DOWNLOADS_LATESTLIST}></h4>
<{/if}>
<{if $file}>
	<!-- Start new link loop -->
	<{foreach from=$file item=fdata}>
		<{include file="db:`$mydirname`_inc_download.html" down=$fdata}>
	<{/foreach}>
	<!-- End new link loop -->
<{else}>
	<{$smarty.const._MD_D3DOWNLOADS_NOMATCH}>
<{/if}>

<hr class="notification" />

<{include file='db:system_notification_select.html'}>