📄 jk_val_code.asp
字号:
<%
dim val_rnd,val_is_true
val_rnd=joekoe_cms.rand_num(4)
val_is_true=true
session("web_cookies_name")=joekoe_cms.web_cookies
session("web_dir")=joekoe_cms.web_dir
if int(format_mid_num(34))=1 then val_is_true=false
function val_chk(vsort)
if not val_is_true then
val_chk=true
exit function
end if
dim valcode,valc
val_chk=false
valcode="jk"&trim(request.form("valcode"))
valc=trim(request.cookies(joekoe_cms.web_cookies)("vc_"&vsort))
if valcode<>"" and valcode<>"jk" and cstr(valcode)=cstr(valc) then
val_chk=true
end if
end function
sub val_chk_end(vsort)
if not val_is_true then exit sub
response.cookies(joekoe_cms.web_cookies)("vc_"&vsort)=empty
end sub
function val_code_num(vsort,vt)
if not val_is_true then
val_code_num="<input type=hidden name=valcode value=''>"
exit function
end if
response.cookies(joekoe_cms.web_cookies)("vc_"&vsort)="jk"&val_rnd
if vt=0 then
val_code_num=val_rnd
exit function
end if
val_code_num="<input type=hidden name=valcode value='"&val_rnd&"'>"
end function
function val_code(vsort)
if not val_is_true then
val_code="<table border=0 cellspacing=0 cellpadding=0><tr>" & _
"<td><font class=red2>验证码机制已关闭</font></td>" & _
"</tr></table>"
exit function
end if
response.cookies(joekoe_cms.web_cookies)("vc_"&vsort)="jk"&val_rnd
val_code="<table border=0 cellspacing=0 cellpadding=0><tr>" & _
"<td><input type=text name=valcode size=8 maxlength=10> <font class=red>*</font> </td>" & _
"<td>"&getcode1(vsort)&"</td>" & _
"</tr></table>"
end function
Function getcode1(vsort)
Dim test
On Error Resume Next
Set test=Server.CreateObject("Adodb.Stream")
Set test=Nothing
If Err Then
getcode1= val_rnd
Else
getcode1= "<img src='rnd_num.asp?sort="&vsort&"'>"
End If
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -