Namespace.register("U.MD.UI.BTree"),U.MD.UI.BTree=function(e,t,n,o,i,r,l,a,s,c,d){U.MD.UI.BTree.jsonStartLeft(e,r[0],t),U.MD.UI.BTree.jsonStartRight(r[1],t,n,o,i,l,a,s,c,d)},U.MD.UI.BTree.treeCreate=function(e,t,n){for(var o=0;ot&&(t=parseInt(e[n].id));return t},Namespace.register("U.MD.UI.editor"),U.MD.UI.Editor=U.MD.UI.editor=function(e,t){return U.UF.DL.asynLoadCss({rel:"stylesheet",type:"text/css",href:"/css/Controls/Complex/Editor.css"}),U.MD.UI.editor.createEditor(e),U.UF.E.initEditor($(".editor",e)[0],t),U.MD.UI.editor.EditorEventBind(e),U.MD.UI.editor.operateJson.editor=U.selectEl(".editor",e)[0],U.MD.UI.editor.operateJson},U.MD.UI.editor.operateJson={loadContent:function(e){this.editor.focus(),U.UF.E.onpaste(null,this.editor,e)},getContent:function(){return this.editor.innerHTML}},U.MD.UI.editor.createEditor=function(e){e.innerHTML='
\n \n \n \n\n \n
\n\n \n
\n\n \n \n \n \n\n \n
\n \n
\n
\n
\n \n\n \n
\n \n
\n
\n
\n \n\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n
\n
\n
'},U.MD.UI.editor.EditorEventBind=function(e){var t=U.MD.UI.Font();t.style.cssText+="vertical-align: super;";var n=U.MD.UI.WordSize();n.style.cssText+="vertical-align: super;",U.selectEl(".setFont",e).append(t),t.onchange=function(){U.UF.E.setRangeStyle({"font-family":t.value})},U.selectEl(".setSize",e).append(n),n.onchange=function(){U.UF.E.setRangeStyle({"font-size":n.value})},U.selectEl(".pic",e)[0].onclick=function(){U.selectEl(".picUpload",e)[0].click()},U.selectEl(".attachment",e)[0].onclick=function(){U.selectEl(".attachmentUpload",e)[0].click()},U.selectEl(".bIcon",e)[0].onclick=function(){U.UF.E.setRangeStyle({"font-weight":"bold"})},U.selectEl(".iIcon",e)[0].onclick=function(){U.UF.E.setRangeStyle({"font-style":"italic"})},U.selectEl(".UIcon",e)[0].onclick=function(){U.UF.E.setRangeStyle({"text-decoration":"underline"})},U.selectEl(".SIcon",e)[0].onclick=function(){U.UF.E.setRangeStyle({"text-decoration":"line-through"})},U.selectEl(".fontColor",e).bind("click",function(){"none"==$(".fontColorBar",e).css("display")&&(U.MD.UI.colorPicker($(".fontColorBar",e)[0],function(t){U.selectEl(".MD_ColorPicker",U.selectEl(".fontColorBar",e)[0]).remove(),U.selectEl(".fontColorBar",e).hide(),U.UF.E.setRangeStyle({color:t})}),U.selectEl(".fontColorBar",e).show())}),U.selectEl(".backgroundColor",e).bind("click",function(){"none"==$(".backgroundColorBar",e).css("display")&&(U.MD.UI.colorPicker($(".backgroundColorBar",e)[0],function(t){U.selectEl(".MD_ColorPicker",U.selectEl(".backgroundColorBar",e)[0]).remove(),U.selectEl(".backgroundColorBar",e).hide(),U.UF.E.setRangeStyle({backgroundColor:t})}),U.selectEl(".backgroundColorBar",e).show())}),U.selectEl(".a",e).bind("click",function(){U.UF.E.addHref()}),U.selectEl(".c",e).bind("click",function(){U.UF.E.clearStyle(U.UF.E.getRangeAt())}),U.selectEl(".textLeft",e).bind("click",function(){U.UF.E.setLineStyle({"text-align":"left"})}),U.selectEl(".textCenter",e).bind("click",function(){U.UF.E.setLineStyle({"text-align":"center"})}),U.selectEl(".textRight",e).bind("click",function(){U.UF.E.setLineStyle({"text-align":"right"})})},U.MD.UI.editor.Select=function(e,t,n,o){var i="";t.id&&(i=t.id)&&delete t.id;var r=$$("div",{id:i},o||null),l=$$("div",t,r),a=$$("div",{},l);$$("div",{style:{cssText:"border-width: 6px 4px; border-style: solid; border-color: rgb(166, 178, 192) transparent transparent; width: 0; position: absolute; right: 4px; top: 50%; margin-top: -3px"}},l);var s,c=$$("div",{datacontent:"",style:{cssText:"display: none;position: absolute; margin-top:-1px; min-width: 100%; max-width: 280px; max-height: 200px ;border: 1px solid silver; overflow-x: hidden; cursor: pointer;"}},r);for(var d in t.style&&!t.style.position&&(r.style.position="relative"),t.style&&!t.style.textIndent&&(a.style.textIndent="6px"),a.style.whiteSpace="pre",a.style.overflow="hidden",a.style.width=r.offsetWidth-15+"px",e)$$("div",{value:d,innerText:e[d],style:{cssText:"padding: 4px 6px; background: #fff"},onmouseover:function(){this.style.background="#ccc"},onmouseout:function(){this.style.background="#fff"},onclick:function(){a.innerText=this.innerText,U.UF.E.reSelectRange(s),n(this.value||this.innerText)}},c);for(var d in e){a.innerText=e[d];break}return a.style.lineHeight=parseInt(a.style.height)+"px",r.onclick=function(){var e=this.querySelector("div[datacontent]");U.UF.E.reSelectRange(s),"block"===e.style.display?e.style.display="none":e.style.display="block"},U.selectEl(document).bind("click",function(){"none"!=c.style.display&&(c.style.display="none"),$(".BD_BorderPicker")[0]&&"none"!=$(".BD_BorderPicker")[0].style.display&&(U.selectEl(".BD_BorderPicker")[0].style.display="none")},!1),U.selectEl(r).bind("click",function(e){U.UF.EV.stopBubble(e)}),r.onmousedown=function(){s=U.UF.E.getRangeAt()},r},Namespace.register("U.MD.UI.excel"),Namespace.register("U.MD.R"),U.MD.R.data={PID:"",AID:"",URL:"",PageIndex:1,PageSize:20,AllCount:"",CB:null},U.MD.R.reply=function(e){U.MD.R.login.cookieLogin(function(){var t=e.type,n=e.el,o=e.cb;U.MD.R.data.PID=e.pid,U.MD.R.data.AID=U.MD.R.reply.getUrlHash(),U.MD.R.data.URL=U.MD.R.reply.getUrl(),U.MD.R.data.CB=o,t||(n=new U.UF.UI.form("",$$("div"),{style:{width:"800px",height:"800px"}}).content),U.MD.R.reply.init(n),U.UF.DL.asynLoadCss({href:"/css/Controls/Basic/Picture.css",type:"text/css",rel:"stylesheet"}),U.UF.DL.asynLoadJs({type:"text/javascript",src:"/js/Controls/Basic/Picture.js"})})},U.MD.R.reply.init=function(e){var t=U.MD.R.data.PageIndex,n=U.MD.R.data.PageSize;U.MD.R.initPrintHtml(e),U.MD.R.getReplyData(t,n,function(e){U.MD.R.data.AllCount=e[0][0]?Math.ceil(e[0][0].allcount/U.MD.R.data.PageSize):"",U.MD.R.printComment($("#U_MD_R_content_user_comment")[0],1,e,!1,!1,!1),U.MD.R.initLoadMoreBtn(e[0])})},U.MD.R.reply.getUrl=function(){return window.location.href},U.MD.R.reply.getUrlHash=function(){return U.UF.EC.SparkMD5.hash(window.location.href)},U.MD.R.getReplyData=function(e,t,n){U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_Reply","test",U.MD.R.data.AID,"1","",e,t],function(e){n&&n(e.value)})},U.MD.R.initPrintHtml=function(e){var t,n,o,i,r,l,a,s,c,d,p,_,u,g=e;t=$$("div",{className:"U_MD_R_comment"},g),n=$$("div",{className:"U_MD_R_content"},t),o=$$("div",{className:"U_MD_R_content_operation"},n),i=$$("div",{className:"U_MD_R_content_operation_userhead U_MD_R_Reply_Header"},o),r=$$("img",{className:"img",src:"/img/UserHead/UseHead.jpg",onerror:function(){this.src="/img/UserHead/UseHead.jpg"}},i),l=$$("div",{className:"U_MD_R_content_operation_right",style:{width:"calc(100% - 40px - 20px )"}},o),U.selectEl(l).attr({"data-RPID":null,"data-RD":1,"data-RPUID":null}),a=$$("div",{innerHTML:"登录/注册",className:"U_MD_R_content_operation_userlogin U_MD_R_Reply_Name"},l),US.userInfo.userid?(a.innerHTML=US.userInfo.username,r.src="http://fs.1473.cn/"+US.userInfo.UserThumbnailImageHead):a.onclick=function(){U.MD.R.login()},s=$$("div",{id:"editorbox",className:"U_MD_R_Reply_Content",contenteditable:"true",style:{"min-height":"100px",background:"#fff",border:"1px solid black"}},l);var D=document.documentElement.scrollTop;U.UF.E.initEditor(s),document.documentElement.scrollTop=D,c=$$("div",{className:"U_MD_R_content_operation_right_bottom"},l),$$("div",{className:"U_MD_R_content_operation_right_bottom_emoji",onclick:function(){U.UF.EV.stopBubble(),U.MD.UI.face(this,U.selectEl("#editorbox")[0]),U.selectEl("#U_MD_UI_face").css({position:"relative",height:"140px","overflow-y":"scroll",top:"-150px",width:"450px",display:"block"})}},c),d=$$("div",{className:"U_MD_R_content_operation_right_bottom_picturewarp"},c),$$("img",{src:"/img/reply/img.png"},d),p=$$("input",{type:"file"},d),_=$$("div",{className:"U_MD_R_content_operation_right_bottom_release",innerHTML:"发表评论"},c),_.onclick=function(){""!=$(".U_MD_R_Reply_Content")[0].textContent||""!=U.selectEl(".U_MD_R_Reply_Content")[0].innerHTML?U.MD.R.release(l,1,!1,1):U.alert("评论不能为空!")},u=$$("div",{className:"U_MD_R_content_operation_right_bottom_imgloadbox U_MD_R_Reply_Image"},l),$$("div",{className:"U_MD_R_content_comment",id:"U_MD_R_content_user_comment"},n),p.onchange=function(){U.MD.R.uploadImages(this,u)},U.MD.R.data.CB&&U.MD.R.data.CB()},U.MD.R.initLoadMoreBtn=function(e){var t=$$("div",{className:"U_MD_R_content_loading"},U.selectEl(".U_MD_R_comment")[0]);e.length>0&&U.MD.R.data.PageIndex0?U.Json.select(d[2],{ReplyID:d[0][g].ReplyID})[0].AllReplyNum:"0",U.MD.R.printCommentHtml(s,c,{rid:d[0][g].ReplyID,rpid:d[0][g].ReplyParentID,deep:d[0][g].ReplyDeep,topid:d[0][g].ReplyID,uid:d[0][g].UserID,un:d[0][g].UserName,tx:d[0][g].ReplyUserThumbnailImageHead,time:d[0][g].ReplyAddTime,content:d[0][g].ReplyContent,shownum:a,likesnum:2==c?U.Json.select(d[4],{ReplyID:d[0][g].ReplyID})[0]:U.Json.select(d[1],{ReplyID:d[0][g].ReplyID})[0]},p,_,u);else{var D=$$("div",{className:"U_MD_R_content_loading"},U.selectEl(".U_MD_R_comment")[0]);D.innerHTML="该评论系统已关闭",U.selectEl("#U_MD_R_content_loading")[0].innerHTML=""}},U.MD.R.viewComment=function(e,t){if(US.userInfo.userid){var n,o,i,r,l,a=e,s=t;n=new U.UF.UI.form("",$$("div",{style:{padding:"20px"}}),{style:{width:"800px",height:"600px"}}),U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_Reply","Reply_SelectThisReply",a],function(e){o=e.value,U.MD.R.printComment(n.content,2,o,!0,!0,!0),s&&U.selectEl(n.content).find(".U_MD_R_content_box_content_edit").show(),i=$$("div",{className:"U_MD_R_content_warp_box"},n.content);for(var t=0;t0&&(U.selectEl(_).find("img")[0].onclick=function(){U.MD.UI.picture([this.src],0),U.selectEl("#U_MD_UI_PictureForm").css("position","fixed"),U.UF.F.topWindow($("#U_MD_UI_PictureForm")[0],!0)}),u=$$("div",{className:"U_MD_R_content_box_content_bottom"},c),g=$$("div",{className:"U_MD_R_content_box_content_bottom_likeswarp"},u),g.onclick=function(){U.MD.R.like(this,w,US.userInfo.userid)},D=$$("img",{src:"/img/reply/NOFabulous.png"},g),m=$$("div",{className:"U_MD_R_content_box_content_bottom_likeswarp_text",innerHTML:0},g),J&&(m.innerHTML=J.ReplyNum,U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_Reply","Reply_SelectRepeatLikes_Moblie",w,US.userInfo.userid],function(e){1==e.value[0].mode?D.src="/img/reply/NOFabulous.png":0==e.value[0].mode?D.src="/img/reply/Fabulous.png":D.src="/img/reply/NOFabulous.png"})),h=$$("div",{className:"U_MD_R_content_box_content_bottom_replywarp"},u),h.onclick=O?function(){U.MD.R.subsetReply(this)}:function(){U.MD.R.viewComment(w,!0)},$$("img",{src:"/img/reply/reply.png"},h),$$("div",{innerHTML:"回复",className:"U_MD_R_content_box_content_bottom_replywarp_text"},h),1==N&&(M=$$("div",{className:"U_MD_R_content_box_content_bottom_showmorewarp"},u),$$("img",{src:"/img/reply/list.png"},M),f=$$("div",{className:"U_MD_R_content_box_content_bottom_showmore_text"},M),O?(f.className="U_MD_R_content_box_content_bottom_showmore_text U_MD_R_content_box_content_bottom_showmore_text_secondary",f.innerHTML=z?"共有("+z+")条评论":"没有评论(0)"):(f.className="U_MD_R_content_box_content_bottom_showmore_text U_MD_R_content_box_content_bottom_showmore_text_important",f.innerHTML=z?"查看更多("+z+")":"查看更多(0)",M.onclick=function(){U.MD.R.viewComment(w,!1)})),1==N&&!r&&U.selectEl(".U_MD_R_content_loading")[0]&&(U.MD.R.data.PageIndex0){var u=Guid.newGuid(),g=U.selectEl(e).attr("data-rid"),D=U.MD.R.data.PID,m=U.MD.R.data.AID,h="",M=US.userInfo.RegisterIP,f=U.MD.R.data.URL,y=null,b=U.selectEl(e).attr("data-rd"),R=(U.selectEl(e).attr("data-rbid"),U.selectEl(e).attr("data-rpuid")),I=1;1==o?b=1:2==o||3==o?b=parseInt($(e).attr("data-rd"))+1:(b=3,g=U.selectEl(e).attr("data-rpid")),h=$(c).find("img").length>0?s.innerHTML.trim()+c.find("img")[0].outerHTML:s.innerHTML,U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_Reply","Reply_InsertReply",u,g,D,m,d,p,_,h,M,f,y,b,R,I,U.MD.R.getNowFormatDate()],function(e){var t,n,o=e.value[0],c=U.selectEl("div[data-rid='"+o.ReplyParentID+"']").find(".U_MD_R_content_box_content_bottom_showmore_text_important span")[0];U.selectEl("div[data-rid='"+o.ReplyParentID+"']").find(".U_MD_R_content_box_content_bottom_showmore_text_secondary span")[0];U.selectEl(i).find(".U_MD_R_Reply_Content")[0].innerHTML="",U.UF.E.initEditor($(i).find(".U_MD_R_Reply_Content")[0]),U.selectEl(i).find(".U_MD_R_Reply_Image")[0].innerHTML="",1==a?(n=!1,t=!0,i=U.selectEl("#U_MD_R_content_user_comment")[0]):(n=!0,_val=c.innerText,2==a&&(i=U.selectEl(i).Parent().nextSibling,r=2,t=!0),3==a&&(i=$($(i)[0].nextSibling).find(".U_MD_R_content_warp_box").length>0?U.selectEl($(i)[0].nextSibling).find(".U_MD_R_content_warp_box"):$$("div",{className:"U_MD_R_content_warp_box"},U.selectEl($(i)[0].nextSibling)[0]),r=2),4==a&&(i=U.selectEl($(i).Parent()).Parent(),r=3),c.innerText=++_val,U.selectEl($(s).Parent()).hide());U.MD.R.printCommentHtml(i,r,{rid:o.ReplyID,rpid:o.ReplyParentID,deep:o.ReplyDeep,topid:o.ReplyTopID,uid:o.UserID,tx:o.ReplyUserThumbnailImageHead,un:o.UserName,time:U.MD.R.getNowFormatDate()+".0",content:o.ReplyContent,replyinfo:{uid:o.uid,un:o.un,tx:o.tx}},t,l,n);U.alert("评论成功")})}else U.alert("请输入评论内容")}else U.Alert("请先登录")},U.MD.R.like=function(e,t,n){if(US.userInfo.userid){var o=e,i=t,r=n;U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_Reply","Reply_SelectRepeatLikes",i,r],function(e){var t=U.selectEl(o).find("img")[0],n=U.selectEl(o).find(".U_MD_R_content_box_content_bottom_likeswarp_text")[0],i=parseInt(n.innerHTML);0==e.value[0].mode?(t.src="/img/reply/NOFabulous.png",n.innerHTML=--i):(t.src="/img/reply/Fabulous.png",n.innerHTML=++i)})}else U.Alert("请先登录")},U.MD.R.imgError=function(e){U.selectEl(e)[0].src="/img/UserHead/UseHead.jpg"},U.MD.R.login=function(){$("#U_MD_HomeC_Pop")[0]?U.UF.F.windowTopCenter($("#U_MD_HomeC_Pop")[0]):(U.UF.CD.loadPageCrossDomain(function(){}),U.MD.U.L.setLoginCallBack(function(){U.MD.R.login.cb()}))},U.MD.R.login.cookieLogin=function(e){U.UF.Cookie.get("usestudiosso")&&U.UF.Cookie.get("usestudiosso","userid")[0]?U.UF.CD.loadPageCrossDomain(function(){U.MD.U.L.loginCallBack=function(){e&&e(),U.selectEl(".U_MD_R_content_operation_userhead img")[0].src="http://fs.1473.cn/"+US.userInfo.UserThumbnailImageHead,U.selectEl(".U_MD_R_content_operation_userlogin")[0].innerHTML=US.userInfo.username}}):e&&e()},U.MD.R.login.cb=function(){U.selectEl(".U_MD_R_content_operation_userhead img")[0].src="http://fs.1473.cn/"+US.userInfo.UserThumbnailImageHead,U.selectEl(".U_MD_R_content_operation_userlogin")[0].innerHTML=US.userInfo.username},U.MD.R.getNowFormatDate=function(){var e=new Date,t="-",n=":",o=e.getMonth()+1,i=e.getDate();o>=1&&o<=9&&(o="0"+o),i>=0&&i<=9&&(i="0"+i);var r=e.getFullYear()+t+o+t+i+" "+e.getHours()+n+e.getMinutes()+n+e.getSeconds();return r},Namespace.register("U.MD.UI.table"),U.MD.UI.table=function(e,t,n,o){U.MD.UI.table.thead(e,t,n,o)},U.MD.UI.table.thead=function(e,t,n,o,i,r){var l,a,s,c;for(var d in i||(i=1,r=e.length),l=$$("table",{style:{"text-align":"center",position:"relative",width:" 100%", "border-collapse":" collapse","border-width":" 1px","border-style":" solid","border-color":" rgb(213, 213, 213)","border-image":" initial",display:"table"}},o),a=$$("thead",{},l),s=$$("tr",{},a),t)"object"==typeof t[d]?$$("th",{innerHTML:t[d].name,style:{cssText:n[d],padding:"10px 0","font-weight":"normal",border:"1px solid #d5d5d5"},id:"th"},s):$$("th",{innerHTML:t[d],style:{cssText:n[d],padding:"10px 0","font-weight":"normal",border:"1px solid #d5d5d5"},id:"th"},s);return c=$$("tbody",{style:{cssText:"width:100%;"},id:"tbody"},l),U.MD.UI.table.tbody(c,e,t,n,i,r),c},U.MD.UI.table.tbody=function(e,t,n,o,i,r){for(var l,a,s,c=(i-1)*r;c=0;t--)e.removeChild(e.children[t])},U.MD.UI.table.onclick=function(e,t,n){e.onclick=function(){n(t)}},U.MD.UI.table.printDiv=function(e,t){var n;if("string"==typeof t.name&&(n=$$("div",{innerHTML:t.name},e)),"object"==typeof t.name){var o=t.name.cloneNode(!0);e.appendChild(o),n=o}return n},Namespace.register("U.MD.UI.Tree"),U.MD.UI.Tree=function(e,t,n,o){json=[];for(var i=e,r=0;rt&&(t=parseInt(e[n].id));return t},Namespace.register("U.MD.UI.txt");