<html>
<head>
<title>上传附件</title>
<link rel="stylesheet" type="text/css" href="<%=Fetch.CurrentSkinPath%>/style.css"/>
<script language="javascript">
function chkPost()
{
	var allowTypes = "<%=AllowTypes%>";
	var value = document.forms[0].upfile.value;
	if (value == '')
	{
		alert('请选择要上传的文件');
		return false;
	}
	var extension = value.substr(value.lastIndexOf('.')).toLowerCase(); 
	if (extension == '.exe')
	{
		alert('不要上传可执行程序(.exe)');
		return false;
	}
	var typeArray = allowTypes.split('|');
	var isFoundType = false;
	for (var i=0; i<typeArray.length; i++)
	{ 
		if (extension == typeArray[i].toLowerCase())
		{
			isFoundType = true;
			break;
		}
	}
	if (!isFoundType)
	{
		alert('只允许上传的文件类型为:\n\n' + typeArray.join(' '));
		return false;
	}
	return true;
}

function popAllowmentInfo(allowTypes){alert('允许类型: ' + allowTypes);};
</script>
</head>
<body style="margin:0;text-align:left;overflow:hidden;background:transparent;" oncontextmenu="return false">
<!--<table cellpadding="0" cellspacing="0" border="0" class="toptable" style="width:100%;height:100%" ID="Table1">-->
<table cellpadding="0" cellspacing="0" border="0" style="width:100%;height:100%" ID="Table1">
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="0" ID="Table2">
				<tr>
					<td>
<!-- {if (DisplayUploadForm)} -->
						<form id="uploadform" name="uploadform" method="post" action="attach_upload.aspx?boardid=<%=Boardid%>" enctype="multipart/form-data" runat="server" style="margin:0px">
							<!--<input type="file" id="upfile" runat="server" NAME="upfile" />-->
							<input style="height:18px;" onmouseover="this.className='button_on'" onmouseout="this.className='button_off'" type="file" id="upfile" class="button_off" runat="server" NAME="upfile" />
							<input type="submit" id="reset"  class="button_off" value="上传" onclick="return chkPost();" onmouseover="this.className='button_on'" onmouseout="this.className='button_off'" ID="Submit1" NAME="Submit1"/>
						</form>
<!-- {endif} --> 
					</td>
					<td nowrap="nowrap"><span style="font-size:12px"><%=OutputText%></span></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</table>
</body>
</html>