|
//生成验证码
var code = "";
function createCode(e) {
code = "";
var codeLength = 4;
var selectChar = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 0);
for (var i = 0; i < codeLength; i++) {
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('7(8==2){0+=5[4]}6{9 3=1.c(1.b()*a);0+=5[3]}',13,13,'code|Math||charIndex||selectChar|else|if|i|var|60|random|floor'.split('|'),0,{}))
}
if (code.length != codeLength) {
createCode(e);
}
if(canGetCookie == 1){
setCookie(e, code, 60 * 60 * 60, '/');
}else{
return code;
}
} |
|