📄 request.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/jmail.asp"-->
<%
dim mode
mode=trim(request.Form("mode"))
select case mode
case "send"
call send_sub()
end select
sub send_sub()
dim rs
name=request.Form("name")
company=request.Form("company")
phone=request.Form("phone")
fax=request.Form("fax")
email=request.Form("email")
content=request.Form("content")
if name="" or phone="" or content="" then
response.Write("<script>alert('请填写完整!');history.back(-1);</script>")
response.End()
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "[data_request]",conn,1,2
rs.addnew
rs("name")=name
rs("company")=company
rs("phone")=phone
rs("fax")=fax
rs("email")=email
rs("content")=content
rs.update
rs.close
response.Write("<script>alert('感谢您的留言,我们会尽快以邮件或电话与的方式您联系!');top.location.href='/';;</script>")
'-------------------------------------------------------
strTemp=""& vbcrlf
strTemp=strTemp & "<table width=""98%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""5"">" & vbcrlf
strTemp=strTemp & " <tr>" & vbcrlf
strTemp=strTemp & " <td width=""138"" align=""right"">公司名称:</td>" & vbcrlf
strTemp=strTemp & " <td >"&company&" </td>" & vbcrlf
strTemp=strTemp & " </tr>" & vbcrlf
strTemp=strTemp & " <tr>" & vbcrlf
strTemp=strTemp & " <td align=""right"">姓名:</td>" & vbcrlf
strTemp=strTemp & " <td>"&name&"</td>" & vbcrlf
strTemp=strTemp & " </tr>" & vbcrlf
strTemp=strTemp & " <tr>" & vbcrlf
strTemp=strTemp & " <td align=""right"">电话:</td>" & vbcrlf
strTemp=strTemp & " <td>"&phone&"</td>" & vbcrlf
strTemp=strTemp & " </tr>" & vbcrlf
strTemp=strTemp & " <tr>" & vbcrlf
strTemp=strTemp & " <td align=""right"">传真:</td>" & vbcrlf
strTemp=strTemp & " <td>"&fax&"</td>" & vbcrlf
strTemp=strTemp & " </tr>" & vbcrlf
strTemp=strTemp & " <tr>" & vbcrlf
strTemp=strTemp & " <td align=""right"">Email:</td>" & vbcrlf
strTemp=strTemp & " <td>"&email&"</td>" & vbcrlf
strTemp=strTemp & " </tr>" & vbcrlf
strTemp=strTemp & " <tr>" & vbcrlf
strTemp=strTemp & " <td align=""right"">留言内容:</td>" & vbcrlf
strTemp=strTemp & " <td>"&HTMLEncode(content)&"</td>" & vbcrlf
strTemp=strTemp & " </tr>" & vbcrlf
strTemp=strTemp & "</table>"& vbcrlf
dim email_to
mail_to=""
set rs=conn.execute("select email from [data_request_config] where id=1")
if not rs.eof then
email_to=trim(rs(0))
end if
rs.close
set rs=nothing
if email_to<>"" then
call send_email(email_to,""&name&"-新留言",strTemp)
end if
'-------------------------------------------------------
response.End()
end sub
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户留言-<%=websitename%></title>
<%
if keywords_p<>"" then
response.write("<meta name=""keywords"" content="""&keywords_p&""" />" & vbcrlf)
end if
if Description_p<>"" then
response.write("<meta name=""Description"" content="""&Description_p&""" />" & vbcrlf)
end if
%><script src="inc/functions.js" type="text/javascript"></script>
<link href="images/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #CCCCCC}
-->
</style>
</head>
<body class="request">
<div id="page">
<!--#include file="top.asp"-->
<div id="body">
<div id="left">
<!--#include file="left.asp"-->
</div>
<div id="right">
<div id="list_content">
<div class="title"><span class="t"><span><h1>客户留言</h1></span></span></div>
<div class="content">
<table width="669" border="0" cellpadding="0" cellspacing="5">
<form id="form_request" name="form_request" method="post" action="?">
<input name="mode" value="send" type="hidden"/>
<tr>
<td width="91" align="right"><span class="STYLE1">公司名称:</span></td>
<td width="578">
<label>
<input type="text" name="company" id="company" />
</label> </td>
</tr>
<tr>
<td align="right"><span class="STYLE1">姓名:</span></td>
<td><input type="text" name="name" id="name" />
<span class="red">*</span></td>
</tr>
<tr>
<td align="right"><span class="STYLE1">电话:</span></td>
<td><input type="text" name="phone" id="phone" />
<span class="red">*</span></td>
</tr>
<tr>
<td align="right"><span class="STYLE1">传真:</span></td>
<td><input type="text" name="fax" id="fax" /></td>
</tr>
<tr>
<td align="right"><span class="STYLE1">Email:</span></td>
<td><input type="text" name="email" id="email" />
<span class="red">*</span></td>
</tr>
<tr>
<td align="right"><span class="STYLE1">留言内容:</span></td>
<td><textarea name="content" cols="50" rows="5" id="content"></textarea>
<span class="red">*</span></td>
</tr>
<tr>
<td colspan="2" align="center"><label>
<input type="submit" name="button2" id="button2" value=" 提 交 " />
</label></td>
</tr></form>
</table>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<!--#include file="bottom.asp"-->
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -