方法2,采用iframe调用,与原有验证码共存:
1、common/incfile/common.asp
445行增加
Function valcodea() Dim tmpstr tmpstr = ireplace("global.tpl_common.valcodea", "tpl") valcodea = tmpstr End Function
2、gbook 的incfiles module_config。asp 53行
tmpstr = cvalhtml(tmpstr, nvalidate, "{$recurrence_valcodea}")
3、通方法1的 tpl_common.jtbc
增加
[p] <item> <name><![CDATA[valcodea]]></name> <tpl_default><![CDATA[<IFRAME frameBorder=0 height=30 marginHeight=1 marginWidth=1 scrolling=no src="/support/captcha_numchar/1.asp" width=370></IFRAME> ]]></tpl_default> </item>[/p]
4、gbook的module.jtbc
相应改成valcode
急着回去,所以含糊。
请问老大,为什么我在ck_valcode修改了
If UCase(request.Form("valcode")) = UCase(session("rndcodes")) Then tbool = true If UCase(request.QueryString("valcode")) = UCase(session("rndcodes")) Then tbool = true
为什么还必须输入大写的验证码才行。
附验证码提供的测试文件function:
<% function TestCaptcha(byval valSession, byval valCaptcha) dim tmpSession valSession = Trim(valSession) valCaptcha = Trim(valCaptcha) if (valSession = vbNullString) or (valCaptcha = vbNullString) then TestCaptcha = false else tmpSession = valSession valSession = Trim(Session(valSession)) Session(tmpSession) = vbNullString if valSession = vbNullString then TestCaptcha = false else valCaptcha = Replace(valCaptcha,"i","I") if StrComp(valSession,valCaptcha,1) = 0 then TestCaptcha = true else TestCaptcha = false end if end if end if end function %>
|