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

📄 del_from_db0.asp

📁 一个简单的上报系统!!适合中小型企业政府文件的上传下达要求
💻 ASP
字号:
<!--#INCLUDE FILE="data.asp" -->
<!--#INCLUDE FILE="mouse.js" -->

<%
set rs=server.createobject("ADODB.recordset") 
rs.Open "SELECT * FROM jhtdata Where ID is null",conn,1,3 
rs.addnew

application("downdir")="download/"
if Session("Ulogin")<>"yes" then
	Response.Redirect ("index.htm")
end if
ip= Request.ServerVariables("REMOTE_ADDR")
 nowtime=now()
sj=cstr(year(nowtime))+"-"+cstr(month(nowtime))+"-"+cstr(day(nowtime))+" "+cstr(hour(nowtime))+":"+right("0"+cstr(minute(nowtime)),2)+":"+right("0"+cstr(second(nowtime)),2)
%>
<!--#include FILE="upload_5xsoft.inc"-->
<%dim upload,file,formName,formPath,iCount
set upload=new upload_5xSoft ''建立上传对象
 	'--------将日期转化成文件名--------
	function MakedownName()
		dim fname
	  	fname = now()
		fname = replace(fname,"-","")
	 	fname = replace(fname," ","") 
		fname = replace(fname,":","")
	  	fname = replace(fname,"PM","")
	  	fname = replace(fname,"AM","")
		fname = replace(fname,"上午","")
	  	fname = replace(fname,"下午","")
	  	fname = int(fname) + int((10-1+1)*Rnd + 1)
		MakedownName=fname
	end function 
formPath="download/"
iCount=0
for each formName in upload.file ''列出所有上传了的文件
 set file=upload.file(formName)  ''生成一个文件对象
 if file.FileSize>0 then         ''如果 FileSize > 0 说明有文件数据
newname=MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)

  file.SaveAs Server.mappath(formPath&newname)   ''保存文件
  iCount=iCount+1
 else 
  response.write "未找到文件 &nbsp;&nbsp;<A HREF=javascript:history.back(1)>返回</A>"
  response.end
 end if
 set file=nothing
next



	rs("type") ="1"
	rs("真实姓名") =upload.form("Rname")
	rs("部门") = upload.form("Upart")
	rs("标题") = upload.form("biaoti")
	rs("内容") = upload.form("Rname")&"的上传文件"
	rs("链接") =application("downdir")&newname
	rs("IP")=ip
	rs("时间")=sj
	rs.Update
	rs.close
	Set rs=nothing
	Conn.Close
	Set Conn=nothing
%>
<link href="web.css" rel="stylesheet"  type="text/css">
<body>

<div align="center">
	<table border="0" width="513" cellspacing="0" cellpadding="0" height="248">
		<tr>
			<td height="60" width="48">
			<img border="0" src="images/topleft.gif" width="49" height="65"></td>
			<td height="60" width="429" background="images/topmid.jpg">
			<p align="center"><font size="2"><b><font color="#ffffff" size="3"> 
          <span class="font2">海魂高科文件上报系统V1.0<br>
          <br>
          <a href="index.htm"><font color="#FFFFFF">首页</font></a>&nbsp;<a href="register.asp"><font color="#FFFFFF">用户注册</font></a> 
          <a href="addfile.asp"><font color="#FFFFFF">上报文件</font></a> <a href="shouqu.asp"><font color="#FFFFFF">报文管理</font></a> 
          <a href="userchk.asp"><font color="#FFFFFF">用户管理</font></a>&nbsp; <a href="bk"><font color="#FFFFFF">网站留言</font></a></span> 
          </font></b></font></td>
			<td height="60" width="36">
			<img border="0" src="images/topright.gif" width="36" height="65"></td>
		</tr>
		<tr>
			<td width="513" colspan="3">
			<table border="0" width="513" cellspacing="0" cellpadding="0" height="111">
				<tr>
					<td width="4" bgcolor="#3366FF"> </td>
					<td width="504">
                       <table border="0" width="100%" height="138" cellspacing="0" cellpadding="0">
						<tr>
							<td> <TD bgColor=#efefef><font color="#FF0000"><b>文件已经成功上报,是否继续添加……</b></font><BR>
<P>上报人:<%=upload.form("Rname")%><BR>
<br>
单&nbsp;&nbsp;位:<%=upload.form("Upart")%><BR>
<br>
说&nbsp;&nbsp;明:<%=upload.form("biaoti")%><BR>
<P><P><b><A HREF="addfile.asp">继续添加</A></b>&nbsp;&nbsp;<b><A HREF="main.asp">返回主页</A></b></TD></td>
						</tr>
						</table>
						<%set upload=nothing  ''删除此对象
%>
					</td>
					<td width="5" bgcolor="#3366FF"> </td>
				</tr>
			</table>
			</td>
		</tr>
		<tr>
			<td height="45" width="48">
			<img border="0" src="images/footleft.jpg" width="49" height="45"></td>
			
      <td height="45" width="429" background="images/footmid.jpg"> <p align="center" class="font2"><font color="#FFFFFF" size="2">企业资料上报下载系统V1.0<br>
          </font><font color="#ffffff" size="1">Copyright&copy; 2004-2010. </font><a href="http://www.cocms.com"><font color="#FFFFFF">海魂高科</font></a><font color="#ffffff" size="1">. 
          All rights reserved.</font></td>
			<td height="45" width="36">
			<img border="0" src="images/footright.jpg" width="36" height="45"></td>
		</tr>
	</table>
</div>

</body>

</html>

⌨️ 快捷键说明

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