PageSourceSearch

https://unitysquare.co.kr/resources/js/dev_common.js?v=20261004175220

js unitysquare.co.kr collected 2026-10-04 08:53:11 UTC 7,396 bytes, 287 lines download raw bytes

1
2    var taeil_id ;
3    var taeil_uid ;
4
5
6var obj = {
7
8
9    init: function() {
10		login_chk();
11    },
12
13
14    //@ 쿠키세팅
15    setCookie: function(cName, cValue, cDay) {
16
17		var hostn =  window.location.hostname ;
18
19		if (hostn.indexOf("makeulike") != -1) {
20			ckdomain =".makeulike.co.kr";
21		}
22		else  if (hostn.indexOf("unitysquare.co.kr") != -1) {
23			ckdomain =".unitysquare.co.kr";
24		}
25		else  {
26			ckdomain ="";
27		}
28
29
30      var expire = new Date();
31      //expire.setDate(expire.getDate() + cDay);
32      expire.setTime(expire.getTime() + (cDay * 60 * 60 * 1000));   // 20Min
33
34
35  //  cookies = cName + '=' + escape(cValue) + '; path=/ '; // 한글 깨짐을 막기위해 escape(cValue)를 합니다.
36	  cookies = cName + '=' + escape(cValue)+ ';domain='+ckdomain+'; path=/ '; // 도메인 쿠키
37    if (typeof cDay != 'undefined') cookies += ';expires=' + expire.toGMTString() + ';';
38      document.cookie = cookies;
39    },
40
41  //@ 쿠키삭제    도메인 없는것 삭제.
42  deleteCookie: function(cookieName) {
43    var expireDate = new Date();
44    var hostn =  window.location.hostname ;
45
46		if (hostn.indexOf("makeulike") != -1) {
47			ckdomain =".makeulike.co.kr";
48		}
49		else  if (hostn.indexOf("unitysquare.co.kr") != -1) {
50			ckdomain =".unitysquare.co.kr";
51		}
52		else  {
53			ckdomain ="";
54		}
55
56    expireDate.setDate(expireDate.getDate() - 1);
57    document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString() + ";domain="+ckdomain+"; path=/";
58  },
59
60  //@ 쿠키삭제    도메인 없는것 삭제.
61  deleteCookie2: function(cookieName) {
62    var expireDate = new Date();
63    var hostn =  window.location.hostname ;
64
65		if (hostn.indexOf("makeulike") != -1) {
66			ckdomain =".makeulike.co.kr";
67		}
68		else  if (hostn.indexOf("unitysquare.co.kr") != -1) {
69			ckdomain =".unitysquare.co.kr";
70		}
71		else  {
72			ckdomain ="";
73		}
74
75    expireDate.setDate(expireDate.getDate() - 1);
76    document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString() + ";domain="+ckdomain+"; path=/";
77  },
78
79
80    //@ 쿠키 가져오기
81    getCookie: function(cName) {
82      cName = cName + '=';
83      var cookieData = document.cookie;
84      var start = cookieData.indexOf(cName);
85      var cValue = '';
86      if (start != -1) {
87        start += cName.length;
88        var end = cookieData.indexOf(';', start);
89        if (end == -1) end = cookieData.length;
90        cValue = cookieData.substring(start, end);
91      }
92      return unescape(cValue);
93    }
94
95};
96
97
98
99$(document).ready(function(e){
100
101    obj.init();
102});
103
104
105var getParameter = function (param) {
106    var returnValue;
107    var url = location.href;
108    var parameters = (url.slice(url.indexOf('?') + 1, url.length)).split('&');
109    for (var i = 0; i < parameters.length; i++) {
110        var varName = parameters[i].split('=')[0];
111        if (varName.toUpperCase() == param.toUpperCase()) {
112            returnValue = parameters[i].split('=')[1];
113            return decodeURIComponent(returnValue);
114        }
115    }
116};
117
118
119
120
121
122function logout_proc(){
123
124  obj.deleteCookie("E_ID");
125  obj.deleteCookie("E_UID");
126
127	alert("로그아웃 되었습니다.");
128
129	setTimeout(function(){
130		window.location.reload();
131	}, 1000);
132
133}
134
135
136function login_chk(){
137
138   // taeil_id = '<?php echo get_cookie_dec("E_ID") ?>'; //obj.getCookie("E_ID");
139   // taeil_uid = '<?php echo get_cookie_dec("E_UID") ?>'; //obj.getCookie("E_UID");
140    taeil_id =obj.getCookie("E_ID");
141    taeil_uid = obj.getCookie("E_UID");
142
143}
144
145
146
147// 코드 변환 함수
148/*
149사용법:
150seq => html append 일련번호 (여러개일 경우 0, 1, 2 .. 순차적용)
151coeytype => 0 : select, 1 : input, 2 : input 배열, 3 : select(전체포함)
152codearea => 해당 테이블
153codename => 코드명
154c_var => 코드 비교값(선택값)
155mode => 수정 여부 (m:수정)
156etc_var => 기타 값(선택값)
157*/
158function codeConvert(seq, codetype, codearea, codename, c_var, mode, etc_var) {
159    if(codetype==2){
160      c_var = encodeURIComponent(c_var);
161    }
162        $.ajax({
163            url: "/ajax/ajax_codeConvert",
164            type: "GET",
165       data: {
166         'codetype' : codetype,
167         'codearea' : codearea,
168         'codename' : codename,
169         'c_var' : c_var,
170         'mode' : mode,
171         'etc_var' : etc_var
172       },
173            dataType: "html",
174            success:  function(data) {
175
176	  $(".codeuse_"+seq).html(data);
177    },
178    error: function() {
179    }
180  });
181}
182
183
184// 코드 변환 함수 커뮤니티 이벤트 관심주제에서 사용
185/*
186사용법:
187seq => html append 일련번호 (여러개일 경우 0, 1, 2 .. 순차적용)
188coeytype => 0 : select, 1 : input, 2 : input 배열, 3 : select(전체포함)
189codearea => 해당 테이블
190codename => 코드명
191c_var => 코드 비교값(선택값)
192mode => 수정 여부 (m:수정)
193etc_var => 기타 값(선택값)
194industrial_field => 산업분야
195*/
196function codeConvert(seq, codetype, codearea, codename, c_var, mode, etc_var, industrial_field) {
197
198    if(codetype==2){
199      c_var = encodeURIComponent(c_var);
200    }
201        $.ajax({
202            url: "/ajax/ajax_codeConvert_comm",
203            type: "GET",
204       data: {
205         'codetype' : codetype,
206         'codearea' : codearea,
207         'codename' : codename,
208         'c_var' : c_var,
209         'mode' : mode,
210         'etc_var' : etc_var,
211         'industrial_field' : industrial_field
212       },
213            dataType: "html",
214            success:  function(data) {
215
216	  $(".codeuse_"+seq).html(data);
217    },
218    error: function() {
219    }
220  });
221}
222
223
224
225function insert_Share(stype, link, pidx){
226
227    $.ajax({
228        type: 'post',
229        url: '/ajax/sns_share_ins', //데이터를 요청할 페이지
230        dataType: 'json', //데이터 유형
231        data: {
232          'board_idx': pidx,
233          'stype': stype,
234          'board_link': link,
235        },
236        error: function(xhr, status, e) { //에러 발생시 처리함수
237           // console.log(e);
238        },
239        success: function(jdata) { //성공시 처리 함수, 인수는 위에서 data를 사용한 경우
240
241        }
242    });
243}
244
245// 숫자만 입력 onkeypress="inNumber();"/>
246function inNumber(){
247  if(event.keyCode<48 || event.keyCode>57){
248     event.returnValue=false;
249  }
250}
251
252// userAgent 값 얻기
253function checkMobile(){
254    var varUA = navigator.userAgent.toLowerCase(); //userAgent 값 얻기
255
256    if ( varUA.indexOf('android') > -1) {
257        //안드로이드
258        return "android";
259    } else if ( varUA.indexOf("iphone") > -1||varUA.indexOf("ipad") > -1||varUA.indexOf("ipod") > -1 ) {
260        //IOS
261        return "ios";
262    } else {
263        //아이폰, 안드로이드 외
264        return "other";
265    }
266}
267
268//PC, Mobile 디바이스 구분
269function device_check() {
270    // 디바이스 종류 설정
271    var pc_device = "win16|win32|win64|mac|macintel";
272
273    // 접속한 디바이스 환경
274    var this_device = navigator.platform;
275
276    if ( this_device ) {
277
278        if ( pc_device.indexOf(navigator.platform.toLowerCase()) < 0 ) {
279            //console.log('MOBILE');
280            return "MOBILE";
281        } else {
282            //console.log('PC');
283            return "PC";
284        }
285
286    }
287}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.