PageSourceSearch

https://eduyonhap.com/_helpers/_js/netfu_news.class.js?time=1791250208

js eduyonhap.com collected 2026-10-06 01:30:37 UTC 8,223 bytes, 296 lines download raw bytes

1var netfu_news = function() {
2
3	this.page_code = '';
4
5	this.all_menu = function(code) {
6
7		//if(_display=='none') $(".side_menu2").fadeOut();
8		//else $(".side_menu2").fadeIn('slow');
9
10		var _class = $(".allMenu").attr("class");
11		switch(code) {
12			case "open":
13				$(".allMenu").fadeIn('slow');
14				//$(".allMenu").removeClass("none_");
15				break;
16			case "close":
17				$(".allMenu").fadeOut();
18				//$(".allMenu").addClass("none_");
19				break;
20			default:
21				if(_class.indexOf("none_")>=0) $(".allMenu").fadeIn('slow');
22				else $(".allMenu").fadeOut();
23
24				//if(_class.indexOf("none_")>=0) $(".allMenu").removeClass("none_");
25				//else $(".allMenu").addClass("none_");
26				break;
27		}
28	}
29
30
31	this.login_tab = function(el, code) {
32		$(".login_form_").css({"display":"none"});
33		$(".login_tab").find(".tab").removeClass("on");
34		$(el).addClass("on");
35		switch(code) {
36			case 'login':
37				$(".login_form_.login_form").css({"display":"block"});
38				break;
39
40			case 'sns':
41				$(".login_form_.sns_login").css({"display":"block"});
42				break;
43		}
44	}
45
46
47	this.search = function(el) {
48		var form = $(el).closest("form");
49		form.submit();
50	}
51
52
53	this.news_scrap = function(no) {
54		$.post('/include/regist.php', { mode:'news_scrap', ajax:1, no:no }, function(result){
55			if( result=='0012') {
56				alert("회원만 스크랩 가능합니다.\n\n회원이시라면 로그인해 주세요.");
57				if(netfu_util.page_check=='mobile') location.href = "/m/page/login.php?url="+encodeURIComponent(location.href);
58				else location.href = "/member/login.php?url="+encodeURIComponent(location.href);
59			} else {
60				if( result == '0013' ){
61					alert("기사 스크랩중 오류가 발생했습니다.");
62				} else if( result == '0014' ){
63					alert("이미 스크랩한 기사 입니다.");
64				} else {
65					alert("뉴스 기사를 스크랩 하였습니다.");
66				}
67			}
68		});
69	}
70
71
72	this.mail_send = function(){
73		var send_mail = $('#send_mail').val();
74		if( !send_mail || send_mail == '' ){
75			alert("보내는분 이메일 주소를 입력해 주세요.");
76			$('#send_mail').focus();
77			return;
78		}
79		var receive_mail = $('#receive_mail').val();
80		if( !receive_mail || receive_mail == '' ){
81			alert("받는분 이메일 주소를 입력해 주세요.");
82			$('#receive_mail').focus();
83			return;
84		}
85		var mail_options = {
86			beforeSubmit: function(formData, jqForm, form_options){
87				var queryString = $.param(formData);
88				return true;
89			},
90			success : function(responseText, statusText, xhr, $form){
91				alert("기사 내용이 메일로 발송 되었습니다.");
92				mail_layer_close();
93			}
94		};
95		$('#mailLayerFrm').ajaxSubmit(mail_options);
96		//$('#mailLayerFrm').submit();
97	}
98
99
100	this.comment_box = function(el, no, code) {
101
102		var form = document.forms['fcomment'];
103
104		switch(code) {
105			case 'comment_insert':
106			case 'comment_update':
107				var obj = $(el).closest('.reply_con');
108				$(".reply_list_start").find(".reply_con_write__").css({"display":"none"});
109				var form_is = obj.find(".reply_con_write__");
110				if(!form_is[0]) {
111					var _clone = $(".reply_con_write__").eq(0).clone();
112					_clone.find("[name='comment_id']").val(no);
113					_clone.find("form").attr("name", "freply_"+no);
114					_clone.removeClass("mt0");
115
116					if(location.href.indexOf("/m/")>=0) {
117						obj.find(".comment01.comment_con").append(_clone);
118					} else
119						obj.append(_clone);
120
121				} else {
122					obj.find(".reply_con_write__").css({"display":"block"});
123				}
124				if(code=='comment_update') obj.find("textarea").val(obj.find(".reply_text").find("p").html());
125				obj.find("[name='mode']").val(code);
126				break;
127
128			case 'comment_delete':
129				if( is_member ) {
130					if( confirm("댓글을 삭제하시겠습니까?")){
131						var actions = form.action.indexOf("/board/")>=0 ? '/board/process/delete_comment.php' : form.action;
132						$.post(actions,{ mode:'comment_delete', ajax:1, comment_id:no, bo_table:form.bo_table.value, token:form.token.value }, function(result){
133							if(result) alert(result);
134							else location.reload();
135						});
136					}
137				} else {
138					netfu_util.password_click(el, form.bo_table.value, no, code, '.reply_con_list_');
139				}
140				break;
141
142			case 'comment_report':
143				if( confirm("기사의 해당 댓글을 신고하시겠습니까?")){
144					$.post('/include/regist.php',{ mode:'comment_report', ajax:1, comment_id:no }, function(result){
145						switch(result){
146							case '0011':
147								alert("등록된 코멘트가 없거나 코멘트 글이 아닙니다.");
148							break;
149							case '0020':
150								alert("이미 신고하신 글 입니다.");
151							break;
152							default:
153								alert("해당 댓글을 신고 하였습니다.");
154							break;
155						}
156					});
157				}
158				break;
159		}
160	}
161
162	this.is_goods = function( el, wr_id, is_good ){
163		var form = document.forms['fcomment'];
164		var _para = $(form).serialize();
165		$.post('/include/regist.php', _para+"&mode=comment_is_goods&ajax=1&wr_id="+wr_id+"&is_good="+is_good, function(result){
166			result = $.parseJSON(result);
167
168			if(result.comment_is) {
169				if(location.href.indexOf("/m/")>=0) {
170					var _count = parseInt($(el).find("span").text());
171					alert(_count);
172					$(el).find("span").text((_count+1));
173				} else {
174					var _count = parseInt($(el).find("em").text());
175					$(el).find("em").text((_count+1));
176				}
177			}
178
179			if(result.msg) {
180				alert(result.msg);
181			}
182			else {
183				if( is_good == 'good' ){
184					$('#good_'+wr_id).html(result);
185				} else {
186					$('#nogood_'+wr_id).html(result);
187				}
188			}
189		});
190	}
191
192
193
194	// : 이메일
195	this.send_email = function(el, no) {
196
197		if(el) {
198			var _offset = $(el).offset();
199			var _width = $(".mail_box").width();
200			$(".mail_box").css({"top":(_offset.top+37)+'px', "left":(_offset.left-_width+60)+'px'});
201		}
202
203		var _class = $(".mail_box").attr("class");
204		if(_class.indexOf("none_")>=0) $(".mail_box").removeClass("none_");
205		else $(".mail_box").addClass("none_");
206	}
207
208	this.send_mail_process = function() {
209		var form = document.forms['mailLayerFrm'];
210
211		if( !form.send_mail.value ){
212			alert("보내는분 이메일 주소를 입력해 주세요.");
213			form.send_mail.focus();
214			return;
215		}
216		if( !form.receive_mail.value ){
217			alert("받는분 이메일 주소를 입력해 주세요.");
218			form.send_mail.focus();
219			return;
220		}
221
222		var mail_options = {
223			beforeSubmit: function(){
224			}, 
225			success : function(){
226				alert("기사 내용이 메일로 발송 되었습니다.");
227				netfu_news.send_email();
228			}
229		};
230
231		$(form).ajaxSubmit(mail_options);
232
233	}
234
235
236	this.support_price_click = function(el, k) {
237		var form = document.forms['fsupport'];
238		var _para = $(form).serialize();
239		$.post("/include/regist.php", _para+"&mode=support_price_click&k="+k, function(data){
240			data = $.parseJSON(data);
241			if(data.js) eval(data.js);
242			$(el).closest(".tab").find("li").removeClass("on");
243			$(el).addClass("on");
244		});
245	}
246
247
248	this.add_price = function(price) {
249		var form = document.forms['fsupport'];
250		var _para = $(form).serialize();
251		$.post("/include/regist.php", _para+"&mode=support_price_add&price="+price, function(data){
252			data = $.parseJSON(data);
253			if(data.msg) alert(data.msg);
254			if(data.js) eval(data.js);
255			if(data.move) location.href = data.move;
256		});
257	}
258
259
260
261	this.more_page = {};
262	this.more_view = function(type, limit, p_limit) {
263		var _para = $(document.forms['base_form']).serialize();
264		if(!netfu_news.more_page[type+'_use']) netfu_news.more_page[type+'_use'] = 'Y';
265		if(netfu_news.more_page[type+'_use']=='Y') {
266			if(!netfu_news.more_page[type]) netfu_news.more_page[type] = 1;
267			p_limit = p_limit ? p_limit : '';
268			$.post("/m/include/regist.php", _para+"&mode=more_view&type="+type+"&start="+limit+"&p_limit="+p_limit+"&page="+netfu_news.more_page[type]+"&page_code="+netfu_news.page_code, function(data){
269				//alert(data);
270				data = $.parseJSON(data);
271				if(data.js) eval(data.js);
272				$("."+type+"_news").find(".data_paste").append(data.html);
273				netfu_news.more_page[type]++;
274			});
275		}
276	}
277
278
279	this.ajax_cate_change = function(el) {
280		if(el.value=='photo' || el.value=='movie') {
281			netfu_util.ajax_cate(el, el.value, 1)
282		} else {
283			netfu_util.ajax_cate(el, 'section', 1);
284		}
285	}
286
287
288
289
290	// : 설문조사
291
292
293	// : 설문조사
294}
295
296var netfu_news = new netfu_news();

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.