<table width="100%" class="topmenu">
	<tr><td>
		<a href="attachs.php"><em>数据库模式</em></a><span>|</span>
		<a href="attachs_file.php?server=local"{?if $server=='local'?} class="on"{?/if?}><em>本地服务器</em></a><span>|</span>
		<a href="attachs_file.php?server=oss"{?if $server=='oss'?} class="on"{?/if?}><em>OSS服务器</em></a><span>|</span>
		<a href="attachs_file.php?server=ftp"{?if $server=='ftp'?} class="on"{?/if?}><em>FTP服务器</em></a>
	</td></tr>
</table>
<form name="frmsearch" method="post">
<input name="pagesize" id="pagesize" type="hidden" value="{?$Saxue.request.pagesize?}">
</form>
<form method="post" name="checkform" id="checkform">
<input name="pagesize" id="pagesize" type="hidden" value="{?$Saxue.request.pagesize?}">
<input name="dosubmit" type="hidden" value="1">
<table class="grid" width="100%" align="center" id="imgPreview">
	<tr align="center" valign="middle">
		<th width="50"></th>
		<th>文件名</th>
		<th width="100">大小</th>
		<th width="200">修改时间</th>
	</tr>
	<tr><td></td><td colspan="3">当前目录：{?$curpath?}</td></tr>
	<tr><td></td><td colspan="3"><img src="{?$saxue_skin_server?}/ext/folder_open.gif" align="absmiddle"/>&nbsp;<a href="?server={?$server?}">返回根目录</a></td></tr>
	{?if $dir!=''?}<tr><td></td><td colspan="3"><img src="{?$saxue_skin_server?}/ext/folder_open.gif" align="absmiddle"/>&nbsp;<a href="{?$parentpath?}">上一层目录</a></td></tr>{?/if?}
	{?section name=i loop=$dirlist?}
	<tr class="rowbg">
		<td></td>
		<td><img src="{?$saxue_skin_server?}/ext/folder.gif" align="absmiddle"/>&nbsp;<a href="{?$dirlist[i].dirurl?}">{?$dirlist[i].dirname?}</a></td>
		<td><目录></td>
		<td>{?$dirlist[i].dirtime?}</td>
	</tr>
	{?/section?}
	{?section name=i loop=$filelist?}
	<tr class="rowbg">
		<td><input type="checkbox" name="attachs[]" value="{?$dir?}{?$filelist[i].filename?}"></td>
		<td><img src="{?$filelist[i].fileicon?}" align="absmiddle"/>&nbsp;<a rel="{?$attachsurl?}{?$filelist[i].filename?}" href="{?$attachsurl?}{?$filelist[i].filename?}" target="_blank">{?$filelist[i].filename?}</a></td>
		<td>{?$filelist[i].filesize?} K</td>
		<td>{?$filelist[i].filetime?}</td>
	</tr>
	{?/section?}
	<tr>
		<td class="foot"><input type="checkbox" id="checkall" name="checkall" value="checkall" onclick="javascript: for (var i=0;i<this.form.elements.length;i++){ if (this.form.elements[i].name != 'checkkall') this.form.elements[i].checked = form.checkall.checked; }"></td>
		<td colspan="4" class="foot">
			<input type="button" value="批量删除附件" class="button" onclick="javascript:if(confirm('确定要删除选中附件吗？如果附件已使用会导致信息图片无法显示')){ this.form.submit();}">
		</td>
	</tr>
</table>
</form>
{?if $server=='oss'?}<table width="100%"><tr><td width="100%">
	<div class="fl pages">
		<ul>
			<li><span class="fl">每页显示:</span></li>
			<li{?if $Saxue.request.pagesize==20?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(20)">20</a></li>
			<li{?if $Saxue.request.pagesize==30?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(30)">30</a></li>
			<li{?if $Saxue.request.pagesize==50?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(50)">50</a></li>
			<li{?if $Saxue.request.pagesize==100?} class="selected"{?/if?}><a href="javascript:void(0)" onclick="setPage(100)">100</a></li>
		</ul>
	</div>
	<div class="fr pages"><ul><div class="pagelink"><a href="{?$thispage?}" class="cur">当前页</a>{?if $nextpage!=''?}<a href="{?$nextpage?}">下一页</a>{?/if?}</div></ul></div>
</td></tr></table>{?/if?}
<script type="text/javascript" src="{?$saxue_skin_server?}/lib/jquery.imgpreview.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var obj=$("#imgPreview a[rel]");
	if(obj.length>0) {
		$('#imgPreview a[rel]').imgPreview({
			srcAttr: 'rel',
			imgCSS: { border: '1px solid #ccc', padding: '2px' }
		});
	}
});	
</script>
