![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
免费赠品区活动说明 2010年2月9日,湛江房产网免费赠品区上线。 为庆祝湛江房产网上线浏览量突破300万及普及房产家装建材用品知识,湛江房产网免费赠品区策划本次有奖问答活动,以答谢网友的关注,行业的支持。 有奖问答活动规则 具体开奖时间另外公布,敬请光注。
|
|
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]()
|
![]() |
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
% Dim Query_Badword,Form_Badword,f_i,Err_Message,Err_Web,f_name '------定义部份 头---------------------------------------------------------------------- Err_Message = 1 '处理方式:1=提示信息,2=转向页面,3=先提示再转向 Err_Web = "Default.Asp" '出错时转向的页面 Query_Badword="'∥and∥select∥update∥chr∥delete∥%20from∥;∥insert∥master.∥set∥chr(37)" '在这部份定义get非法参数,使用"∥"号间隔 '----- 对 get query 值 的过滤. if request.QueryString<>"" then Chk_badword=split(Query_Badword,"∥") FOR EACH Query_Name IN Request.QueryString for f_i=0 to ubound(Chk_badword) If Instr(LCase(request.QueryString(Query_Name)),Chk_badword(f_i))<>0 Then Select Case Err_Message Case "1" Response.Write "" Case "2" Response.Write "" Case "3" Response.Write "" End Select Response.End End If NEXT NEXT End if %> <% 'On Error Resume Next dim connstr,datapath,conn datapath="DataBase/db.mdb" connstr="Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & Server.mappath(datapath) Set conn=Server.CreateObject("ADODB.Connection") conn.open connstr %> <% Function findJS(frmName,errStr) Dim tmpArr Dim i '参数值 i=0 '获取错误列表,建立数组 tmpArr=Split(errStr,"|") '输出查询条件 Select Case tmpArr(i+1) Case "0" '必填的Text类型 findJS="if ((document."&frmName&"."&tmpArr(i)&".value)=="""")"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".select();"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function Case "1" '必填的ListMenu类型 findJS="if ((document."&frmName&"."&tmpArr(i)&".value)=="""")"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function Case "2" '必须为数字的Text类型 findJS="if (isNaN(document."&frmName&"."&tmpArr(i)&".value))"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".select();"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function Case "3" '必须为指定位数的Text类型 findJS="if (document."&frmName&"."&tmpArr(i)&".value.length="&tmpArr(i+3)&")"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".select();"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function Case "4" '必须大于指定位数的Text类型 findJS="if (document."&frmName&"."&tmpArr(i)&".value.length<"&tmpArr(i+3)&")"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".select();"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function Case "5" '必须为Email的Text类型 findJS="if ((!emailReg.test(document."&frmName&"."&tmpArr(i)&".value))&&(document."&frmName&"."&tmpArr(i)&".value!=''))"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".select();"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function Case "6" '必须为a-z或0-9的字符的Text类型 findJS="if ((!pwdReg.test(document."&frmName&"."&tmpArr(i)&".value))&&(document."&frmName&"."&tmpArr(i)&".value!=''))"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".select();"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function Case "7" '确认密码和密码必须相等的Text类型 findJS="if ((document."&frmName&"."&tmpArr(i)&".value)!=(document."&frmName&"."&tmpArr(i+3)&".value))"&vbCrlf&_ "{"&vbCrlf&_ "window.alert ('"&tmpArr(i+2)&"');"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".select();"&vbCrlf&_ "document."&frmName&"."&tmpArr(i)&".focus();"&vbCrlf&_ "return false;"&vbCrlf&_ "}"&vbCrlf '"else"&vbCrlf&_ '"return true;"&vbCrlf Exit Function End Select End Function Sub CheckForm_JS(frmName,errStr) Dim tmpArr Dim i Dim strShow '输出JS的字符串 '获取错误列表,建立数组 tmpArr=Split(errStr,",") '写JS for i=0 to UBound(tmpArr) if i<>0 then strShow=strShow&"else "&findJS(frmName,tmpArr(i)) else strShow=strShow&findJS(frmName,tmpArr(i)) end if next '输出 strShow="" Response.Write strShow End Sub %> <% Sub get1() Response.Write("") End Sub Sub get3() Response.Write("
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
免费赠品区活动说明 2010年2月9日,湛江房产网免费赠品区上线。 为庆祝湛江房产网上线浏览量突破300万及普及房产家装建材用品知识,湛江房产网免费赠品区策划本次有奖问答活动,以答谢网友的关注,行业的支持。 有奖问答活动规则 具体开奖时间另外公布,敬请光注。
|
|
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]()
|
![]() |
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||