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

📄 senddateindb.asp

📁 企业办公自动化管理系统 asp+sql server 2005
💻 ASP
字号:
<!--#INCLUDE FILE="include/fupload.inc"-->
<!--#include file="include/opendb.asp"-->
<!--#include file="include/sqlstr.asp"-->
<!--#include file="include/checked.asp"-->
<!--#include file="include/bgsub.asp"-->
<%
'On Error Resume Next
oabusyname=request.cookies("oabusyname")
oabusysuid=request.cookies("oabusysuid")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusysuid="" then response.redirect "default.asp"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="css/css.css" type="text/css">
<title>企业管理系统</title>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<%
call bghead()
%>
<center>
<table>
<tr>
<td>
<b>公文发送</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<form action="senddate.asp" method="post" name="form1">
<td>
<input type="submit" value="返回">
</td>
</form>
</tr>
</table>
</center>
<%
call bgmid()
%>

<%
if Request.ServerVariables("REQUEST_METHOD") = "POST" Then
'---------------------------
'response.write "开始发送<br>"
'---------------------------
	Dim Fields
	'设定文件传送大小
	UploadSizeLimit=2000000
	Set Fields = GetUpload()
	
	dim Field
	
	For Each Field In Fields.Items
		if Field.name="title" then title=BinaryToString(Field.value)
		if Field.name="content" then content=BinaryToString(Field.value)
		if Field.name="sendto" then sendto=BinaryToString(Field.value)
		if Field.name="file1" then
			filename=field.FileName
			fileContentType=field.ContentType
			filevalue=field.value
		end if
	next
'--------------------------------------
'response.write "title=" & title & "<br>"
'response.write "content=" & content & "<br>"
'response.write "sendto=" & sendto & "<br>"
'response.write "filedname=" & filename & "<br>"
'response.write "fileContentType=" & fileContentType & "<br>"
'----------------------------------------
	dim mysendto
	mysendto=split(sendto,"|",-1,1)
	
	for each sendtoinf in mysendto
		userdeptpoint=InStr(sendtoinf,":")
		if userdeptpoint>0 then
			sendtoinflen=len(sendtoinf)
			recipientusername=right(sendtoinf,sendtoinflen-userdeptpoint)
			if recipientusername="所有人" then
				recipientusername="所有人"
			else
				suidpoint=Instr(recipientusername,"(")
				suidlen=len(recipientusername)
				recipientusername=left(recipientusername,suidlen-1)
				recipientusername=right(recipientusername,suidlen-1-suidpoint)
			end if
			recipientuserdept=left(sendtoinf,userdeptpoint-1)
			set conn=opendb()
			set rs=server.createobject("ADODB.recordset") 
			sql = "select * from a_senddate"
			rs.Open sql,conn,1,3
			rs.addnew 
			rs("title")=title
			rs("content")=content
			rs("sender")=oabusysuid
			rs("recipientusername")=recipientusername
			rs("recipientuserdept")=recipientuserdept
			if filename<>"" then
				rs("filename")=filename
				rs("fileContentType")=fileContentType
				rs("filevalue").appendchunk filevalue
			end if
			rs.update 
			rs.close 
			set rs=nothing 
			set conn=nothing 
		end if
	next
%>
<br><br>
<center>发送完成</center>
<%end if%>
<%
call bgback()
%>

</body>  
  
</html>  


⌨️ 快捷键说明

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