PageSourceSearch

https://www.ssecurity.co.kr/js/board_common.js?1772502784

js ssecurity.co.kr collected 2026-10-02 01:06:06 UTC 6,352 bytes, 193 lines download raw bytes

1/**
2 * 게시판 공통으로 사용되는 함수. (게시판위젯, 지도위젯, 캘린더위젯)
3 *
4 */
5var BOARD_COMMON = function(){
6
7	// site 에서 사용됨.
8	var _openReportModal = function() {
9		var board_code = arguments.length <= 0 || arguments[0] === undefined ? "" : arguments[0];
10		var post_code = arguments.length <= 1 || arguments[1] === undefined ? "" : arguments[1];
11		var comment_code = arguments[2];
12		var type = arguments[3];
13
14		$.ajax({
15			type : 'post',
16			data : {'board_code':board_code, 'post_code':post_code, 'comment_code':comment_code, 'type':type},
17			url : '/dialog/open_report_modal.cm',
18			dataType : 'json',
19			success : function(res){
20				if(res.msg === 'SUCCESS'){
21					$.cocoaDialog.open({type : 'admin', custom_popup : res.html});
22
23					//cocoaDialog
24					$('#cocoaSubModal').css('z-index',$('#cocoaModal').css('z-index') + 1);
25
26				}else{
27					alert(res.msg)
28				}
29			}
30		});
31	};
32
33	var addReport = function(){
34		var data = $('#report_form').serializeObject();
35		$.ajax({
36			type : 'post',
37			data : {'data':data},
38			url : '/ajax/add_report.cm',
39			dataType : 'json',
40			success : function(res){
41				if(res.msg === 'SUCCESS'){
42					alert(LOCALIZE.설명_신고가성공적으로접수되었습니다());
43					$.cocoaDialog.close();
44					$('#doz_body').css('overflow-y','scroll');
45
46					location.reload();
47				}else{
48					alert(res.msg);
49				}
50			}
51		});
52	};
53	var getOnlyPhotoReview = function(a,l){
54		window.location.href = l + "&only_photo=" + a;
55	};
56
57	var _addBlock = function (code, writer, type, bord_code) {
58		var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4];
59
60		var alert_block_text = '';
61		var alert_block = '';
62		switch(type){
63			case 'post':
64				alert_block_text = '게시글을 차단하시겠습니까? 작성자의 다른 글과 댓글도 확인할 수 없습니다.';
65				alert_block = '설명_게시글차단안내';
66				break;
67			case 'comment':
68				alert_block_text = '댓글을 차단하시겠습니까? 작성자의 다른 댓글도 확인할 수 없습니다.';
69				alert_block = '설명_님을차단안내';
70				break;
71		}
72		if (confirm(getLocalizeString(alert_block, '', alert_block_text))){
73			$.ajax({
74				type : 'post',
75				data : {
76					'code' : code,
77					'writer' : writer,
78					'type' : type,
79				},
80				url : '/ajax/add_block.cm',
81				dataType : 'json',
82				success : function(res){
83					if(res.msg === 'SUCCESS'){
84						//댓글
85						$('._comment_body_' + writer).html("<p class='text-gray'><i aria-hidden='true' class='icon icon-exclamation' style='margin-right: 5px;'></i>" + getLocalizeString("설명_차단된작성자의댓글입니다", "", "차단된 작성자의 댓글입니다.") + "</p>");
86
87							$('._block_'+ writer)
88								.text(getLocalizeString("설명_차단해제", "", "차단해제"))
89								.removeAttr('onclick')
90								.off('click')
91								.on('click', function(e){
92									e.preventDefault();
93									BOARD_COMMON.deleteBlock(res.post_code, writer, 'comment', bord_code, current_page);
94								});
95
96						//게시글
97						$('.margin-top-xxl._comment_body_' + writer).html("<p class='text-gray'><i aria-hidden='true' class='icon icon-exclamation' style='margin-right: 5px;'></i>" + getLocalizeString("설명_차단된작성자의게시글입니다", "", "차단된 작성자의 게시글입니다.") + "</p>");
98
99							$('._board._block_'+ writer)
100								.text(getLocalizeString("설명_차단해제", "", "차단해제"))
101								.removeAttr('onclick')
102								.off('click')
103								.on('click', function(e){
104									e.preventDefault();
105									BOARD_COMMON.deleteBlock(res.post_code, writer, 'post', bord_code, current_page);
106								});
107
108					}else{
109						alert(res.msg);
110					}
111				}
112			});
113		}
114	};
115
116	var _deleteBlock = function (post_code, writer, type, bord_code) {
117		var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4];
118
119		var alert_block_text = '';
120		var alert_block = '';
121		switch(type){
122			case 'post':
123				var page_number = $(".pagination [class='active']").text();
124				current_page = page_number == "" ? '1' : page_number;
125				alert_block_text = '게시글을 차단 해제하시겠습니까? 작성자의 다른 글과 댓글을 다시 확인할 수 있습니다.';
126				alert_block = '설명_게시글차단해제안내';
127				break;
128			case 'comment':
129				alert_block_text = '댓글을 차단 해제하시겠습니까? 작성자의 다른 댓글을 다시 확인할 수 있습니다.';
130				alert_block = '설명_님을차단해제안내';
131				break;
132		}
133
134		if(confirm(getLocalizeString(alert_block, '', alert_block_text))){
135			$.ajax({
136				type : 'post',
137				data : {
138					'writer' : writer,
139					'post_code' : post_code,
140					'bord_code' : bord_code,
141					'current_page' : current_page,
142				},
143				url : '/ajax/delete_block.cm',
144				dataType : 'json',
145				success : function(res){
146					if(res.msg === 'SUCCESS'){
147						$('#comment_container').html(res.html);
148
149						//게시물 상단
150						$('.margin-top-xxl._comment_body_' + writer).html(res.post_body);
151
152						$('._board._block_'+ writer)
153							.text(getLocalizeString("설명_차단", "", "차단"))
154							.removeAttr('onclick')
155							.off('click')
156							.on('click', function(e){
157								e.preventDefault();
158								BOARD_COMMON.addBlock(res.code, writer, 'post', bord_code);
159							});
160					}else{
161						alert(res.msg)
162					}
163				}
164			});
165		}
166	};
167	return {
168		'openReportModal': function () {
169			var board_code = arguments.length <= 0 || arguments[0] === undefined ? "" : arguments[0];
170			var post_code = arguments.length <= 1 || arguments[1] === undefined ? "" : arguments[1];
171			var comment_code = arguments[2];
172			var type = arguments[3];
173
174			_openReportModal(board_code, post_code, comment_code, type);
175		},
176		'addReport' : function(){
177			addReport();
178		},
179		'getOnlyPhotoReview' : function(a,l){
180			getOnlyPhotoReview(a,l);
181		},
182		'addBlock': function (code, writer, type, bord_code) {
183			var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4];
184
185			_addBlock(code, writer, type, bord_code, current_page);
186		},
187		'deleteBlock': function (post_code, writer, type, bord_code) {
188			var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4];
189
190			_deleteBlock(post_code, writer, type, bord_code, current_page);
191		}
192	};
193}();

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.