// 쿠키 가져오기 function getCookie(key) { var cook = document.cookie + ";"; var idx = cook.indexOf(key, 0); var val = ""; if(idx != -1) { cook = cook.substring(idx, cook.length); begin = cook.indexOf("=", 0) + 1; end = cook.indexOf(";", begin); val = unescape( cook.substring(begin, end) ); } return val; } // 쿠키 설정 function setCookie(name, value, expiredays) { var today = new Date(); today.setDate( today.getDate() + expiredays ); if(expiredays==0) { document.cookie = name + "=" + escape( value ) + "; path=/; expires=0;" } else { document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";" } } function strstr(haystack, needle, offset) { var i = (haystack + '').indexOf(needle, (offset || 0)); return i === -1 ? false : i; } function loginAlert(str,type) { $("#login-alert").html(""+str+""); } function loginAlertModal(str) { $("#login-alert").html(""); $("#login_popup_modal_text").html(str); $("#login_popup_modal").modal(); } function redirectCheck() { var loginmode = $("#loginMode").val(); if(loginmode=="LoginSkinRedirect") { popupModal("고객지정 로그인 URL을 이용한 접속은
보안문제로 더 이상 지원하지 않습니다.

아래 로그인페이지에서 다시 로그인해 주시기 바랍니다.", 350); } } function saveCheck(checkbox) { var isRemember; // 로그인 정보 저장한다고 선택할 경우 if(checkbox.checked) { isRemember = confirm("아이디 정보를 저장하시겠습니까? \n공공장소에서는 개인정보가 유출될 수 있으니 주의해 주십시오."); if(!isRemember) checkbox.checked = false; /* bootbox.confirm({ message: "아이디 정보를 저장하시겠습니까?
공공장소에서는 개인정보가 유출될 수 있으니 주의해 주십시오.", callback: function(result) { if(!result) { checkbox.checked = false; } }, className: "bootbox-sm" }); */ } } // 쿠키에서 로그인 정보 가져오기 function getLogin() { // userid 쿠키에서 id 값을 가져온다. var id = getCookie("inputUserid"); // 가져온 쿠키값이 있으면 if(id != "") { $("#inputUserid").val(id); $("#saveid").attr("checked", true); $("#inputPassword").focus(); } } // 쿠키에 로그인 정보 저장 function saveLogin(id) { if(id != "") { // userid 쿠키에 id 값을 7일간 저장 setCookie("inputUserid", id, 7); }else{ // userid 쿠키 삭제 setCookie("inputUserid", id, -1); } } // popup modal function popupModal(str, width) { $("#popup_modal_message").html(str); if(width=="") { $("#popup_modal_layer").css("width", "400px"); } else { $("#popup_modal_layer").css("width", width+"px"); } $("#popup_modal").modal('toggle'); } function loginPasswdCheck() { $("#passwd_check_message").html(""); $("#passwd_modal").modal({backdrop: 'static', keyboard: false, toggle: true}); } function loginPasswdCheckCancel() { $("#passwd_modal").modal("hide"); $("#passwd_check_message").html(""); $("#inputCheckUserid").val(""); $("#inputCheckEmail").val(""); } function emailRegistPopup() { $("#select_type").removeAttr("disabled"); $("#select_depart").removeAttr("disabled"); $("#inputClassNo").removeAttr("disabled"); $("#inputClassName").removeAttr("disabled"); $("#inputClassNo").val(""); $("#inputClassName").val(""); $("#inputRegistUserid").val(""); $("#inputRegistPass1").val(""); $("#inputRegistPass2").val(""); $("#emailclass_check_message").html(""); $("#divEmailChkBtn").html(""); $("#divClassNoTitle").html("학번"); $("#emailregist_check_message").html(""); $("#emailRegistClassCheck").val(""); var select1Html = ''; $("#divSelectPart").html(select1Html); var select2Html = ''; $("#divSelectDepart").html(select2Html); $("#select_type").select2({ minimumResultsForSearch: Infinity }); $("#select_depart").select2({ minimumResultsForSearch: Infinity }); $("#select_email").select2({ minimumResultsForSearch: Infinity }); $("#emailregist_modal").modal({backdrop: 'static', keyboard: false, toggle: true}); } function selectEmail() { var domain = $("#select_email").val(); if(domain!="DIRECT" && domain!="") { $("#inputRegistEmailDomain").val(domain); $("#inputRegistEmailDomain").attr("disabled", true); } else if(domain=="DIRECT") { $("#inputRegistEmailDomain").val(""); $("#inputRegistEmailDomain").attr("disabled", false); } } function emailRegistCancel() { $("#emailregist_modal").modal("hide"); $("#emailregist_check_message").html(""); } function selectDepartment() { var type = $("#select_type").val(); if(type=="UNDERGRADUATE") { var data = JSON.parse($('#department1_data').val()); $("#divClassNoTitle").html("학번"); } else if(type=="GRADUATE") { var data = JSON.parse($('#department2_data').val()); $("#divClassNoTitle").html("학번"); } else if(type=="INSTRUCTOR") { var data = JSON.parse($('#department3_data').val()); $("#divClassNoTitle").html("직번"); } else { var data = ''; $("#divClassNoTitle").html("학번"); } if(data.length==0) { var html = ''; } else { var html = ''; } $("#divSelectDepart").html(html); $("#select_depart").select2({ minimumResultsForSearch: Infinity }); } function mailListCheck(sn) { var chk = $("input:checkbox[name='muid[]']"); var checked = false; var muid = "muid_"+sn; var mailuid = "mailuid_"+sn; if($("input:checkbox[id='"+muid+"']").is(":checked")) { $("#mailuid_"+sn).addClass("uplus-maillist-checked"); } else { $("#mailuid_"+sn).removeClass("uplus-maillist-checked"); } chk.each(function(){ if(this.checked) { checked = true; } }); if(checked) { showMaillistBtn("show"); } else { showMaillistBtn("hide"); } } function mailListAllCheck(mode) { var sn = 0; var chk = $("input:checkbox[name='muid[]']"); var chk_h = $("input:hidden[id='chk_hidden[]']"); var checked = false; if(mode=="") { if($("#maillist_chkbox_all").is(":checked")) { mode = "all"; } else { mode = "uncheck"; } } chk.each(function(){ var h = chk_h[sn].value; var arr = h.split("_"); if(mode=="all") { this.checked = true; $("#mailuid_"+sn).addClass("uplus-maillist-checked"); checked = true; showMaillistBtn("show"); } else if(mode=="read") { if(arr[2] == "S") { this.checked = true; $("#mailuid_"+sn).addClass("uplus-maillist-checked"); checked = true; showMaillistBtn("show"); } } else if(mode=="unread") { if(arr[2] == "U") { this.checked = true; $("#mailuid_"+sn).addClass("uplus-maillist-checked"); checked = true; showMaillistBtn("show"); } } else if(mode=="attached") { if(arr[1] == "A") { this.checked = true; $("#mailuid_"+sn).addClass("uplus-maillist-checked"); checked = true; showMaillistBtn("show"); } } else if(mode=="starred") { if(arr[3] == "X") { this.checked = true; $("#mailuid_"+sn).addClass("uplus-maillist-checked"); checked = true; showMaillistBtn("show"); } } else if(mode=="uncheck") { this.checked = false; $("#mailuid_"+sn).removeClass("uplus-maillist-checked"); showMaillistBtn("hide"); } sn++; }); } function showMaillistBtn(mode) { if(mode=="show") { $("#maillist_group_03").removeClass("uplus-maillist-btn-hide"); $("#maillist_group_04").removeClass("uplus-maillist-btn-hide"); $("#maillist_group_05").removeClass("uplus-maillist-btn-hide"); $("#maillist_group_03").addClass("uplus-maillist-btn-show"); $("#maillist_group_04").addClass("uplus-maillist-btn-show"); $("#maillist_group_05").addClass("uplus-maillist-btn-show"); } else { $("#maillist_group_03").removeClass("uplus-maillist-btn-show"); $("#maillist_group_04").removeClass("uplus-maillist-btn-show"); $("#maillist_group_05").removeClass("uplus-maillist-btn-show"); $("#maillist_group_03").addClass("uplus-maillist-btn-hide"); $("#maillist_group_04").addClass("uplus-maillist-btn-hide"); $("#maillist_group_05").addClass("uplus-maillist-btn-hide"); } } function loginKeyEvent(mode, e) { var evt = e ? e : window.event var ck=evt.keyCode; var paycode_login_option = $("#paycodeLoginOption").val(); var paycode_login_length = $("#paycodeLoginLength").val(); if(mode=="ID" && paycode_login_option=="YES" && paycode_login_length>0) { if($("#inputUserid").val().length>=6) { $("#inputPassword").focus(); } } if(ck==13) { if(mode=="ID") { $("#inputPassword").focus(); } else { loginCheck(); } } } function secondAuthKeyEvent(mode, e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { secondAuthNumCheck(); } } function gotoMbox(mbox) { $("#mbox").val(mbox); $("#showtype").val("ALL"); $("#page").val("1"); $("#sfrom").val(null); $("#sto").val(null); $("#ssubject").val(null); $("#sdatetype").val(null); $("#sdatestart").val(null); $("#sdateend").val(null); $("#scommand").val(null); $("#scontent").val(null); $("#sort").val(""); var timestamp = tstamp(); //2020-01-31// mbox = $.URLEncode(mbox.replace(/\ /g, '%20')); mbox = encodeURIComponent(mbox); if(mbox=="Confirm") { $.history.load("confirm^INBOX^1^ALL^"+timestamp); } else if(mbox=="ALL") { $.history.load("maillist_unseen^ALL^1^ALL^"+timestamp); } else { $.history.load("maillist^"+mbox+"^1^ALL^"+timestamp); } } function gotoOrgtree() { $("#mbox").val("INBOX"); $("#showtype").val("ALL"); $("#page").val("1"); $("#sfrom").val(null); $("#sto").val(null); $("#ssubject").val(null); $("#sdatetype").val(null); $("#sdatestart").val(null); $("#sdateend").val(null); $("#scommand").val(null); $("#scontent").val(null); $("#sort").val(""); /*** var timestamp = tstamp(); $.history.load("orgtree^INBOX^1^ALL^"+timestamp); ***/ orgPopupView(); } function gotoAddressbook(type, idx) { $("#addrbook_showtype").val(type); $("#addrbook_page").val("1"); $("#addrbook_groupidx").val(idx); $("#search_content").val(""); $("#addrbook_alphasearch").val(""); $("button[name='addrbook_filter_btn']").each(function() { $(this).removeClass("active"); }); var timestamp = tstamp(); $.history.load("addressbook^"+type+"^1^"+idx+"^"+timestamp); } function gotoCompanyAddress() { $("#addrbook_showtype").val(""); $("#addrbook_page").val("1"); $("#addrbook_groupidx").val(""); $("#search_content").val(""); $("#addrbook_alphasearch").val(""); var timestamp = tstamp(); $.history.load("company_address^COMPANY^1^^"+timestamp); } function gotoSchedule(type) { $("#schedule_showtype").val(type); $("#schedule_page").val("1"); $("#search_content").val(""); var timestamp = tstamp(); $.history.load("schedule^"+type+"^1^^"+timestamp); } function createUserMailbox() { growlNotice("default", "알림!", "메일함생성 페이지 준비중입니다."); } function gotoPage(page) { } // 파일 확장자 체크 function checkExtName(obj, ext){ var check = false; var extName = $(obj).val().substring($(obj).val().lastIndexOf(".")+1).toUpperCase(); var str = ext.split(","); for (var i=0;i 0 && x == 0) { popupModal("숫자로만 검색이 불가능합니다."); return; } x = 0; for(var i=0; i 0 && x == 0) { popupModal("숫자로만 검색이 불가능합니다."); return; } $("#sfrom").val(sfrom); $("#sto").val(sto); $("#ssubject").val(ssubject); $("#sdatetype").val(sdatetype); $("#mbox").val($.URLEncode(schmail)); $("#sch_mbox").val($.URLEncode(schmail)); } $("#page").val("1"); $("#scommand").val(command); $("#showtype").val("ALL"); LayerOpen("open", ""); if(pagecode=="maillist") { maillist_Init(); } else { var mbox = $.URLDecode($("#mbox").val()); var timestamp = tstamp(); $.history.load("maillist^"+mbox+"^1^"+showtype+"^"+timestamp); } } function mailSearch2(email) { var command = "DEFAULT"; var search_content = email; var search_type = "FROM"; $("#scontent").val(search_content); $("#stype").val(search_type); $("#page").val("1"); $("#scommand").val(command); $("#showtype").val("ALL"); LayerOpen("open", ""); maillist_Init(); } function maillistchk(val) { $("#page").val("1"); $("#showtype").val(val); maillist_Init(); } function maillistReload() { var mbox = $("#mbox").val(); if(mbox!="Reserved") { maillist_Init(); } else { reservelist_Init(); } } function sortlist(val) { $("#sort").val(val); maillist_Init(); } function popupMainNotice(boardcode, idx) { var popup_name = "popup_"+boardcode+"_"+idx; OpenWindow2('/popup_notice.php?boardcode='+boardcode+'&idx='+idx, popup_name, '810', '600', '100', '100', 1, 1) } function popupNoticeClose(id, boardcode, idx) { if($("#popupClose").is(":checked")==false) $("#popupClose").attr("checked", true); else $("#popupClose").attr("checked", false); var cName = boardcode+"_"+idx; setCookie(cName, id, 1); window.close(); } // 메일리스트 페이지 이동 function mailPageMove(pg) { $("#page").val(pg); // 2022-03-11 patch //var mbox = $.URLDecode($("#mbox").val()); var mbox = decodeURIComponent($("#mbox").val()); console.log("mailPageMove mbox: "+mbox); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); $.history.load("maillist^"+mbox+"^"+pg+"^"+showtype+"^"+timestamp); } // 읽지않은 메일리스트 페이지 이동 function unseenMailPageMove(pg) { $("#page").val(pg); var mbox = $.URLDecode($("#mbox").val()); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); $.history.load("maillist_unseen^ALL^"+pg+"^"+showtype+"^"+timestamp); } function addrbookPageMove(pg) { $("#addrbook_page").val(pg); var groupidx = $("#addrbook_groupidx").val(); var showtype = $("#addrbook_showtype").val(); var timestamp = tstamp(); $.history.load("addressbook^"+showtype+"^"+pg+"^"+groupidx+"^"+timestamp); } function mailDownload() { var mbox = $.URLDecode($("#mbox").val()); if($("#hash").val() == "maillist" || $("#hash").val() == "") { var checkedlist = getChecked(); if(checkedlist.length == "") { growlNotice("warning", LANGUAGE[164][LANGTYPE], LANGUAGE[140][LANGTYPE]); return; } msgid = checkedlist; var url = "mail_download.php?mbox="+$.URLEncode(mbox)+"&msgid="+$.URLEncode(checkedlist); $(location).attr('href', url); maillist_Init(); } else if($("#hash").val() == "mailview") { msgid = $("#msgid").val(); var url = "mail_download.php?mbox="+$.URLEncode(mbox)+"&msgid="+$.URLEncode(msgid); $(location).attr('href', url); } } function mailDownloadToEml() { var pagetype = $("#pagetype").val(); if(pagetype=="popup") { //2022-03-14//var mbox = $.URLDecode($("#mbox", opener.document).val()); var mbox = decodeURIComponent($("#mbox", opener.document).val()); msgid = $("#msgid").val(); var url = "mail_download2.php?mbox="+encodeURIComponent(mbox)+"&msgid="+$.URLEncode(msgid); $(location).attr('href', url); } else { var mbox = $.URLDecode($("#mbox").val()); if($("#hash").val() == "maillist" || $("#hash").val() == "") { var checkedlist = getChecked(); if(checkedlist.length == "") { growlNotice("warning", LANGUAGE[164][LANGTYPE], LANGUAGE[140][LANGTYPE]); return; } msgid = checkedlist; var url = "mail_download2.php?mbox="+encodeURIComponent(mbox)+"&msgid="+$.URLEncode(checkedlist); $(location).attr('href', url); maillist_Init(); } else if($("#hash").val() == "mailview") { msgid = $("#msgid").val(); var url = "mail_download2.php?mbox="+encodeURIComponent(mbox)+"&msgid="+$.URLEncode(msgid); $(location).attr('href', url); } } } // 메일박스 비우기 체크 function emptyMboxCheck(mbox) { bootbox.dialog({ message: LANGUAGE[117][LANGTYPE]+"
"+LANGUAGE[320][LANGTYPE], buttons: { danger: { label: LANGUAGE[97][LANGTYPE], className: "btn-primary", callback: function() { emptyMailbox(mbox); } }, main: { label: LANGUAGE[115][LANGTYPE], className: "btn-default", callback: function() { } } }, className: "bootbox-sm" }); } // 주소록 추가 function addAddressbook2(name, email) { growlNotice('default', '알림!', '주소록 준비중입니다.'); } function mailView(mbox, muid) { var msgid = $("#muid_"+muid).val(); $("#msgid").val(msgid); $("#mbox").val(mbox); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); var viewpopup = $("#viewpopup").val(); var mailimg = $("#mailimg_"+muid).attr("src"); $("#mailuid_"+muid).removeClass("unread"); if(mailimg == "/images/ico_mail_unseen.png") { $("#mailimg_"+muid).attr("src", "/images/ico_mail_seen.png") } //mbox = $.URLEncode(mbox.replace(/\ /g, '%20')); mbox = encodeURIComponent(mbox); if(viewpopup=="1") { //POPUP var param = "?mbox="+encodeURIComponent(mbox)+"&msgid="+msgid; OpenWindow('/mailview_popup.php'+param, '', 1024, 700, 'yes', 'yes'); } else if(mbox=="Drafts") { $.history.load("mailwrite^"+mbox+"^VIEWDRAFT^"+timestamp+"^"+msgid); } else { $.history.load("mailview^"+mbox+"^"+msgid+"^"+showtype+"^"+timestamp+"^"); } } function unseenMailView(mbox, muid) { var msgid = $("#muid_"+muid).val(); $("#msgid").val(msgid); $("#mbox").val(mbox); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); var viewpopup = $("#viewpopup").val(); var mailimg = $("#mailimg_"+muid).attr("src"); $("#mailuid_"+muid).removeClass("unread"); if(mailimg == "/images/ico_mail_unseen.png") { $("#mailimg_"+muid).attr("src", "/images/ico_mail_seen.png") } //mbox = $.URLEncode(mbox.replace(/\ /g, '%20')); mbox = encodeURIComponent(mbox); if(viewpopup=="1") { //POPUP var param = "?mbox="+encodeURIComponent(mbox)+"&msgid="+msgid; OpenWindow('/mailview_popup.php'+param, '', 1024, 700, 'yes', 'yes'); } else { $.history.load("mailview_unseen^"+mbox+"^"+msgid+"^"+showtype+"^"+timestamp+"^"); } } function mailView2(mbox, msgid) { $("#msgid").val(msgid); $("#mbox").val(mbox); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); mbox = $.URLEncode(mbox.replace(/\ /g, '%20')); $.history.load("mailview^"+mbox+"^"+msgid+"^"+showtype+"^"+timestamp+"^"); } //목록으로 이동 function goMaillist() { var mbox = $.URLDecode($("#mbox").val()); /*** 2021-01-25 mbox = encodeURIComponent(mbox); ***/ // alert(mbox); var page = $("#page").val(); $("#msgid").val(""); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); if(mbox!="ALL") { $.history.load("maillist^"+mbox+"^"+page+"^"+showtype+"^"+timestamp); } else { $.history.load("maillist_unseen^"+mbox+"^"+page+"^"+showtype+"^"+timestamp); } } function goUnseenMaillist() { var mbox = $.URLDecode($("#mbox").val()); /*** 2021-01-25 mbox = encodeURIComponent(mbox); ***/ // alert(mbox); var page = $("#page").val(); $("#msgid").val(""); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); $.history.load("maillist_unseen^ALL^"+page+"^"+showtype+"^"+timestamp); } // 새창으로 메일읽기 function mailPopupView(mbox, muid) { var msgid = $("#muid_"+muid).val(); $("#msgid").val(msgid); $("#mbox").val(mbox); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); var viewpopup = $("#viewpopup").val(); var mailimg = $("#mailimg_"+muid).attr("src"); $("#mailuid_"+muid).removeClass("unread"); if(mailimg == "/images/ico_mail_unseen.png") { $("#mailimg_"+muid).attr("src", "/images/ico_mail_seen.png") } //2022-03-14//mbox = $.URLEncode(mbox.replace(/\ /g, '%20')); mbox = encodeURIComponent(mbox); if(mbox=="Drafts") { var param = "mailwrite_popup%5E"+mbox+"%5EVIEWDRAFT%5E"+timestamp+"%5E"+msgid; OpenWindow('/main_popup.php#'+param, '', 1000, 850, 'yes', 'yes'); } else { //$.history.load("mailview^"+mbox+"^"+msgid+"^"+showtype+"^"+timestamp+"^"); var param = "mailview_popup%5E"+mbox+"%5E"+msgid+"%5E"+showtype+"%5E"+timestamp+"%5E"; OpenWindow('/main_popup.php#'+param, '', 1000, 850, 'yes', 'yes'); } } // 새창으로 메일읽기2 function mailPopupView2(mbox, msgid) { $("#mbox").val(mbox); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); var viewpopup = $("#viewpopup").val(); mbox = $.URLEncode(mbox.replace(/\ /g, '%20')); if(mbox=="Drafts") { var param = "mailwrite_popup%5E"+mbox+"%5EVIEWDRAFT%5E"+timestamp+"%5E"+msgid; OpenWindow('/main_popup.php#'+param, '', 1000, 850, 'yes', 'yes'); } else { //$.history.load("mailview^"+mbox+"^"+msgid+"^"+showtype+"^"+timestamp+"^"); var param = "mailview_popup%5E"+mbox+"%5E"+msgid+"%5E"+showtype+"%5E"+timestamp+"%5E"; OpenWindow('/main_popup.php#'+param, '', 1000, 850, 'yes', 'yes'); } } function orgPopupView() { var timestamp = tstamp(); var param = "orgtree_popup%5E%5EINBOX%5E"+timestamp+"%5E"; OpenWindow('/main_popup.php#'+param, 'OrgPopupView', 950, 730, 'yes', 'yes'); } function headerInfo(n) { if(n==1) { var html = $("#to_html_all").val(); $("#mailheader_to").html(html); } if(n==4) { var html = $("#to_html").val(); $("#mailheader_to").html(html); } if(n==2) { var html = $("#cc_html_all").val(); $("#mailheader_cc").html(html); } if(n==5) { var html = $("#cc_html").val(); $("#mailheader_cc").html(html); } if(n==3) { var html = $("#bcc_html_all").val(); $("#mailheader_bcc").html(html); } if(n==6) { var html = $("#bcc_html").val(); $("#mailheader_bcc").html(html); } $('#mailheader_to a').tooltip(); $('#mailheader_cc a').tooltip(); $('#mailheader_bcc a').tooltip(); } // 메일본문 첨부파일 리스트 출력 function filelist_view() { var show = $("#attachfile").css("display"); if(show=="none") { $("#attachfile").css("display", ""); } else { $("#attachfile").css("display", "none"); } } // 모두저장 function SaveToAllDownloadNoneActiveX(filename, bodypart, encode, mime, lchk) { var msgno = $("#msgid").val(); var mode = "downall"; var url = "/file_download.php?mode="+mode+"&msgno="+msgno+"&filename="+filename+"&bodypart="+bodypart+"&encode="+encode+"&mime="+mime+"&lchk="+lchk; alert(url); $(location).attr('href', url); } // 원문보기 function originalView() { var msgid = $("#msgid").val(); var mbox = $("#mbox").val(); var param = "?mbox="+encodeURIComponent(mbox)+"&msgid="+msgid; OpenWindow('/original_view.php'+param, '', 650, 700, 'yes', 'no'); } // 메일인쇄 Modal function mailPrint() { $("#print_popup_modal").modal('toggle'); } // 메일인쇄 function chk_print() { var val = ""; var rd = $("input:radio[name='print_opt_slt']"); rd.each(function(){ if(this.checked == true) { val = this.value; } }); $("#rd_param").val(val); var mailPrint = window.open('/mail_print.php','mailPrint','width=840,height=550,scrollbars=1,resizable=1'); $("#print_popup_modal").modal('hide'); } // 팝업 윈도우 function OpenWindow(url, description, width, height, scrollbars, resizable) { var xposition = screen.availWidth/2 - width/2; var yposition = screen.availHeight/2 - height/2; var features = "'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollbars + ",resizable=" + resizable + ", top="+yposition+", left="+xposition+", width="+width+", height="+height+"'"; var object = window.open(url, description, features); object.focus(); } // 팝업 윈도우2 function OpenWindow2(url, description, width, height, position_x, position_y, scrollbars, resizable) { var xposition = position_x; var yposition = position_y; var features = "'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollbars + ",resizable=" + resizable + ", top="+yposition+", left="+xposition+", width="+width+", height="+height+"'"; var object = window.open(url, description, features); object.focus(); } // 메일화면 레이아웃 설정 function maillist_layout(val) { growlNotice('default', '알림', '레이아웃 설정 기능은 현재 준비중입니다.') } function usertypeCheck() { var usertype = $("#login_usertype").val(); if(usertype=="PUBLIC") { popupModal(LANGUAGE[860][LANGTYPE]); return false; } return true; } // 메일쓰기 function mailWrite(mode) { var mbox = $("#mbox").val(); var timestamp = tstamp(); var writemode = ""; var msgid = $("#msgid").val(); var pagetype = $("#pagetype").val(); if(usertypeCheck()==false) return; if(mode=="forward") { writemode = "FORWARDMAIL"; } else if (mode=="multiforward") { writemode = "MULTIFORWARD"; var checkedlist = getChecked(); if(checkedlist.length == "") { popupModal("메일을 선택해 주세요."); return; } var checkedlist_arr = checkedlist.split("|"); var checkedlist_cnt = checkedlist_arr.length - 1; if(checkedlist_cnt > 10) { popupModal("최대 10개의 메일을 전달할 수 있습니다."); return; } msgid = checkedlist; } else if (mode=="reply") { writemode = "REPLY"; } else if (mode=="replyall") { writemode = "REPLYALL"; } else if (mode=="resend") { writemode = "RESEND"; } else if (mode=="me") { writemode = "SENDMAILME"; } else { writemode = "NEWSENDMAIL"; } if(pagetype=="popup") { $.history.load("mailwrite_popup^"+mbox+"^"+writemode+"^"+timestamp+"^"+msgid); } else { $.history.load("mailwrite^"+mbox+"^"+writemode+"^"+timestamp+"^"+msgid); } } function quickMailReply(msgid) { var mbox = $("#mbox").val(); var timestamp = tstamp(); var writemode = "REPLY"; var pagetype = $("#pagetype").val(); $.history.load("mailwrite^"+mbox+"^"+writemode+"^"+timestamp+"^"+msgid); } function quickMailMove(n, msgid) { var mailbox = JSON.parse($("#MailboxData").val()); var mailbox_html = ""; for(i=0; i" + mailbox[i]["BOXKONAME"].replace(".", "/"); + ""; } } else { mailbox_html += "
  • " + mailbox[i]["BOXRAWKONAME"].replace(".", "/"); + "
  • "; } } $("#maillist_dropdown_"+n).html(mailbox_html); $("#maillist_dropdown_"+n).css("display", "block"); } function maillistDropdownOver(n) { $("#maillist_dropdown_"+n).css("display", "block"); } function maillistDropdownOut(n) { $("#maillist_dropdown_"+n).css("display", "none"); } function mailWriteTo(email) { //growlNotice('default', '알림!', '메일쓰기 준비중입니다.'); var mbox = $("#mbox").val(); var timestamp = tstamp(); var writemode = "NEWSENDMAIL"; var msgid = $("#msgid").val(); var receiver = email; var pagetype = $("#pagetype").val(); if(pagetype=="popup") { var timestamp = tstamp(); var param = "mailwrite_popup%5E"+mbox+"%5E"+writemode+"%5E"+timestamp+"%5E"+msgid+"%5E"+receiver; OpenWindow('/main_popup.php#'+param, '', 1000, 850, 'yes', 'yes'); } else { $.history.load("mailwrite^"+mbox+"^"+writemode+"^"+timestamp+"^"+msgid+"^"+receiver); } } function mailWriteInit() { var receiver_form_type = $("#RECEIVER_FORM_TYPE").val(); var receiver = $("#receiver").val(); if(receiver_form_type=="INPUT") { if(receiver!="") { $("#mail-to").val(receiver); } // if($("#mail-bcc").val()!="") { showBcc(); } } else { if(receiver!="") { $("#mail-to").val(receiver) } if($("#mail-bcc").val()!="") { showCc2(); showBcc2(); } } // 메일전달시 첨부파일 처리 var attach_cnt = $("#org_attach_total_count").val(); if(attach_cnt) { for(i=0; i 1024) { filesize = parseInt(filesize / 1024); if(filesize > 1024) { filesize = parseInt(filesize / 1024); if(filesize > 1024) { filesize = parseInt(filesize / 1024)+"GB"; } else { filesize += "MB"; } } else { filesize += "KB"; } } else { filesize += "B"; } ***/ if(fileattachtype == "NORMAL") { fileattachtype_html = "일반첨부"; fileattachtype_change = "전환"; } else { fileattachtype_html = "대용량첨부"; } /*** ""+ " "+ "
    "+ "
    "+formatByte(filesize,2)+"
    "+ " "+ "
    "+tmptype+""+tmptype_html+"
    "+ " "+ " "+ " "+ " "+ " "+ " "+ " "+ "" ***/ var attach_html = ""+ " "+ "
    "+ "
    "+formatByte(filesize,2)+"
    "+ " "+ "
    "+fileattachtype_html+""+fileattachtype_change+"
    "+ " "+ " "+ " "+ " "+ " "+ " "+ " "+ ""; $("#attachfile_list").append(attach_html); $("#messages").css("display","none"); $("#attachfile_box").css("display", ""); } } // 2019-01-21 namo crosseditor patch CrossEditor.params.ParentEditor = document.getElementById("crosseditor_ex"); CrossEditor.params.Width = "100%"; CrossEditor.params.UserLang = "kor"; CrossEditor.params.FullScreen = false; CrossEditor.EditorStart(); $("#crosseditor_ex").css("display", "block"); } function mailWriteEditorFocus(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==9) { //xfe.setFocus(); CrossEditor.SetFocusEditor(); return false; } else if (ck==13) { event.preventDefault(); return false; } else { return; } } function showBcc() { var bcc = $("#mailwrite_bcc_dl").css("display"); if(bcc=="none") { $("#mailwrite_bcc_dl").css("display", ""); $("#mailwrite_cc_btn").removeClass("fa-plus"); $("#mailwrite_cc_btn").addClass("fa-minus"); } else { $("#mailwrite_bcc_dl").css("display", "none"); $("#mailwrite_cc_btn").removeClass("fa-minus"); $("#mailwrite_cc_btn").addClass("fa-plus"); } } function input_to_select_check(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { return false; } } function showCcCheck() { } function showCc2() { var cc = $("#mailwrite_cc2_dl").css("display"); if(cc=="none" || $("#setReceiver2").is(":checked")) { $("#mailwrite_cc2_dl").css("display", ""); $("#mailwrite_to2_btn").removeClass("fa-plus"); $("#mailwrite_to2_btn").addClass("fa-minus"); } else { var bcc = $("#mailwrite_bcc2_dl").css("display"); if(bcc!="none" && $("#setReceiver3").is(":checked")==false) { showBcc2(); } if($("#setReceiver3").is(":checked")==false && $("#setReceiver2").is(":checked")==false) { $("#mailwrite_cc2_dl").css("display", "none"); $("#mailwrite_to2_btn").removeClass("fa-minus"); $("#mailwrite_to2_btn").addClass("fa-plus"); } } } function showBcc2() { var bcc = $("#mailwrite_bcc2_dl").css("display"); if(bcc=="none" || $("#setReceiver3").is(":checked")) { $("#mailwrite_bcc2_dl").css("display", ""); $("#mailwrite_cc2_btn").removeClass("fa-plus"); $("#mailwrite_cc2_btn").addClass("fa-minus"); } else { $("#mailwrite_bcc2_dl").css("display", "none"); $("#mailwrite_cc2_btn").removeClass("fa-minus"); $("#mailwrite_cc2_btn").addClass("fa-plus"); } } function showMailinfo() { var mailinfo = $("#mailheader_receiver_info").css("display"); if(mailinfo=="none") { $("#mailheader_receiver_info").removeClass("hide"); $("#mailheader_receiver_info").addClass("show"); $("#mailview_header_btn").removeClass("fa-plus"); $("#mailview_header_btn").addClass("fa-minus"); } else { $("#mailheader_receiver_info").removeClass("show"); $("#mailheader_receiver_info").addClass("hide"); $("#mailview_header_btn").removeClass("fa-minus"); $("#mailview_header_btn").addClass("fa-plus"); } } function showAttach() { if($("#fileattachbox").css("display")=="none") { $("#mailwrite_attach_btn").attr("class", "fa fa-minus"); $("#fileattachbox").attr("class", "add_file_list uplus-box-show"); } else { $("#mailwrite_attach_btn").attr("class", "fa fa-plus"); $("#fileattachbox").attr("class", "add_file_list uplus-box-hide"); } } function showMailViewFile() { var height = $("#attachfile").css("height"); if(height!="0px") { $("#attach_box_btn").removeClass("fa-minus"); $("#attach_box_btn").addClass("fa-plus"); } else { $("#attach_box_btn").removeClass("fa-plus"); $("#attach_box_btn").addClass("fa-minus"); } } // 파일 첨부방식 전환 function changeFileType(num) { var tmp_fileattachtype = $("#tmp_fileattachtype_"+num).val(); if(tmp_fileattachtype == "NORMAL") { var tmptype = "대용량첨부"; $("#changeType_"+num).html(tmptype); $("#tmp_fileattachtype_"+num).val("BIGMAIL"); } else { var tmptype = "일반첨부"; $("#changeType_"+num).html(tmptype); $("#tmp_fileattachtype_"+num).val("NORMAL"); } } // 첨부파일 전체 선택 function selectAttachFile() { $("input[name='mail_f']").each(function() { $(this).attr("checked", $("#mail_all_f").is(":checked")); }); } // 예약메일 활성화 function mailreserveActive() { if($("#mailwrite_reserveuse").attr("checked")=="checked") { $("#reservedate_form").css("display", ""); } else { $("#reservedate_form").css("display", "none"); } } // 예약메일 날짜설정 팝업 모달 function mailreserveDatePopup() { var newDate = new Date(); newDate.setMinutes(newDate.getMinutes()+60); var reserveDate = newDate.getFullYear() + "/" + sprintf("%02d", (newDate.getMonth() + 1)) + "/" + sprintf("%02d", newDate.getDate()) var reserveHour = sprintf("%02d", newDate.getHours()); var reserveMinutes = sprintf("%02d", newDate.getMinutes()); reserveMinutes = reserveMinutes.substring(0, 1) * 10; var reservedate_text = $("#reservedate_form").html(); if(reservedate_text=="") { $("#reservemail_date").val(reserveDate); $("#reservemail_hour").val(reserveHour).prop("selected", true); $("#reservemail_minute").val(reserveMinutes).prop("selected", true); } $("#reservedate_message").html(""); $("#reservedate_popup_modal").modal('toggle'); } function mailreserveRegistDate() { var temp_date = $("#reservemail_date").val(); var date_array = temp_date.split("/"); var reserve_date = date_array[0]+""+date_array[1]+""+date_array[2]+""+$("#reservemail_hour").val()+""+$("#reservemail_minute").val(); var print_date = date_array[0]+"-"+date_array[1]+"-"+date_array[2]+" "+$("#reservemail_hour").val()+":"+$("#reservemail_minute").val(); var newDate = new Date(); var check_date = newDate.getFullYear() + "" + sprintf("%02d", (newDate.getMonth() + 1)) + "" + sprintf("%02d", newDate.getDate()) + "" + sprintf("%02d", newDate.getHours()) + "" + sprintf("%02d", newDate.getMinutes()); if(check_date >= reserve_date) { $("#reservedate_message").html("예약시간은 현재시간보다 이후여야 합니다."); return false; } $("#reservedate_form").html(print_date+" 예약설정 되었습니다.  "); $("#reserve_date").val(reserve_date); $("#reservedate_popup_modal").modal('hide'); } function mailreserveCancel() { $("#reservedate_form").html(""); $("#reserve_date").val(""); } // 보안메일 활성화 function mailsecurityActive() { if($("#mailwrite_securityuse").attr("checked")=="checked") { $("#security_form").css("display", ""); } else { $("#security_form").css("display", "none"); } } // 첨부파일 목록 삭제 function deleteAttachFile() { $("input[name='mail_f']").each(function() { if($(this).is(":checked") == true) { var num = $(this).val(); var cnt = $("#attach_total_count").val(); var attach_total_count = cnt - 1; var attach_total_size = $("#attach_total_size").val(); var filesize = $("#tmp_fileattachsize_"+num).val(); var temp_total_size = attach_total_size - filesize; $("#attach_total_size").val(temp_total_size); $("#print_total_size").html(formatByte(temp_total_size, 2)); $("#print_total_count").html(attach_total_count); $("#attach_total_count").val(attach_total_count); $("#tmp_attach_filename_"+num).val(null); $("#tmp_attach_en_filename_"+num).val(null); $("#tmp_filetype_"+num).val(null); $("#tmp_fileattachtype_"+num).val(null); $("#attach_tr_"+num).css("display", "none"); $("#tmp_attach_filename_"+num).remove(); $("#tmp_attach_en_filename_"+num).remove(); $("#tmp_filetype_"+num).remove(); $("#tmp_fileattachtype_"+num).remove(); $("#attach_tr_"+num).remove(); } }); } // 편지쓰기 메일서명 변경 function mailsignChange() { var message_id = "mailwood_mailsign_" + $("#message_uniqueid").val(); var sign_num = $("#mailsign").val(); if(sign_num=="NONE") { var sign_content = ""; } else { var sign_content = $("#mailsign_"+sign_num).val(); } //2019-01-24//xfe.setHtmlValueById(message_id, sign_content); var doc = CrossEditor.GetEditorDocument('doc'); doc.getElementById(message_id).innerHTML = sign_content; } // function sendmailComplete_Init() { var subject = $("#completeSubject").val(); var to_list = $("#completeToList").val(); var cc_list = $("#completeCcList").val(); var bcc_list = $("#completeBccList").val(); var sendrsltmsg = $("#sendrsltmsg").val(); if(subject=="") { gotoMbox("INBOX"); return; } if($("#completeMode").val()=="SENDMAILME") { var msg = "
  • "+LANGUAGE[296][LANGTYPE]+"
  • "; msg+= "
  • "+LANGUAGE[297][LANGTYPE]+"
  • "; $("#sendcomplete_title").html(LANGUAGE[235][LANGTYPE]); $("#sendcomplete_memo").html(msg); } else if($("#completeMode").val()=="DRAFTS") { var msg = "
  • "+LANGUAGE[299][LANGTYPE]+"
  • "; msg+= "
  • "+LANGUAGE[300][LANGTYPE]+"
  • "; $("#sendcomplete_title").html(LANGUAGE[298][LANGTYPE]); $("#sendcomplete_memo").html(msg); } else if($("#completeMode").val()=="RESERVEMAIL") { var msg = "
  • "+LANGUAGE[302][LANGTYPE]+"
  • \n"; msg+= "
  • "+LANGUAGE[303][LANGTYPE]+"
  • \n"; msg+= "
  • "+LANGUAGE[304][LANGTYPE]+"
  • \n"; $("#sendcomplete_title").html(LANGUAGE[301][LANGTYPE]); $("#sendcomplete_memo").html(msg); } else { var msg = "
  • "+LANGUAGE[294][LANGTYPE]+"
  • "; msg+= "
  • "+LANGUAGE[295][LANGTYPE]+"
  • "; $("#sendcomplete_title").html(LANGUAGE[235][LANGTYPE]); if(sendrsltmsg!="NO") { $("#sendcomplete_memo").html(msg); } } $("#mailwrite_subject").html(subject); if(to_list!="") { $("#mailwrite_to").html(to_list); $("#mailwrite_to_dl").css("display", ""); } else { $("#mailwrite_to_dl").css("display", "none"); } if(cc_list!="") { $("#mailwrite_cc").html(cc_list); $("#mailwrite_cc_dl").css("display", ""); } else { $("#mailwrite_cc_dl").css("display", "none"); } if(bcc_list!="") { $("#mailwrite_bcc").html(bcc_list); $("#mailwrite_bcc_dl").css("display", ""); } else { $("#mailwrite_bcc_dl").css("display", "none"); } } // function formatByte(size, precision) { if (size < 1024) { return size + 'B'; } else if (size < 1048576) { return roundPrecision((size / 1024), precision) + 'KB'; } else if (size < 1073741824) { return roundPrecision((size / 1048576), precision) + 'MB'; } else if (size < 1099511627776) { return roundPrecision((size / 1073741824), precision) + 'GB'; } else if (size < 1125899906842624) { return roundPrecision((size / 1099511627776), precision) + 'TB'; } else if (size < 1152921504606846976) { return roundPrecision((size / 1125899906842624), precision) + 'PB'; } else if (size < 1180591620717411303424) { return roundPrecision((size / 1152921504606846976), precision) + 'EB'; } else if (size < 1208925819614629174706176) { return roundPrecision((size / 1180591620717411303424), precision) + 'ZB'; } else { return roundPrecision((size / 1208925819614629174706176), precision) + 'YB'; } } function roundPrecision(n, digits) { if (digits >= 0) return parseFloat(n.toFixed(digits)); // 소수 반올림 digits = Math.pow(10, digits); // 정수 반올림 var t = Math.round(n * digits) / digits; return parseFloat(t.toFixed(0)); } // 수신확인 목록 페이지 이동 function confirm_pageMove(pg) { $("#page").val(pg); var showtype = $("#showtype").val(); if(showtype == "" || showtype == undefined) { showtype = "ALL" } var timestamp = tstamp(); $.history.load("confirm^INBOX^"+pg+"^"+showtype+"^"+timestamp); } // 수신확인 리스트 전체선택 버튼 function confirm_check_btn() { if($("#confirm_chkbox_all").is(":checked")==true) { $("#confirm_chkbox_all").attr("checked", false); } else { $("#confirm_chkbox_all").attr("checked", true); } confirm_check_all(); } // 수신확인 리스트 체크 function confirm_check_all() { $("input[name='confirm_chkbox']").each(function() { $(this).attr("checked", $("#confirm_chkbox_all").is(":checked")); }); confirm_btn_view(); } // 수신확인 리스트 삭제 버튼 출력 function confirm_btn_view() { var check = false; var i = 0; $("input[name='confirm_chkbox']").each(function() { if($(this).is(":checked")==true) { check = true; $("#confirm_tr_"+i).addClass("uplus-maillist-checked"); } else { $("#confirm_tr_"+i).removeClass("uplus-maillist-checked"); } i++; }); if(check) { $("#confirmlist_btn_02").removeClass("uplus-maillist-btn-hide"); $("#confirmlist_btn_02").addClass("uplus-maillist-btn-show"); } else { $("#confirmlist_btn_02").removeClass("uplus-maillist-btn-show"); $("#confirmlist_btn_02").addClass("uplus-maillist-btn-hide"); } } // 수신확인 수신인목록 체크 function mailcancel_check_all() { $("input[name='mailcancel_chkbox']").each(function() { $(this).attr("checked", $("#mailcancel_chkbox_all").is(":checked")); }); mailcancel_btn_view(); } // 수신확인 메일회수 버튼 출력 function mailcancel_btn_view() { var check = false; $("input[name='mailcancel_chkbox']").each(function() { if($(this).is(":checked")==true) { check = true; } }); if(check) { $("#confirm_callback_btn").css("display", ""); } else { $("#confirm_callback_btn").css("display", "none"); } } // 주소록 빠른추가 modal function addEmailPopup(name, email) { var addressBookUser_Data = JSON.parse($("#addressBookUser_Data").val()); var addressBookSharedAuth_Data = JSON.parse($("#addressBookSharedAuth_Data").val()); var html = "
    "; html += "
    "+LANGUAGE[182][LANGTYPE]+"
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
    "+LANGUAGE[183][LANGTYPE]+""+LANGUAGE[184][LANGTYPE]+""+LANGUAGE[185][LANGTYPE]+"
    "+email+""; html += " "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#addEmail_group").select2({ minimumResultsForSearch: Infinity }); $("#popup_modal2_div").css("width", "600px"); $("#popup_modal2").modal('toggle'); } // 주소록 빠른추가 modal function addEmailPopupOrg(name, email) { var phone = $("#addPhone").val(); var mobile = $("#addMobile").val(); var addressBookUser_Data = JSON.parse($("#addressBookUser_Data").val()); var addressBookSharedAuth_Data = JSON.parse($("#addressBookSharedAuth_Data").val()); var html = "
    "; html += "
    "+LANGUAGE[182][LANGTYPE]+"
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
    "+LANGUAGE[183][LANGTYPE]+""+LANGUAGE[184][LANGTYPE]+""+LANGUAGE[185][LANGTYPE]+"
    "+email+""; html += " "; html += "
    "; html += " "; html += " "; html += " "; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#addEmail_group").select2({ minimumResultsForSearch: Infinity }); $("#popup_modal2_div").css("width", "600px"); $("#popup_modal2").modal('toggle'); } // 주소록 추가시 그룹선택에 따른 입력폼 변경 function addEmailGroupChange(mode) { //if(mode=="add") { var groupinfo = $("#popupAddEmail_group").val().split(":"); var groupidx = groupinfo[0]; var grouptype = groupinfo[1]; if(grouptype=="SHARE") { $("#popupAddEmail_shareinfo_tr").css("display", "none"); } else { $("#popupAddEmail_shareinfo_tr").css("display", ""); } //} } // 주소록 추가 modal function addEmailPopupFull() { var sharing_permit_addressbook = $("#sharing_addressbook").val(); var addressBookUser_Data = JSON.parse($("#addressBookUser_Data").val()); var addressBookSharedAuth_Data = JSON.parse($("#addressBookSharedAuth_Data").val()); var html = "
    "; html += "
    "+LANGUAGE[182][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
    "+LANGUAGE[185][LANGTYPE]+""; html += " "; html += "
    "+LANGUAGE[183][LANGTYPE]+"
    "+LANGUAGE[184][LANGTYPE]+"
    "+LANGUAGE[252][LANGTYPE]+"
    "; html += "
    "; html += " "; html += "
    "+LANGUAGE[337][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "
    "+LANGUAGE[269][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += " "; html += " "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += " "+LANGUAGE[271][LANGTYPE]+" "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += ""; html += ""; html += ""; html += ""; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#popupAddEmail_group").select2({ minimumResultsForSearch: Infinity }); $("#popup_modal2_div").css("width", "650px"); $("#popup_modal2").modal('toggle'); } // 주소록 추가 상세정보 출력 function addEmailPopupDetail() { //alert($("#addrbook_detail_table").css("display")); if($("#addrbook_detail_table").css("display")=="none") { $("#addrbook_detail_table").css("display", "block"); $("#addrbook_detail_btn").removeClass("fa-plus"); $("#addrbook_detail_btn").addClass("fa-minus"); } else { $("#addrbook_detail_table").css("display", "none"); $("#addrbook_detail_btn").removeClass("fa-minus"); $("#addrbook_detail_btn").addClass("fa-plus"); } } // 주소록 정렬 function sortAddrbook(mode) { $("#addrbook_order").val(mode); addrbookList(); } // 주소록 리스트 전체선택 버튼 function addrbook_check_btn() { if($("#addrbook_chkbox_all").is(":checked")==true) { $("#addrbook_chkbox_all").attr("checked", false); } else { $("#addrbook_chkbox_all").attr("checked", true); } addrbook_check_all(); } // 주소록 보기 필터 function addrbook_filter(mode) { $("#addrbook_page").val("1"); $("#addrbook_alphasearch").val(mode); var i = 0; $("button[name='addrbook_filter_btn']").each(function() { if(i==mode) $(this).addClass("active"); else $(this).removeClass("active"); i++; }); addrbookList() } // 주소록 리스트 체크 function addrbook_check_all() { $("input[name='addrbook_chkbox']").each(function() { $(this).attr("checked", $("#addrbook_chkbox_all").is(":checked")); }); addrbook_btn_view(); } function addrbook_uncheck_all() { $("#addrbook_chkbox_all").attr("checked", false); $("input[name='addrbook_chkbox']").each(function() { $(this).attr("checked", false); }); addrbook_btn_view(); } // 주소록 리스트 버튼 출력 function addrbook_btn_view() { var showtype = $("#addrbook_showtype").val(); var check = false; var i = 0; $("input[name='addrbook_chkbox']").each(function() { if($(this).is(":checked")==true) { check = true; $("#addrbook_list_tr_"+i).addClass("uplus-maillist-checked"); } else { $("#addrbook_list_tr_"+i).removeClass("uplus-maillist-checked"); } i++; }); if(check) { if(showtype=="USER") { $("#addrbook_btn_01").removeClass("uplus-maillist-btn-hide"); $("#addrbook_btn_01").addClass("uplus-maillist-btn-show"); $("#addrbook_btn_02").removeClass("uplus-maillist-btn-hide"); $("#addrbook_btn_02").addClass("uplus-maillist-btn-show"); } else if(showtype=="COMPANY") { $("#addrbook_btn_02").removeClass("uplus-maillist-btn-hide"); $("#addrbook_btn_02").addClass("uplus-maillist-btn-show"); } $("#addrbook_btn_03").removeClass("uplus-maillist-btn-hide"); $("#addrbook_btn_03").addClass("uplus-maillist-btn-show"); } else { if(showtype=="USER") { $("#addrbook_btn_01").removeClass("uplus-maillist-btn-show"); $("#addrbook_btn_01").addClass("uplus-maillist-btn-hide"); $("#addrbook_btn_02").removeClass("uplus-maillist-btn-show"); $("#addrbook_btn_02").addClass("uplus-maillist-btn-hide"); } else if(showtype=="COMPANY") { $("#addrbook_btn_02").removeClass("uplus-maillist-btn-show"); $("#addrbook_btn_02").addClass("uplus-maillist-btn-hide"); } $("#addrbook_btn_03").removeClass("uplus-maillist-btn-show"); $("#addrbook_btn_03").addClass("uplus-maillist-btn-hide"); } } // 주소록 이메일 보내기 버튼 function addrbookMailSend() { var fullemail = ""; var num = 0; var addrbook_data = JSON.parse($("#addrbook_jsondata").val()); $("input[name='addrbook_chkbox']").each(function() { if($(this).is(":checked")==true) { fullemail += fullemail!="" ? "; "+addrbook_data[num].NAME+" <"+addrbook_data[num].EMAIL+">" : addrbook_data[num].NAME+" <"+addrbook_data[num].EMAIL+">"; } num++; }); mailWriteTo(fullemail); } // 전사주소록 이메일 보내기 버튼 function addrbookCompanyMailSend() { var fullemail = ""; var addrbook_data = JSON.parse($("#addressbook_company").val()); $("input[name='addrbook_chkbox']").each(function() { if($(this).is(":checked")==true) { for(var i=0; i" : addrbook_data[i].name+" <"+addrbook_data[i].email+">"; break; } } } }); mailWriteTo(fullemail); } // 이메일 주소 체크 function checkEmail(email) { email.replace(" ", ""); if (email == "") { return false; } else { reg = new RegExp("^[\\w\\-]+(\\.[\\w\\-_]+)*@[\\w\\-]+(\\.[\\w\\-]+)*(\\.[a-zA-Z]{2,20})$", "gi"); if (!reg.test(email)) { return false; } } return true; } // 이메일 주소 체크2 (문자열에 이메일 주소가 포함되었는지 확인) function checkEmail2(email) { var str = email; var pattern = /[a-zA-Z0-9-_]+@[a-zA-Z0-9-_.]+\.[a-zA-Z]{2,}/gi return pattern.test(str) } // 이메일 도메인 체크 function checkEmailDomain(domain) { domain.replace(" ", ""); if(domain == "") { return false; } else { reg = new RegExp("^@[\\w\\-]+(\\.[\\w\\-]+)*(\\.[a-zA-Z]{2,3})$", "gi"); if(!reg.test(domain)) { return false; } } return true; } // 주소록 상세보기 메일보내기 function addrbookMailWriteTo(email) { $("#popup_modal2").modal('hide'); mailWriteTo(email); } // 주소록 삭제 function deleteAddrbookCheck() { bootbox.dialog({ message: LANGUAGE[244][LANGTYPE], buttons: { danger: { label: LANGUAGE[114][LANGTYPE], className: "btn-primary", callback: function() { deleteAddrbook(); return; } }, main: { label: LANGUAGE[115][LANGTYPE], className: "btn-default", callback: function() { } } }, className: "bootbox-sm" }); } // 주소록 그룹 삭제 function deleteAddrbookGroupCheck(groupidx) { var addressBookUser_Data = JSON.parse($("#addressBookUser_Data").val()); var groupname = ""; for(i=0; i"+LANGUAGE[339][LANGTYPE]+"

    "+LANGUAGE[340][LANGTYPE]+" : "+groupname+"", buttons: { danger: { label: LANGUAGE[114][LANGTYPE], className: "btn-primary", callback: function() { deleteAddrbookGroup(groupidx); return; } }, main: { label: LANGUAGE[115][LANGTYPE], className: "btn-default", callback: function() { } } }, className: "bootbox-sm" }); } // 주소록 그룹 추가 function addEmailGroupPopup() { var sharing_permit_addressbook = $("#sharing_addressbook").val(); var html = "
    "; html += "
    "+LANGUAGE[342][LANGTYPE]+"
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; if(sharing_permit_addressbook=="Y") { html += " "; html += " "; html += " "; html += " "; } html += " "; html += "
    "+LANGUAGE[275][LANGTYPE]+"
    "+LANGUAGE[276][LANGTYPE]+"
    "; html += "
    "+LANGUAGE[262][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "+LANGUAGE[269][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += " "; html += " "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += " "+LANGUAGE[271][LANGTYPE]+" "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "+LANGUAGE[277][LANGTYPE]+"
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += ""; html += ""; html += ""; html += ""; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#popup_modal2_div").css("width", "650px"); $("#popup_modal2").modal('toggle'); } // 주소록/그룹 공유리스트 추가 function addrbookShareAddOrg(event, treeid, treeNode) { if(treeNode.isParent) { var id = treeNode.id; var name = treeNode.name; var title = "dept"; } else { var id = treeNode.userid; var name = treeNode.name; var title = "user"; } var value = id+":"+title; var optsize = $("#addrbookShareList option").size(); var check = false; for(var i=0; i"+name+""); } } // 주소록 그룹 공유리스트 추가 function addrbookGroupShareAddOrg(event, treeid, treeNode) { if(treeNode.isParent) { var id = treeNode.id; var name = treeNode.name; var title = "dept"; } else { var id = treeNode.userid; var name = treeNode.name; var title = "user"; } var value = id+":W:"+title; var optsize = $("#addrbookShareList option").size(); var check = false; for(var i=0; i"+name+""); } } // 주소록 공유리스트 추가(조직도 검색) function popupAddrSharedAdd(id, name) { var title = "user"; var value = id+":"+title; var optsize = $("#addrbookShareList option").size(); var check = false; for(var i=0; i"+name+""); } } // 주소록그룹 공유리스트 추가(조직도 검색) function popupAddrGroupSharedAdd(id, name) { var title = "user"; var value = id+":W:"+title; var optsize = $("#addrbookShareList option").size(); var check = false; for(var i=0; i"+name+""); } } // 주소록 공유리스트 삭제 function addrbookShareListDel() { var optsize = $("#addrbookShareList option").size(); var html = ""; for(var i=0; i"+text+""; } } $("#addrbookShareList").html(html); } // 주소록 그룹 공유권한 적용 function addrbookGroupShareAction() { var deptstoshare = ""; var userstoshare = ""; var temp_deptstoshare = ""; var temp_userstoshare = ""; var optsize = $("#addrbookShareList option").size(); var html = ""; for(var i=0; i"+name+""; html += "
    "+auth+"
    "; html += " "; deptstoshare += idx+":"+authflag+","; temp_deptstoshare += name+":"+idx+":"+authflag+","; } else { html += "
    "; html += "
    "+name+"
    "; html += "
    "+auth+"
    "; html += "
    "; userstoshare += idx+":"+authflag+","; temp_userstoshare += name+":"+idx+":"+authflag+","; } } $("#addrbookGroup_shared_box").html(html); $("#strDeptsToShare").val(deptstoshare); $("#strUsersToShare").val(userstoshare); $("#tempDeptsToShare").val(temp_deptstoshare); $("#tempUsersToShare").val(temp_userstoshare); addrBookOrgViewClose(); } // 주소록 그룹 공유리스트 추가 /*** function addrbookShareAddOrg(event, treeid, treeNode) { if(treeNode.isParent) { var id = treeNode.id; var name = treeNode.name; var title = "dept"; } else { var id = treeNode.userid; var name = treeNode.name; var title = "user"; } var value = id+":"+title; $("#addrbookShareList").append(""); } ***/ // 주소록 공유권한 적용 function addrbookShareAction() { var deptstoshare = ""; var userstoshare = ""; var temp_deptstoshare = ""; var temp_userstoshare = ""; var optsize = $("#addrbookShareList option").size(); var html = ""; for(var i=0; i"+name+""; html += " "; deptstoshare += idx+","; temp_deptstoshare += name+":"+idx+","; } else { html += "
    "; html += "
    "+name+"
    "; html += "
    "; userstoshare += idx+","; temp_userstoshare += name+":"+idx+","; } } $("#addrbookGroup_shared_box").html(html); $("#strDeptsToShare").val(deptstoshare); $("#strUsersToShare").val(userstoshare); $("#tempDeptsToShare").val(temp_deptstoshare); $("#tempUsersToShare").val(temp_userstoshare); addrBookOrgViewClose(); } // 주소록 그룹 공유설정 확인 function addrbookShareListChange() { var text = $("#addrbookShareList option:selected").text(); var val = $("#addrbookShareList option:selected").val(); var valueArr = val.split(":"); $("#addrbookShaerAuth").val(valueArr[1]); } // 주소록 그룹 공유 권한 설정 function addrbookShareSetAuth() { var idx = $("#addrbookShareList option").index($("#addrbookShareList option:selected")); if(idx!=-1) { var text = $("#addrbookShareList option:selected").text(); var val = $("#addrbookShareList option:selected").val(); var valueArr = val.split(":"); var auth = $("#addrbookShaerAuth option:selected").val(); var auth_new = valueArr[0]+":"+auth+":"+valueArr[2]; $("#addrbookShareList option:eq("+idx+")").replaceWith(""); $("#addrbookShareList").val(auth_new); } } // 주소록 그룹 공유설정창 닫기 function addrBookOrgViewClose() { $("#addrbook_shared_setting").removeClass("show"); $("#addrbook_shared_setting").addClass("hide"); $("#addrbookShareBtnGroup").removeClass("hide"); $("#addrbookShareBtnGroup").addClass("show"); } // function showAddrbookGroupEditBtn(n) { $("#modAddrbookGroup_"+n).removeClass("hide"); $("#modAddrbookGroup_"+n).addClass("show"); $("#delAddrbookGroup_"+n).removeClass("hide"); $("#delAddrbookGroup_"+n).addClass("show"); } // function hideAddrbookGroupEditBtn(n) { $("#modAddrbookGroup_"+n).removeClass("show"); $("#modAddrbookGroup_"+n).addClass("hide"); $("#delAddrbookGroup_"+n).removeClass("show"); $("#delAddrbookGroup_"+n).addClass("hide"); } function showShareGroupEditBtn(n) { $("#viewAddrbookGroup_"+n).removeClass("hide"); $("#viewAddrbookGroup_"+n).addClass("show"); } // function hideShareGroupEditBtn(n) { $("#viewAddrbookGroup_"+n).removeClass("show"); $("#viewAddrbookGroup_"+n).addClass("hide"); } // 주소록 가져오기 페이지 function addrbookImport() { $("#addrbook_showtype").val("USER"); $("#addrbook_page").val("1"); $("#addrbook_groupidx").val(""); $("#search_content").val(""); $("#addrbook_alphasearch").val(""); $("button[name='addrbook_filter_btn']").each(function() { $(this).removeClass("active"); }); var timestamp = tstamp(); $.history.load("addressbook_import^USER^1^ALL^"+timestamp); } // 주소록 내보내기 페이지 function addrbookExport() { $("#addrbook_showtype").val("USER"); $("#addrbook_page").val("1"); $("#addrbook_groupidx").val(""); $("#search_content").val(""); $("#addrbook_alphasearch").val(""); $("button[name='addrbook_filter_btn']").each(function() { $(this).removeClass("active"); }); var timestamp = tstamp(); $.history.load("addressbook_export^USER^1^ALL^"+timestamp); } // function addrbookExportItemCheckAll() { var chk = $("input[id='addrbook_export_item_checkall']").is(":checked"); $("input[name='addrbook_export_item']").each(function() { $(this).attr("checked", chk); }); } // function addrbookExportGroupCheckAll(type) { if(type=="USER") { var chk = $("input[id='addrbook_export_group_user_checkall']").is(":checked"); $("input[name='addrbook_export_group_user']").each(function() { $(this).attr("checked", chk); }); } else { var chk = $("input[id='addrbook_export_group_shared_checkall']").is(":checked"); $("input[name='addrbook_export_group_shared']").each(function() { $(this).attr("checked", chk); }); } } // 주소록 가져오기 전체선택 버튼 function importAddrbook_check_btn() { if($("#importAddrbook_chkbox_all").is(":checked")==true) { $("#importAddrbook_chkbox_all").attr("checked", false); } else { $("#importAddrbook_chkbox_all").attr("checked", true); } importAddrbook_check_all(); } // 주소록 가져오기 리스트 체크 function importAddrbook_check_all() { $("input[name='importAddrbook_chkbox']").each(function() { $(this).attr("checked", $("#importAddrbook_chkbox_all").is(":checked")); }); importAddrbook_btn_view(); } // 주소록 리스트 버튼 출력 function importAddrbook_btn_view() { var check = false; var i = 0; $("input[name='importAddrbook_chkbox']").each(function() { if($(this).is(":checked")==true) { check = true; } i++; }); if(check) { $("#importEmail_btn_02").removeClass("hide"); $("#importEmail_btn_02").addClass("show"); } else { $("#importEmail_btn_02").removeClass("show"); $("#importEmail_btn_02").addClass("hide"); } } // 주소록 불러오기 항목 삭제 function deleteImportAddrbook() { $("input[name='importAddrbook_chkbox']").each(function() { if($(this).is(":checked")==true) { var id = $(this).val(); $("#importAddrbook_list_tr_"+id).remove(); } }); } // 주소록 불러오기 결과 페이지 function addrbookImportComplete() { var result = $("#addrbook_export_result").val(); var message = $("#addrbook_export_message").val(); var total = $("#addrbook_export_total").val(); var success = $("#addrbook_export_success").val(); var failure = $("#addrbook_export_failure").val(); var duplicated = $("#addrbook_export_duplicated").val(); var failure_list = $("#addrbook_export_failure_list").val(); var duplicated_list = $("#addrbook_export_duplicated_list").val(); var importmessage = ""; $("#addrbook_message").html(message); $("#addrbook_total").html(total+""+LANGUAGE[152][LANGTYPE]); $("#addrbook_success").html(success+""+LANGUAGE[152][LANGTYPE]); if(failure>0) { $("#addrbook_failure_dl").css("display", ""); $("#addrbook_failure_list").html(failure_list); importmessage += "
  • "+LANGUAGE[357][LANGTYPE]+"
  • "; } if(duplicated>0) { $("#addrbook_duplicated_dl").css("display", ""); $("#addrbook_duplicated_list").html(duplicated_list); importmessage += "
  • "+LANGUAGE[354][LANGTYPE]+"
  • "; } if(importmessage.length>0) { $("#importcomplete_memo").html(importmessage); $("#importcomplete_memo").css("display", ""); } } // 일정관리 function viewCalendarAction(id) { /*** cal_id = ""; $("input[name='chkbox_schedule']").each(function() { if($(this).is(":checked")==true) { var id = $(this).val(); cal_id += (cal_id=="") ? id : "^"+id; } }); alert(cal_id); $("#calendar").fullCalendar('refetchEventSources', '/module/schedule.php?cal_id='+$.URLEncode(cal_id)); ***/ /***/ if(id==1) { var chk = $("#chkbox_schedule_company").is(":checked"); } else if(id==2) { var chk = $("#chkbox_schedule_dept").is(":checked"); } else if(id==3) { var chk = $("#chkbox_schedule_personal").is(":checked"); } else if(id==4) { var chk = $("#chkbox_schedule_shared").is(":checked"); } var url = '/module/schedule.php?mode=list&cal_id='+id; if(chk) { $("#calendar").fullCalendar("addEventSource", url); //$("#calendar").fullCalendar('refetchEvents'); } else { //alert("calendar "+id+" hidden"); $("#calendar").fullCalendar('removeEventSource', url); //$("#calendar").fullCalendar('removeEvents'); } } // Calendar, DatePicker View Sync function syncCalendarToDatePicker() { var calendarSelectedDate = $('#calendar').fullCalendar('getDate').format('YYYY-MM-DD'); var pickerSelectedDate = $('#schedule_datepicker_date').val(); if(pickerSelectedDate=="") { //alert("picker null : "+calendarSelectedDate); //var tempDate = $("#calendar-inline").data('datepicker').getDate(); //pickerSelectedDate = tempDate.getFullYear() + "-" + sprintf("%02d", (tempDate.getMonth() + 1)) + "-" + sprintf("%02d", tempDate.getDate()); pickerSelectedDate = calendarSelectedDate; $('#schedule_datepicker_date').val(calendarSelectedDate); } var calendarMonth = calendarSelectedDate.substring(0,7); var pickerMonth = pickerSelectedDate.substring(0,7); //alert("calendar: "+calendarMonth+", picker: "+pickerMonth); if(calendarMonth!=pickerMonth) { $('#calendar-inline').datepicker("update", calendarSelectedDate); $('#schedule_datepicker_date').val(calendarSelectedDate); } } // 일정 삭제 확인 function removeSchedule(resource, id) { bootbox.dialog({ message: LANGUAGE[387][LANGTYPE], buttons: { danger: { label: LANGUAGE[97][LANGTYPE], className: "btn-primary", callback: function() { removeScheduleAction(resource, id); } }, main: { label: LANGUAGE[115][LANGTYPE], className: "btn-default", callback: function() { } } }, className: "bootbox-sm" }); } // 일정등록 function addSchedulePopupFull(start, end) { if(start==undefined && end==undefined) { var tempDate = new Date(); var startdate = tempDate.getFullYear() + "-" + sprintf("%02d", (tempDate.getMonth() + 1)) + "-" + sprintf("%02d", tempDate.getDate()); var starttimeHour = sprintf("%02d", tempDate.getHours()); var starttimeMin = "00"; var enddate = startdate; var endtimeHour = sprintf("%02d", tempDate.getHours()+2); var endtimeMin = "00"; } else { var tempStartDate = start.split(" "); var startdate = tempStartDate[0]; if(tempStartDate.length<2) { var starttimeHour = "00"; var starttimeMin = "00"; } else { var tempTime = tempStartDate[1].split(":"); var starttimeHour = tempTime[0]; var starttimMin = tempTime[1]; } var tempEndDate = end.split(" "); var enddate = tempEndDate[0]; if(tempEndDate.length<2) { var endtimeHour = "00"; var endtimeMin = "00"; } else { var tempTime = tempEndDate[1].split(":"); var endtimeHour = tempTime[0]; var endtimeMin = tempTime[1]; } } var html = "

    "+LANGUAGE[388][LANGTYPE]+"

    "; html += "
    "; html += ""; html += "
    "; html += "
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
    "+LANGUAGE[389][LANGTYPE]+""; html += "
    "; html += "
    "; html += "
    "; html += "
    "+LANGUAGE[84][LANGTYPE]+"
    "+LANGUAGE[390][LANGTYPE]+"
    "+LANGUAGE[391][LANGTYPE]+""; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "+LANGUAGE[392][LANGTYPE]+""; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += "
    "+LANGUAGE[393][LANGTYPE]+""; html += " "; html += "
    "+LANGUAGE[395][LANGTYPE]+""; html += " "; html += "
    "+LANGUAGE[404][LANGTYPE]+""; html += " "; html += "
    "+LANGUAGE[164][LANGTYPE]+""; html += "  "+LANGUAGE[408][LANGTYPE]+" "; html += "  "+LANGUAGE[409][LANGTYPE]+""; html += "
    "+LANGUAGE[261][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "
    "; html += " "; html += " "; html += "
    "; html += ""; html += "
    "; $("#popup_modal2_message").html(html); $("#popup_modal2_div").css("width", "600px"); if(start==undefined) { $("#popup_modal2").modal('toggle'); } $("#popupAddSchedule_starttimeHour").select2({ minimumResultsForSearch: Infinity }); $("#popupAddSchedule_starttimeMin").select2({ minimumResultsForSearch: Infinity }); $("#popupAddSchedule_endtimeHour").select2({ minimumResultsForSearch: Infinity }); $("#popupAddSchedule_endtimeMin").select2({ minimumResultsForSearch: Infinity }); $("#popupAddSchedule_inportance").select2({ minimumResultsForSearch: Infinity }); $("#popupAddSchedule_repeat").select2({ minimumResultsForSearch: Infinity }); $("#popupAddSchedule_alarmHour").select2({ minimumResultsForSearch: Infinity }); $("#popupAddSchedule_alarmMin").select2({ minimumResultsForSearch: Infinity }); var options = { format: "yyyy-mm-dd", todayBtn: "linked", todayHighlight: true, autoclose: true, orientation: $('body').hasClass('right-to-left') ? "auto right" : 'auto auto' } $('#inputStartDate').datepicker(options); $('#inputEndDate').datepicker(options); } function scheduleTypeChange(n) { var domain = $("#login_domain").val(); if(domain=="jeonjupaper.com" || domain=="jeonjupaper.mailwood.com" || domain=="mailself55.mailwood.com") { if(n==1) { alert(LANGUAGE[872][LANGTYPE]); } else if(n==2) { alert(LANGUAGE[873][LANGTYPE]); } } } // function checkScheduleAllDay() { //popupAddSchedule_allday if($("#popupAddSchedule_allday").is(":checked")) { $("#popupAddSchedule_starttimeHour").attr("disabled", "disabled"); $("#popupAddSchedule_starttimeMin").attr("disabled", "disabled"); $("#popupAddSchedule_endtimeHour").attr("disabled", "disabled"); $("#popupAddSchedule_endtimeMin").attr("disabled", "disabled"); } else { $("#popupAddSchedule_starttimeHour").removeAttr("disabled"); $("#popupAddSchedule_starttimeMin").removeAttr("disabled"); $("#popupAddSchedule_endtimeHour").removeAttr("disabled"); $("#popupAddSchedule_endtimeMin").removeAttr("disabled"); } } // 게시판 이동 function gotoBbs(boardcode) { $("#board_stype").val(null); $("#board_scontent").val(null); var board_page = $("#board_page").val(); $("#board_code").val(boardcode); $("#board_showtype").val("list"); $("#board_content").val(""); var timestamp = tstamp(); $.history.load("boardlist^list^1^"+boardcode+"^"+timestamp); } // 게시판 목록보기 function goBoardlist() { var board_code = $("#board_code").val(); var board_showtype = $("#board_showtype").val(); var board_page = $("#board_page").val(); var timestamp = tstamp(); $.history.load("boardlist^"+board_showtype+"^"+board_page+"^"+board_code+"^"+timestamp); } // function boardlist_pageMove(pg) { var board_code = $("#board_code").val(); var board_showtype = $("#board_showtype").val(); $("#board_page").val(pg); var timestamp = tstamp(); $.history.load("boardlist^"+board_showtype+"^"+pg+"^"+board_code+"^"+timestamp); } // 게시판리스트 간편보기 HIDE function boardSimpleLoadHide() { if($("#board_simple_load_box").css("display")!="none") { $("#board_simple_load_box").removeClass("show"); $("#board_simple_load_box").addClass("hide"); } } // 게시판 본문페이지 이동 function boardView(idx) { var boardcode = $("#board_code").val(); var pg = $("#board_page").val(); if(boardcode=="") boardcode = $("#board_firstcode").val(); $("#board_code").val(boardcode); $("#board_idx").val(idx); $("#board_showtype").val("list"); $("#board_page").val(pg); $("#board_content").val(""); $("#board_stype").val($("#search_type").val()); $("#board_scontent").val($("#search_content").val()); var timestamp = tstamp(); $.history.load("boardview^list^"+pg+"^"+boardcode+"^"+timestamp+"^"+idx); } function boardNoticeFlag() { if($("#board-popup").is(":checked")) { $("#board-period").removeClass("hide"); $("#board-period").addClass("show"); } else { $("#board-period").removeClass("show"); $("#board-period").addClass("hide"); } } // 게시판 글 작성 function boardWrite(mode) { var boardcode = $("#board_code").val(); var authflag = $("#board_authflag").val(); var idx = $("#board_idx").val(); if(authflag!="A" && authflag!="W") { popupModal(LANGUAGE[431][LANGTYPE]); return; } if(boardcode=="") boardcode = $("#board_firstcode").val(); var timestamp = tstamp(); $.history.load("boardwrite^list^1^"+boardcode+"^"+timestamp+"^"+mode+"^"+idx); } // 게시판 글작성 확인 function boardRegist() { if($("#board-subject").val()=="") { popupModal(LANGUAGE[432][LANGTYPE]); return; } if(CrossEditor.GetValueLength()<1) { popupModal(LANGUAGE[433][LANGTYPE]); return; } var writemode = $("#board_writemode").val(); if(writemode=="modify") { var message = LANGUAGE[434][LANGTYPE]; } else { var message = LANGUAGE[435][LANGTYPE]; } if($("#attach_uploading").val() > 0) { popupModal(LANGUAGE[157][LANGTYPE]); return; } bootbox.dialog({ message: message, buttons: { danger: { label: LANGUAGE[114][LANGTYPE], className: "btn-primary", callback: function() { boardRegistAction(); } }, main: { label: LANGUAGE[115][LANGTYPE], className: "btn-default", callback: function() { return; } } }, className: "bootbox-sm" }); return; } // 게시판리스트 답장 아이콘 설정 var reIcon = function(str) { var returnVal = ""; if(str.length>0 && str>"0") { var width = (str.length)*10; var returnVal = "Re "; } return returnVal; } // 게시물 다운로드 function boardSave() { var boardcode = $("#board_code").val(); var idx = $("#board_idx").val(); var url = "board_download.php?boardcode="+$.URLEncode(boardcode)+"&idx="+$.URLEncode(idx); $(location).attr('href', url); } // 게시물 인쇄 function boardPrint() { var boardcode = $("#board_code").val(); var idx = $("#board_idx").val(); var url = "board_print.php?boardcode="+$.URLEncode(boardcode)+"&idx="+$.URLEncode(idx); var boardPrint = window.open(url,'boardPrint','width=950,height=650,scrollbars=1,resizable=1'); } // SMS발송페이지 이동 function gotoSms(mode) { //$("#sms_mode").val(mode); $("#smslist_page").val("1"); var timestamp = tstamp(); $.history.load("smssend^basic^1^^"+timestamp); } // SMS발송내역 이동 function gotoSmsList() { //$("#sms_mode").val(mode); $("#smslist_page").val("1"); var timestamp = tstamp(); $.history.load("smslist^^1^^"+timestamp); } // SMS예약내역 이동 function gotoSmsReserve() { //$("#sms_mode").val(mode); $("#page").val("1"); var timestamp = tstamp(); $.history.load("smsreserve^^1^^"+timestamp); } // SMS발신번호 관리 이동 function gotoSmsNumber() { var timestamp = tstamp(); $.history.load("smsnumber^^1^^"+timestamp); } // SMS 발송내역리스트 페이지 이동 function smslist_pageMove(pg) { $("#smslist_page").val(pg); var timestamp = tstamp(); $.history.load("smslist^^"+pg+"^^"+timestamp); } // SMS 예약발송리스트 페이지 이동 function smsreserve_pageMove(pg) { $("#smslist_page").val(pg); var timestamp = tstamp(); $.history.load("smsreserve^^"+pg+"^^"+timestamp); } // SMS 메시지 입력 제한 function chkSmsMessageLength() { var sms_transfer_type = $("#SMS_TRANSFER_TYPE").val(); var tran_type = $("#tran_type").val(); var message = $("#sms_message").val(); var length = calculate_byte(message); var tmpStr; if(sms_transfer_type=="LMS") { if(length>90) { if(tran_type=="0") { $("#tran_type").val("1"); $("#send_mode").html("LMS"); $("#send_length").html("2000"); } if(length>2000) { tmpStr = Cut_Str(message,2000); $("#sms_message").val(tmpStr); length = calculate_byte(tmpStr); } } else { if(tran_type=="1") { $("#tran_type").val("0"); $("#send_mode").html("SMS"); $("#send_length").html("90"); } } } else { if(length>90) { tmpStr = Cut_Str(message,90); $("#sms_message").val(tmpStr); length = calculate_byte(tmpStr); } } $("#sms_message_length").html(length); } function calculate_byte(sTargetStr) { var sTmpStr, sTmpChar; var nOriginLen = 0; var nStrLength = 0; sTmpStr = new String(sTargetStr); nOriginLen = sTmpStr.length; for(var i=0; i 4) { nStrLength += 2; } else { nStrLength++; } } return nStrLength; } function Cut_Str(sTargetStr, nMaxLen) { var sTmpStr, sTmpChar, sDestStr; var nOriginLen = 0; var nStrLength = 0; var sDestStr = ""; sTmpStr = new String(sTargetStr); nOriginLen = sTmpStr.length; for(var i=0; i 4) { nStrLength = nStrLength + 2; } else { nStrLength++; } if(nStrLength <= nMaxLen) { sDestStr = sDestStr + sTmpChar; } else { break; } } return sDestStr; } // 휴대폰 번호 하이픈 자동추가 function autoHypenMobile(str){ if(str=="" || str==undefined) return str; str = str.replace(/[^0-9]/g, ''); var tmp = ''; if( str.length < 4){ return str; } else if(str.length < 7) { tmp += str.substr(0, 3); tmp += '-'; tmp += str.substr(3); return tmp; } else if(str.length < 11) { tmp += str.substr(0, 3); tmp += '-'; tmp += str.substr(3, 3); tmp += '-'; tmp += str.substr(6); return tmp; } else { tmp += str.substr(0, 3); tmp += '-'; tmp += str.substr(3, 4); tmp += '-'; tmp += str.substr(7); return tmp; } return str; } // 전화번호 하이픈 자동추가 function autoHypenPhone(str){ if(str=="" || str==undefined) return str; str = str.replace(/[^0-9]/g, ''); var tmp = ''; if(str.length > 3) { if(str.substr(0, 2)=="02") { if(str.length < 3){ return str; } else if(str.length < 6) { tmp += str.substr(0, 2); tmp += '-'; tmp += str.substr(2); return tmp; } else if(str.length < 10) { tmp += str.substr(0, 2); tmp += '-'; tmp += str.substr(2, 3); tmp += '-'; tmp += str.substr(5); return tmp; } else { tmp += str.substr(0, 2); tmp += '-'; tmp += str.substr(2, 4); tmp += '-'; tmp += str.substr(6); return tmp; } } else { if(str.length < 4){ return str; } else if(str.length < 7) { tmp += str.substr(0, 3); tmp += '-'; tmp += str.substr(3); return tmp; } else if(str.length < 11) { tmp += str.substr(0, 3); tmp += '-'; tmp += str.substr(3, 3); tmp += '-'; tmp += str.substr(6); return tmp; } else { tmp += str.substr(0, 3); tmp += '-'; tmp += str.substr(3, 4); tmp += '-'; tmp += str.substr(7); return tmp; } } } return str; } function smsKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { smsPhoneNumCheck(); } } // 모바일 번호체크 function mobilePhoneNumCheck(str) { var regExp = /((01[0|1|6|9|7])|(070))[-](\d{3}|\d{4})[-](\d{4}$)/g; var result = regExp.exec(str); return result; } // 전화번호 체크 function telPhoneNumCheck(str) { var regExp = /(\d{2}|\d{3})[-](\d{3}|\d{4})[-](\d{4}$)/g; var result = regExp.exec(str); return result; } // SMS 문자보내기 받는사람 번호 체크/등록 function smsPhoneNumCheck() { var phoneNumber = $("#input_receiver").val(); if(!mobilePhoneNumCheck(phoneNumber)) { popupModal(LANGUAGE[503][LANGTYPE]); return; } else { var num = $("#sms_receiver option").size(); if(num>0) { if(num>=200) { popupModal(LANGUAGE[516][LANGTYPE]); return; } for(i=0; i"+phoneNumber+""); $("#input_receiver").val(""); } } // SMS 수신인 삭제 function smsReceiverDelete() { var num = $("#sms_receiver option").size(); var selectedVal = $("#sms_receiver").val(); if(selectedVal!=null) { var selectedNum = selectedVal.length; for(i=0; i check_quota) { popupModal(LANGUAGE[521][LANGTYPE]); return; } } else { if(sms_receiver > sms_count) { popupModal(LANGUAGE[521][LANGTYPE]); return; } } if(sms_receiver > 100) { popupModal(LANGUAGE[516][LANGTYPE]); return; } smsSendAction(); } // SMS 메시지 특수문자 입력 function smsAddChar(ch){ var message = $("#sms_message").val(); message = message + ch; $("#sms_message").val(message); chkSmsMessageLength(); } // SMS 예약 날짜설정 팝업 모달 function smsReserveDatePopup() { $("#sms_reservedate_message").html(""); $("#sms_reservedate_popup_modal").modal('toggle'); } // SMS 예약 날짜 설정 function smsReserveRegistDate() { var temp_date = $("#reservesms_date").val(); var date_array = temp_date.split("/"); var reserve_date = date_array[0]+""+date_array[1]+""+date_array[2]+""+$("#reservemail_hour").val()+""+$("#reservemail_minute").val(); var print_date = date_array[0]+"-"+date_array[1]+"-"+date_array[2]+" "+$("#reservemail_hour").val()+":"+$("#reservemail_minute").val(); var newDate = new Date(); var check_date = newDate.getFullYear() + "" + sprintf("%02d", (newDate.getMonth() + 1)) + "" + sprintf("%02d", newDate.getDate()) + "" + sprintf("%02d", newDate.getHours()) + "" + sprintf("%02d", newDate.getMinutes()); if(check_date >= reserve_date) { $("#sms_reservedate_message").html(LANGUAGE[522][LANGTYPE]); return false; } $("#sms_reserve_date").val(print_date); $("#sms_reservedate_popup_modal").modal('hide'); } // function smsReserveCancel() { $("#sms_reserve_date").val(""); } // SMS 발송 리스트 전체선택 버튼 function smslist_check_btn() { if($("#smslist_chkbox_all").is(":checked")==true) { $("#smslist_chkbox_all").attr("checked", false); } else { $("#smslist_chkbox_all").attr("checked", true); } smslist_check_all(); } // SMS 발송 리스트 체크 function smslist_check_all() { $("input[name='smslist_chkbox']").each(function() { $(this).attr("checked", $("#smslist_chkbox_all").is(":checked")); }); smslist_btn_view(); } // SMS 발송 리스트 삭제 버튼 출력 function smslist_btn_view() { var check = false; var i = 0; $("input[name='smslist_chkbox']").each(function() { if($(this).is(":checked")==true) { check = true; $("#smslist_tr_"+i).addClass("uplus-maillist-checked"); } else { $("#smslist_tr_"+i).removeClass("uplus-maillist-checked"); } i++; }); if(check) { $("#smslist_btn_02").removeClass("uplus-maillist-btn-hide"); $("#smslist_btn_02").addClass("uplus-maillist-btn-show"); } else { $("#smslist_btn_02").removeClass("uplus-maillist-btn-show"); $("#smslist_btn_02").addClass("uplus-maillist-btn-hide"); } } // SMS 발신번호 등록 공지 function smsNumberNotice() { var notice_content =LANGUAGE[523][LANGTYPE]; bootbox.dialog({ message: notice_content, buttons: { danger: { label: LANGUAGE[524][LANGTYPE], className: "btn-primary", callback: function() { gotoSmsNumber(); } }, main: { label: LANGUAGE[171][LANGTYPE], className: "btn-default", callback: function() { } } }, className: "bootbox-sm" }); } // 환경설정페이지 이동 function gotoSetting(mode) { $("#setting_mode").val(mode); $("#setting_page").val("1"); var timestamp = tstamp(); $.history.load("setting^"+mode+"^1^^"+timestamp); } function autoreplySwitch(n) { if(n==1) { $("#setautoreply_msg").prop("readonly", false); $("#setautoreply_start").prop("readonly", false); $("#setautoreply_end").prop("readonly", false); } else { $("#setautoreply_msg").prop("readonly", true); $("#setautoreply_start").prop("readonly", true); $("#setautoreply_end").prop("readonly", true); } } // 신규메일함 이름 체크 function usermailboxNameCheck(mailbox_jsondata, mailbox) { var flag_dup = 0; if(mailbox.search(/\.|\ |,|;|:|\'|\"|\^|\#|\$|\%|\!|\@|\&|\*|\~|\{|\}|\[|\]\/|\<|\>|\?/) != -1) { return "ERR|"+LANGUAGE[714][LANGTYPE]; } else if(mailbox.length > 20){ return "ERR|"+LANGUAGE[715][LANGTYPE]; } else if(mailbox.value != '') { for(var i=0; i"; html += "
    "; html += "
    "+LANGUAGE[679][LANGTYPE]+"
    "; html += "
    "+LANGUAGE[678][LANGTYPE]+" : \"(\", \")\", \"_\", \"-\"
    "; html += "
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += "
    "; html += "
    "; html += " "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#parent_mailbox").select2({ minimumResultsForSearch: Infinity }); $("#popup_modal2_div").css("width", "650px"); $("#popup_modal2").modal('toggle'); } // 사용자메일함 수정 function usermailboxRename(mailbox) { var mailbox_jsondata = JSON.parse($("#rootmailboxlist").val()); var boxtype = "rootbox"; var rootmailbox = ""; $("#oldmailbox").val(mailbox); var boxnameinfo = mailbox.split("."); if(boxnameinfo.length>1) { var input_mailbox = boxnameinfo[1]; boxtype = "subbox"; rootmailbox = boxnameinfo[0]; } else { var input_mailbox = boxnameinfo[0]; } var html = "
    "; html += "
    "; html += "
    "+LANGUAGE[679][LANGTYPE]+"
    "; html += "
    "+LANGUAGE[680][LANGTYPE]+" : \"(\", \")\", \"_\", \"-\"
    "; html += "
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += "
    "; html += "
    "; html += " "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#parent_mailbox").select2({ minimumResultsForSearch: Infinity }); $("#popup_modal2_div").css("width", "650px"); $("#popup_modal2").modal('toggle'); } function settingExternalmailModify(n) { $("#externalmail_update_id").val(n); $("#externalmail_add_title").html(LANGUAGE[683][LANGTYPE]); var externalmail_data = JSON.parse($("#externalmail_data").val()); $("#popname").val(externalmail_data[n]["NAME"]); $("#popserver").val(externalmail_data[n]["SERVER"]); $("#popid").val(externalmail_data[n]["USERID"]); $("#popport").val(externalmail_data[n]["PORT"]); if(externalmail_data[n]["SSL"]=="SSL") { $("#popssl").attr("checked", true); } else { $("#popssl").attr("checked", false); } $("input[name='popmailsave']").each(function() { if(externalmail_data[n]["MAILSAVE"]==$(this).val()) { $(this).prop("checked", true); } else { $(this).prop("checked", false); } }); var boxcount = $("#popsavebox option").size(); for(var i=0; i-1) { popupModal(LANGUAGE[687][LANGTYPE]); return false; } var cnt=0,cnt2=1,cnt3=1; var temp=""; for(i=0;i < id.length;i++){ temp_id =id.charAt(i); for(j=0;j < passwd.length;j++){ if (cnt >0) j=tmp_pass_no+1; if (temp == "r"){ j=0; temp=""; } temp_pass = passwd.charAt(j); if (temp_id == temp_pass){ cnt = cnt + 1; tmp_pass_no = j; break; }else if(cnt > 0 && j > 0){ temp="r"; cnt = 0; }else{ cnt = 0; } } if (cnt >= 3) break; } if (cnt >= 3){ popupModal(LANGUAGE[688][LANGTYPE]); return false; } for(i=0;i < passwd.length;i++){ temp_pass1 = passwd.charAt(i); next_pass = (parseInt(temp_pass1.charCodeAt(0)))+1; temp_p = passwd.charAt(i+1); temp_pass2 = (parseInt(temp_p.charCodeAt(0))); if (temp_pass2 == next_pass) cnt2 = cnt2 + 1; else cnt2 = 1; if (temp_pass1 == temp_p) cnt3 = cnt3 + 1; else cnt3 = 1; if (cnt2 >= 3) break; if (cnt3 >= 3) break; } if (cnt2 >= 3){ popupModal(LANGUAGE[689][LANGTYPE]); return false; } if (cnt3 >= 3){ popupModal(LANGUAGE[690][LANGTYPE]); return false; } return true; } // 비밀번호 유효성 체크2 function passwdVerifyCheck(id,passwd) { var s_chars = "-_=+\|()*&^%$#@!~`?><;,.:'"; var chk_chars = false; for(var i=0; i-1) { return "ERROR|"+LANGUAGE[687][LANGTYPE]; } var cnt=0,cnt2=1,cnt3=1; var temp=""; for(i=0;i < id.length;i++){ temp_id =id.charAt(i); for(j=0;j < passwd.length;j++){ if (cnt >0) j=tmp_pass_no+1; if (temp == "r"){ j=0; temp=""; } temp_pass = passwd.charAt(j); if (temp_id == temp_pass){ cnt = cnt + 1; tmp_pass_no = j; break; }else if(cnt > 0 && j > 0){ temp="r"; cnt = 0; }else{ cnt = 0; } } if (cnt >= 3) break; } if (cnt >= 3){ return "ERROR|"+LANGUAGE[688][LANGTYPE]; } for(i=0;i < passwd.length;i++){ temp_pass1 = passwd.charAt(i); next_pass = (parseInt(temp_pass1.charCodeAt(0)))+1; temp_p = passwd.charAt(i+1); temp_pass2 = (parseInt(temp_p.charCodeAt(0))); if (temp_pass2 == next_pass) cnt2 = cnt2 + 1; else cnt2 = 1; if (temp_pass1 == temp_p) cnt3 = cnt3 + 1; else cnt3 = 1; if (cnt2 >= 3) break; if (cnt3 >= 3) break; } if (cnt2 >= 3){ return "ERROR|"+LANGUAGE[689][LANGTYPE]; } if (cnt3 >= 3){ return "ERROR|"+LANGUAGE[690][LANGTYPE]; } return "SUCCESS|";; } // 이메일 아이디 유효성 체크 function useridVerifyCheck(userid) { for (i = 0; i < userid.length; i++) { ch = userid.charAt(i); if (i == 0 && ((ch < 'a' || 'z' < ch) && (ch < 'A' || 'Z' < ch) && (ch < '0' || '9' < ch))) { return "ERROR|계정의 첫문자는 영문자, 숫자만 허용합니다"; } if ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || ('A' <= ch && ch <= 'Z') || (ch == '_') || (ch == '.') || (ch == '-')) { continue; } else { return "ERROR|영문자, 숫자, '.', '_', '-'만 허용합니다."; } } return "SUCCESS|"; } function blackListSort(mode) { if(mode=="date") { var blacklist = $("#blacklist_date").val(); var blacklist_json = JSON.parse(blacklist); var blacklist_cnt = blacklist_json.length; var html = ""; for(var i=0; i["+(i+1)+"] "+blacklist_json[i].TITLE+" ("+blacklist_json[i].REGDATE+")"; } $("#blacklist_selectbox").html(html); $("#blacklist_sort_btn").html(LANGUAGE[691][LANGTYPE]); $("#blacklist_sort_btn").attr("onClick", "blackListSort('title')"); } else { var blacklist = $("#blacklist").val(); var blacklist_json = JSON.parse(blacklist); var blacklist_cnt = blacklist_json.length; var html = ""; for(var i=0; i["+(i+1)+"] "+blacklist_json[i].TITLE+" ("+blacklist_json[i].REGDATE+")"; } $("#blacklist_selectbox").html(html); $("#blacklist_sort_btn").html(LANGUAGE[593][LANGTYPE]); $("#blacklist_sort_btn").attr("onClick", "blackListSort('date')"); } } function blackListSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { blackListSearch(); } } function blackListRegistKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { settingSpamBlacklistAdd(); } } function blackListSearch(mode) { var val = $("#search_blacklist_input").val(); if(val=="") { popupModal(LANGUAGE[692][LANGTYPE]); return; } var html = ""; var blacklist = $("#blacklist").val(); var blacklist_json = JSON.parse(blacklist); var blacklist_cnt = blacklist_json.length; for(var i=0; i["+(i+1)+"] "+blacklist_json[i].TITLE+" ("+blacklist_json[i].REGDATE+")"; } } if(mode=="all") $("#search_blacklist_input").val(""); $("#blacklist_selectbox").html(html); } function whiteListSort(mode) { if(mode=="date") { var whitelist = $("#whitelist_date").val(); var whitelist_json = JSON.parse(whitelist); var whitelist_cnt = whitelist_json.length; var html = ""; for(var i=0; i["+(i+1)+"] "+whitelist_json[i].TITLE+" ("+whitelist_json[i].REGDATE+")"; } $("#whitelist_selectbox").html(html); $("#whitelist_sort_btn").html(LANGUAGE[691][LANGTYPE]); $("#whitelist_sort_btn").attr("onClick", "whiteListSort('title')"); } else { var whitelist = $("#whitelist").val(); var whitelist_json = JSON.parse(whitelist); var whitelist_cnt = whitelist_json.length; var html = ""; for(var i=0; i["+(i+1)+"] "+whitelist_json[i].TITLE+" ("+whitelist_json[i].REGDATE+")"; } $("#whitelist_selectbox").html(html); $("#whitelist_sort_btn").html(LANGUAGE[593][LANGTYPE]); $("#whitelist_sort_btn").attr("onClick", "whiteListSort('date')"); } } function whiteListSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { whiteListSearch(); } } function whiteListRegistKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { settingSpamWhitelistAdd(); } } // 환경설정-스팸관리 화이트리스트 검색 function whiteListSearch(mode) { var val = $("#search_whitelist_input").val(); if(val=="") { popupModal(LANGUAGE[692][LANGTYPE]); return; } var html = ""; var whitelist = $("#whitelist").val(); var whitelist_json = JSON.parse(whitelist); var whitelist_cnt = whitelist_json.length; for(var i=0; i["+(i+1)+"] "+whitelist_json[i].TITLE+" ("+whitelist_json[i].REGDATE+")"; } } if(mode=="all") $("#search_whitelist_input").val(""); $("#whitelist_selectbox").html(html); } // 환경설정-자동분류 리스트 체크 function filter_check_all() { $("input[name='filter_chkbox']").each(function() { $(this).attr("checked", $("#filter_chkbox_all").is(":checked")); }); } // 자동분류 설정추가 체크 function filter_option_chk(s) { $("#filter_opt1").prop("disabled", true); $("#filter_opt2").prop("disabled", true); $("#filter_opt3").prop("disabled", true); $("#filterbox1").prop("disabled", true); $("#filterbox2").prop("disabled", true); $("#filterbox3").prop("disabled", true); $("#filterbox4").prop("disabled", true); $("#filterbox5").prop("disabled", true); $("#filter_btn1").prop("disabled", true); $("#filter_btn2").prop("disabled", true); $("#filter_btn3").prop("disabled", true); $("#filter_btn4").prop("disabled", true); $("#filter_btn5").prop("disabled", true); if(s==1) { $("#filter_opt1").prop("disabled", false); $("#filterbox1").prop("disabled", false); $("#filter_btn1").prop("disabled", false); } else if(s==2) { $("#filter_opt2").prop("disabled", false); $("#filterbox2").prop("disabled", false); $("#filter_btn2").prop("disabled", false); } else if(s==3) { $("#filter_opt3").prop("disabled", false); $("#filterbox3").prop("disabled", false); $("#filter_btn3").prop("disabled", false); } else if(s==4) { $("#filterbox4").prop("disabled", false); $("#filter_btn4").prop("disabled", false); } else if(s==5) { $("#filterbox5").prop("disabled", false); $("#filter_btn5").prop("disabled", false); } } // 메일리스트 규칙추가 modal function addMailFilterPopup(email) { var mailbox = JSON.parse($("#MailboxData").val()); var html = "
    "; html += "
    "; html += " "; html += "
    "+LANGUAGE[844][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "   "; html += " "; html += "
    "; html += "
    "; html += "   "+LANGUAGE[845][LANGTYPE]+" "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "+LANGUAGE[847][LANGTYPE]+"
    "; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#addMailFilter_filterbox").select2({ minimumResultsForSearch: Infinity }); $("#popup_modal2_div").css("width", "450px"); //$("#popup_modal2").modal('toggle'); $("#popup_modal2").modal({backdrop: 'static', keyboard: false, toggle: true}); } function IsSTR(Str) { var Ori = ",|^"; for(i = 0; i < Str.length; i++) { Idcheck = Str.charAt(i); for (j=0; j < Ori.length; j++){ if (Idcheck == Ori.charAt(j)){ return false; break; } } } return true; } // function informationSecurityAccess() { var message = "
    "; message+= " "+LANGUAGE[611][LANGTYPE]+""; message+= "
    "; message+= "
    "; message+= "

    "+LANGUAGE[693][LANGTYPE]+"

    "; message+= "

    "+LANGUAGE[694][LANGTYPE]+"

    "; message+= "

    "+LANGUAGE[695][LANGTYPE]+"

    "; message+= "
    "; popupModal(message, 500); } // function changeAccessCountry() { if($("#security_country_access").is(":checked")) { $("#access_country_btn").removeClass("hide"); $("#access_country_btn").addClass("show"); } else { $("#access_country_btn").removeClass("show"); $("#access_country_btn").addClass("hide"); } } // function changeAccessIp() { if($("#security_ip_access").is(":checked")) { $("#access_ip_btn").removeClass("hide"); $("#access_ip_btn").addClass("show"); } else { $("#access_ip_btn").removeClass("show"); $("#access_ip_btn").addClass("hide"); } } // function changeSecurityAlarm() { } function settingAccessCountry() { var country_code = JSON.parse($("#country_code_data").val()); var access_country_data = JSON.parse($("#access_country_data").val()); var html = "
    "; html += "
    "+LANGUAGE[696][LANGTYPE]+"
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#popup_modal2_div").css("width", "650px"); $("#popup_modal2").modal({backdrop: 'static', keyboard: false, toggle: true}); } function cancelRegistOtp() { console.log("cancelRegistOtp =>"); $("#popup_modal3").modal('hide'); $("#security_otp_auth").switcher("off"); $("#security_load").val("loaded"); return; } function settingAccessCountryAdd() { var optsize = $("#select_country_codes option").size(); var optsize2 = $("#select_access_country option").size(); for(var i=0; i"+text+""); } } } } function settingAccessCountryDel() { var optsize = $("#select_access_country option").size(); var html = ""; for(var i=0; i"+text+""; } } $("#select_access_country").html(html); } function settingAccessIp() { var access_ip_data = JSON.parse($("#access_ip_data").val()); var html = "
    "; html += "
    "+LANGUAGE[697][LANGTYPE]+"
    "; html += "
    "; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += " "; html += "
    "; html += "
    "; html += " "; html += " "; html += " "; html += "
    "; html += "
    "; html += "
    "; html += "
    "; $("#popup_modal2_message").html(html); $("#popup_modal2_div").css("width", "650px"); $("#popup_modal2").modal({backdrop: 'static', keyboard: false, toggle: true}); } function inputAccessipSwitch(mode) { if(mode=="1") { $("#input_accessip_host").prop("disabled", false); $("#input_accessip_range1").val(""); $("#input_accessip_range2").val(""); $("#input_accessip_range1").prop("disabled", true); $("#input_accessip_range2").prop("disabled", true); } else { $("#input_accessip_host").val(""); $("#input_accessip_host").prop("disabled", true); $("#input_accessip_range1").prop("disabled", false); $("#input_accessip_range2").prop("disabled", false); } } function settingAccessIpAdd() { if($("#chk_accessip1").prop("checked")) { var ip = $("#input_accessip_host").val(); var message = ""; if(ip=="") { message = " "+LANGUAGE[700][LANGTYPE]+"."; } if(!validIpCheck(ip)) { message = " "+LANGUAGE[701][LANGTYPE]+""; } } else { var ip = ""; var ip1 = $("#input_accessip_range1").val(); var ip2 = $("#input_accessip_range2").val(); var message = ""; if(ip1=="" || ip2=="") { message = " "+LANGUAGE[700][LANGTYPE]+""; } if(!validIpCheck(ip1) || !validIpCheck(ip2)) { message = " "+LANGUAGE[701][LANGTYPE]+""; } if(ip1 > ip2) { message = " "+LANGUAGE[701][LANGTYPE]+""; } ip = ip1+"-"+ip2; } var optsize = $("#select_access_ip option").size(); for(var i=0; i "+LANGUAGE[702][LANGTYPE]+""; break; } } if(message!="") { $("#custom_modal_message").html(message); setTimeout(function() { $("#custom_modal_message").html(""); }, 3000); return; } $("#select_access_ip").append(""); $("#input_accessip_host").val(""); $("#input_accessip_range1").val(""); $("#input_accessip_range2").val(""); } function settingAccessIpDel() { var optsize = $("#select_access_ip option").size(); var html = ""; for(var i=0; i"+text+""; } } $("#select_access_ip").html(html); } function validIpCheck(str) { var reg=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/ return reg.test(str); } function userSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { userOrgSearch(); } } function userOrgSearch() { var search_val = $("#search_content").val(); if(search_val=="") { popupModal(LANGUAGE[703][LANGTYPE]); return; } var userOrgData = JSON.parse($("#userOrgData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html = "
  • "+LANGUAGE[704][LANGTYPE]+"
  • "; } $("#orgtree_search_result").html(html); $("#orgtree_search_result").css("display","block"); } function adminUserSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { adminUserOrgSearch(); } } function adminUserOrgSearch() { var search_val = $("#search_content").val(); if(search_val=="") { popupModal(LANGUAGE[703][LANGTYPE]); return; } var userOrgData = JSON.parse($("#userOrgData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html = "
  • 검색된 사용자가 없습니다.
  • "; } $("#orgtree_search_result").html(html); $("#orgtree_search_result").css("display","block"); } function adminUserListSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { adminUserlist_pageMove(1); } } function popupUserSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { popupUserOrgSearch(); } } function popupUserOrgSearch() { var search_val = $("#search_content1").val(); if(search_val=="") { return; } var userOrgData = JSON.parse($("#popupUserOrgData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html += "
  • 검색된 사용자가 없습니다.
  • "; } $("#popup_orgtree_search_content").html(html); $("#popup_orgtree_search").css("display","block"); } function popupAddrUserSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { popupAddrUserOrgSearch(); } } function popupAddrUserOrgSearch() { var search_val = $("#search_content1").val(); if(search_val=="") { return; } var userOrgData = JSON.parse($("#popupUserOrgData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html += "
  • 검색된 사용자가 없습니다.
  • "; } $("#popup_orgtree_search_content").html(html); $("#popup_orgtree_search").css("display","block"); } function popupAddrGroupUserSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { popupAddrGroupUserOrgSearch(); } } function popupAddrGroupUserOrgSearch() { var search_val = $("#search_content1").val(); if(search_val=="") { return; } var userOrgData = JSON.parse($("#popupUserOrgData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html += "
  • 검색된 사용자가 없습니다.
  • "; } $("#popup_orgtree_search_content").html(html); $("#popup_orgtree_search").css("display","block"); } function popupUserSearchKeyEvent2(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { popupUserOrgSearch2(); } } function popupUserOrgSearch2() { var search_val = $("#search_content").val(); if(search_val=="") { return; } var userOrgData = JSON.parse($("#popupUserOrgData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html += "
  • 검색된 사용자가 없습니다.
  • "; } $("#popup_orgtree_search_content").html(html); $("#popup_orgtree_search").css("display","block"); } function popupUserOrgSearchHide() { $("#popup_orgtree_search_content").html(""); $("#popup_orgtree_search").css("display","none"); } function popupAddrSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { popupUserAddrSearch(); } } function popupUserAddrSearch() { var search_val = $("#search_content2").val(); if(search_val=="") { return; } var userAddrData = JSON.parse($("#popupUserAddrData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html += "
  • 검색된 사용자가 없습니다.
  • "; } $("#popup_addrtree_search_content").html(html); $("#popup_addrtree_search").css("display","block"); } function popupUserAddrSearchHide() { $("#popup_addrtree_search_content").html(""); $("#popup_addrtree_search").css("display","none"); } function popupReceiverAddOrg(event, treeid, treeNode) { if(treeNode.isParent==true) { //부서명 클릭시 var childNode1 = treeNode.children; if(childNode1!=undefined) { var cnt1 = childNode1.length; for(var i=0; i/g,'>'); $("#select_receiverlist_"+checkTab).append(""); } function popupReceiverDel(checkTab) { var optsize = $("#select_receiverlist_"+checkTab+" option").size(); var html = ""; for(var i=0; i/g,'>'); var value = $("#select_receiverlist_"+checkTab+" option:eq("+i+")").val(); html += ""; } } $("#select_receiverlist_"+checkTab).html(html); } function popupReceiverSubmit() { var receiver_form_type = $("#receiver_form_type").val(); if(receiver_form_type=="INPUT") { var optsize_to = $("#select_receiverlist_to option").size(); var receiver_to = ""; for(var i=0; i0) receiver_to += "; "+value; else receiver_to += value; } $("#mail-to").val(receiver_to); var optsize_cc = $("#select_receiverlist_cc option").size(); var receiver_cc = ""; for(var i=0; i0) receiver_cc += "; "+value; else receiver_cc += value; } $("#mail-cc").val(receiver_cc); var optsize_bcc = $("#select_receiverlist_bcc option").size(); var receiver_bcc = ""; for(var i=0; i0) receiver_bcc += "; "+value; else receiver_bcc += value; } $("#mail-bcc").val(receiver_bcc); var bcc_display = $("#mailwrite_bcc_dl").css("display"); if(receiver_bcc!="" && bcc_display=="none") { showBcc(); } $("#mail-to").select2({ tags: data, minimumInputLength: 2, tokenSeparators: [";"] }); $("#mail-cc").select2({ tags: data, minimumInputLength: 2, tokenSeparators: [";"] }); $("#mail-bcc").select2({ tags: data, minimumInputLength: 2, tokenSeparators: [";"] }); } else { $("#select-to").html(""); var optsize_to = $("#select_receiverlist_to option").size(); var to_html = ""; for(var i=0; i/g,'>'); var value = $("#select_receiverlist_to option:eq("+i+")").val(); to_html += ""; } $("#select-to").html(to_html); $("#select-cc").html(""); var optsize_cc = $("#select_receiverlist_cc option").size(); var cc_html = ""; for(var i=0; i/g,'>'); var value = $("#select_receiverlist_cc option:eq("+i+")").val(); cc_html += ""; } $("#select-cc").html(cc_html); if(cc_html!="") { if($("#mailwrite_cc2_dl").css("display")=="none") { $("#mailwrite_cc2_dl").css("display", ""); $("#mailwrite_to2_btn").removeClass("fa-plus"); $("#mailwrite_to2_btn").addClass("fa-minus"); } } $("#select-bcc").html(""); var optsize_bcc = $("#select_receiverlist_bcc option").size(); var bcc_html = ""; for(var i=0; i/g,'>'); var value = $("#select_receiverlist_bcc option:eq("+i+")").val(); bcc_html += ""; } $("#select-bcc").html(bcc_html); if(bcc_html!="") { if($("#mailwrite_cc2_dl").css("display")=="none") { $("#mailwrite_cc2_dl").css("display", ""); $("#mailwrite_to2_btn").removeClass("fa-plus"); $("#mailwrite_to2_btn").addClass("fa-minus"); } if($("#mailwrite_bcc2_dl").css("display")=="none") { $("#mailwrite_bcc2_dl").css("display", ""); $("#mailwrite_cc2_btn").removeClass("fa-plus"); $("#mailwrite_cc2_btn").addClass("fa-minus"); } } } } function inputAddReceiver(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { var email = $("#input-to-select").val(); if(checkEmail2(email)) { addReceiver(email); $("#input-to-select").val(""); $("#ui-id-1").css("display", "none"); } } } function addReceiver(email) { email.replace('"', ''); var optsize = $("#select-to option").size(); for(var i=0; i/g,'>'); $("#select-to").append(""); } if($("#setReceiver2").is(":checked")) { var email_text = email.replace(//g,'>'); $("#select-cc").append(""); } if($("#setReceiver3").is(":checked")) { var email_text = email.replace(//g,'>'); $("#select-bcc").append(""); } /***** if($("#setReceiver1").is(":checked")) { var optsize = $("#select-to option").size(); for(var i=0; i/g,'>'); $("#select-to").append(""); } if($("#setReceiver2").is(":checked")) { var optsize = $("#select-cc option").size(); for(var i=0; i/g,'>'); $("#select-cc").append(""); } if($("#setReceiver3").is(":checked")) { var optsize = $("#select-bcc option").size(); for(var i=0; i/g,'>'); $("#select-bcc").append(""); } *****/ $("#input-to-select").val(""); } function removeReceiver(type) { if(type=="to") { var optsize_to = $("#select-to option").size(); var to_html = ""; for(var i=0; i/g,'>'); var value = $("#select-to option:eq("+i+")").val(); to_html += ""; } } $("#select-to").html(to_html); } else if(type=="cc") { var optsize_cc = $("#select-cc option").size(); var cc_html = ""; for(var i=0; i/g,'>'); var value = $("#select-cc option:eq("+i+")").val(); cc_html += ""; } } $("#select-cc").html(cc_html); } else if(type="bcc") { var optsize_bcc = $("#select-bcc option").size(); var bcc_html = ""; for(var i=0; i/g,'>'); var value = $("#select-bcc option:eq("+i+")").val(); bcc_html += ""; } } $("#select-bcc").html(bcc_html); } } function popupSmsUserSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { popupSmsUserOrgSearch(); } } function popupSmsUserOrgSearch() { var search_val = $("#search_content1").val(); if(search_val=="") { return; } var userOrgData = JSON.parse($("#popupSmsUserOrgData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html += "
  • 검색된 사용자가 없습니다.
  • "; } $("#popup_orgtree_search_content").html(html); $("#popup_orgtree_search").css("display","block"); } function popupSmsAddrSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { popupSmsUserAddrSearch(); } } function popupSmsUserAddrSearch() { var search_val = $("#search_content2").val(); if(search_val=="") { return; } var userAddrData = JSON.parse($("#popupSmsUserAddrData").val()); var html = ""; for(i=0; i "+result+""; } } } if(html=="") { html += "
  • 검색된 사용자가 없습니다.
  • "; } $("#popup_addrtree_search_content").html(html); $("#popup_addrtree_search").css("display","block"); } function popupSmsReceiverAddOrg(event, treeid, treeNode) { if(treeNode.isParent==true) { //부서명 클릭시 var childNode1 = treeNode.children; if(childNode1!=undefined) { var cnt1 = childNode1.length; for(var i=0; i=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(childNode1[i].hp); } else { var childNode2 = childNode1[i].children; if(childNode2!=undefined) { var cnt2 = childNode2.length; for(var j=0; j=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(childNode2[j].hp); } else { var childNode3 = childNode2[j].children; if(childNode3!=undefined) { var cnt3 = childNode3.length; for(var k=0; k=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(childNode3[k].hp); } else { var childNode4 = childNode3[k].children; if(childNode4!=undefined) { var cnt4 = childNode4.length; for(var l=0; l=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(childNode4[l].hp); } else { var childNode5 = childNode4[l].children; if(childNode5!=undefined) { var cnt5 = childNode5.length; for(var m=0; m=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(childNode5[m].hp); } } } } } } } } } } } } } } } } else { // 사용자 클릭시 if($("#select_receiverlist_sms option").size()>=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(treeNode.hp); } } function popupSmsReceiverAddAddr(event, treeid, treeNode) { if(treeNode.isParent==true) { //그룹명 클릭시 var childNode1 = treeNode.children; if(childNode1!=undefined) { var cnt1 = childNode1.length; for(var i=0; i=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(childNode1[i].hp); } } } } else { // 사용자 클릭시 if($("#select_receiverlist_sms option").size()>=200) {alert(LANGUAGE[516][LANGTYPE]); return;} popupSmsReceiverAdd(treeNode.hp); } } function popupSmsReceiverAdd(email) { email.replace('"', ''); if(email.length<11 || email.length>13) return; var selectReceiver = $("#select_receiverlist_sms"); var optsize = $("#select_receiverlist_sms option").size(); if(optsize>=200) { return; } for(var i=0; i"+email+""); } function popupSmsReceiverDel() { var optsize = $("#select_receiverlist_sms option").size(); var html = ""; for(var i=0; i/g,'>'); var value = $("#select_receiverlist_sms option:eq("+i+")").val(); html += ""; } } $("#select_receiverlist_sms").html(html); } function popupSmsReceiverSubmit() { var optsize = $("#select_receiverlist_sms option").size(); if(optsize>0) { $("#sms_receiver option").remove(); for(var i=0; i"+value+""); } } } function numberSetComma(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } function maillistMouseover(n) { $("#mailcheck_"+n).css("display", "block"); } function maillistMouseout(n) { $("#mailcheck_"+n).css("display", "none"); } //////////////////////////////////////////////////////////////////////////////////////////////////// function gotoAdminUser(mode) { var timestamp = tstamp(); $.history.load("user^"+mode+"^1^^"+timestamp); } function gotoAdminSpam(mode) { var timestamp = tstamp(); $.history.load("spam^"+mode+"^1^^"+timestamp); } function gotoAdminQna(mode) { var timestamp = tstamp(); $.history.load("qna^"+mode+"^1^^"+timestamp); } function gotoAdminRequest(mode) { var timestamp = tstamp(); $.history.load("request^"+mode+"^1^^"+timestamp); } function gotoAdminSetting(mode) { var timestamp = tstamp(); $.history.load("setting^"+mode+"^1^^"+timestamp); } function adminLoginKeyEvent(mode, e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { if(mode=="ID") { $("#inputPassword").focus(); } else { adminLoginCheck(); } } } function adminLoginProcKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { authnumCheck(); } } function popupAdminOrgTree() { $("#orgtree_popup_modal").modal('toggle'); } function adminDeptSelect(idx, deptname) { $("#input_companydeptidx").val(idx); $("#input_companydeptname").val(deptname); $("#orgtree_popup_modal").modal('hide'); } function adminAddDept() { } function adminPopupHide() { $("#popup_boot_modal").modal("hide"); } function adminPopupHide2() { $("#popup_boot_modal2").modal("hide"); } function adminPopupHide3() { $("#popup_boot_modal3").modal("hide"); } function adminSpamAllCheck(mode) { var chk = $("input:checkbox[name='muid[]']"); var checked = false; if(mode=="") { if($("#spam_chkbox_all").is(":checked")) { mode = "all"; } else { mode = "uncheck"; } } chk.each(function(){ if(mode=="all") { this.checked = true; checked = true; } else if(mode=="uncheck") { this.checked = false; } }); if(checked) { $("#spam_del_btn").css("display", "block"); } else { $("#spam_del_btn").css("display", "none"); } } function adminSpamSelectCheck() { var chk = $("input:checkbox[name='muid[]']"); var checked = 0; chk.each(function() { if(this.checked) { checked++; } }); if(checked>0) { $("#spam_del_btn").css("display", "block"); } else { $("#spam_del_btn").css("display", "none"); } } function adminSpamRegularInfo() { $("#popupmodal_regular").modal('toggle'); } function adminBoardView(idx,depth) { var boardcode = $("#board_code").val(); var boardpage = $("#board_page").val(); $("#board_idx").val(idx); $("#board_showtype").val("list"); $("#board_page").val(boardpage); $("#board_content").val(""); $("#board_searchtype").val($("#search_type").val()); $("#board_searchcontent").val($("#search_content").val()); var timestamp = tstamp(); if(boardcode=="spamrequest") { var board = "spam_board"; } else if(boardcode=="mailqna") { var board = "qna_board"; } var mode = "view"; //$.history.load(board+"^"+mode+"^1^"+boardcode+"^"+timestamp+"^"+idx+"^"+depth); $.history.load("boardview^list^"+boardpage+"^"+boardcode+"^"+timestamp+"^"+idx+"^"+depth); } function adminBoardWrite(mode) { var boardcode = $("#board_code").val(); var depth = $("#board_depth").val(); var idx = $("#board_idx").val(); var timestamp = tstamp(); $.history.load("boardwrite^"+mode+"^1^"+boardcode+"^"+timestamp+"^"+idx+"^"+depth); } // 게시판 목록보기 function goAdminBoardlist(n) { var board_code = $("#board_code").val(); var board_showtype = $("#board_showtype").val(); var board_page = $("#board_page").val(); var timestamp = tstamp(); var mode = "list"; if(n==1) { $.history.load("boardlist^"+mode+"^"+board_page+"^"+board_code+"^"+timestamp+"^registcomplete"); } else { $.history.load("boardlist^"+mode+"^"+board_page+"^"+board_code+"^"+timestamp+"^"); } } // function gotoAdminBbs(boardcode) { var board_page = $("#board_page").val(); $("#board_code").val(boardcode); $("#board_showtype").val("list"); $("#board_content").val(""); $("#board_searchtype").val(""); $("#board_searchcontent").val(""); $("#search_type").val("SUBJECT"); $("#search_content").val(""); var timestamp = tstamp(); $.history.load("boardlist^list^1^"+boardcode+"^"+timestamp); } // function adminBoardlist_pageMove(pg) { var board_code = $("#board_code").val(); var board_showtype = $("#board_showtype").val(); $("#board_page").val(pg); var timestamp = tstamp(); $.history.load("boardlist^"+board_showtype+"^"+pg+"^"+board_code+"^"+timestamp); } // 게시판 글작성 확인 function adminBoardRegist() { if($("#board-writer").val()=="") { popupModal("작성자를 입력해 주세요."); return; } if($("#board-email").val()=="") { popupModal("이메일을 입력해 주세요."); return; } if(checkEmail($("#board-email").val())==false) { popupModal("이메일을 정확히 입력해 주세요."); return; } if($("#board-subject").val()=="") { popupModal("제목을 입력해 주세요."); return; } if(CrossEditor.GetValueLength()<1) { popupModal("내용을 입력해 주세요."); return; } var writemode = $("#board_writemode").val(); if(writemode=="modify") { var message = "게시물을 수정하시겠습니까?"; } else { var message = "게시물을 등록하시겠습니까?"; } bootbox.dialog({ message: message, buttons: { danger: { label: "확인", className: "btn-primary", callback: function() { adminBoardRegistAction(); } }, main: { label: "취소", className: "btn-default", callback: function() { return; } } }, className: "bootbox-sm" }); return; } function adminBoardSearchKeyEvent(e) { var evt = e ? e : window.event var ck=evt.keyCode; if(ck==13) { adminBoardSearch(); } } function adminRequestExpiredBoxView() { $("#request_reason1_box").removeClass("show"); $("#request_reason2_box").removeClass("show"); $("#request_reason1_box").addClass("hide"); $("#request_reason2_box").addClass("hide"); var chk = $("input:radio[name='expired_etc1']"); chk.each(function(){ if(this.checked && (this.value=="필요기능부재" || this.value=="기타")) { $("#request_reason1_box").removeClass("hide"); $("#request_reason1_box").addClass("show"); } }); var chk2 = $("input:radio[name='expired_etc2']"); chk2.each(function(){ if(this.checked && this.value=="기타") { $("#request_reason2_box").removeClass("hide"); $("#request_reason2_box").addClass("show"); } }); } function adminAliasAddOrg(event, treeid, treeNode) { if(treeNode.isParent==true) { //부서명 클릭시 var childNode1 = treeNode.children; if(childNode1!=undefined) { var cnt1 = childNode1.length; for(var i=0; i"+email+""); } function adminAliasEmailDel() { var optsize = $("#select_alias_email option").size(); var html = ""; for(var i=0; i"+value+""; } } $("#select_alias_email").html(html); } function adminBoardShareAddOrg(event, treeid, treeNode) { if(treeNode.isParent) { var id = treeNode.id; var name = treeNode.name; var title = "dept"; } else { var id = treeNode.userid; var name = treeNode.name; var title = "user"; } var value = id+":W:"+title; $("#boardShareList").append(""); } function adminBoardShareAddOrg2(id, name, title) { var value = id+":W:"+title; $("#boardShareList").append(""); } function adminBoardOrgViewClose() { $("#board_shared_setting").removeClass("show"); $("#board_shared_setting").addClass("hide"); $("#boardShareBtnGroup").removeClass("hide"); $("#boardShareBtnGroup").addClass("show"); } function adminBoardShareListDel() { var optsize = $("#boardShareList option").size(); var html = ""; for(var i=0; i"+text+""; } } $("#boardShareList").html(html); } function adminBoardShareAction() { var deptstoshare = ""; var userstoshare = ""; var temp_deptstoshare = ""; var temp_userstoshare = ""; var optsize = $("#boardShareList option").size(); var html = ""; for(var i=0; i"+name+""; html += "
    "+auth+"
    "; html += " "; deptstoshare += idx+":"+authflag+","; temp_deptstoshare += name+":"+idx+":"+authflag+","; } else { html += "
    "; html += "
    "+name+"
    "; html += "
    "+auth+"
    "; html += "
    "; userstoshare += idx+":"+authflag+","; temp_userstoshare += name+":"+idx+":"+authflag+","; } } $("#board_shared_box").html(html); $("#strDeptsToShare").val(deptstoshare); $("#strUsersToShare").val(userstoshare); $("#tempDeptsToShare").val(temp_deptstoshare); $("#tempUsersToShare").val(temp_userstoshare); adminBoardOrgViewClose(); } function adminBoardShareListChange() { var text = $("#boardShareList option:selected").text(); var val = $("#boardShareList option:selected").val(); var valueArr = val.split(":"); $("#boardShaerAuth").val(valueArr[1]); } function adminBoardShareSetAuth() { var idx = $("#boardShareList option").index($("#boardShareList option:selected")); if(idx!=-1) { var text = $("#boardShareList option:selected").text(); var val = $("#boardShareList option:selected").val(); var valueArr = val.split(":"); var auth = $("#boardShaerAuth option:selected").val(); var auth_new = valueArr[0]+":"+auth+":"+valueArr[2]; $("#boardShareList option:eq("+idx+")").replaceWith(""); $("#boardShareList").val(auth_new); } } function adminOrgchartPermit() { if($("#orgchart").is(":checked")) { $("#orgchart_opt1").attr("disabled", false); $("#orgchart_opt2").attr("disabled", false); $("#orgchart_opt3").attr("disabled", false); } else { $("#orgchart_opt1").attr("disabled", true); $("#orgchart_opt2").attr("disabled", true); $("#orgchart_opt3").attr("disabled", true); } } function adminUserAddBatch() { $("#orgtree_leftbox_btn").empty(); $("#orginfo").empty(); $("#orgtree_leftbox_btn").css("float", "left"); $("#orgtree_leftbox_btn").css("margin-top", "7px"); $("#orgtree_leftbox_btn").html("사용자 일괄등록"); var html = "
    "; html+= "
    "; html+= "
  • CSV 파일을 이용하여 사용자를 일괄 등록하실 수 있습니다.
  • "; html+= "
  • 직위와 직책은 직위관리, 직책관리를 통해 먼저 등록되어 있어야 합니다.
  • "; html+= "
  • 부서명의 경우 생성되어 있지 않은 경우 자동 생성됩니다.
  • "; html+= " [CSV 샘플파일 다운로드]"; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= " "; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= " "; html+= "
    "; html+= "
    "; html+= "
    "; $("#orginfo").html(html); $('#userlist_upload_file').pixelFileInput({ placeholder: "업로드할 파일을 선택해 주세요." }); } function adminUserModBatch(n) { $("#orgtree_leftbox_btn").empty(); $("#orginfo").empty(); $("#orgtree_leftbox_btn").css("float", "left"); $("#orgtree_leftbox_btn").css("margin-top", "7px"); if(n==1) { $("#orgtree_leftbox_btn").html("사용자 일괄수정"); var html = "
    "; html+= "
    "; html+= "
  • 사용자정보를 일괄 수정하실 수 있습니다.(이름,부서명,직위,직책,휴대폰,메일용량,웹하드용량)
  • "; html+= "
  • 부서명과 직위,직책은 등록된 정보와 일치하지 않으면 업데이트 되지 않습니다.
  • "; html+= "
  • 변경하지 않을 항목은 공란으로 두시면 됩니다.
  • "; html+= " [CSV 샘플파일 다운로드]"; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= " "; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= " "; html+= "
    "; html+= "
    "; html+= "
    "; $("#orginfo").html(html); $('#userlist_upload_file').pixelFileInput({ placeholder: "업로드할 파일을 선택해 주세요." }); } else { $("#orgtree_leftbox_btn").html("사용자 상태 일괄처리"); var html = "
    "; html+= "
    "; html+= "
  • 사용자 계정을 일괄 중지/삭제하실 수 있습니다.
  • "; html+= "
  • 계정 삭제의 경우 복구가 불가능하니 삭제작업시 계정을 잘 확인해 주시기 바랍니다.
  • "; html+= "
  • 처리상태는 삭제시 DELETE, 중지시 STOP
  • "; html+= " [CSV 샘플파일 다운로드]"; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= " "; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= "
    "; html+= " "; html+= "
    "; html+= "
    "; html+= "
    "; $("#orginfo").html(html); $('#userlist_upload_file').pixelFileInput({ placeholder: "업로드할 파일을 선택해 주세요." }); } }