PageSourceSearch

https://rkp-static.kaipoke.biz/rkp/kaipokebiz/js/biz_login.js?v=20260914030511

js kaipoke.biz collected 2026-10-04 00:14:18 UTC 5,607 bytes, 161 lines download raw bytes

1var HEART_BEAT_TIMER =  10 * 60 * 1000;
2
3function setHeartBeat_(){
4}
5function setHeartBeat() {
6	if($(document).everyTime !== undefined){
7	    $(document).everyTime(HEART_BEAT_TIMER, function() {
8	        $.ajax({type: "POST",
9	                url: contextPath + "/servlet/ajaxservlet",
10	                data: "function=session_heart_beat"});
11	    });
12	}
13}
14function check_status_code(response){
15	switch(response.status){
16		case 200:
17			return true;
18		case 12029:
19		case 12031:
20		case 12152:
21		case 12159:
22			return false;
23		default:
24			//Nothing to do...just now.
25			return false;
26	}
27}
28function checkLogin(){
29	return true;
30}
31
32function checkLogin_() {
33    /*res = eval("(" + $.ajax({type: "POST",
34                             url: contextPath + "/servlet/ajaxservlet",
35                             data: "function=check_login",
36                             async: false
37                             }).responseText + ")");*/
38    response = $.ajax({type: "GET",
39        url: contextPath + "/servlet/ajaxservlet",
40        data: "function=check_login",
41        timeout: 1000,
42        async: false
43        });
44    if (response == null || typeof response == "undefined") {
45        return false;
46    }
47    if(check_status_code(response)){
48    	res = eval("(" + response.responseText + ")");
49    }else{
50    	alert("ErrorCode:"+response.status);
51    	res = {"needLogin":false}
52    }
53    if (res == null || typeof res == "undefined") {
54        return false;
55    }
56
57    if (res.needLogin == true) {
58        tb_show("ログイン", "#TB_inline?width=580&height=300&inlineId=common_login&modal=true", false);
59    }
60    return !res.needLogin;
61}
62
63function setCheckLogin() {
64    // 対象タグ
65    targetTag = new Array("input", "a");
66    // 対象タグにログインチェックを追加
67    for (i = 0; i < targetTag.length; ++i) {
68        for (j = 0; j < $(targetTag[i]).length; ++j) {
69            if ($(targetTag[i]).get(j).getAttribute("id") != null && $(targetTag[i]).get(j).getAttribute("id").match("chk_login")) {
70                if (document.getElementById($(targetTag[i]).get(j).getAttribute("id")).addEventListener) {
71                    document.getElementById($(targetTag[i]).get(j).getAttribute("id")).addEventListener('click', checkLogin, false);
72                } else if (document.getElementById($(targetTag[i]).get(j).getAttribute("id")).attachEvent){
73                    document.getElementById($(targetTag[i]).get(j).getAttribute("id")).attachEvent('onclick', checkLogin);
74                }
75            }
76        }
77    }
78}
79
80function doLogin() {
81    cid = $("#common_cid")[0].value;
82    mid = $("#common_mid")[0].value;
83    pass = $("#common_pass")[0].value;
84    res = eval("(" + $.ajax({type: "POST",
85                             url: contextPath + "/servlet/ajaxservlet",
86                             data: "function=do_login&pass=" + pass,
87                             async: false
88                             }).responseText + ")");
89
90    if (res.result == true) {
91        tb_remove();
92        document.getElementById("common_pass").value = "";
93        $("#common_err_message_pos").html("");
94        // alert("ログイン完了しました。");
95        //$("#" + fid + "\\:" + bid).click(); // 次画面遷移が必要な場合に利用
96    } else {
97        $("#common_err_message_pos").html("<font color='red'>" + res.errMessage + "</font>");
98        document.getElementById("common_pass").value = "";
99    }
100    if (typeof (closeLoginForm) != 'undefined') {
101        closeLoginForm();
102    }
103}
104
105function bizFunction(id) {
106    result = true;
107    if (!id.match("nochklogin")) {
108        result = checkLogin();
109    }
110    return result;
111}
112var MAX_NEED_LOGIN = 5;
113var needLoginCounter = 0;
114function checkNeedLogin() {
115    /*res = eval("(" + $.ajax({type: "POST",
116                             url: contextPath + "/servlet/ajaxservlet",
117                             data: "function=check_login",
118                             async: false
119                             }).responseText + ")");*/
120    response = $.ajax({type: "GET",
121        url: contextPath + "/servlet/ajaxservlet",
122        data: "function=check_login",
123        timeout: 1000,
124        async: false
125        });
126    if (response == null || typeof response == "undefined" || response.responseText == null || typeof response.responseText  == "undefined") {
127        if (needLoginCounter > MAX_NEED_LOGIN) {
128            needLoginCounter = 0;
129            if (typeof isPopupPage != "undefined") {
130                window.location.href = contextPath + "/common/error_popup.do";
131            } else {
132                window.location.href = contextPath + "/common/error.do";
133            }
134            return;
135        }
136        needLoginCounter++;
137        return checkNeedLogin();
138    }
139    if(check_status_code(response)){
140    	res = eval("(" + response.responseText + ")");
141    }else{
142    	alert("ErrorCode:"+response.status);
143    	res = {"needLogin":false}
144    }
145    if (res == null || typeof res == "undefined") {
146        if (needLoginCounter > MAX_NEED_LOGIN) {
147            needLoginCounter = 0;
148            if (typeof isPopupPage != "undefined") {
149                window.location.href = contextPath + "/common/error_popup.do";
150            } else {
151                window.location.href = contextPath + "/common/error.do";
152            }
153            return;
154        }
155        needLoginCounter++;
156        return checkNeedLogin();
157    }
158    needLoginCounter = 0;
159    return !res.needLogin;
160}
161

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.