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

📄 function.asp

📁 国内最早的在线客服系统源码.可以把访客变成自己的客户.是目前比较流行的在线客服系统
💻 ASP
字号:
<%
'显示错误信息过程一
sub disp_error1(err_info,href)
	Response.Write("<div align=center><p><font color=#ff0000 size=+3>错误信息</font></p>")
	Response.Write(err_info)
	if href="" then
		Response.Write("<br>系统5秒后自动<a href='#' onclick='javascript:location.href=history.go(-1)'>返回</a>")
	else
		Response.Write("<a href="&href&">返回</a>")
	end if		
	Response.Write("<script language=javascript>")
	if href="" then
		Response.Write("setTimeout('location.href=history.go(-1)',5000);")
	end if
	Response.Write("</script>")
	Response.End 
end sub

'显示错误信息过程二
sub disp_error(err_info,href)
	Response.Write("<script language=javascript>")
	Response.Write("alert('"&err_info&"');")
	if href="" then
		Response.Write("location.href=history.go(-1);")
	else
		Response.Write("top.location.href='"&href&"';")
	end if
	Response.Write("</script>")
	Response.End 
end sub

sub disp_error2(info)
	Response.Write("<script language='javascript'>")
	Response.Write("alert('"&info&"');")
	Response.Write("window.close();")
	Response.Write("</script>")
end sub

'中止事务处理
function check_mts()
	if err.number<>0 then
		objcontext.setabort
	end if
end function

'检查用户注册信息
sub check_userinfo()
	dim err_info
	err_info=""
	yhm=trim(Request.Form("yhm"))
	if yhm="" then
		err_info=err_info&"●用户名不能为空!<br>"
	end if
	if len(yhm)>10 then
		err_info=err_info&"●用户名太长,请勿超过10个汉字!<br>"
	end if
	mm=trim(Request.Form("mm"))
	if mm="" then
		err_info=err_info&"●密码不能为空!<br>"
	end if
	if len(mm)>16 then
		err_info=err_info&"●密码太长,请勿超过16字符!<br>"
	end if
	if mm<>trim(Request.Form("mmqr")) then
		err_info=err_info&"●两次输入的密码不同!<br>"
	end if
	lc=trim(Request.Form("lc"))
	if lc="" then
		err_info=err_info&"●昵称不能为空!<br>"
	end if
	if len(xm)>6 then
		err_info=err_info&"●昵称太长,请勿超过6个汉字!<br>"
	end if
	mc1=trim(Request.Form("mc1"))
	if mc1="" then
		err_info=err_info&"●主页名称不能为空!<br>"
	end if
	grzy1=ucase(trim(Request.Form("grzy1")))
	if grzy1="" or grzy1="HTTP://" then
		err_info=err_info&"●网址不能为空!<br>"
	end if
	lx1=trim(Request.Form("grzy1"))
	if lx1="请选择" then
		err_info=err_info&"●主页类型不能为空!<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
	jj=trim(Request.Form("jj"))
	if jj="" then
		err_info=err_info&"●简介不能为空!<br>"
	end if
	if len(jj)>50 then
		err_info=err_info&"●简介太长,请勿超过50个汉字!<br>"
	end if
	if err_info<>"" then
		conn.close
		call disp_error1(err_info,"")
	end if
end sub
%>

⌨️ 快捷键说明

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