document.onkeydown = function (e) { var theEvent = window.event || e; var code = theEvent.keyCode || theEvent.which; if (code == 13) { $("#YtUserbnt").click(); } } function YtFavorite(fvtype, pid, obj) { if(fvtype == 'add') { var posturl='http://52xbf.com/zb_users/plugin/YtUser/favorite/add.php'; } else if(fvtype == 'del') { var posturl='http://52xbf.com/zb_users/plugin/YtUser/favorite/del.php'; } if (fvtype == 'add' || fvtype == 'del') { $.post(posturl, { "LogID":pid, } , function(data) { var s = data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { YtFavorite_custom(fvtype,s,obj,'failed'); } else { YtFavorite_custom(fvtype,s,obj,'success'); } } ); } } function YtFavorite_custom(yt_type,yt_mms,yt_obj,yt_isok) { if (yt_isok == 'success') { layer.msg(yt_mms); if (yt_type == 'add') { if (yt_obj) {//有按钮就直接修改按钮内容,否则就弹出提示 $(yt_obj).text('已收藏'); //$(yt_obj).removeAttr('onclick'); } else { layer.msg('已加入收藏'); window.location.reload(); } } else if (yt_type == 'del') { if (yt_obj) {//有按钮就直接修改按钮内容,否则就弹出提示 $(yt_obj).text('已取消'); //$(yt_obj).removeAttr('onclick'); } else { layer.msg('已取消收藏'); window.location.reload(); } } } else if (yt_isok == 'failed') { layer.msg(yt_mms.match(".+?")[0].replace("","").replace("","")); } } function YtSbuy() { $.post('http://52xbf.com/zb_users/plugin/YtUser/YtSbuy.php', { "LogID":$("input[name='LogID']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")) } else { var s =data; layer.msg(s); setTimeout('window.location.reload()',1500); } } ); } function Upgrade() { $.post('http://52xbf.com/zb_users/plugin/YtUser/Upgrade.php', { "vipstate":$("input[name='vipstate']:checked").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Upgrade&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?Upgrade"',1500); } } ); } function Integral() { $.post('http://52xbf.com/zb_users/plugin/YtUser/Integral.php', { "invitecode":$("input[name='invitecode']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Integral&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?Integral"',1500); } } ); } function register() { $.post('http://52xbf.com/zb_users/plugin/YtUser/register.php', { "username":$("input[name='username']").val(), "password":$("input[name='password']").val(), "repassword":$("input[name='repassword']").val(), "email":$("input[name='email']").val(), "emailcode":$("input[name='emailcode']").val(), "alias":$("input[name='alias']").val(), "homepage":$("input[name='homepage']").val(), "intro":$("input[name='intro']").val(), "verifycode":$("input[name='verifycode']").val(), "invitecode":$("input[name='invitecode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=register&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?Login"',1500); } } ); } function Ytuser_Login() { $.post('http://52xbf.com/zb_users/plugin/YtUser/cmd.php?act=verify', { "verifycode":$("input[name='verifycode']").val(), "username":$("input[name='edtUserName']").val(), "edtPassWord":MD5($("input[name='edtPassWord']").val()), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")) } else { var s =data; layer.msg(s); if( == 0) { setTimeout('window.location="http://52xbf.com/"',1500); } else { setTimeout('window.location="http://52xbf.com/?User"',1500); } } } ); } function Ytuser_allLogin() {//一般用于主题调用,登录后刷新而不是跳转首页,且无验证码 $.post('http://52xbf.com/zb_users/plugin/YtUser/cmd.php?act=verify', { "username":$("input[name='edtUserName']").val(), "edtPassWord":MD5($("input[name='edtPassWord']").val()), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")) } else { var s =data; layer.msg(s); setTimeout('window.location.reload()',1500); } } ); } function resetpwd() { layer.msg('正在发送邮件'); $.post('http://52xbf.com/zb_users/plugin/YtUser/mailto.php', { "username":$("input[name='username']").val(), "email":$("input[name='email']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=resetpwd&tm="+Math.random()); } else { var s =data; layer.msg(s); } } ); } function Resetpassword() { $.post('http://52xbf.com/zb_users/plugin/YtUser/resetpassword.php', { "username":$("input[name='username']").val(), "hash":$("input[name='hash']").val(), "password":$("input[name='password']").val(), "repassword":$("input[name='repassword']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Resetpassword&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?Login"',1500); } } ); } function Changepassword() { $.post('http://52xbf.com/zb_users/plugin/YtUser/changepassword.php', { "password":$("input[name='password']").val(), "newpassword":$("input[name='newpassword']").val(), "repassword":$("input[name='repassword']").val(), "token":$("input[name='token']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Changepassword&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?Login"',1500); } } ); } function checkInfo() { $.post('http://52xbf.com/zb_users/plugin/YtUser/cmd.php?act=MemberPst&token=4e84dd1cf95dbb55f5f3ad3a8d85f999',{ "ID":$("input[name='ID']").val(), "Guid":$("input[name='Guid']").val(), "Alias":$("input[name='Alias']").val(), "Email":$("input[name='Email']").val(), "HomePage":$("input[name='HomePage']").val(), "Intro":$("textarea[name='Intro']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")) $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=User&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?User"',1500); } } ); } function YtSign() { $.post('http://52xbf.com/zb_users/plugin/YtUser/common/sign.php', function(data) { var s = data; layer.msg(s); } ); } function ytmobilecode() { layer.msg('正在发送验证码'); $.post('http://52xbf.com/zb_users/plugin/YtUser/common/mobilecode.php', { "email":$("input[name='email']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s = data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")) $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=register&tm="+Math.random()); } else { layer.msg(s); } } ); } function Ytbuy() {//本来应该已经弃用了,但是天兴APP模板的APP下载调用了这个,所以只能加上 $.post('http://52xbf.com/zb_users/plugin/YtUser/Ytbuy.php', { "LogID":$("input[name='LogID']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")) } else { var s =data; layer.msg(s); setTimeout(window.location="http://52xbf.com/?buy&uid="+$("input[name='LogID']").val(),1500); } } ); } function onlinepay() {//在线支付 $.post('http://52xbf.com/zb_users/plugin/YtUser/onlinepay.php', { "payjifen":$("input[name='payjifen']").val(), "payment_way":$("input[name='payment_way']:checked").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Integral&tm="+Math.random()); } else { var s =data; if(s.search("form")>=0) { document.write(s); } else { layer.msg(s); } } } ); }function 注释Ytbuypay() { $.post('http://52xbf.com/zb_users/plugin/YtUser/Ytbuypay.php', { "LogID":$("input[name='LogID']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { var yt=s.match(".+?")[0].replace("","").replace("",""); layer.msg(yt); if(yt =="余额不足,请充值.") { window.location='http://52xbf.com/?Integral'; } } else { var s =data; layer.msg(s); setTimeout(window.location=$("input[name='LogUrl']").val(),1500); } } ); } function 注释checkArticleInfo() { $.post('http://52xbf.com/zb_users/plugin/YtUser/articleInfo.php', { "Title":$("input[name='Title']").val(), "Alias":$("input[name='Alias']").val(), "Tag":$("input[name='Tag']").val(), "CateID":$("*[name='CateID']").val(), "Content":editor.getContent(), "token":$("input[name='token']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Articleedt&tm="+Math.random()); } else { var s =data; layer.msg(s); window.location='http://52xbf.com/?Articlelist'; } } ); } function 注释Certifi() { $.post('http://52xbf.com/zb_users/plugin/YtUser/common/certifi.php', { "name":$("input[name='name']").val(), "idcard":$("input[name='idcard']").val(), "token":$("input[name='token']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Certifi&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?Certifi"',1500); } } ); } function 注释Nameedit() { $.post('http://52xbf.com/zb_users/plugin/YtUser/nameedit.php', { "name":$("input[name='name']").val(), "rename":$("input[name='rename']").val(), "token":$("input[name='token']").val(), "verifycode":$("input[name='verifycode']").val(), } , function(data) { var s =data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)) { layer.msg(s.match(".+?")[0].replace("","").replace("","")); $("#reg_verfiycode").attr("src","http://52xbf.com/zb_system/script/c_validcode.php?id=Nameedit&tm="+Math.random()); } else { var s =data; layer.msg(s); setTimeout('window.location="http://52xbf.com/?User"',1500); } } ); }