'; html += '
'; $("body").prepend(html); $("#uname").blur(function (e) { var params = new Object(); params.uname = $("#uname").val().trim(); $.getJSON(NCTInfo.ROOT_URL + "ajax/user-social", params, function (result) { if (typeof result.error_code != "undefined" && result.error_code == 0) { NCTOAuth.validateFieldRegister(false, "UName"); } else { var msg = ""; if (result.error_code == 1) { msg = "Tên đăng nhập tối thiểu phải 6 ký tự và tối đa 30 ký tự. Vui lòng nhập lại!"; } else if (result.error_code == 2) { msg = "Tên đăng nhập không hợp lệ. Vui lòng nhập lại!"; } else if (result.error_code == 3) { msg = "Tên đăng nhập đã tồn tại. Vui lòng nhập lại!"; } NCTOAuth.validateFieldRegister(true, "UName", msg); } }); }); $("#uname").focus(function () { $("#noteUserName").show(); }); $("#uname").blur(function () { $("#noteUserName").hide(); }); $("#email").focus(function () { $("#noteEmail").show(); }); $("#email").blur(function () { $("#noteEmail").hide(); }); } if (NCTOAuth.FACEBOOK == type) { title += " bằng tài khoản facebook"; } else if (NCTOAuth.GOOGLE == type) { title += " bằng tài khoản Google"; } $("#socialTitle").html(title); $("#uname").val(username); $("#fullName").val(fullName); $("#email").val(email); $("#htmlLoginSocial").show(); NCTOAuth.showAllSuccessFieldRegister(); }, closePopupRegister: function () { $("#htmlLoginSocial").hide(); }, validateFieldRegister: function (isError, regex, msg) { if (typeof isError == "undefined" || isError == null || typeof regex == "undefined" || regex == null || regex == "") { return; } if (isError) { $("#err_" + regex).html(msg); $("#err_" + regex).show(); $("#suc_" + regex).hide(); } else { $("#err_" + regex).hide(); $("#suc_" + regex).show(); } }, showErrorSocial: function (msg) { $("#errorSocial").show(); $("#errorSocial").html(msg); }, showAllSuccessFieldRegister: function () { $("span[id*='err_']").each(function (e) { $(this).hide(); }); $("div[id*='suc_']").each(function (e) { $(this).show(); }); $("#errorSocial").hide(); }, closePopupLogin: function () { if ($("#htmlLoginForm").is(":visible")) { $("#htmlLoginForm").addClass("hideShowCase"); } if ($("#htmlRegisterForm").is(":visible")) { $("#htmlRegisterForm").addClass("hideShowCase"); } }, isInvalidEmail: function (email) { if (email == null || email == 'undefined') { return false; } var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); }, registerSocial: function (socialId, type) { if (!$("#checkAll").is(":checked")) { NCTOAuth.showErrorSocial("Bạn chưa chọn đồng ý điều kiện \"Thỏa thuận sử dụng\" "); return; } var userName = $("#uname").val(); var fullName = $("#fullName").val(); var email = $("#email").val(); var phone = $("#phone").val(); var ggCaptcha = $("#codegg").val(); if (typeof userName == "undefined" || userName == "") { NCTOAuth.validateFieldRegister(true, "UName", "Tên đăng nhập tối thiểu phải 6 ký tự và tối đa 30 ký tự. Vui lòng nhập lại!"); return; } if (typeof fullName == "undefined" || fullName == "") { NCTOAuth.validateFieldRegister(true, "FName", "Tên hiển thị không được để trống."); return; } if (typeof email == "undefined" || email == "") { NCTOAuth.validateFieldRegister(true, "Mail", "Email không được để trống."); return; } else if (!NCTOAuth.isInvalidEmail(email)) { NCTOAuth.validateFieldRegister(true, "Mail", "Email không không hợp lệ."); return; } if (typeof ggCaptcha == "undefined" || ggCaptcha == "") { NCTOAuth.showErrorSocial("Mã xác nhận không đúng."); return; } var user = new Object(); user.userName = userName; user.fullName = fullName; user.email = email; user.phone = phone; user.ggCaptcha = ggCaptcha; user.socialId = socialId; user.type = type; $.post(NCTInfo.ROOT_URL + "ajax/user-social", user, function (result) { if (typeof result.error_code != "undefined") { if (result.error_code == 0) { //success if ($("#htmlLoginSocial").is(":visible")) { $("#htmlLoginSocial").hide(); } NCTOAuth.showPopupRegisterSuccess(userName, fullName, type); } else { var msg = ""; if (result.error_code == 1) { msg = "Tên đăng nhập tối thiểu phải 6 ký tự và tối đa 30 ký tự. Vui lòng nhập lại!"; NCTOAuth.validateFieldRegister(true, "UName", msg); } else if (result.error_code == 2) { msg = "Tên đăng nhập không hợp lệ. Vui lòng nhập lại!"; NCTOAuth.validateFieldRegister(true, "UName", msg); } else if (result.error_code == 3) { msg = "Tên đăng nhập đã tồn tại. Vui lòng nhập lại!"; NCTOAuth.validateFieldRegister(true, "UName", msg); } else if (result.error_code == 16) { msg = "Mã xác minh đã hết hạn."; NCTOAuth.showErrorSocial(msg); } else if (result.error_code == 15) { msg = "Thông tin đăng nhập không hợp lệ. Vui lòng nhập lại!"; NCTOAuth.showErrorSocial(msg); } } } grecaptcha.reset(); }); }, showPopupRegisterSuccess: function (username, fullName, type) { var title = "Đăng ký"; if (NCTOAuth.FACEBOOK == type) { title += " bằng tài khoản facebook"; } else if (NCTOAuth.GOOGLE == type) { title += " bằng tài khoản Google"; } var html = 'Stay Tuned! Ayy! Soke blom leh a choose, Ndichoke a di two, Bada de blu resana ga gela senda di nuth, Bu di fans so is cool, Baitli sitak baju, She took a bullet from me and on her face she done prove, And I fed her up again a ratso, Hard things like reskimi le magur, Real ass ain't talk about ma fur, Don't promote crime, marra pela re-good, She looking good, marra energies Jesus, Charlie from the factory, never been the real Mingus, After we shook hands I had to cut my fingers, They all two-faced sure they make up, make me nervous, Blom me look seh nuhm gandwa, She spill a little bit nuhm gandwa, Seh skimi ne skips nuhm gandwa, Seh swine lum seh nuhm gandwa, Bim gandwa, Yeah, I'm gandwa, Bim gandwa, Yeah, I'm gandwa, Explode me look seh nuhm gandwa, She spill a little bit nuhm gandwa, Seh skimi ne skips nuhm gandwa, Seh swine lum seh nuhm gandwa, Bim gandwa, I'm gandwa, I'm gandwa, Bim gandwa, Yeah, I'm gandwa, Yeah, I'm gandwa, With that look in her eyes like a chogo to stoat, I swear she look better without all of her clothes, Down when she on the old foes, Come to my house round the time I wake up with, None of the thousand layers of makeup, Lifting benches like M-10, Be with them when you're getting home, Cause, All your pets don't got my phone, No dog on the railing, She can't help but admit it, She, Love the feeling when I hit her, Make her feel it in her bones, Love the feeling when she nut, While I'm kissing on the rose, I, Swear she got that pirifera gitgiri, Swear she got that pirifera gitgiri, By the time that she puts on her clothes, She's ghost, Bim gandwa, Yeah, I'm gandwa, Bim gandwa, Seh skimi ne skips nuhm gandwa, Seh es vun elum sim duhm gandwa, Bim gandwa, Yeah, I'm gandwa Bim gandwa, Yeah, I'm gandwa, Es blume luk sin, Duhm gandwa, Seh spele lip in, Duhm gandwa, Seh skimi ne skips, Duhm gandwa, Seh es vun elum sim, Duhm gandwa, Bim gandwa, Bim gandwa, I'm gandwa, I'm gandwa, Bim gandwa, Yeah, I'm gandwa, I'm gandwa, I'm not much of a smooth talk, But she vibin' regardless, And girl you the finest, I'm honest, Straight boss, Call me Hugo, And baby girl, You know you a queen, But also you is my bitch, God bless, I'm verified Christ, And I live through the music, So I'm sacrificed twice, So you marry Magdalene, Centerfold Magazine, You my best friend, I love you like a rat love Chase, I love you, Trust that I got you, Ain't no woman above you, Girl I love you, I'm gandwa, Seh es vun elum sim, Duhm gandwa, Seh es vun elum sim, Duhm gandwa, Bim gandwa, Yeah, I'm gandwa, Bim gandwa, Yeah, I'm gandwa, Bim gandwa, Yeah, I'm gandwa, Es blommel uksin, Duhm gandwa, Seh spille lib bin, Duhm gandwa, Seh gskim men skims, Duhm gandwa, Seh es vun elum sim, Duhm gandwa, Bim gandwa, I'm gandwa, I'm gandwa, Bim gandwa, I'm gandwa, I'm gandwa, I'm gandwa.