/*//信息提交,全部整合在这里(暂时不使用 U.UN.subUserAllInfo = function () { var affirmP = $("#UU_N_AffirmP")[0].value; var newP = $("#UU_N_NewP")[0].value; var nowP = $("#UU_N_NowP")[0].value; if (nowP != "" || newP != "" || affirmP != "") { //三个输入框中有一个不为空则执行密码函数 if (!U.U.SPW()) { alert("密码修改失败"); return false; } } //密保码 var affirmSC = $("#UU_N_AffirmSecurityCode")[0].value; var newSC = $("#UU_N_NewSecurityCode")[0].value; if (newSC != "" || affirmSC != "") { if (US.userInfo.SecurityAnswer == null || US.userInfo.SecurityAnswer == "") { //无密保码用户 if (!U.U.SSC()) { alert("密保码修改失败"); return false; } } else { var nowSC = $("#UU_N_NowSecurityCode")[0].value; if (nowSC != "") { if (!U.U.SSC()) { alert("密保码修改失败"); return false; } } } } alert("信息已保存"); return true; }*/ /*-------------------------------------------------------*/ //------------------------------------------------------------没使用的函数------------------------------------------------------------// //firefox居然连split getElmentById()都不怎么支持。哎。无奈放弃。 //function US_Manage_UserDescriptCommand(obj) { // //哎,firefox徒有虚名啊。。网络上得传闻都是假的,事件传递老出毛病 // //var target = U.M.GetEventTarget(e); //根据浏览器类型装载事件,在主js文件中定义。 // //if (target.tagName.toLowerCase() == 'div') { // var _tagetarray = obj.getElementsByTagName("div")[0].innerHTML.split("|"); // U.M.divdoubleClick(_tagetarray[0], _tagetarray[1]); // //} //} //U.U.UR = 0; //判断个人设置信息input文本框中所有格式是否错误的临时变量 ////--------------------------------------------------------------------------------个人信息设置区域---------------------------------------------------------------------- ////-----------------------------------------------------------------------------------初始化用户信息--------------------------------------------------------------------- ////加载个人信息以及最近留言 //U.U.UPD = function () { // if (!U.U.L.LARG()) {//判断用户是否登录 // var j = 0; // var _UPF = $("#UU_N_UProDiv")[0]; //好友信息框 // U.D.PopupWindow(_UPF); //弹窗 // U.D.Tb.WindowRestore(_UPF, '', '个人信息设置'); //创建任务栏链接 // $("img", _UPF)[0].src = U.M.GetImgU(US.userInfo.UserThumbnailImageHead); // var _USW = { "UserIDCard": "UU_N_mypost", "UserNickName": "UU_N_myname", "UserEmail": "UU_N_email", "UserTelephoneNumber": "UU_N_phone", "TrueName": "UU_N_TNameInput", "UserRemarks": "UU_N_resume", "UserThumbnailImageHead": "UU_N_Image", "TrueCurrency": "UU_ND_TrueCurrency", "VirtualCurrency": "UU_ND_VirtualCurrency" }; //需要改变的元素 // for (var i in _USW) { // if (_USW.hasOwnProperty(i)) { // if (j > 6) { $("#" + _USW[i])[0].innerHTML = US.userInfo[i] || ""; } // else if (j > 5) { $("#" + _USW[i])[0].src = U.M.GetImgU(US.userInfo[i] || ""); } // else { $("#" + _USW[i])[0].value = US.userInfo[i] || ""; } // j++; // } // } // (US.userInfo.UserSex == false) ? $("#UU_N_FMSex")[0].checked = true : $("#UU_N_MSex")[0].checked = true; //设置性别。 // if (!US.userInfo.SecurityAnswer) { $("div", $("#ChangeSecurityCode")[0])[1].style.display = "none"; } // U.U.CB(1); //视图切换 // //如果用户已经通过认证,身份证上传按钮,姓名,身份证号不给修改。 // if (US.userInfo.IsAllowAccess != 0) { $("#UU_N_TNameInput")[0].disabled = $("#UU_N_mypost")[0].disabled = true; $("#UU_N_Identitycardimg")[0].className = "UU_N_Identitys UD_NUB UU_N_Idenbg2"; $("#UU_N_BDTNFile")[0].disabled = true; } // U.U.LMBD($("#UU_ND_NYR")[0]); //加载用户生日 // if (!U.MD.DynamicLoad("/js/UU/U.U.C.js", "js", [[U.U.LCJ, ([$("#UU_ND_CPC")[0]])]])) { U.U.LCJ($("#UU_ND_CPC")[0]); } //第一次加载Js的判断 加载用户城市 // } //} ////切换视图 //U.U.CB = function (T) { // var _USDW = [U.U.SIF, U.U.SMD, U.U.SPW, U.U.SSC, null]; // var _USW = ["UU_N_rightDetail", "UU_N_moreDetail2", "UU_N_pwdblock", "UU_N_SecurityCodeblock", "UU_N_note"]; //切换的 // for (var i = 0; i < _USW.length; i++) { $("#" + _USW[i])[0].style.display = "none"; } //全部隐藏 // $("#" + _USW[T - 1])[0].style.display = "block"; //显示对应的 // $("#UU_N_SB")[0].onclick = _USDW[T - 1]; //点击事件 //} ////------------------------------------------------------------------------提交数据-------------------------------------------------------------- ////提交修改后的个人信息,此处把数据提交到数据库 //U.U.SIF = function () { // var _UDE = {}, _UDOD = $("#UU_N_rightDetail")[0], _UDID = $("input", _UDOD); // U.A.Request("UseStudioManage.ModifyUserInfo", ([US.userInfo.userid, (_UDE["TrueName"] = _UDID[5]), (_UDE["UserNickName"] = _UDID[0]), (_UDE["UserTelephoneNumber"] = _UDID[4]), (_UDE["UserIDCard"] = _UDID[6]), _UDE["UserIndividualitysignature"] = _UDID[7], _UDE["UserEmail"] = _UDID[3], _UDE["UserRemarks"] = _UDID[7], (_UDE["UserSex"] = _UDID[1].checked) ? 0 : 1]), U.U.AsynSIF, (["", _UDE])); //后台修改数据库 //} ////修改个人信息异步 //U.U.AsynSIF = function (request) { // var context = request.context, _UDE = context[1]; request = request.value; // if (request) { _UDE["UserEmail"] = US.userInfo["UserEmail"]; } //邮箱给占用了 // _$(US.userInfo).Change(_UDE); $("#UF_UP_Maruee")[0].innerHTML = US.userInfo.UserIndividualitysignature; //} ////修改真实姓名和身份证 //U.U.CUTN = function () { // var _UDID = $("input", $("#UU_N_rightDetail")[0]), _UDND = _UDID[5], _UDSD = _UDID[6], _UDCD = _UDID[7]; // if (US.userInfo.IsAllowAccess == 0) {//如果没有认证的用户 // if (_UDCD.value) { if (_UDND.value.Trim() && _UDSD.value.Trim()) { U.U.ICAF(_UDCD); _UDND.disabled = _UDSD.disabled = true; U.Alert("等待认证"); return true; } } else { alert("请上传身份证进行认证"); } // } // return false; //} ////------------------------------------------------------------------------------------------用户输入判断 ////判断用户输入 //U.U.ICC = function (UDTH, UDTD, UTF, UTP) { // UDTD.innerHTML = ""; // if (UTF.test(UDTH)) { U.U.UR = true; } // else { U.U.UR = false; U.U.TE(UTP, UDTD); } // return U.U.UR; //} ////判断邮箱是否正确 //U.U.SEM = function (UDOD, UAF) { // (UDOD.value != US.userInfo.UserEmail) && (U.A.Request("UseStudioManage.GetEmailValue", ([US.userInfo.userid, UDOD]), UAF || U.U.IE, ([""]))) //} ////判断邮箱是否存在 //U.U.IE = function (request) { // // request = request.value; // // var _UNE = $('#UU_N_ChangeEmailSpan')[0] // // _UNE.innerHTML = ""; // // if (!request) { // // U.U.TE("此邮箱已被注册", _UNE); // // } //} ////判断身份证是否重复使用 //U.U.SICM = function (SO) { // if (US.userInfo.useridCard != SO) U.A.Request("UseStudioManage.GetIDCardValue", ([US.userInfo.userid, SO]), U.U.AsynSICM, ([""])) //} ////ajax异步处理身份证,要求唯一 判断身份证是否存在 //U.U.AsynSICM = function (request) { // request = request.value; // var _UNE = $('#UU_N_ChangeIdCardSpan')[0] // _UNE.innerHTML = ""; // if (!request) { // U.U.TE("此身份证已被注册", _UNE); // } //} //U.U.TE = function (IST, SO) { // $$("div", { "className": "UU_N_cs UU_N_error" }, SO); // $$("div", { "className": "UU_N_float", "innerHTML": IST }, SO); //} ////设置是否正确的样式 //U.U.SER = function (IST, SO) { // if (IST) { SO.className = "UU_N_cs UU_N_error"; } // else { SO.className = "UU_N_cs UU_N_right"; } // SO.innerHTML = ""; // return IST; //} ////-------------------------------------------------------------------------------初始化生日地址------------------------------------------------------------------------ ////----------------------------------------------------------------------添加数据 ////保存数据 //U.U.SMD = function () { // var _UCC = $("#UU_ND_Country")[0], _UP = $("#UU_ND_Province")[0], _UC = $("#UU_ND_City")[0], _UBY = $("#UU_ND_Birthday_year")[0], _UBM = $("#UU_ND_Birthday_month")[0], _UBD = $("#UU_ND_Birthday_day")[0], _UND = _UBY.value + "-" + _UBM.value + "-" + _UBD.value; // if (U.MT.SetDT(_UND, "-") != US.userInfo.Birthday || _UCC.value != US.userInfo.Country || _UP.value != US.userInfo.Province || _UC.value != US.userInfo.City) { U.A.Request("UseStudioManage.ModifyUserMoreDetail", ([US.userInfo.userid, _UCC.value, _UP.value, _UC.value, _UND]), U.U.AsynSMD, (["", { "Country": _UCC.value, "Province": _UP.value, "City": _UC.value, "Birthday": _UND}])); } //异步修改用户资料 // U.U.CUD(); //重新检查资料完整度 //} ////异步修改用户资料 //U.U.AsynSMD = function (request) { // var context = request.context; // request = request.value; // if (request != null) { // U.U.CUIF(US.userInfo, context[1]); // U.Alert("详细信息保存成功"); // return true; // } //} ////修改用户信息 //U.U.CUIF = function (DA, F) { // for (var i in F) { // DA[i] = F[i]; // } //} ////检测当前用户输入的密码是否正确 //U.U.CNP = function (UDOD, UTF, UAF) { // var _UDE = UTF ? "SecurityCode" : "Password"; // U.A.Request("UseStudioManage.ModifyCheck" + _UDE, ([US.userInfo.userid, UDOD.value]), U.U.AsynCNP, (["", UDOD, UTF, UAF])); //} ////异步判断密码是否正确 //U.U.AsynCNP = function (request) { // var _UDOD, context = request.context, _UTF = context[2], _UAF = context[3]; request = request.value; // if (_UAF) { _UAF(context, request); } // else { _UDOD = $("#" + (_UTF ? "UU_N_Nowp" : "UU_N_NowSCSpan"))[0]; _UDOD.innerText = ""; (request) && (U.U.TE("密码错误", _UDOD)); } //} ////异步判断密保码是否正确 //U.U.AsynNSC = function (request) { // var _UDOD, context = request.context, _UAF = context[2]; request = request.value; // if (_UAF) { _UAF(context, request); } // else { _UDOD = $("#UU_N_NowSCSpan")[0]; _UDOD.innerText = ""; U.U.TE("密保码错误", _UDOD); } //} ////提交修改密码 //U.U.SPW = function () { // var _UDOD = $("#UU_N_AffirmP")[0]; // if (!$("#UU_N_Nowp")[0].innerHTML && !$("#UU_N_Newp")[0].innerHTML && !$("#UU_N_ChangePassword")[0].innerHTML && $("#UU_N_NowIP")[0].value && $("#UU_N_NI")[0].value && $("#UU_N_AffirmP")[0].value) { // U.A.Request("UseStudioManage.ModifyUserPassword", ([_UDOD.value, US.userInfo.userid, US.userInfo.username, US.userInfo.SecurityAnswer, US.userInfo["OnUserId"]]), U.U.CPW, ([])); //保存到数据库 // } // else { U.Alert("请正确填写资料"); } //} ////修改密码异步 //U.U.CPW = function (request) { // var context = request.context; request = request.value; // if (request) { // US.userInfo.UserPassword = request; // $("#UU_N_ChangePassword")[0].innerHTML = $("#UU_N_NI")[0].value = $("#UU_N_NowIP")[0].value = $("#UU_N_AffirmP")[0].value = ""; // U.Alert("密码修改成功"); // } // else { U.Alert("密码修改失败,请重试"); } //} ////判断确认密码是否相同 //U.U.CCPW = function (SO, NPW, NWPW, UCPW) { // UCPW.innerHTML = ""; // var _USW = ""; var _TF = false; // if (SO.value && NWPW.value) { // if (SO.value == NWPW.value) { // if (SO.value.length < 6 || SO.value.length > 20) { _USW = "长度应为6-20位"; } // else if (!U.MS.PassWord.test(SO.value)) { _USW = "不支持特殊符号"; } // else if (SO.value == NPW.value || NWPW.value == NPW.value) { _USW = "新密码不得与旧密码相同"; } // else { _TF = true; } // } // else { _USW = "两次输入的密码不一致 "; } // } // if (_USW) { // U.U.TE(_USW, UCPW); // } // return _TF; //} ////通用密码检查 //U.U.CNPW = function (SO, SP) { // SP.innerHTML = ""; // if (SO.value) { // if (SO.value.length < 6 || SO.value.length > 20) { U.U.TE("长度应为6-20位", SP); } // else if (!U.MS.PassWord.test(SO.value)) { U.U.TE("不支持特殊符号", SP); } // } //} ////------------------------------------------------------------------------------- ////提交密保码 //U.U.SSC = function () { // var _UASC = $("#UU_N_AffirmSC")[0]; // if (!US.userInfo.SecurityAnswer) { // if (!$("#UU_N_NewSCSpan")[0].innerHTML && !$("#UU_N_ChangeSCSpan")[0].innerHTML && $("#UU_N_NewSC")[0].value && $("#UU_N_AffirmSC")[0].value) { // U.A.Request("UseStudioManage.EditSecurityCode", ([US.userInfo.userid, _UASC.value]), U.U.CS, ([])); //保存到数据库 // $("div", $("#ChangeSecurityCode")[0])[1].style.display = "block"; // } // else { U.Alert("请正确填写资料"); } // } // else { // if (!$("#UU_N_NowSCSpan")[0].innerHTML && !$("#UU_N_NewSCSpan")[0].innerHTML && !$("#UU_N_ChangeSCSpan")[0].innerHTML && $("#UU_N_NowSC")[0].value && $("#UU_N_NewSC")[0].value && $("#UU_N_AffirmSC")[0].value) { // U.A.Request("UseStudioManage.EditSecurityCode", ([US.userInfo.userid, _UASC.value]), U.U.CS, ([])); //保存到数据库 // } // else { U.Alert("请正确填写资料"); } // } //} ////添加密保 //U.U.CS = function (request) { // request = request.value; US.userInfo.SecurityAnswer = request; // $("#UU_N_NowSC")[0].value = $("#UU_N_NewSC")[0].value = $("#UU_N_AffirmSC")[0].value = $("#UU_N_ChangeSCSpan")[0].innerHTML = ""; //清空数据 // U.U.CUD(); U.Alert("密保码修改成功"); //重新检查资料完整度 //} ////--------------------------------------------------------------------------------------上传头像区域------------------------------------------------------------------ ////上传头像显示 //U.U.DP = function (T) { // var _UNCD = $("#UU_N_CD")[0]; // $("div", _UNCD)[7].innerHTML = US.userInfo.UserNickName; //这里带数字,添加一个div会出错。 // var _UNI = $("img", _UNCD).addAttrArray({ "onerror": [U.M.ImgError, (["this"])], "src": U.M.GetImgU(US.userInfo.UserThumbnailImageHead) }); // $("div", _UNCD)[6].onclick = U.M.apply(this, [[U.M.StopBubble], [U.Img.Create, [([{ 'Thm': U.M.GetImgU(US.userInfo.UserThumbnailImageHead), 'Img': US.fs + US.userInfo.UserImageHead}])]]]); // U.U.LXP(T || 0); //用户历史头像 // if (T == null) { U.D.PopupWindow(_UNCD); } //} ////查看历史头像 //U.U.LDP = function (DH) { // var _UNIA = $("#UU_N_IA")[0]; // _UNIA.innerHTML = ""; // for (var i = 0; i < DH.length; i++) { if (i == 8) { break; } $$("img", { "onerror": U.M.ImgError, "className": "UU_N_FLL", "alt": "点击更换头像", "src": DH[i][0], "onclick": [[U.U.CP, ([DH[i]])]] }, _UNIA); } //} ////查看系统头像 //U.U.LXP = function (T) { // var _U = "/img/UserHead/", _SW = [[_U + "nFacen.jpg"], [_U + "nFaceArt.jpg"], [_U + "212名.jpg"], [_U + "w551.png"], [_U + "w2.png"], [_U + "w3.png"]]; // if (T == 1) { _SW = []; for (var i = US.userInfo.DiskHeadImg.length - 1; i >= 0; i--) { _SW.push([US.userInfo.DiskHeadImg[i].UserDirectoryUrl, US.fs + US.userInfo.DiskHeadImg[i].UserFilesServerName]); } } // U.U.LDP(_SW); //} ////修改用户头像查看 //U.U.CP = function (URL) { // var _UR = URL[0] || this.src, _UDCD = $("#UU_N_CD")[0]; // $("img", _UDCD).addAttrArray({ "src": URL }); $("div", _UDCD)[6].onclick = U.M.apply(this, [[U.M.StopBubble], [U.Img.Create, [([{ 'Thm': _UR, 'Img': URL[1] || _UR}])]]]); // $("#UU_N_BTT")[0].onclick = U.M.apply(this, [[U.U.CUIMG, ([URL, "this"])], [U.U.ULIMG, ([$('input', _UDCD)[0]])]]); //保存头像 //} ////修改用户头像 //U.U.CUIMG = function (UEI, SO) { // if (UEI[0] != US.fs + US.userInfo.UserThumbnailImageHead && UEI[0].indexOf("1473.cn") > -1) {//合法的链接地址同时又修改了用户头像 // //修改所有页面中的头像。 // U.U.TYMHimg(UEI[0]); // U.A.Request("UseStudioDisk.ModitfyHeadImage", ([US.userInfo.userid, (UEI[1] || UEI[0]).replace(US.fs, ""), UEI[0].replace(US.fs, "")]), U.M.apply(this, "U.Alert('修改用户头像成功')"), ([])); // _$(US.userInfo).Add({ "UserThumbnailImageHead": UEI[0], "UserImageHead": UEI[1] }); // } // $('div', SO.parentNode.parentNode)[1].onclick(); //} ////统一修改头像 //U.U.TYMHimg = function (src) { // if (US.userInfo.userid) { $("img", $("#UD_UT")[0])[0].src = $("#UDK_LL_US_IM")[0].src = $("img", $("#UF_UP_UserBoard")[0])[0].src = $("img", $("#UU_N_CD")[0])[0].src = $("#UU_N_Image")[0].src = $("#U_U_L_HeadImg")[0].src = $("#UU_IC_Avatar")[0].src = $("img#UDK_LL_US_IM", $("#UseStudioUserDiskDiv" + US.userInfo.userid)[0])[0].src = src; } //} ////统一修改积分 //U.U.TYMIC = function (VCSum) { // $("div#UDK_LL_VirC", $("#UseStudioUserDiskDiv" + US.userInfo.userid))[0].innerHTML = "积分:" + VCSum; // $("#UU_IC_VCSum")[0].innerHTML = $(".UU_OverIC")[0].innerHTML = $(".UU_OverIC")[1].innerHTML = VCSum; //} ////------------------------------------------------------------------------------------上传----------------------------------------------------------------------------- ////上传用户身份证(还没有上传到用户硬盘 只是获取css和html可以识别的图片base64编码) //U.U.UIDC = function (SO) { // var _PSO = SO.parentNode; // U.UP.uploading([SO], U.U.DI, (["idcardimg"]), "http://disk.1473.cn/USupfile.ashx?iframename=UploadIdCard"); // _PSO.appendChild(SO); // U.U.UR = true; //把修改标志置为true. //} ////确认添加身份证图片时 //U.U.ICAF = function (UDOD) { // var _UDPD = UDOD.parentNode; // U.UP.uploading([UDOD], U.U.UIAA, ([2]), "http://disk.1473.cn/USupfile.ashx?iframename=IDCardImage"); // $("#UU_N_TNameInput")[0].disabled = $("#UU_N_mypost")[0].disabled = false; // _UDPD.appendChild(UDOD); //} ////添加身份证异步处理 //U.U.UIAA = function (UIK) { // US.userInfo.IsAllowAccess = UIK; // $("#UU_N_mypost")[0].disabled = $("#UU_N_TNameInput")[0].disabled = true; //真实姓名文本框 // $("#UU_N_Identitycardimg")[0].className = "UU_N_Identitys UD_NUB UU_N_Idenbg2"; // $("#UU_N_Identitycardimg")[0].style.cursor = "default"; //} ////------------------------------------------------------------------辅助函数----------------------------------------------------------------------- //判断个人简介 //U.UN.ResumeTextBoxOnChange = function (obj, event) { // // var KeyCode = U.M.getKeyCode(event); // // var evt = U.M.GetEvent(event); // // if (obj.length > 134) { // // if (KeyCode != 40 && KeyCode != 39 && KeyCode != 38 && KeyCode != 37 && KeyCode != 46 && KeyCode != 8) { // // if (browser.firefox == true) { //判断是否是FF // // evt.preventDefault(); //firefox 禁止键盘输入 // // } // // else { // // window.event.returnValue = false; //ie // // } // // } // // } //} //ajax异步处理邮箱,要求唯一。 判断是否存在此邮箱 //function SetEmailMessage(obj) { // U.D.P.TSInfo(); // var response = U.A.Request("UseStudioManage.GetEmailValue", ([obj])).value; // var emailtext = document.getElementById("UU_N_EmailTBox"); // if (response == false) { // _useremailspan.innerHTML = "已经存在此邮箱"; // } // else { // _useremailspan.style.color = "Black"; // _useremailspan.innerHTML = "正确"; // } //} //U.M.GetUserInfo_CallBack = function (response) { // var NewReply = "", NewUpload = "", GetUserInfo = "", _user = "", NewArticle = ""; // var _usernewinfo = response.value; // //var US_Manage_OtherUsersInfoDiv = response.context[1]; // var _otheruser = _usernewinfo[0]; //调用用户信息,不加var是全局变量,彭依选要特别注意这个地方。 // var ArticleContent = _usernewinfo[1]; //用户最新文章 // var ReplyContent = _usernewinfo[2]; //用户最新回复 // var Upload = _usernewinfo[3]; //用户最新上传 // /*------最新文章------*/ // var userid = _otheruser.UserId; // if (typeof (ArticleContent[0]) == "undefined") { // NewArticle = "