<%@ Page Inherits="Dvbbs.bbs.UI.Admin.admin_upimg" %>
<html>
	<head>
		<title>上传图片</title>
		<script language="javascript">
function chkPost()
{
	var allowTypes = ".gif|.jpg|.jpeg";
	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;
}
		</script>
	</head>
	<body style="background:#EEF7FD ;MARGIN:0px;OVERFLOW:hidden;TEXT-ALIGN:left" oncontextmenu="return false">
		<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>
								<form id="uploadform" action="admin_upimg.aspx" method="post" runat="server">
								<span style="font-size:12px">存放路径:</span>
								    <input type="text" id="savepath" runat="server" name="savepath" width="30px">
									<input type="file" id="upfile" runat="server" NAME="upfile"> 
									<input type="submit" value="上传" onclick="return chkPost();" ID="Submit1"	NAME="Submit1" runat="server">
								</form>
							</td>
						
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</TABLE>
	</body>
</html>
