1function get_last_visit(c_name) 2{ 3 if (document.cookie.length > 0) 4 { 5 var visited = document.cookie.indexOf(c_name + "=") 6 7 if (visited != -1) 8 { 9 visited = visited + c_name.length + 1 10 var c_end = document.cookie.indexOf(";", visited) 11 12 if (c_end == -1) c_end = document.cookie.length 13 //return unescape(document.cookie.substring(visited, c_end)) 14 return true; 15 } 16 } 17 18 return false; 19} 20 21function set_last_visit(c_name, value, expiredays) 22{ 23 var exdate = new Date(); 24 exdate.setDate(exdate.getDate() + expiredays); 25 document.cookie = c_name + "=" + escape(value) + 26 ((expiredays==null) ? "" : ";expires=" + exdate.toGMTString()) + '; path=/'; 27} 28 29function do_statistics() 30{ 31 var lasted = get_last_visit('last_visit'); 32 (lasted == '') ? 0 : 1; 33 34 var refer = (document.referrer != '') ? document.referrer : 'none'; 35 var path = window.location.pathname; 36 37 // get the grow content via ajax 38 $.post('/ndxzsite/plugin/ajax.php', { jxs : 'statistics', last_visit : lasted, url : path, referrer : refer }, 39 function(html) 40 { 41 //alert(html); 42 // set the cookie 43 set_last_visit('last_visit', 'true', 365); 44 return false; 45 }); 46} 47 48// if no cookie it's a unique 49// need a jquery.ajax call
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.