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

📄 save.asp

📁 功能非常强大的一款办公自动化软件原代码,其中的文档签收功能特别实用.不相信下下来看下.
💻 ASP
字号:
<%
mrecordid=request("recordid")
mfiletype=request("filetype")
mfiledate=request("filedate")
mfilename=request("filename")
msubject=request("subject")
musername=request("username")
maddnew=request("addnew")
dim conn,ptr
     connstr="DBQ="+server.mappath("data.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" 
     set conn=server.createobject("ADODB.CONNECTION")
     	 		 conn.open connstr
			sql="select * from document where recordid='"+ mrecordid +"'"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,1,3
			if rs.eof then
				rs.addnew
				end if
		   Rs("recordid")=request("recordid")
     Rs("filename")=request("filename")
     Rs("filetype")=request("filetype")
     Rs("filedate")=request("filedate")
     Rs("username")=request("username")
     rs("subject")=request("subject")
      rs.update
	  rs.close
	  set rs=nothing	
%>
<html>
<head>
<title>save</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language=javascript>
function uploadfile(){
maddnew="<%=maddnew%>"
ftpip="192.168.0.7";
port="21"
username="administrator";
password="";
if (maddnew=="newdoc")
{
localfile="c:\\template.doc";
}
else
{
localfile="<%=mfilename%>";
localfile="c:\\"+localfile;
}
remotefile="/"+"<%=mfilename%>";
cc=web.uploadfile(ftpip,port,username,password,localfile,remotefile)
if (cc){
alert("文件保存成功!")
web.delfile(localfile)
document.location="index.asp  "
}
else {
alert("文件保存失败!")
}

}

</script>
<body onload="uploadfile()">
<object width="426" height="32" codebase="web.ocx" id="web" classid="clsid:8C9AA244-AC33-47F9-8968-CC114654A6EC">
      </object>

</body>
</html>

⌨️ 快捷键说明

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