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

📄 guest_write.asp

📁 国内最早的在线客服系统源码.可以把访客变成自己的客户.是目前比较流行的在线客服系统
💻 ASP
字号:
<%response.Expires=0%>
<!--#include file="function.asp"-->
<%
on error resume next
siteid=request("siteid")
if siteid="" then
	call disp_error("数据传送出错,请返回重试!","")
end if
dim err_info,sql
err_info=""
xm=trim(Request.Form("xm"))
if xm="" then
	err_info=err_info&"●留言人不能为空!<br>"
end if
if len(xm)>10 then
	err_info=err_info&"●留言人太长,请勿超过10个汉字!<br>"
end if
bt=trim(Request.Form("bt"))
if bt="" then
	err_info=err_info&"●标题不能为空!<br>"
end if
if len(bt)>25 then
	err_info=err_info&"●标题太长,请勿超过6个汉字!<br>"
end if
dzyj=trim(Request.Form("dzyj"))
if dzyj="" then
	err_info=err_info&"●电子邮件不能为空!<br>"
end if
if len(dzyj)>25 then
	err_info=err_info&"●电子邮件太长,请勿超过25个字符!<br>"
end if
lr=trim(Request.Form("lr"))
if len(lr)>400 then
	err_info=err_info&"●留言内容太长,请勿超过200个汉字!<br>"
end if
if err_info<>"" then
	call disp_error1(err_info,"")
end if
%>
<!--#include file="conn.asp"-->
<%
Dim ip
ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If IsNull(ip) or ""=ip Then
    ip=Request.ServerVariables("REMOTE_ADDR") 
End If
sql="insert into user_letter_table(siteid,xm,bt,dzyj,oicq,bq,lr,sj,rq,ip) values(" & siteid & ",'" & charfilter(xm) & "','" & charfilter(bt) & "','" & dzyj & "','" & Request.Form("oicq") & "'," &Request.Form("bq")& ",'" & charfilter(lr) & "','" & time & "','" & date & "','" & ip & "')"
Conn.execute(sql)
if err.number<>0 then
	conn.close
    Response.Write("<br><p align=center><font size=+1>")
	Response.Write(sql & "发表留言出错了!系统5秒后自动<a href='javascript:window.close();'>关闭</a>窗口!</font></p>" & err.description)
else
	conn.close
	Response.Write("<br><p align=center><font size=+1>")
	Response.Write("留言成功,系统5秒后自动<a href='javascript:window.close();'>关闭</a>窗口!</font></p>")
	Response.Write("<script language='javascript'>")
	response.write("opener.location.href='disp_ly.asp?siteid="&siteid&"&page=1';")
	Response.Write("setTimeout('window.close()',5000);")
	Response.Write("</script>")
 end if    
%>

⌨️ 快捷键说明

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