temp
http://client.cj.i.xunlei.com/get?uid=
http://lixian.vip.xunlei.com/js/login.js?205
找啊找啊找啊找
//提交标志
var rlflag = 1;
var loginServer=['http://login.xunlei.com/','http://login2.xunlei.com/','http://login3.xunlei.com/'];
var verifyServer=['http://verify2.xunlei.com/','http://verify.xunlei.com/','http://verify3.xunlei.com/'];
var verifyQuery = null;
var loginQuery = null;
var verify_times = 0;
var login_times = 0;
var responsetime;
//页面登录信息初始化
function initLogininfo()
{
$('d_body').style.display = 'none';
var leftDiv = $("userinfro_leftdiv");
var gdrive = $('gdrive_info');
//判断提交那个提交表单(登陆 |注册)
//登陆框
if($('u')){
$('u').onfocus = function(){
rlflag = 1;
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_gougou' || G_PAGE == 'login_union' || G_PAGE == 'login_xmp')) {
$('u').className='intxt intxt_on';
if($('u').value == '请输入您的迅雷帐号' || $('u').value == ''){
$('u').value='';
}
}
};
$('u').onblur = function(){
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_gougou' || G_PAGE == 'login_union' || G_PAGE == 'login_xmp')) {
$('u').className='intxt';
if($('u').value == '请输入您的迅雷帐号' || $('u').value == ''){
$('u').value='请输入您的迅雷帐号';
}else{
}
}
};
}
if($('p_show')){
$('p_show').onfocus = function(){
rlflag = 1;
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_gougou' || G_PAGE == 'login_union' || G_PAGE == 'login_xmp')) {
$('p_show').className='intxt intxt_on';
}
};
$('p_show').onblur = function(){
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_gougou' || G_PAGE == 'login_union' || G_PAGE == 'login_xmp')) {
if($('p_show_err') && $('p_show').value == ''){
$('p_show').style.display = 'none';
$('p_show_err').style.display = '';
}
$('p_show').className='intxt';
}
};
}
if($('p_show_err')){
$('p_show_err').onfocus = function(){
rlflag = 1;
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_gougou' || G_PAGE == 'login_union' || G_PAGE == 'login_xmp')) {
$('p_show_err').style.display = 'none';
$('p_show').style.display = '';
$('p_show').className='intxt intxt_on';
$('p_show').focus();
}
};
$('p_show_err').onb = function(){
rlflag = 1;
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_gougou' || G_PAGE == 'login_union' || G_PAGE == 'login_xmp')) {
$('p_show_err').style.display = '';
$('p_show').style.display = 'none';
}
};
/*$('p_show').onblur = function(){
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_gougou' || G_PAGE == 'login_union')) {
$('p_show').className='intxt';
}
};*/
}
if($('verifycode')){
$('verifycode').onfocus = function(){
rlflag = 1;
};
}
var luid = getCookie("luserid").trim();
var lsessionid = getCookie("lsessionid").trim();
var sessionid = getCookie("sessionid").trim();
var lx_sessionid = getCookie("lx_sessionid").trim();
var dl_enable = getCookie("dl_enable").trim();
if((sessionid == "" || lx_sessionid == "") && (luid == '' || lsessionid == '')){
$('d_body').style.display = '';
setGdCookie('lx_login',"");
showLayer(leftDiv);
if($('u') && $('loginform').u.value.trim() != '' && $('loginform').u.value != '请输入您的迅雷帐号'){
$('p_show_err').style.display = 'none';
$('p_show').style.display = '';
$('p_show').focus();
} else if($('u')) {
$('u').focus();
}
return ;
}
var username = getCookie("usrname"); //用户名
var vip_isvip = getCookie("vip_isvip"); // 是否是 vip
if(lx_sessionid== null){
lx_sessionid="";
}
try{
var nickname = decodeURIComponent(getCookie("usernick"));
} catch(e){
var nickname = '';
}
if(vip_isvip=='0' && dl_enable != '1' ){
$('d_body').style.display = '';
leftDiv.style.display="none";
var h_suggest = word_suggest();
var ucid = getCookie("ucid");
if( !isUndef(ucid) && ucid != "" ) {
var param = "referfrom=union&ucid=" + ucid;
//var param = "ucid=" + ucid;
} else {
var param = "referfrom=LX_01";
}
if(typeof(G_PAGE)!='undefined' && G_PAGE=='login_xunlei'){
/*var s = '<h2>用户信息</h2><div class="log_uinfo"><p>'+h_suggest+',<em class="u_name">'+nickname+'</em> <a href="javascript:logout1();" class="link_quit">[退出]</a>'
+'<br /><span class="novtip">您还不是迅雷会员,无法享受离线特权</span></p>现在可以免费领取1天离线体验卡,<br /><a class="oneday_tiyan u_name" onclick="oneday_tiyan();return false;" href="javascript:;">立即领取>></a><a href="javascript:;" onclick="go_url(\'http://dynamic.vip.xunlei.com/paycenter/index/?referfrom=LX_011\')" title="开通会员" class="open_hy">立即加入</a></div>'
+'<a href="javascript:;" title="更多会员功能" class="more_serv" onclick="go_url(\'http://vip.xunlei.com/freedom/index.html\')">更多会员功能</a></div>';*/
var s = '';
page_init_unlixian();
jQuery(".wp").hide();
jQuery(".new_body").show();
}
else if(typeof(G_PAGE)!='undefined' && G_PAGE=='login_web'){
/*var s = '<h2>用户信息</h2><div class="log_uinfo"><p>'+h_suggest+',<em class="u_name">'+nickname+'</em> <a href="javascript:logout1();" class="link_quit">[退出]</a>'
+'<br /><span class="novtip">您还不是迅雷会员,无法享受离线特权</span></p>现在可以免费领取1天离线体验卡,<br /><a class="oneday_tiyan u_name" onclick="oneday_tiyan();return false;" href="javascript:;">立即领取>></a><a href="javascript:;" onclick="go_url(\'http://dynamic.vip.xunlei.com/paycenter/index/?referfrom=LX_021\')" title="开通会员" class="open_hy">立即加入</a></div>'
+'<a href="javascript:;" title="更多会员功能" class="more_serv" onclick="go_url(\'http://vip.xunlei.com/freedom/index.html\')">更多会员功能</a></div>';*/
var s = '';
page_init_unlixian();
jQuery(".wp").hide();
jQuery(".new_body").show();
}else if(typeof(G_PAGE)!='undefined' && G_PAGE=='login_xmp'){
jQuery(".wp").hide();
jQuery(".new_body").show();
}else{
gougou_login_success();
return;
var s = '<div class="names">'+h_suggest+','+nickname+' <a href="javascript:logout1();" class="a_exit">[退出]</a></div>'
+'<div class="into"><p>您现在还不是迅雷会员<br />无法享受离线下载特权</p>现在可以免费领取1天离线体验卡,<br /><a class="oneday_tiyan u_name" onclick="oneday_tiyan();return false;" href="javascript:;">立即领取>></a><a href="javascript:;" onclick="go_url(\'http://dynamic.vip.xunlei.com/paycenter/index/\')" class="a_in">立即加入</a></div>'
+'<div class="tac"><a href="javascript:;" onclick="go_url(\'http://vip.xunlei.com/freedom/index.html\')">了解更多会员功能>></a></div>';
}
try{
$('open_now_id').className='open1';
}catch(e){}
gdrive.innerHTML = s;
showLayer(gdrive);
return ;
}
if(luid != '' && lsessionid != '') {
var precss_req = new JSONscriptRequest(INTERFACE_URL+"/verify_login");
precss_req.buildScriptTag();
precss_req.addScriptTag();
return;
}
else if(G_PAGE=='login_gougou' || G_PAGE=='login_union'){
gougou_login_success();
return;
}
else {
showLayer(leftDiv);
}
window.setTimeout('dynamic_login()', 500);
}
function verify_login_resp(json) {
if(json.result==1) {
setXlCookie('sessionid',getCookie('lsessionid'));
for(var key in json.data) {
if(key == 'usernick') {
document.cookie = key + "=" + encodeURIComponent(unescape(json.data[key])) + "; path=/; domain=xunlei.com";
} else {
setXlCookie(key,json.data[key]);
}
}
if(!isUndef(G_PAGE) && (G_PAGE == 'login_gougou' || G_PAGE=='login_union')) {
gougou_login_success(1);
return;
}
if(!isUndef(G_PAGE) && G_PAGE == 'login_gougou' && $P("furl") != "") {
top.location = LOGIN_URL+"?cid="+$P("cid")+"&furl="+$P("furl")+"&cachetime="+new Date().getTime();
}else if(G_PAGE == 'xmp'){
location.href = getnocacheurl('http://dynamic.cloud.vip.xunlei.com/login?from=xmp&interfrom='+G_PAGE);
} else {
top.location = getnocacheurl(LOGIN_URL);
}
} else {
$('userinfro_leftdiv').style.display = '';
$('d_body').style.display = '';
}
}
function dynamic_login() {
if(!isUndef(G_PAGE) && G_PAGE == 'login_gougou') {
$('d_body').style.display = '';
}
else{
location.href = LOGIN_URL;
}
}
var Login = {
popDiv:null,
timer:0,
loginRet:false,
nowCheckedVerifyCode:false,
hasCheckedVerifyCode: 'no',
loginCount: 0,
validateCount: 0,
callBackFunc:function(){},
validateInput: function(){
$('loginform').u.value = $('loginform').u.value.trim();
$('loginform').p_show.value = $('loginform').p_show.value.trim();
if($('loginform').u.value.length == 0){Login.loginMsg("请您输入用户名!");$('u').focus();return false;}
if($('loginform').u.value == '请输入您的迅雷帐号'){Login.loginMsg("请您输入用户名!");$('u').focus();return false;}
if($('loginform').p_show.value.length == 0){Login.loginMsg("请您输入密码!");if($('p_show_err')){$('p_show_err').style.display='none';$('p_show').style.display='';};$('p_show').focus();return false;}
if($('loginform').verifycode.value.length == 0 && !Login.nowCheckedVerifyCode) {
if($('verifycodePanel').style.display=='none' && Login.hasCheckedVerifyCode == 'no') {
Login.hasCheckedVerifyCode = 'yes';
Login.checkVerifyCode($('loginform').u.value.trim());
Login.validateCount++;
window.setTimeout('if(Login.validateInput())submitForm();', 500);
return false;
}
if($('verifycodePanel').style.display=='none' && Login.validateCount<5) {
Login.validateCount++;
window.setTimeout('if(Login.validateInput())submitForm();', 500);
return false;
} else {
Login.loginMsg("请您输入验证码!");
Login.validateCount = 0;
try{
$('verifycode').focus();
}
catch(e){}
return false;
}
}
Login.validateCount = 0;
$("u1").value="http://cloud.vip.xunlei.com/xunlei_task1.html";
this.disablePopDiv(true);
Login.loginRet = true;
return true;
},
loginMsg: function(msg) {
if(isUndef(msg)) {
msg = '未知错误!';
}
if(msg.trim() != '') {
$('loginform_msg').innerHTML = '<p>'+msg+'</p>'
$('loginform_msg').style.display = '';
$('warm_tip').style.display = '';
} else {
$('loginform_msg').innerHTML = '';
$('loginform_msg').style.display = 'none';
$('warm_tip').style.display = 'none';
}
try{
clearTimeout(Login.timer);
Login.timer = setTimeout(function(){
$('loginform_msg').style.display = 'none';
$('warm_tip').style.display = 'none';
},3*1000);
}
catch(e){}
},
submitForm: function(){
setGdCookie("vip_cburl","http://cloud.vip.xunlei.com/xunlei_task1.html");
Login.submitFormOpr();
},
submitFormOpr: function(){
try {
if(window.external) {
window.external.AutoCompleteSaveForm($('loginform'));
}
} catch (e) {}
},
onIndexLogin: function (){//return;
if (login_times > loginServer.length) {
window.clearInterval(loginQuery);
loginQuery = 1;
return;
}
var login_u = $('loginform').u.value.trim();
setGdCookie("lx_login_u", login_u, 3600*24*30);
if(!isUndef($('loginform').login_enable)) {
var lx_login_auto = $('loginform').login_enable.checked ? 1 : 2;
setGdCookie("lx_login_auto", lx_login_auto, 3600*24*30);
}
var result = getCookie("blogresult");
var url0 = window.location.href;
url0 = url0.replace('http://','');
var responsetime1 = (new Date().getTime())/1000;
responsetime = Math.round((responsetime1-responsetime)*1000)/1000;
var url = 'http://stat.login.xunlei.com:1800/report?cnt=1&cmdid0=sec2login&errorcode0='+result+'&responsetime0='+responsetime+'&retrynum0='+(login_times-1)+'&serverip0=&url0='+url0+'&domain0=lixian.vip.xunlei.com&b_type0=108&platform0=1&clientversion0=';
try{setTimeout(function(){var img = new Image(0,0);img.src = url;},5);}catch(e){};
var login_error = {1: "验证码错误,请重新输入",2: "密码错误,请重新输入",3: "网络超时,请稍候重试",4: "帐号不存在,请重新输入",5: "帐号不存在,请重新输入",6: "帐号被锁定,<a href='http://help.xunlei.com/problemVer.html?serialnum=1045&contentFno=0003000200020001' target='_blank'>详情</a>",
7: "网络超时,请稍候重试",8: "网络超时,请稍候重试",9: "非法验证码,请重新登录",10: "非法验证码",11: "验证码超时,请稍候重试",12: "登录页面无效,请重新登录",13: "登录页面无效,请重新登录",14: "登录页面无效,请重新登录",15: "登录页面无效,请重新登录",16: "网络超时,请重新登录"};
if(login_times < loginServer.length && (!result || result == '' || result=="3" || result=="7" || result=="8" || result=="16" )){ //
logined = false;
//$("button_submit4reg").disabled = false;
$("login_enable").disabled = false;
submitForm();
return;
} else if(!result || result == '') {
return false;
} else if(result!="0") {
nowCheckedVerifyCodeCount = 0;
logined = false;
window.clearInterval(loginQuery);
loginQuery = null;
login_times = 0;
if(result=="3" || result=="4" || result=="5" || result=="6" || result=="7" || result=="8" || result>11) {
$('loginform').p_show.value = '';
$('u').focus();
} else if(result=="2" || result=="1" || result=="9" || result=="10") {
if(result=="2") {
$('loginform').p_show.value = '';
$('verifycode').value = '';
$('p_show').focus();
} else {
$('verifycodePanel').style.display='';
$('verifycode').focus();
}
} else if(result=="11") {
$('verifycodePanel').style.display = '';
$('verifycode').focus();
}
Login.loginMsg(login_error[result]);
if($('verifycodePanel').style.display!='none') {
$('verifycode').value = '';
getVerifyCode(1);
} else { // if(result=="2")
Login.hasCheckedVerifyCode = 'yes';
Login.checkVerifyCode(login_u);
}
$("button_submit4reg").disabled = false;
if(G_PAGE=='login_web' || G_PAGE=='login_xunlei'){
$("button_submit4reg").className = 'spr btn btn_sign';
}
$("login_enable").disabled = false;
return false;
}
window.clearInterval(loginQuery);
loginQuery = 1;
login_times = 0;
//success
/*if(!isUndef(G_PAGE) && G_PAGE == 'login_union') {
close_layer('layer_union_login');
union_download();
return;
}*/
if(!isUndef(G_PAGE) && (G_PAGE == 'login_gougou' || G_PAGE=='login_union')) {
gougou_login_success();
return;
}
if(G_PAGE == 'login_xunlei'){
$('in_xl').value = 1;
}
var ix = $('in_xl').value;
if(G_PAGE == 'login_xmp'){
$('u1').value = getnocacheurl(LOGIN_URL)+"&from=xmp&interfrom="+G_PAGE;
}else if($('u1').value.trim() == '') {
$('u1').value = getnocacheurl(LOGIN_URL)+"&from="+ix;
} else {
$('u1').value = getnocacheurl($('u1').value)+"&from="+ix;
}
top.location.href = $('u1').value;
},
setPos:function(){
Login.popDiv.style.left = (document.documentElement.clientWidth/2 + document.documentElement.scrollLeft -207) +"px";
Login.popDiv.style.top = (document.documentElement.clientHeight/2 + document.documentElement.scrollTop-142 + 43) +"px";
Login.backDiv.style.width = Math.max(document.body.scrollWidth, document.documentElement.clientWidth) +"px";
Login.backDiv.style.height = Math.max(document.body.scrollHeight, document.documentElement.clientHeight)+"px";
},
exit: function(){
$('loginform').reset();
if($('flashplay'))
$('flashplay').style.display = "block";
Login.popDiv.style.display =Login.backDiv.style.display ="none";
this.disablePopDiv(false);
if(window.detachEvent){
window.detachEvent("onresize",this.setPos);
window.detachEvent("onscroll",this.setPos);
}else{
window.removeEventListener("onresize",this.setPos,false);
window.removeEventListener("onscroll",this.setPos,false);
}
},
disablePopDiv: function(tag){
},
checkBeforeLogin: function(){
var luid = getCookie("luserid").trim();
var lsessionid = getCookie("lsessionid").trim();
var lx_login_u = getCookie("lx_login_u").trim();
var lx_login_auto = getCookie("lx_login_auto").trim();
if(luid != '' && lsessionid != '') {
return;
}
if($('u') && $('loginform').u.value.trim() == '' && lx_login_u != ''){
try{
$('loginform').u.value = lx_login_u;
Login.hasCheckedVerifyCode = 'yes';
Login.checkVerifyCode(lx_login_u);
$('p_show').focus();
} catch(e){}
}
if(!isUndef($('loginform').login_enable) && (lx_login_auto == '' || lx_login_auto == "1")) {
//$('loginform').login_enable.checked = "checked";
}
},
checkAutoVerify: function(){
window.onload = function(){
/*$('u').onblur = function(){
var login_u = $('loginform').u.value.trim();
var login_p = $('loginform').p_show.value.trim();
if($('verifycodePanel').style.display=='none' && login_u != '' && login_p !='' && Login.hasCheckedVerifyCode=='no') {
Login.hasCheckedVerifyCode = 'yes';
Login.checkVerifyCode(login_u);
}
};
$('u').onchange = function(){
if($('verifycodePanel').style.display=='none') {
var login_u = $('loginform').u.value.trim();
var login_p = $('loginform').p_show.value.trim();
if(login_u != '' && login_p !='' && Login.hasCheckedVerifyCode=='no') {
Login.hasCheckedVerifyCode = 'yes';
Login.checkVerifyCode(login_u);
} else {
Login.hasCheckedVerifyCode = 'no';
}
}
};*/
$('u').onchange = function(){
if($('verifycodePanel').style.display=='none' && Login.hasCheckedVerifyCode!='no') {
Login.hasCheckedVerifyCode = 'no';
}
};
$('p_show').onfocus = function(){//Login.loginMsg('5555555555');
var login_u = $('loginform').u.value.trim();
if(login_u == '请输入您的迅雷帐号'){
login_u = '';
}
if($('verifycodePanel').style.display=='none' && login_u != '' && Login.hasCheckedVerifyCode=='no') {
Login.hasCheckedVerifyCode = 'yes';
Login.checkVerifyCode(login_u);
}
if(!isUndef(G_PAGE) && (G_PAGE == 'login_xunlei' || G_PAGE == 'login_web' || G_PAGE == 'login_union' || G_PAGE == 'login_gougou')) {
$('p_show').className='intxt intxt_on';
}
};
};
},
checkVerifyCode: function(usrname) {
if(Login.nowCheckedVerifyCode) return;
var checkUrl = getnocacheurl('http://login.xunlei.com/check?u='+usrname);
Login.nowCheckedVerifyCode = true;
var restime = (new Date().getTime())/1000;
new Json.Request(checkUrl,{onSuccess: function(){
var res = parseInt(getCookie('check_result'));
var restime1 = (new Date().getTime())/1000;
restime = Math.round((restime1-restime)*1000)/1000;
var url0 = window.location.href;
url0 = url0.replace('http://','');
var url = 'http://stat.login.xunlei.com:1800/report?cnt=1&cmdid0=check&errorcode0='+res+'&responsetime0='+restime+'&retrynum0=0&serverip0=&url0='+url0+'&domain0=lixian.vip.xunlei.com&b_type0=108&platform0=1&clientversion0=';
try{setTimeout(function(){var img = new Image(0,0);img.src = url;},5);}catch(e){};
if(res == 0){
$('verifycodePanel').style.display = 'none';
var newVerifyCode = getCookie('check_result').split(':')[1];
$('verifycode').value = newVerifyCode;
}else{
$('verifycode').value = '';
getVerifyCode(1);
$('verifycodePanel').style.display = '';
}
Login.nowCheckedVerifyCode = false;
},method: "GET"});
}
}
function getGrowValueByPaytype(paytype) {
var ptype = parseInt(paytype);
if(ptype > 100 && ptype != 105) {
return 10; // 靓号赠送
}
switch(paytype) {
case "1" : return 10; // 雷点
case "2" : return 5; // sina 无线
case "3" : return 5; // 手机
case "4" : return 12; // 网银
case "5" : return 15; // 年费
case "6" : return 10; // 声讯
case "7" : return 10; // 齐顺声讯
case "8" : return 5; // 手机钱包
case "9" : return 10; // 嗖付支付
case "105" : return 15; // 靓号年费
default : return 0;
}
}
function logout(){
sendHttpPack(getnocacheurl("http://login.xunlei.com/unregister?sessionid="+getCookie("sessionid")));
sendHttpPack(getnocacheurl("http://dynamic.vip.xunlei.com/login/indexlogin_contr/logout/"));
var ckeys = ["vip_isvip","lx_sessionid","vip_level","lx_login","dl_enable","in_xl","ucid","lixian_section"];
var ckeys1 = ["sessionid","usrname","nickname","usernewno","userid"];
for(var i=0;i<ckeys.length;i++){
setGdCookie(ckeys[i],"");
}
for(var i=0;i<ckeys1.length;i++){
setXlCookie(ckeys1[i],"");
}
$("userinfro_leftdiv").style.display="";
$('div_quickregister').style.display="none";
$('gdrive_info').style.display="none";
$('gdrive_info').innerHTML="";
$('div_kaitong').style.display = "";
var head_login = "[<a style='cursor:pointer' onclick='if(Login.validateInput(1))submitForm();' >登录</a>] [<a href='http://i.xunlei.com/?redirecturl=regist' target='_blank'>注册</a>]";
$('vip_headSP').innerHTML = head_login;
}
function logout1(){
sendHttpPack(getnocacheurl("http://login.xunlei.com/unregister?sessionid="+getCookie("sessionid")));
var ckeys = ["vip_isvip","lx_sessionid","vip_level","lx_login","dl_enable","in_xl","ucid","lx_login_u","rw_list_open","parent_id"];
var ckeys1 = ["sessionid","usrname","nickname","usernewno","lsessionid","luserid","userid","vip_paytype"];
for(var i=0;i<ckeys.length;i++){
setGdCookie(ckeys[i],"");
}
for(var i=0;i<ckeys1.length;i++){
setXlCookie(ckeys1[i],"");
}
setGdCookie('lx_nf_all','page_check_all=commtask&fltask_all_guoqi=0&class_check=0&page_check=task&fl_page_id=0&class_check_new=0');
setGdCookie('menu_isopen',0);
if(!isUndef(G_PAGE) && (G_PAGE == 'login_union' || G_PAGE == 'login_gougou')) {
location.reload();
} else if (in_xl == 1) {
top.location = "http://lixian.vip.xunlei.com/xunlei_task.html";
}else if (G_PAGE == 'xmp' || G_PAGE == 'login_xmp') {
location.href = "http://lixian.vip.xunlei.com/xmp_task.html";
} else {
top.location = "http://lixian.vip.xunlei.com/task.html";
}
}
//网页内按下回车触发
document.onkeydown = function(event){
function $(id){
return document.getElementById(id);
}
if(window.event) {
event = window.event;
}
if(event.keyCode==13 && $("login_pop_id") && $("login_pop_id").style.display != "none"){
if(Login.validateInput()) {
Login.submitForm();
}
}
//判断登陆框
if(rlflag == 1){
//只有当存在这个标签的时候调用
if(event.keyCode==13 && $("button_submit4reg")){
if(Login.validateInput()) {
//此时只能调用html中的方法
submitForm();
}
}
}else if(rlflag == 2){
if(event.keyCode==13 && $("btn_regist")){
//注册方法
submitRegist();
}
}
//if($("task_batch_layer") && $("task_batch_layer").style.display != "none" && (event.keyCode==13 || event.keyCode==86)){
//setTimeout('begin_task_batch()',500);
//}
}
function sendHttpPack(scripturl){
var ifr=document.createElement("script");
ifr.src=scripturl;
if(ifr.attachEvent) {
ifr.attachEvent('onload',function (){});
} else {
jsonReq = new JSONscriptRequest(scripturl);
jsonReq.buildScriptTag();
jsonReq.addScriptTag();
}
}
function getnocacheurl(urlstr){
var returnurl = "http://vip.xunlei.com";
var cachetime = new Date().getTime();
var index = urlstr.indexOf("?");
if(index == -1){
returnurl = urlstr + "?cachetime=" + cachetime;
}else{
returnurl = urlstr + "&cachetime=" + cachetime;
}
return returnurl;
}
//首次获得焦点时获取验证码
function getOnfocusVerifyCode(flag){
var ver;
var p;
if(flag == 1){
ver = $('verify_code1');
p = $('vcode_p1');
}else{
ver = $('verify_code2');
p = $('vcode_p2');
}
p.style.display = "";
if(ver.src == "")
ver.src = 'http://verify2.xunlei.com/image?cachetime='+new Date().getTime();
showLayer(p);
}
//获取验证码
var nowGetVerifyImage = false;
function getVerifyCode(flag){
var verify_img = $('verify_code1');
if(verify_img && !nowGetVerifyImage) {
getVerifyImage();
verifyQuery = window.setInterval('getVerifyImage()',5000);
}
}
function getVerifyImage() {
var verify_img = $('verify_code1');
if (verify_times >= verifyServer.length) {
nowGetVerifyImage = false;
window.clearInterval(verifyQuery);
verify_times = 0;
return;
}
if(verify_img) {
verify_img.src = verifyServer[verify_times]+'image?cachetime='+new Date().getTime();
var restime1 = (new Date().getTime())/1000;
var url0 = window.location.href;
url0 = url0.replace('http://','');
nowGetVerifyImage = true;
verify_times++;
verify_img.onerror = function() {
nowGetVerifyImage = false;
return;
}
if (isIE) {
verify_img.onreadystatechange = function() {
if (verify_img.readyState == "complete") {
var restime = (new Date().getTime())/1000;
restime = Math.round((restime1-restime)*1000)/1000;
var url = 'http://stat.login.xunlei.com:1800/report?cnt=1&cmdid0=check&errorcode0=0&responsetime0='+restime+'&retrynum0='+(verify_times-1)+'&serverip0=&url0='+url0+'&domain0=lixian.vip.xunlei.com&b_type0=108&platform0=1&clientversion0=';
try{setTimeout(function(){var img = new Image(0,0);img.src = url;},5);}catch(e){};
nowGetVerifyImage = false;
window.clearInterval(verifyQuery);
verify_times = 0;
verify_img.width = 50;
verify_img.height = 20;
return;
}
}
} else {
verify_img.onload = function() {
if (verify_img.complete == true) {
var restime = (new Date().getTime())/1000;
restime = Math.round((restime1-restime)*1000)/1000;
var url = 'http://stat.login.xunlei.com:1800/report?cnt=1&cmdid0=check&errorcode0=0&responsetime0='+restime+'&retrynum0='+(verify_times-1)+'&serverip0=&url0='+url0+'&domain0=lixian.vip.xunlei.com&b_type0=108&platform0=1&clientversion0=';
try{setTimeout(function(){var img = new Image(0,0);img.src = url;},5);}catch(e){};
nowGetVerifyImage = false;
window.clearInterval(verifyQuery);
verify_times = 0;
verify_img.width = 50;
verify_img.height = 20;
return;
}
}
}
}
}
var logined = false;
var nowCheckedVerifyCodeCount = 0;
function submitForm(){
if(G_PAGE == 'login_xmp'){
Login.loginMsg("您还没有登录,点击右上角按钮,完成登录");
return;
}
if ($("button_submit4reg").disabled == true && logined) {
return;
}
//if(isIE) {
/*
var login_u = $('loginform').u.value.trim();
var login_p = $('loginform').p_show.value.trim();
if($('verifycodePanel').style.display=='none' && login_u != '' && login_p !='' && Login.hasCheckedVerifyCode=='no') {
Login.hasCheckedVerifyCode = 'yes';
Login.checkVerifyCode(login_u);
}*/
//}
if($P("furl") == "") {
$('u1').value = (LOGIN_URL);
} else {
var f_s = $P("s");
var f_f = $P("f");
if (isUndef(f_s)) {
f_s = '';
}
if (isUndef(f_f)) {
f_f = '';
}
if(typeof(ref_url)!='undefined' && ref_url){
$('u1').value = LOGIN_URL+"?cid="+$P("cid")+"&furl="+$P("furl")+"&s="+f_s+"&f="+f_f+"&cachetime="+new Date().getTime()+'&ref_url='+ref_url;
}
else{
$('u1').value = LOGIN_URL+"?cid="+$P("cid")+"&furl="+$P("furl")+"&s="+f_s+"&f="+f_f+"&cachetime="+new Date().getTime();
}
}
if(G_PAGE=='login_web' || G_PAGE=='login_xunlei'){
//$("button_submit4reg").className = 'btnlog clickit';
}
$("button_submit4reg").disabled = true;
$("login_enable").disabled = true;
nowCheckedVerifyCodeCount++;
if(Login.nowCheckedVerifyCode || $('loginform').verifycode.value.trim()=='') {
if(nowCheckedVerifyCodeCount>5) {
Login.nowCheckedVerifyCode = false;
nowCheckedVerifyCodeCount = 0;
} else {
window.setTimeout('if(Login.validateInput())submitForm();', 500);
return;
}
}
logined = true;
var md5Pwd = hex_md5(hex_md5($('loginform').p_show.value.trim()));
md5Pwd = hex_md5(md5Pwd.toString()+$('loginform').verifycode.value.trim().toUpperCase());
var login_enable = $('login_enable').checked ? 1 : 0;
var login_hour = $('login_hour').value.trim();
var params="u="+($('loginform').u.value);
params+="&p="+encodeURIComponent(md5Pwd);
params+="&verifycode="+encodeURIComponent($('loginform').verifycode.value.trim().toUpperCase());
params+="&login_enable="+encodeURIComponent(login_enable);
params+="&login_hour="+encodeURIComponent(login_hour);
params+="&business_type=108";
if (false && (isSafari || isChrome)) {
$('loginform').p.value = md5Pwd;
$('loginform').action = 'http://login.xunlei.com/sec2login/';
$('loginform').submit();
} else {
if(loginQuery == null) {
loginQuery = window.setInterval('Login.onIndexLogin()',5000);
}
setXlCookie("blogresult","");
new Json.Request(loginServer[login_times]+"sec2login/",{onSuccess: Login.onIndexLogin,parameters: params,method: "POST"});
responsetime = (new Date().getTime())/1000;
login_times++
return false;
}
}
//客户端登录时,打开离线页面,自动检测是否登录了迅雷
function check_xl_login() {
var sessionid = getCookie("sessionid");
var lx_sessionid = getCookie("lx_sessionid");
var vip_isvip = getCookie("vip_isvip");
var last_userid = getCookie("last_userid");
var user_type = getCookie('user_type');
if(sessionid == null || sessionid == "" || lx_sessionid == "-1"){
var jumpkey,xl_userid;
try {
//7.2
jumpkey = window.external.GetJumpKey();
xl_userid = window.external.GetUserID();
//alert(1);
if (jumpkey!=0 && jumpkey.length>2 && (last_userid == xl_userid || last_userid == "")) {
//alert(33);
var login_url = LOGIN_URL+"?from=1";
location.href = 'http://jump.xunlei.com/jump/?jump_key='+jumpkey+'&u1='+login_url;
}else{
//alert(23);
//IE登录,客户端未登录
var ckeys1 = ["sessionid","usrname","nickname","usernewno","lsessionid","luserid","userid","vip_paytype"];
for(var i=0;i<ckeys1.length;i++){
setXlCookie(ckeys1[i],"");
}
return;
//top.location = "http://lixian.vip.xunlei.com/xunlei_task.html";
}
} catch (e) {
var userinfo = window.external.GetLoginUserInfo();
var data = eval("(" + userinfo + ")");
if(data.isLogined != 1){
//alert(23);
//IE登录,客户端未登录
var ckeys1 = ["sessionid","usrname","nickname","usernewno","lsessionid","luserid","userid","vip_paytype"];
for(var i=0;i<ckeys1.length;i++){
setXlCookie(ckeys1[i],"");
}
location.href = 'http://lixian.vip.xunlei.com/openvip.html';
return;
}else if(data.isLogined == '1'){
jumpkey = data.jumpkey;
xl_userid = data.userId;
if (jumpkey!=0 && jumpkey.length>2 && (last_userid == xl_userid || last_userid == "")) {
//alert(33);
var login_url = LOGIN_URL+"?from=1";
location.href = 'http://jump.xunlei.com/jump/?jump_key='+jumpkey+'&u1='+login_url;
}else{
//alert(23);
//IE登录,客户端未登录
var ckeys1 = ["sessionid","usrname","nickname","usernewno","lsessionid","luserid","userid","vip_paytype"];
for(var i=0;i<ckeys1.length;i++){
setXlCookie(ckeys1[i],"");
}
location.href = 'http://lixian.vip.xunlei.com/openvip.html';
return;
//top.location = "http://lixian.vip.xunlei.com/xunlei_task.html";
}
}
}
//return;
}
//7.9 非会员登录显示开通会员页面
if(user_type == 3){
}else if(vip_isvip == 0){
//alert(1);
function getParameter(parameter,url) {
return isNull(url.match(new RegExp("[?#&]"+parameter+"=(.*?)(?:[#&]|$)", "i"))) ? "" : RegExp.$1;
}
var $P = function(parameter, url){
url = url || window.location.href;
return getParameter(parameter, url);
};
var er = $P('error');
if(e != 3){ //冻结
try {
//7.2
jumpkey = window.external.GetJumpKey();
} catch(e){
location.href = 'http://lixian.vip.xunlei.com/openvip.html?error='+er;
}
}
}
}
function go_pay_referFrom(index, payway, month){
index = index || "";
var pway = '';
if(payway && payway != "") {
pway = "payway/" + payway;
}
if(month && month != "") {
pway += "/month/" + month;
}
window.open(g_dynamic_urls['domain']+g_dynamic_urls['kaitong']+ pway +"?cachetime="+new Date().getTime() + "&referfrom=LX_03");
}
function getPwayByPaytype(paytype) {
switch(paytype) {
case "1" : return "雷点"; // 雷点
case "2" : return "sina 无线"; // sina 无线
case "3" : return "手机"; // 手机
case "4" : return "网银"; // 网银
case "5" : return "年费"; // 年费
case "6" : return "固定电话"; // 声讯
case "7" : return "齐顺声讯"; // 齐顺声讯
case "8" : return "手机钱包"; // 手机钱包
case "9" : return "嗖付"; // 嗖付支付
case "105" : return "靓号赠送"; // 靓号年费
default : return "其他";
}
}
/*
* Configurable variables. You may need to tweak these to be compatible with
* the server-side, but the defaults work in most cases.
*/
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
function str2binl(str)
{
var bin = Array();
var mask = (1 << chrsz) - 1;
for(var i = 0; i < str.length * chrsz; i += chrsz)
bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
return bin;
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length
*/
function core_md5(x, len)
{
/* append padding */
x[len >> 5] |= 0x80 << ((len) % 32);
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
for(var i = 0; i < x.length; i += 16)
{
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
}
return Array(a, b, c, d);
}
/*
* Convert an array of little-endian words to a hex string.
*/
function binl2hex(binarray)
{
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var str = "";
for(var i = 0; i < binarray.length * 4; i++)
{
str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
}
return str;
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5_cmn(q, a, b, x, s, t)
{
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
}
function md5_ff(a, b, c, d, x, s, t)
{
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function md5_gg(a, b, c, d, x, s, t)
{
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function md5_hh(a, b, c, d, x, s, t)
{
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5_ii(a, b, c, d, x, s, t)
{
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 0xFFFF);
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bit_rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));
}
/* add by yeliang 2012-07-02 */
function oneday_tiyan(){
var userid = getCookie('userid');
var type = 'vod_202';
var urls = "http://dyact.vip.xunlei.com/exttrial/activetrialvip/?type="+type+"&userid="+userid+"&callback=?&t="+Math.random();
/*jQuery.ajax({
type: "GET",
url: urls,
dataType:'jsonp',
timeout: 5000,
error: function(){
jQuery('#msginfo_div #msg_info').html("领取失败,稍侯重试");
jQuery('#msginfo_div').show();
},
success: function(data){
if(data.ret == 0){
jQuery('#msginfo_div #msg_info').html("恭喜您,成功领取1天离线体验卡,有效期24小时,<a class='oneday_tiyan_new u_name' href='http://act.vip.xunlei.com/lixian/free/5.html' target='_black'>查看权限>></a>");
}else if(data.ret == 5){
jQuery('#msginfo_div #msg_info').html("对不起,您的ip地址已经领取过,不能再领取,<a class='oneday_tiyan_new u_name' href='http://pay.vip.xunlei.com/index.html?referfrom=VIP_3304' target='_black'>立即开通会员吧>></a>");
}else if(data.ret == 6){
jQuery('#msginfo_div #msg_info').html("对不起,您已经领取过,请立即<a class='oneday_tiyan_new u_name' href='http://pay.vip.xunlei.com/index.html?referfrom=VIP_3304' target='_black'>开通会员></a>享受更多特权");
}else if(data.ret == 4){
jQuery('#msginfo_div #msg_info').html("对不起,您之前领取过体验会员,2个月内不能领取体验卡,请<a class='oneday_tiyan_new u_name' href='http://pay.vip.xunlei.com/index.html?referfrom=VIP_3304' target='_black'>开通会员</a>继续享受特权吧");
}else{
jQuery('#msginfo_div #msg_info').html("领取失败,稍侯重试");
}
jQuery('#msginfo_div').show();
}
});*/
var isneedtoKillAjax =true;// set this true
// Fire the checkajaxkill method after 10 搜刮引擎优化nds
setTimeout(function(){
checkajaxkill();
},5000);// 10 seconds
jQuery.getJSON("http://dyact.vip.xunlei.com/exttrial/activetrialvip/?type="+type+"&userid="+userid+"&callback=?&t="+Math.random(),function(data){
if(isneedtoKillAjax == false){
}else{
isneedtoKillAjax =false;
if(data.ret == 0){
jQuery('#msginfo_div #msg_info').html("恭喜您,成功领取1天离线体验卡,有效期24小时,<a class='oneday_tiyan_new u_name' href='http://act.vip.xunlei.com/lixian/free/5.html' target='_black'>查看权限>></a>");
}else if(data.ret == 5){
jQuery('#msginfo_div #msg_info').html("对不起,您的ip地址已经领取过,不能再领取,<a class='oneday_tiyan_new u_name' href='http://pay.vip.xunlei.com/index.html?referfrom=VIP_3304' target='_black'>立即开通会员吧>></a>");
}else if(data.ret == 6){
jQuery('#msginfo_div #msg_info').html("对不起,您六个月内已经领取过一次,不能再次领取,请立即<a class='oneday_tiyan_new u_name' href='http://pay.vip.xunlei.com/index.html?referfrom=VIP_3304' target='_black'>开通会员></a>享受更多特权");
}else if(data.ret == 4){
jQuery('#msginfo_div #msg_info').html("对不起,您已经领取过体验会员,2个月内不能领取体验卡,请<a class='oneday_tiyan_new u_name' href='http://pay.vip.xunlei.com/index.html?referfrom=VIP_3304' target='_black'>开通会员</a>继续享受特权吧");
}else{
jQuery('#msginfo_div #msg_info').html("领取失败,稍侯重试");
}
jQuery('#msginfo_div').show();
}
return false;
});
function checkajaxkill(){
if(isneedtoKillAjax){
jQuery('#msginfo_div #msg_info').html("领取失败,稍侯重试");
jQuery('#msginfo_div').show();
isneedtoKillAjax = false;
}else{
}
}
return false;
}
function openUrl( url ){
var f=document.createElement("form");
f.setAttribute("action" , url );
f.setAttribute("method" , 'get' );
f.setAttribute("target" , '_black' );
document.body.appendChild(f)
f.submit();
}
/* add 2012-09-01*/
function close_speac_notice_layer(){
jQuery(".speac_notice_layer").hide();
var next = new Date();
next.setTime(next.getTime() + 86400*1000);
next = new Date(Date.parse(next.getFullYear().toString()+"/"+(next.getMonth()+1).toString()+"/"+next.getDate().toString()));
//setGdCookie('cloud_tg_open',1,(Date.parse((next.getMonth()+1).toString()+" " + next.getDate().toString() + ", "+next.getFullYear()) - (new Date()).getTime())/1000);
var next_day = (next.getTime() - (new Date()).getTime())/1000;
setGdCookie('lixian_speac_notice_',1,next_day);
}
/* add 2012-09-10 */
//新登录成功后,初始化
function page_init_unlixian(){
try{
var nickname = decodeURIComponent(getCookie("usernick"));
} catch(e){
var nickname = '';
}
var user_type = getCookie('user_type');
if(user_type == 0 || user_type == 12){
user_level = 0;
}else{
user_level = getCookie('vip_level');
}
var html = '尊敬的用户:<a title="" onclick="go_url(this.href);return false;" href="http://dynamic.i.xunlei.com/user" target="_blank">'+nickname+' </a>您好! <a class="icvip icvip00hui" title="" target="_blank" onclick="go_url(this.href);return false;" href="http://pay.vip.xunlei.com/index.html?referfrom=LX_098"></a><a class="icvip icdown" title="" ></a> <a href="javascript:logout1();" class="link_quit">退出登录</a>';
jQuery(".user_info").html(html);
var vip_expiredate = getCookie('vip_expiredate');
var html1 = "过期时间:<strong>"+vip_expiredate+"</strong>"
if(user_type == 0){
jQuery(".m_mid").find('p').eq(0).hide();
jQuery(".m_mid").find('p').eq(1).show();
jQuery(".link_more,.off_time").hide();
}else{
jQuery(".m_mid").find('p').eq(1).hide();
jQuery(".m_mid").find('p').eq(0).show();
jQuery(".off_time").html(html1).show();
var g_url = decodeURIComponent(getCookie('g_url'));
jQuery(".link_more a").attr("href",g_url).show();
}
}
Keep it simple!

浙公网安备 33010602011771号