提交 | 用户 | age
|
a6a76f
|
1 |
if(typeof(pvhitimgview)=="undefined"){ |
F |
2 |
var pvhitimgview=true; |
|
3 |
function pv_rport(dm,f) { |
|
4 |
var i = dm.indexOf(f); |
|
5 |
if (i > 0) { |
|
6 |
return dm.substring(0, i); |
|
7 |
} |
|
8 |
return dm; |
|
9 |
} |
|
10 |
function getRefUrl(refUrl){ |
|
11 |
if (refUrl.indexOf('ref0') > -1){ |
|
12 |
var regexstr = /(?:\&|\?)ref0=([\s\S]*?)$/i; |
|
13 |
refUrl = refUrl.match(regexstr); |
|
14 |
refUrl = encodeURI(refUrl[1]); |
|
15 |
return refUrl; |
|
16 |
} |
|
17 |
} |
|
18 |
function getDomain() |
|
19 |
{ |
|
20 |
hn=location.hostname; |
|
21 |
str=hn.replace(/\.(com|net|org|cn$)\.?.*/,""); |
|
22 |
if(str.lastIndexOf(".") == -1) |
|
23 |
dm = "." + hn; |
|
24 |
else |
|
25 |
{ |
|
26 |
str = str.substring(str.lastIndexOf(".")); |
|
27 |
dm = hn.substring(hn.lastIndexOf(str)); |
|
28 |
} |
|
29 |
return dm; |
|
30 |
} |
|
31 |
function getflash(){ |
|
32 |
var i,flash; |
|
33 |
if (window.ActiveXObject){ |
|
34 |
for(i=12;i>0;i--){ |
|
35 |
try{ |
|
36 |
flash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i); |
|
37 |
return i+".0"; |
|
38 |
} |
|
39 |
catch(e){ |
|
40 |
} |
|
41 |
} |
|
42 |
} |
|
43 |
else if (navigator.plugins&&navigator.plugins.length){ |
|
44 |
for (i=0;i<navigator.plugins.length;i++){ |
|
45 |
if (navigator.plugins[i].name.indexOf('Shockwave Flash')!=-1){ |
|
46 |
return navigator.plugins[i].description.split(" ")[2]; |
|
47 |
} |
|
48 |
} |
|
49 |
} |
|
50 |
return "Not enabled"; |
|
51 |
} |
|
52 |
|
|
53 |
function readck(name){ |
|
54 |
var cookieValue = ""; |
|
55 |
var search_s = name + "="; |
|
56 |
if(document.cookie.length > 0) |
|
57 |
{ |
|
58 |
offset = document.cookie.indexOf(search_s); |
|
59 |
if (offset != -1) |
|
60 |
{ |
|
61 |
offset += search_s.length; |
|
62 |
end = document.cookie.indexOf(";", offset); |
|
63 |
if (end == -1) end = document.cookie.length; |
|
64 |
cookieValue = unescape(document.cookie.substring(offset, end)) |
|
65 |
} |
|
66 |
} |
|
67 |
return cookieValue; |
|
68 |
} |
|
69 |
function writeck(name, value, hours) |
|
70 |
{ |
|
71 |
var expire = ""; |
|
72 |
dm = getDomain(); |
|
73 |
if(hours != null) |
|
74 |
{ |
|
75 |
expire = new Date((new Date()).getTime() + hours * 3600000); |
|
76 |
expire = "; expires=" + expire.toGMTString(); |
|
77 |
} |
|
78 |
document.cookie = name + "=" + escape(value) + expire + ";domain=" + dm + ";path=/; "; |
|
79 |
} |
|
80 |
|
|
81 |
function randck(){ |
|
82 |
return Math.floor(Math.random()*255); |
|
83 |
} |
|
84 |
|
|
85 |
function gettitle(){ |
|
86 |
var title; |
|
87 |
if (typeof(encodeURIComponent)=="function"){ |
|
88 |
if (document.title){ |
|
89 |
if (window.RegExp){ |
|
90 |
var tire=new RegExp("^"+window.location.protocol+"//"+window.location.hostname+"\\s-\\s"); |
|
91 |
title=document.title.replace(tire,""); |
|
92 |
} |
|
93 |
}else{ |
|
94 |
title=document.title; |
|
95 |
} |
|
96 |
title=encodeURIComponent(title); |
|
97 |
}else{ |
|
98 |
title=''; |
|
99 |
} |
|
100 |
return title; |
|
101 |
} |
|
102 |
|
|
103 |
var imgsrc=''; |
|
104 |
function pv_d(){ |
|
105 |
var _check_url = document.URL; |
|
106 |
if(_check_url.indexOf('#cwmysxghgu')!=-1){ |
|
107 |
return; |
|
108 |
} |
|
109 |
var now = new Date().getTime(); |
|
110 |
var datestr=escape(now*1000+Math.round(Math.random()*1000)); |
|
111 |
|
|
112 |
if(typeof(pv_subcatid)=="undefined") |
|
113 |
pv_subcatid=0; |
|
114 |
|
|
115 |
if(top.location==self.location){ |
|
116 |
var refer_str = document.referrer; |
|
117 |
refer_str=refer_str.replace(/\</g,""); |
|
118 |
refer_str=refer_str.replace(/\>/g,""); |
|
119 |
imgsrc='http://zpv.abab.com/images/pvhit0001.gif?t='+datestr+'&subcat='+pv_subcatid+'&'+refer_str; |
|
120 |
}else { |
|
121 |
var d=document.referrer+''; |
|
122 |
d=d.substr(7); |
|
123 |
d=pv_rport(d,'/'); |
|
124 |
d=pv_rport(d,':'); |
|
125 |
|
|
126 |
var refer_str = getRefUrl(document.referrer); |
|
127 |
refer_str = (refer_str)?refer_str:document.referrer; |
|
128 |
refer_str=refer_str.replace(/\</g,""); |
|
129 |
refer_str=refer_str.replace(/\>/g,""); |
|
130 |
|
|
131 |
if(d.substr(d.length-9)=='abab.com' || d.substr(d.length-10)=='google.com' || d.substr(d.length-9)=='qihoo.com' || d.substr(d.length-9)=='baidu.com'|| d.substr(d.length-8)=='3721.com') |
|
132 |
imgsrc='http://zpv.abab.com/images/pvhit0002.gif?t='+datestr+'&subcat='+pv_subcatid+'&'+refer_str; |
|
133 |
else imgsrc=''; |
|
134 |
} |
|
135 |
|
|
136 |
if(imgsrc!='') |
|
137 |
{ |
|
138 |
var ck = readck('ip_ck'); |
|
139 |
document.write('<scr'+'ipt type="text/javascript" src="http://zdw.w8.com.cn/p.ht?h=&t='+ datestr +'&c='+ ck +'"></scr'+'ipt>'); |
|
140 |
} |
|
141 |
} |
|
142 |
|
|
143 |
pv_d(); |
|
144 |
} |