<table class="sgrid" width="100%" align="center">
    <tr><td>{?if $mode=='ftp'?}<span class="red">当前附件目录为 FTP服务器目录</span>{?else?}<span class="green">当前附件目录为 本地目录</span>{?/if?}</td></tr>
</table>
<br>
<form method="post" name="checkform" id="checkform">
<input name="checkaction" type="hidden" value="delete">
<table class="grid" width="100%" align="center" id="imgPreview">
	<tr align="center" valign="middle">
		<th width="50"><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; }"></th>
		<th>文件名</th>
		<th width="100">大小</th>
		<th width="200">修改时间</th>
	</tr>
	<tr><td></td><td colspan="3">当前目录：{?$fileurl?}</td></tr>
	{?if $dir!=''?}<tr><td></td><td colspan="3"><img src="{?$saxue_skin_server?}/ext/folder_open.gif" align="absmiddle"/>&nbsp;<a href="{?$parentdir?}">上一层目录</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 colspan="4" class="foot">
			<input type="button" value="删除" class="button" onclick="javascript:if(confirm('确定要删除选中附件吗？如果附件已使用会导致信息图片无法显示')){ this.form.submit();}">
		</td>
	</tr>
</table>
</form>
<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>
