1var this_data; 2var this_host; 3var this_ip; 4var this_loginId; 5var this_port; 6var this_pageUrl; 7var this_sendThis; 8var this_waitCnt; 9var this_isWait; 10var this_reject; 11var this_session_time_out; 12var this_limitCnt; 13var this_waitQueueSize; 14var this_waitMyCnt; 15 16var service_type="https"; 17var tracer_domain="tracer.seongnam.go.kr"; 18var tracer_cookie_domain='sugang.seongnam.go.kr'; 19 20function showRealPage() { 21 $("#waitPage").css("display","none"); 22} 23 24function showWaitPage(type) { 25 $("#waitPage").css("display","block"); 26 27 $("#isWaitPage").css("display","none"); 28 $("#isRejectPage").css("display","none"); 29 $("isNotUse").css("display","none"); 30 31 if ( type == 'W' ) { 32 $("#isWaitPage").css("display","block"); 33 } else if ( type == 'NE' ) { 34 $("#isNotUse").css("display","block"); 35 } else if ( type == 'R' ) { 36 $("#isRejectPage").css("display","block"); 37 } 38} 39 40function makeCookieKey(loginId) { 41 var start=10000; 42 var end=99999; 43 44 var rand = Math.floor((Math.random() * (end-start+1)) + start); 45 loginId=loginId+"_T_"+rand+"_WC"; 46 47 var date = new Date(); 48 date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); 49 50 setCookie_Tracer("wcCookie",loginId,date,"/",tracer_cookie_domain); 51 52 return loginId; 53} 54 55function setCookie_Tracer(cookieName, cookieValue, cookieExpire, cookiePath, cookieDomain, cookieSecure){ 56 var cookieText=escape(cookieName)+'='+escape(cookieValue); 57 cookieText+=(cookieExpire ? '; EXPIRES='+cookieExpire.toGMTString() : ''); 58 cookieText+=(cookiePath ? '; PATH='+cookiePath : ''); 59 cookieText+=(cookieDomain ? '; DOMAIN='+cookieDomain : ''); 60 cookieText+=(cookieSecure ? '; SECURE' : ''); 61 document.cookie=cookieText; 62 63 console.log(cookieText); 64} 65 66function getCookie(cookieName){ 67 var cookieValue=null; 68 if(document.cookie){ 69 var array=document.cookie.split((escape(cookieName)+'=')); 70 if(array.length >= 2){ 71 var arraySub=array[1].split(';'); 72 cookieValue=unescape(arraySub[0]); 73 } 74 } 75 return cookieValue; 76} 77 78function getCookieKey(loginId) { 79 var cookie = getCookie('wcCookie'); 80 return cookie; 81} 82 83var bMakeCookie=false; 84 85$( document ).ready(function() { 86 var cookie = getCookie('wcCookie'); 87 if ( cookie == null || cookie == '' ) { 88 bMakeCookie=true; 89 } else { 90 bMakeCookie=false; 91 this_loginId=cookie; 92 } 93}); 94 95function callTracerApiRejectData(host, ip, port, pageUrl) { 96 97 $.ajax({ 98 type: 'POST', 99 url: service_type+'://'+tracer_domain+':8180/TRACERAPI/checkBotIp.do', 100 data: { 101 host:host, 102 ip:ip, 103 port:port, 104 pageUrl:pageUrl 105 }, 106 timeout: 1000, 107 async: false, 108 success: function(data) { 109 this_reject=data; 110 }, 111 error:function(request,status,error){ 112 this_reject="E"; 113 } 114 }); 115} 116 117function callTracerApiInputData(host, ip, loginId, port, pageUrl, sendThis) { 118 this_data = sendThis; 119 this_host = host; 120 this_ip = ip; 121 this_loginId = loginId; 122 this_port = port; 123 this_pageUrl = pageUrl; 124 this_sendThis = sendThis; 125 126 //loginId=this_loginId; 127 128 var userAgent=navigator.userAgent.toLowerCase(); 129 130 $.ajax({ 131 type: 'POST', 132 url: service_type+'://'+tracer_domain+':8180/TRACERAPI/inputQueue.do', 133 data: { 134 host:host, 135 ip:ip, 136 loginId:loginId, 137 port:port, 138 pageUrl:pageUrl, 139 userAgent:userAgent 140 }, 141 success: function(data) { 142 var result = data.lastChild.textContent; 143 var resultS = result.split(" "); 144 145 isWait = resultS[7]; 146 waitCnt = resultS[8]; 147 isWait = $.trim(isWait); 148 waitCnt = $.trim(waitCnt); 149 this_isWait = isWait; 150 this_waitCnt=waitCnt; 151 152 limitCnt = resultS[9]; 153 session_time_out = resultS[10]; 154 limitCnt = $.trim(limitCnt); 155 session_time_out = $.trim(session_time_out); 156 157 this_limitCnt = limitCnt; 158 this_session_time_out=session_time_out; 159 160 waitQueueSize = resultS[11]; 161 waitQueueSize = $.trim(waitQueueSize); 162 this_waitQueueSize = waitQueueSize; 163 164 165 waitMyCnt = resultS[12]; 166 waitMyCnt = $.trim(waitMyCnt); 167 this_waitMyCnt = waitMyCnt; 168 169 170 if ( isWait == "F" ) { 171 showRealPage(); 172 callBackTracer(); 173 } 174 } 175 }); 176} 177 178 179function callTracerApiInput(host, ip, loginId, port, pageUrl, sendThis) { 180 this_data = sendThis; 181 this_host = host; 182 this_ip = ip; 183 184 185 var cookie = getCookie('wcCookie'); 186 if ( cookie == null || cookie == '' ) {
187 bMakeCookie=true; 188 this_loginId = makeCookieKey(loginId); 189 } else { 190 bMakeCookie=false; 191 this_loginId=cookie; 192 } 193 194/* 195 if ( bMakeCookie == true ) { 196 this_loginId = makeCookieKey(loginId); 197 } 198*/ 199 this_port = port; 200 this_pageUrl = pageUrl; 201 this_sendThis = sendThis; 202 203 loginId=this_loginId; 204 205 var userAgent=navigator.userAgent.toLowerCase(); 206 callTracerApiRejectData(host, ip, port, pageUrl); 207 208 if ( this_reject == 'E' ) { 209 showRealPage(); 210 callBackTracer(); 211 } 212 else if ( this_reject == 'F' ) { 213 $.ajax({ 214 type: 'POST', 215 url: service_type+'://'+tracer_domain+':8180/TRACERAPI/inputQueue.do', 216 data: { 217 host:host, 218 ip:ip, 219 loginId:loginId, 220 port:port, 221 pageUrl:pageUrl, 222 userAgent:userAgent 223 }, 224 success: function(data) { 225 var result = data.lastChild.textContent; 226 var resultS = result.split(" "); 227 228 isWait = resultS[7]; 229 waitCnt = resultS[8]; 230 231 isWait = $.trim(isWait); 232 waitCnt = $.trim(waitCnt); 233 234 this_waitCnt=waitCnt; 235 236 limitCnt = resultS[9]; 237 session_time_out = resultS[10]; 238 limitCnt = $.trim(limitCnt); 239 session_time_out = $.trim(session_time_out); 240 241 this_limitCnt = limitCnt; 242 this_session_time_out=session_time_out; 243 244 waitQueueSize = resultS[11]; 245 waitQueueSize = $.trim(waitQueueSize); 246 this_waitQueueSize = waitQueueSize; 247 248 waitMyCnt = resultS[12]; 249 waitMyCnt = $.trim(waitMyCnt); 250 this_waitMyCnt = waitMyCnt; 251 252 253 if ( isWait == "E" || isWait == "F" ) { 254 this_data.callBackTracer(); 255 } else if ( isWait == "NE" ) { 256 callTracerWaitPage("NE"); 257 }else { 258 callTracerWaitPage("W"); 259 } 260 261 this_isWait = isWait; 262 }, 263 error:function(request,status,error){ 264 showRealPage(); 265 callBackTracer(); 266 } 267 }); 268 } else { 269 callTracerWaitPage("R"); 270 } 271} 272 273function callRealPage (type) { 274 this_data.callBackTracer(type); 275} 276 277function callTracerWaitPage(type) { 278 //var ret = this_data.window.open("./wait_default.html", "TRACER_WAIT", "toolbar=no,width=800,height=400", ""); 279 this_data.showWaitPage(type); 280} 281 282function callTracerApiOutput(host, ip, loginId, port, pageUrl, sendThis) { 283 this_data = sendThis; 284 this_host = host; 285 this_ip = ip; 286 //this_loginId = getCookieKey(loginId); 287 this_port = port; 288 this_pageUrl = pageUrl; 289 this_sendThis = sendThis; 290 291 loginId=this_loginId; 292 293 $.ajax({ 294 type: 'POST', 295 url: service_type+'://'+tracer_domain+':8180/TRACERAPI/outQueue.do', 296 data: { 297 host:host, 298 ip:ip, 299 loginId:loginId, 300 port:port, 301 pageUrl:pageUrl 302 }, 303 success: function(data) { 304 } 305 }); 306} 307
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.