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

📄 senddateindb.asp

📁 红金羚v1.5办公自动化软件是基于大型数据库系统开发的应用系统
💻 ASP
字号:
<!--#INCLUDE FILE="asp/fupload.inc"-->
<!--#include file="asp/opendb.asp"-->
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/checked.asp"-->
<!--#include file="asp/bgsub.asp"-->
<%
function strlength(inputstr)
	dim length,i
	length=0
	for i=1 to len(inputstr)
		if asc(mid(inputstr,i,1))<0 then
			length=length+2
		else
			length=length+1
		end if
	next
	strlength=length
end function
On Error Resume Next
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then 
	response.write("<script language=""javascript"">")
	response.write("window.top.location.href='default.asp';")
	response.write("</script>")
	response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
<title>红孩儿Office管理系统</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="sendarticle.asp" method="post" name="form1">
<td>
<input type="submit" value="返回">
</td>
</form>
</tr>
</table>
</center>
<%
call bgmid()
if Request.ServerVariables("REQUEST_METHOD") = "POST" Then
	Dim Fields
	UploadSizeLimit=5000000
	Set Fields = GetUpload()
	dim Field
	For Each Field In Fields.Items
		if Field.name="title" then title=BinaryToString(Field.value)
		if Field.name="lb" then lb=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
	dim mysendto
	set conn=opendb("oabusy","conn","accessdsn")
	conn.begintrans
	mysendto=split(sendto,"|",-1,1)
	for each sendtoinf in mysendto
		userdeptpoint=InStr(sendtoinf,":")
		addflag=false
		if userdeptpoint>0 then
			sendtoinflen=len(sendtoinf)
			recipientusername=right(sendtoinf,sendtoinflen-userdeptpoint)
			recipientuserdept=left(sendtoinf,userdeptpoint-1)
			if recipientusername="所有人" then
				recipientusername="所有人"
				addflag=true
			elseif recipientusername<>"所有人" and instr(sendto,"|"&recipientuserdept&":所有人")<=0 then
				usernamepoint=Instr(recipientusername,"(")
				usernamelen=len(recipientusername)
				recipientusername=left(recipientusername,usernamelen-1)
				recipientusername=right(recipientusername,usernamelen-1-usernamepoint)
				addflag=true
			end if
			if addflag then
				set rs=server.createobject("ADODB.recordset") 
				sql = "select * from senddate"
				rs.Open sql,conn,1,3
				rs.addnew 
				rs("title")=title
				rs("documenttype")=lb
				rs("content")=content
				rs("sender")=oabusyusername
				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 
			end if
		end if
	next
	if err.number<>0 then
		conn.rollbacktrans
%>
<br><br>
<center><font color="#ee0000" size="+1">公文发送出错,请返回重试!</font></center>
<%
	else
		conn.committrans
%>
<br><br>
<center><font color="#ee0000" size="+1">公文发送成功!</font></center>
<%
	end if
end if
conn.close
set conn=nothing
%>
         </td>
            
          <td background="<%=imgpath%>images/j5.gif" width=19 height=280></td>
          </tr>
        </table>
    </tr>
    <tr>
      <td height=19>
        <table border="0" cellpadding="0" cellspacing="0" width="610" height="19">
          <tr>
            
          <td width=18 height=20><img border="0" src="<%=imgpath%>images/j6.gif" width="18" height="19"></td>
            
          <td background="<%=imgpath%>images/j7.gif" width=100% height=20></td>
            
          <td width="19" height="20"><img border="0" src="<%=imgpath%>images/j8.gif"></td>
          </tr>
		  <tr>
          <td width="100%" height=20 colspan="3"><center>-----<a href="http://office.11k.net/" target=_blank><font color="red">Red office v1.5</font></a>-----</center></td>
		  </tr>
        </table>
      </td>
    </tr>
  </table>
<%
%>
</body>  
</html>  


⌨️ 快捷键说明

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