⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 box_upload.jsp

📁 基于jsp的网络百宝箱
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GB18030" import="java.sql.*,java.util.*,java.io.*"%>
<%@ include file="config.ini"%>
<%@ include file="readlogin.jsp"%>
<%
String iCanroot=dirPath.replace('\\','/');
long userBoxSize=0;
File userBox=new File(iCanroot+"box/"+iCan);
File userBoxfile[]=userBox.listFiles();
for(int i=0;i<userBoxfile.length;i++)
  {
    if(userBoxfile[i].isFile())
    {
      userBoxSize=userBoxSize+userBoxfile[i].length();
    }
  }
if(userBoxSize>=50000000)
{
   out.print("<script>");
   out.print("alert('您的储藏箱已满,不能再上传文件!');");
   out.print("location.href='box.jsp';");
   out.print("</script>");
}
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<%@ include file="head.jsp"%>
</head>

<body>
<center>
<table border="0" width="768" id="table1" cellspacing="0" cellpadding="0">
	<tr>
	<%@ include file="top.jsp"%>
	</tr>
	<tr>
		<td width="90" valign="top">
	<%@ include file="menu.jsp"%>		</td>
		<td width="588" valign="top">
		<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
			<tr>
				<td>
				<table border="1" width="100%" id="table4" bordercolorlight="#0A9EE4" cellspacing="0" cellpadding="5" bordercolordark="#0A9EE4">
					<tr>
						<td>
						<table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0">
							<tr>
								<td>
								<table border="0" width="100%" id="table6" cellspacing="0" cellpadding="0">
									<tr>
										<td valign="bottom" width="50%">
										</td>
										<td width="50%">
										<img src="images/n-box.jpg" align="right"></td>
									</tr>
								</table>
								</td>
							</tr>
							<tr>
								<td><hr noshade color="#0A9EE4" size="1"></td>
							</tr>
							<tr>
								<td><FORM METHOD="POST" ACTION="box_upload_do.jsp" ENCTYPE="multipart/form-data">
								<table border="0" width="100%" id="table7" cellspacing="0" cellpadding="0">
									<tr>
										<td> </td>
									</tr>
									<tr>
										<td height="35">
										<p align="center">
										<span style="font-size: 9pt">文件1:<input type="FILE" name="FILE1" size="30" style="border: 1px solid #0A9EE4" tabindex="1"></span></td>
									</tr>
									<tr>
										<td height="35">
										<p align="center">
										<span style="font-size: 9pt">文件2:<input type="FILE" name="FILE2" size="30" style="border: 1px solid #0A9EE4"></span></td>
									</tr>
									<tr>
										<td height="35">
										<p align="center">
										<span style="font-size: 9pt">文件3:<input type="FILE" name="FILE3" size="30" style="border: 1px solid #0A9EE4"></span></td>
									</tr>
									<tr>
										<td height="35">
										 </td>
									</tr>
									<tr>
										<td height="35">
										<p align="center"><input type="submit" name="Submit" style="border: 1px solid #156FC7" value="上传">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="button" value="返回" name="B2" style="border: 1px solid #156FC7" onclick="javascript:location.href='box.jsp';"></td>
									</tr>
								</table></FORM>
								</td>
							</tr>
							<tr>
								<td height="16">
								<p style="line-height: 150%">
								<span style="font-size: 9pt">说明:<br>
&nbsp;&nbsp;&nbsp; 1、您一次最多上传3个文件;<br>
&nbsp;&nbsp;&nbsp; 2、为了安全起见,只允许上传rar和zip压缩包文件,请您在上传非rar或zip文件前将其打包后再上传;<br>
&nbsp;&nbsp;&nbsp; 3、单个文件最大容量为5MB。</span></td>
							</tr>
							<tr>
								<td> </td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
		<td width="90"> </td>
	</tr>
	<tr>
		<td width="90" valign="top">
	 </td>
		<td width="588" valign="top">
<%@ include file="copyright.jsp"%>
		</td>
		<td width="90"> </td>
	</tr>
</table>
<p>
</center>
</p>
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -