📄 u_sendmessage.asp
字号:
<%@ Language="VBScript" %>
<!-- #include file="../u_menu.asp" -->
<!-- #include file="msg_common.inc" -->
<%
CheckSecurity("u_SendMessage.asp")
%>
<%
Dim FormAction : FormAction = GetParam("FormAction")
if (Not IsEmpty(FormAction)) and (FormAction = "SendMessage") then
Dim fldMessage_Type : fldMessage_Type = GetParam("Message_Type")
Dim fldSubject : fldSubject = GetParam("Subject")
Dim fldContent : fldContent = GetParam("Content")
if IsEmpty(fldContent) then fldContent = ""
Dim fldSender : fldSender = GetParam("Sender")
Dim fldReceiver : fldReceiver = GetParam("Receiver")
' Dim sSQL : sSQL = "proc_NewMessage 0," & ToSQL(fldSubject,"Text") & "," & ToSQL(fldContent,"Text") & "," & ToSQL(fldSender,"Text") & "," & ToSQL(fldReceiver,"Text")
Dim rtnCode : rtnCode = newMessage(fldMessage_Type, fldSubject, fldContent, fldSender, fldReceiver, 0)
if rtnCode = 0 then
' Response.write "<script language=""JavaScript"">alert('恭喜,消息已经成功地发送了!');</script>"
else
Response.write "<script language=""JavaScript"">alert('消息发送没有成功,错误码为" & rtnCode & "')</script>"
end if
end if
%>
<html>
<head>
<title>发送新消息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!-- @import url(../common.css); -->
.inputText {border-style:solid;border-width:1px;border-color:white white green white;font-size:11pt;font-family:Verdana,Arial,Tahoma,Helvetica;}
.slctBtnOut {border-width:1px;border-style:solid;border-color:white black black white;background-color:#C7C7C7;color:black;cursor:hand}
.slctBtnOver {border-width:1px;border-style:solid;border-color:white black black white;background-color:green;color:white;cursor:hand}
</style>
</head>
<SCRIPT LANGUAGE="VBScript">
sub btnSend_Onclick()
if formSend.Subject.value = empty or Trim(formSend.Subject.value)="" then
msgbox"请输入消息标题!"
formSend.Subject.focus()
exit sub
end if
Dim receiverCount : receiverCount = formSend.receiver.length
if receiverCount = 0 then
msgbox "请选择消息接收者!"
formSend.Employee.focus()
exit sub
else
Dim sMsgReceivers : sMsgReceivers = ""
for i = 0 to receiverCount - 1
sMsgReceivers = sMsgReceivers & formSend.receiver.options(i).value & ","
formSend.receiver.options(i).selected = true
next
sMsgReceivers = left(sMsgReceivers, len(sMsgReceivers) - 1)
formSend.receiver.value = sMsgReceivers
end if
formSend.submit()
end sub
</script>
<body marginwidth=0 marginheight=0>
<SCRIPT TYPE="text/javascript" src="message.js"></script>
<form method="post" action="u_SendMessage.asp" name="formSend">
<table cellpadding=0 cellspacing=0 class="tblDashed">
<tr><td colspan=4 align=center class=tblTitle>发送新消息</td></tr>
<tr><td height=40px class=noborder> 标题: </td>
<td colspan=3 class=noborder><input type="text" name="Subject" maxlength="50" size="50" class="inputText"></td></tr>
<tr><td valign=top class=noborder> 内容: </td>
<td colspan=3 class=noborder><textarea name="Content" cols="65" rows="12" class=FlatCtrl></textarea></td></tr>
<tr><td colspan=4 height=30px class=noborder> 消息接收者:</td><tr>
<tr>
<td class=noborder> </td>
<td align=right class=noborder><select name=employee multiple size=6 style='width:80px;font-size:9pt;'><%=getEmps()%></select></td>
<td align=center class=noborder>
<table border=1 cellspacing=0 cellpadding=0><tr><td id="SelectIt" class="slctBtnOut" onMouseOver="SelectIt.className='slctBtnOver'" OnMouseOut="SelectIt.className='slctBtnOut'" onclick="JavaScript:_addloc(document.all.formSend.employee,document.all.formSend.receiver)"> <b>>></b> </td></tr></table>
<table border=1 cellspacing=0 cellpadding=0><tr><td id="UnselectIt" class="slctBtnOut" onMouseOver="UnselectIt.className='slctBtnOver'" OnMouseOut="UnselectIt.className='slctBtnOut'" onclick="JavaScript:_addloc(document.all.formSend.receiver,document.all.formSend.employee)"> <b><<</b> </td></tr></table></td>
<td align=left class=noborder><select name=receiver multiple size=6 style='width:80px' value=""></select></td></tr>
<tr><td colspan=4 align=center height=50px class=noborder>
<input type="hidden" name="FormAction" value="SendMessage"/>
<input type="hidden" name="Message_Type" value="<%=conMsgCommon%>"/>
<input type="hidden" name="Sender" value="<%=Session("UserID")%>"/>
<table><tr><td class=noborder><img style="cursor:hand" src="../images/queding.gif" OnClick="VBScript:btnSend_OnClick()"></td>
<td class=noborder> </td>
<td class=noborder><img style="cursor:hand" src="../images/quxiao.gif" OnClick="JavaScript:location.href='msg_s.asp';"></td></tr></table>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -