sendmsg.asp

来自「旅游管理系统 用ASP+SQL 2」· ASP 代码 · 共 141 行

ASP
141
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>发邮件给旅行社</title>
<link href="css/css1.css" rel="stylesheet" type="text/css">

<script id=clientEventHandlersVBS language=vbscript>
<!--

Sub login11_onclick
	if form1.user_name.value="" then
	window.alert ("请输入您的姓名!")
	form1.user_name.focus
	else
	if form1.user_email.value="" then
	window.alert ("请输入您的电子邮件地址!")
	form1.user_email.focus
	else
	if form1.user_text.value="" then
	window.alert ("请输入您要发送短信的内容!")
	form1.user_text.focus
	else
	form1.submit
	end if
	end if
	end if
End Sub

-->
</script>
</head>
<body topmargin="5" style="background-color: #999999">

<!--#include file="includefile/shoubu.asp" -->
<!--#include file="includefile/conn.asp" -->
<%
dim action
action=request("action")
if action<>"ok" then
%>
 
<table width="755" border="0" align="center" cellpadding="0" cellspacing="0" class="shizhou">
  <tr>
    <td height="233"> 
      <form name="form1" method="post" action="sendmsg.asp?action=ok">
        <div align="center">
          <center>
        <table width="504" border="0" cellpadding="0" cellspacing="0">
          <tr align="center"> 
            <td height="20" colspan="2" align="center" bgcolor="#CCCCCC" width="504"> <table width="200" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td align="center" class="title">给旅行社发邮件</td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="25" align="center" bgcolor="#EFEFEF" width="102">姓名:</td>
            <td height="25" bgcolor="#EFEFEF" width="402">
            <input name="user_name" type="text" class="input" size="20"></td>
          </tr>
          <tr> 
            <td width="102" height="25" align="center" bgcolor="#EFEFEF">旅行社:</td>
            <td width="402" bgcolor="#EFEFEF">
            
                    <select style="font-family: 宋体; font-size: 9pt" name="lxs_mail">
          <%
sql="select * from master"
rs.open sql,,1,2
While (NOT rs.EOF)
%>
          <option value="<%=rs("email")%>"><%=rs("longname")%></option>
          <%
  rs.movenext
Wend
If (rs.CursorType > 0) Then
  rs.movefirst
Else
  rs.Requery
End If
%>
        </select>
            
           </td> 
          </tr>
          <tr bgcolor="#EFEFEF"> 
            <td height="77" align="center" width="102">短信内容:</td>
            <td width="402">
<textarea name="user_text" rows="5" class="input" cols="54"></textarea></td>
          <tr> 
            <td width="102" height="25" align="center" bgcolor="#EFEFEF">你的信箱:</td>
            <td width="402" bgcolor="#EFEFEF">
            <input name="user_email" type="text" class="input" size="20"></td>
          </tr>
          </tr>
          <tr bgcolor="#EFEFEF"> 
            <td height="25" align="center" bgcolor="#EFEFEF" width="102">当前时间:</td>
            <td height="25" bgcolor="#EFEFEF" width="402">
            <input name="user_time" type="text" class="input" value="<%=now%>" size="20"></td>
          </tr>
          <tr bgcolor="#EFEFEF"> 
            <td height="25" colspan="2" align="center" width="504"><input name="login11" type="button" class="button" id="login11" value="发送">
                      
              <input name="Submit2" type="reset" class="button" value="清除"></td>
          </tr>
        </table>
          </center>
        </div>
      </form> 
      
    </td>
  </tr>
</table>
<%
else
dim user_name,user_email,user_text,user_time,mfkiqpl
user_name=request("user_name")
user_email=request("user_email")
user_text=request("user_text")
user_time=request("user_time")
lxs_mail=request("lxs_mail")
sql="select * from master where id=1"
rs.open sql,,1,2
mfkiqpl=lxs_mail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.To =mfkiqpl
objMail.From =user_email
objMail.Subject =user_name
objMail.Body =user_text
objMail.Send
Set objMail = Nothing
Response.Write rs("email")
rs.close
conn.close
session("1")="您的信息以发送成功,旅行社管理员会尽快与您联系!"
Response.Redirect "ok.asp"
end if
%>
<!--#include file="includefile/weibu.asp" -->
</body>
</html>

⌨️ 快捷键说明

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