function SetCookie(sName, sValue, timeKeep) { var now=new Date(); var expireTime= new Date(now.valueOf()+timeKeep*60000*60); document.cookie = sName + "=" + escape(sValue) + "; path=/; expires=" + expireTime.toGMTString() + ";"; } function GetCookie(sName) { var aCookie = document.cookie.split("; "); for (var i=0; i < aCookie.length; i++) { var aCrumb = aCookie[i].split("="); if (sName == aCrumb[0]) return unescape(aCrumb[1]); } return null; } function GetCurrentDateTime() { var date = new Date(); var current=new String(""); current += date.getFullYear()+"-"; current += date.getMonth() + 1+"-"; current += date.getDate()+" "; current += date.getHours()+":"; current += date.getMinutes()+":"; current += date.getSeconds(); return current; } if (typeof(m_tc_parent_website)=="undefined") var m_tc_parent_website="0"; m_tc_parent_website=m_tc_parent_website=="0"?942:m_tc_parent_website; // Cookie名称 var m_tc_cookie_unique="tc_total_cookie_"+942; var m_tc_cookie_all_uniquee="tc_total_cookie_parent_"+m_tc_parent_website; var m_tc_cookie_datetime="tc_total_cookie_datetime_"+942; // 是否唯一用户;24小时算一次 var m_tc_unique_user; var m_tc_all_unique_user; if (GetCookie(m_tc_cookie_unique)==null) { m_tc_unique_user="1"; SetCookie(m_tc_cookie_unique,"1",24); } else m_tc_unique_user="0"; if (GetCookie(m_tc_cookie_all_uniquee)==null) { m_tc_all_unique_user="1"; SetCookie(m_tc_cookie_all_uniquee,"1",24); } else m_tc_all_unique_user="0"; // 访问时间 var m_tc_datetime=GetCookie(m_tc_cookie_datetime); SetCookie(m_tc_cookie_datetime,GetCurrentDateTime(),365*24); if (m_tc_datetime==null) m_tc_datetime=""; // 统计代码 document.write(""); // 图标 if ("txt"=="txt") document.write("[一统统计]"); else if ("txt"=="textclick") document.write(""); else document.write("");