PageSourceSearch

https://appmake.co.kr/asset/A/js/popup20.js

js appmake.co.kr collected 2026-09-24 14:03:53 UTC 8,495 bytes, 231 lines download raw bytes

1var customItem = Array();
2var maxCustomItem = 0;
3var currentItem = 0;
4function reCustomData(no) {
5	if (no == 'undefined') {
6		no = 0;
7	}
8
9	// removeCookie("customItem", "/", window.location.hostname);			
10	var expireTime = remaindTime();
11	setCookie("customItem", "N", expireTime);
12	getCustomData(no);
13}
14
15function getCustomData(no) {
16	$.ajax({
17		url:"/Intro/customItemListAx",
18		type:"post",
19		dataType:"json",
20		global:false,
21		error:function(msg){
22			document.write(msg.responseText);
23		},
24		success:function (data,textStatus) {	
25			addHtmlCustomItem();
26			setCustomItem(data.customItem);
27			openCustomDialog(no);
28		}
29	}); 	
30}
31
32function addHtmlCustomItem() {
33	if (!document.getElementById('customItem')) {
34		var html = "";
35		html = html + "<!-- // customItem modal 시작 -->";
36		html = html + "<div class='modal fade' id='customItem'>";
37		html = html + "	<div class='modal-dialog modal-lg'>";
38		html = html + "		<div class='modal-content'>";
39		html = html + "			<div class='modal-header porel'>";
40		html = html + "				<button type='button' class='modal_close' data-dismiss='modal'></button>";
41		html = html + "				<h4 class='modal-title ttl_add'>";
42		html = html + "					<span class='pop_ic_new'></span>커스터마이징된 항목<br>";
43		html = html + "						<span class='pop_sttl' id='custom_name'>FCM HTTP API를 HTTPv1 API로 변경</span>";
44		html = html + "				</h4>";
45		html = html + "				<p id='custom_app_type' class='header-stxt'>적용가능 :  Android / iOS</p>";
46		html = html + "			</div>";
47		html = html + "			<div class='modal-body modal-box2'>";
48		html = html + "				<!--프로그램부분-->";
49		html = html + "				<p id='custom_contents' style='font-size: medium;'>종료시 표시되는 팝업의 이미지를 제거합니다.</p>";
50		html = html + "				<div class='row' id='custom_useimage'>";
51		html = html + "					<div class='col-12 text-center col-lg-1'></div>";
52		html = html + "					<div class='col-12 text-center col-lg-4'>";
53		html = html + "						<span class='md_img01'>";
54		html = html + "							<img id='custom_img_before' src='/asset/A/images/img_yes.png' class='img rnd' style='max-width: 100%;vertical-align: middle;' alt='이미지있음'>";
55		html = html + "						</span>";
56		html = html + "					</div>";
57		html = html + "					<div class='col-lg-2 text-center d-none d-lg-block pdtp113'>";
58		html = html + "						<img src='/asset/A/images/arw_rt.png' alt='오른쪽화살표'>";
59		html = html + "					</div>";
60		html = html + "					<div class='col-12  text-center d-lg-none d-block pdtb20'>";
61		html = html + "						<img src='/asset/A/images/arw_bt.png' alt='아랫쪽화살표'>";
62		html = html + "					</div>";
63		html = html + "					<div class='col-12 text-center col-lg-4'>";
64		html = html + "						<div class='d-none d-lg-block'></div>";
65		html = html + "						<span class='md_img02'>";
66		html = html + "							<img id='custom_img_after' src='/asset/A/images/img_no.png' class='img rnd' style='max-width: 100%;vertical-align: middle;' alt='이미지없음'>";
67		html = html + "						</span>";
68		html = html + "					</div>";
69		html = html + "					<div class='col-12 text-center col-lg-1'></div>";
70		html = html + "				</div>";
71		html = html + "				<!--//프로그램부분-->";
72		html = html + "			</div>";
73		html = html + "			<div class='p_clz'>";
74		html = html + "				<div class='row'>";
75		html = html + "					 <div class='col-12 col-lg-4'>";
76		html = html + "						<div class='checkbox-custom checkbox-default'>";
77		html = html + "							<input id='check_customItem'  type='checkbox' checked />";
78		html = html + "							<label for='today'> 더이상 표시하지 않기</label>";
79		html = html + "						</div>";
80		html = html + "						<div class='d-lg-none ph10'></div>";
81		html = html + "					</div><!--col-->";
82		html = html + "						<div class='col-12 col-lg-8 text-right'>";
83		html = html + "							<ul class='disin'>";
84		html = html + "								<li><a href='javascript:prevCustomItem()' class='nclz_btn_p'>이전항목</a></li>";
85		html = html + "								<li><a href='javascript:nextCustomItem()' class='nclz_btn_n'>다음항목</a></li>";
86		html = html + "								<li>
86<a href='javascript:closePopup(\"customItem\")' class='nclz_btn_g'>닫기</a></li>";
87		html = html + "							</ul>";
88		html = html + "						</div>";
89		html = html + "					</div><!--col-->";
90		html = html + "				</div><!--row-->";
91		html = html + "			</div>";
92		html = html + "		</div><!-- /.modal-content -->";
93		html = html + "	</div><!-- /.modal-dialog -->";
94		html = html + "	</div>";
95		html = html + "	<!-- // customItem modal 끝 -->	";
96
97		$('body').append(html);
98	}
99}
100
101function setCustomItem(data) {
102	
103	maxCustomItem = data.length - 1;
104	if(data.length > 0) {
105		$.each(data,function(i,row) {		
106			customItem[i] = Array();
107			customItem[i]["cus_srno"] = row.CUS_SRNO;
108			customItem[i]["cus_item"] = row.CUS_POPUP_TITLE;
109			customItem[i]["cus_use_image"] = row.CUS_POPUP_USEIMAGE;
110			customItem[i]["cus_app_type"] = row.CUS_POPUP_APPTYPE;
111			customItem[i]["cus_contents"] = row.CUS_POPUP_CONTENTS.replace(/\r\n/gi, '');
112		});
113	}
114}
115
116function openCustomDialog(no) {
117	if (no == 0) {
118		currentItem = 0;
119	} else {
120		for (ii = 0; ii < customItem.length; ii++) {
121			if (customItem[ii]["cus_srno"] == no) {
122				currentItem = ii;
123			}
124		}
125	}
126
127	$("#custom_name").html(customItem[currentItem]["cus_item"]);
128
129	if (customItem[currentItem]["cus_use_image"] =="Y") {
130		$("#custom_contents").hide();
131	} else {
132		$("#custom_useimage").hide();
133	}
134
135	if (customItem[currentItem]["cus_app_type"] =="A") {
136		$("#custom_app_type").html("적용가능 :  Android");
137	} else if (customItem[currentItem]["cus_app_type"] =="I") {
138		$("#custom_app_type").html("적용가능 :  iOS");
139	} else {
140		$("#custom_app_type").html("적용가능 :  Android / iOS");
141	}
142
143	if (customItem[currentItem]["cus_use_image"] =="Y") {
144		$("#custom_contents").html(customItem[currentItem]["cus_contents"]);
145		img_before = "/asset/A/images/custom_" + customItem[currentItem]["cus_srno"] + "_before.png";
146		
147		if (customItem[currentItem]["cus_srno"] == 20) {
148			img_after = "/asset/A/images/custom_" + customItem[currentItem]["cus_srno"] + "_after.gif";
149		} else {
150			img_after = "/asset/A/images/custom_" + customItem[currentItem]["cus_srno"] + "_after.png";
151		}
152		$("#custom_img_before").attr("src",img_before);
153		$("#custom_img_after").attr("src",img_after);			
154		$("#custom_useimage").show();
155	} else {
156		$("#custom_contents").html(customItem[currentItem]["cus_contents"]);
157		$("#custom_contents").show();
158	}
159	
160	if (getCookie("customItem") != "Y") {
161		$("#customItem").modal('show');
162	}
163}
164
165function prevCustomItem() {
166	currentItem--;
167	if (currentItem < 0) {
168		currentItem = maxCustomItem;
169	}
170	openCustomDialog();
171}
172
173function nextCustomItem() {
174	currentItem++;
175	if (currentItem > maxCustomItem) {
176		currentItem = 0;
177	}		
178	openCustomDialog();
179}	
180
181// 쿠키 쓰기 (이름, 값, 만료일)
182function setCookie(name, val, exp) {
183	var date = new Date();
184
185	// 만료 시간 구하기(만료일을 ms단위로 변경)
186	date.setTime(date.getTime() + exp);
187	console.log(name + "=" + val + ";expires=" + date.toUTCString() + ";path=/");
188
189	// 실제로 쿠키 작성하기
190	document.cookie = name + "=" + val +  ";expires=" + date.toUTCString() + ";path=/";
191}
192
193// 쿠키 읽어오기(쿠키 이름을 기준으로 정규식 이용해서 가져오기)
194function getCookie(name) {
195	var value = document.cookie.match("(^|;) ?" + name + "=([^;]*)(;|$)");
196	return value ? value[2] : null;
197}
198
199function removeCookie(name, path, domain) {
200	if( getCookie( name ) ) {
201		document.cookie = name + "=" + ((path) ? ";path="+path:"") + ((domain)?";domain="+domain:"") + "; expires=Thu, 01 Jan 1970 00:00:00 GMT";
202		// document.cookie = name + '=; Max-Age=-99999999;';
203	}
204}
205
206function getNoticePopup() {
207	var nameNotice01 = "notice01";
208	// 쿠키 읽고 화면 보이게
209	if (getCookie(nameNotice01) != "Y") {
210		openPopup(nameNotice01);
211	}
212}
213
214function closePopup(id) {
215	if ($('#check_' + id).is(':checked')) {
216		var expireTime = remaindTime();
217		setCookie(id, "Y", expireTime);
218	}
219	$("#" + id).modal('hide');
220	return false;
221}
222
223function remaindTime() {
224	var now = new Date();
225	var end = new Date(now.getFullYear(),now.getMonth(),now.getDate(),24,0,0);
226
227	var nt = now.getTime();
228	var et = end.getTime();
229
230	return et - nt;
231}

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.