|
|
我搞了个统计网站流量及其来源地址的,用在别的老的网页里和新建的网页都可以,但是用在下面的网页里面就不可以了,源代码如下:
, r: u K, d, f1 u& L2 \' i C$ U谁知道怎么回事请告诉我& X* Q3 k8 B: a ]
) ~5 ]; f2 x: l- e+ d文件名: main.asp 代码如下:
; p" i$ g0 H9 t7 G% ?5 H
2 h. U; b3 {1 P# G<!--#include file="Head.asp"-->
$ ~' y. p; r3 M Z" g0 ? <div id="Bodyer_index">
* t1 c! k+ @7 ^8 ^5 f9 I7 M <div id="Bodyer_banner_index">
" o) [/ J( }: k! J) P. e <script type="text/javascript">
( F8 Y! ^' D$ g2 I! ` \ <!--
$ X; s, I# a$ ]9 {$ Q3 ^
7 m" W# Y2 j0 L6 z2 K var focus_width=850
* U% T0 L+ _6 f$ m4 A var focus_height=190- Y4 R! @, Y C# P$ q6 d
var text_height=0% ~2 s) J7 _* _! j- q
var swf_height = focus_height+text_height; g* ?+ ~8 L; U* d' I' {
9 D9 e3 q2 y, b7 y$ D$ ` , U. y! V' Y$ C- h8 V
var pics='<%=pic%>'
" S# r& B; T% x8 f& G2 ^4 R. T var links='<%=link%>'9 t3 Y% Q0 c5 ^2 T; k6 P
var texts='<%=texts%>'
+ n! `$ g1 x: l+ Q4 x document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
8 o0 y5 R5 O$ Z& t2 @, Q document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="../Include/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000">');
+ [+ i" R- Q1 W$ y document.write('<param name="menu" value="false"><param name=wmode value="opaque">');2 H- B a! a) N; ~
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');5 L9 D+ r& n }4 D2 \% v
document.write('<embed ID="focus_flash" src="../Include/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#000000" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
2 Y8 V" @5 G7 G$ b$ W document.write('</object>');0 _0 F+ }8 E5 H* T- b; [
@% O' N; i' ^* Y8 A //-->1 N4 b' _: _3 p6 p' l, d
</script>
2 _0 [4 n" t8 h/ r; b. K</div>$ v+ O2 ~, c- j( \( k
<div id="Bodyer_left_index">$ q1 d& p% r+ e1 h. j6 ?
<div class="Bodyer_left_index_login"><%=Login()%></div>
8 |+ G% j1 m# [! ] <div class="Bodyer_left_index_search"><%=Search()%></div>
8 l' p- H: r3 |5 ^' N* Z+ i <div class="Bodyer_left_index_links"><%=FriendLink()%></div>
' F! v) [( A7 X) S! N <br/>
! }* O; R4 _* r" g7 ~) v </div>$ I5 S; Y" n) [- {
<div id="Bodyer_right_index"># A! E4 b1 X# A4 |+ j3 {0 y
<div class="Bodyer_right_index_item"><img src="Images/Main_news.jpg" width="120" height="38" /></div># d4 u8 w1 A4 x" i& `: j- K8 Y
<div class="Bodyer_right_index_more"><a href="newslist.asp"><img src="Images/More.gif" width="29" height="5" border="0" /></a></div>
1 S, F/ P- z$ Q% e <div class="Bodyer_right_index_list">
; X0 F6 E& } J, h# w <div class="Bodyer_right_index_news"><%=News("0,")%></div>
, l2 E( `, @( ^9 |6 c. [9 O1 P </div>% ]' `/ u+ R% g0 F W( p! p
<div class="Bodyer_right_index_item"><img src="Images/Main_product.jpg" width="120" height="38" /></div>
d4 f1 M3 C: ^+ w( s9 G7 j* E. P <div class="Bodyer_right_index_more"><a href="productlist.asp"><img src="Images/More.gif" width="29" height="5" border="0" /></a></div>
9 w; l# u- M% |1 N0 q5 h* E) i <div class="Bodyer_right_index_list"><%=Products("0,",2,4)%><br/></div>
) z8 @* h1 }+ }8 n3 P0 P6 P" L5 t </div>
% p, G4 N! k$ n! L </div>9 f0 d n( q! c s* q: v2 g) F0 s
<p>
+ o- T' _% g# q5 l* i <%
+ S6 M8 @& b1 }function FriendLink()
5 K; O, _1 w# q0 l& \& P dim rs,sql
! p& w1 ~. l# y* { set rs = server.createobject("adodb.recordset")) Q+ m$ ?# J, V4 U
sql="select top 4 * from liangjing_FriendLink where ViewFlag"&Language&" and LinkType order by id asc"
0 d/ C$ P$ n P/ w0 l6 j rs.open sql,conn,1,1
A: ` [. M" p if rs.eof then/ m7 }% {% S2 Y% w5 e. v% s
response.write "暂无相关信息"
2 t: V3 I/ n t% c else
) ?7 u- N- \ \6 [1 a) i do while not rs.eof" M& }: F8 R3 P) w# ?
response.write "<a href="""&rs("LinkUrl")&""" target=""_blank""><img src="""&rs("LinkFace"&Language)&""" alt="""&rs("LinkName"&Language)&"""></a><br/>"
$ n! d! F9 }& ?6 { rs.movenext, f1 t( y. D+ D4 E
loop
2 F2 T! _. A: c8 v3 r end if- j' H2 R1 l$ D
rs.close
+ B" F% J! r- o set rs=nothing
. q1 a1 M% t/ a) a7 v U- t. L$ N t+ _end function
+ [; X0 {; p* B' E' ?( h; ^function News(SortPath)* I- ^+ b% W, T
dim rs,sql,NewsName,NewFlag8 b7 \3 a% U/ J1 C/ B" g$ P
set rs = server.createobject("adodb.recordset")% \+ N [5 {1 O' w4 [
sql="select top 7 * from liangjing_News where ViewFlag"&Language&" and Instr(SortPath,'"&SortPath&"')>0 order by id desc"* F9 K$ n0 b' H! e: U* N
rs.open sql,conn,1,1& M/ c# @' y& a# A3 |' l2 s) v+ N
if rs.eof then. }/ @3 }0 z' c# Y Y# y. u& ?
response.write "暂无相关信息"3 X- a: B7 y/ S, N; K6 B
else( G) `0 H) l9 M9 [$ N" M
do while not rs.eof
8 {2 k w, L( a7 j" w n if now()-rs("AddTime")<=2 then
6 v+ p. A9 B! T, R NewsName=StrLeft(rs("NewsName"&Language),32)9 g; m) ?, M3 I4 B
NewFlag=" <font style=""font-size:9px;color:red;""><strong>NEW</strong></font>". T5 c3 A; F& L- W9 c
else2 X* X3 j* A9 m: [% H
NewsName=StrLeft(rs("NewsName"&Language),36), ^+ |" c4 x3 L6 A$ N7 D6 V. I
NewFlag=""
( n/ u) L+ Y; P( e end if
3 x0 S) Q9 e% H9 x0 F; B response.write "<img src=""Images/Arrow_01.gif"" align=""absmiddle""> "&FormatDate(rs("Addtime"),15)&" | <a href=""NewsView.asp?ID="&rs("id")&""" title="""&rs("NewsName"&Language)&""">"&NewsName&"</a>"&NewFlag&"<br/>"9 o7 T- o2 ]7 \* D& y+ z4 u% {
rs.movenext3 E4 v2 X, A& b1 J! o
loop - ^/ {+ u9 P( P, n
end if5 h1 o) S: }. L. ?6 k+ z3 e
rs.close$ {+ m1 h3 K/ p2 g2 k& u. b3 `
set rs=nothing
, r8 G( Y0 W2 aend function
2 W( X1 H2 l' p5 V+ Afunction Products(SortPath,trs,tds)
0 j: k. v; r/ h6 B: Z dim rs,sql,tr,td,ProductName,SmallPicPath7 a7 z! A$ b3 p$ y
set rs = server.createobject("adodb.recordset") S, x* B- b& a
sql="select top "&trs*tds&" * from liangjing_Products where ViewFlag"&Language&" and CommendFlag order by id desc"
$ _) D, J! b- O2 V t9 }3 ~ 'sql="select top "&trs*tds&" * from liangjing_Products where ViewFlag"&Language&" and CommendFlag and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
8 D3 M2 h+ H/ i 'sql="select top "&trs*tds&" * from liangjing_Products where ViewFlag"&Language&" and NewFlag order by id desc"5 h& u& h& s! `7 J: q* _
rs.open sql,conn,1,1; k% l' `. U6 s* R
if rs.eof then
3 o, H" V0 |1 F5 [' b response.write "暂无相关信息"8 X& s- s k$ T) j9 p4 l
else0 r+ U. X! P$ q/ Q; v% V
response.write "<table cellpadding=""0"" cellspacing=""0"">") _6 X& D2 ^* ?( O$ J1 E, {! ?
for tr=1 to trs- o& s2 w1 Q1 g
response.write "<tr>"6 @9 i( j' g8 b) J
for td=1 to tds '填充数据到表格$ i- V- @1 u; o! D$ _4 C6 k
if StrLen(rs(" roductName"&Language))<=18 then: E+ O. g! J( Q# l
ProductName=rs(" roductName"&Language)
8 k' g! T2 W/ q0 C$ M0 n6 \, H' i else - h7 j. @4 i5 @: [
ProductName=StrLeft(rs(" roductName"&Language),16) g( G( D" S1 \% o. @
end if
% [6 O9 |& k% | M! a6 i SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
- J# L$ e' u! ~/ Z: p response.write "<td>"3 n- ?. y& f( }: x9 F9 |
response.write "<table cellpadding=""2"" cellspacing=""0"" >" &_
" _# W6 C/ c5 \& n; R$ G$ \0 W3 m "<tr><td style=""border: 1px solid #ccc; width:120px; height:120px; text-align:center;"">" &_! T& q& Y7 C0 w. `% ]
"<a href=""ProductView.asp?ID="&rs("id")&""">" &_) z: x3 p% e( ]7 i; P
"<img src="""&SmallPicPath&"""javascript rawImage(this,120,120);"" alt="""&rs("ProductName"&Language)&""" />" &_) p/ C& L5 I4 V$ }' ?; H/ Z1 [) {& V2 h
"</a>" &_
3 w! x/ B" g3 f$ u w0 S" j "</td></tr>" &_
" z, e9 x7 ^. W "<tr><td style=""height:24px; text-align:center;"">" &_
5 A$ m% C$ U0 j* B/ J8 M! k "<a href=""ProductView.asp?ID="&rs("id")&""" title="""&rs("ProductName"&Language)&""">"&ProductName&"</a>" &_
7 w9 f- C. v, k( j, q; V( \: W$ L "</td></tr>" &_
0 ]9 L# a/ N L& a, M; W# Z "</table>"
. ~" y& i4 F" L: K2 K3 j( J response.write"</td><td width=""14""></td>"( R/ Z4 ]. c/ x6 ~
rs.movenext' K3 j6 d- J. X# a9 [0 L) @
if rs.eof then exit for5 y4 a! F: G: x7 F& V( U
next. R* m8 ~3 E4 x, Q0 s* _8 i
Response.Write "</tr>"
: g: N" E; _1 d+ A if rs.eof then exit for! ^$ X- @2 D" T+ Z0 g) r( G; l
next
7 b) P0 Z. d t1 c response.write "</table>"
9 d. U) b, T9 w8 _8 \1 D7 l end if
$ \' j, s3 n7 M9 T rs.close& k' N$ [. @2 N/ J8 q
set rs=nothing+ e, O* _" }$ j7 u4 o& I; G! L. Z
end function, \& B9 e- ?7 w7 h# c, e# M
%>4 }) g' m: ~1 D" ?
</p>
! A6 g* @& b9 B h! ?6 j5 { <p>关键词: 护栏(栅栏),静电喷涂护栏(组装护栏),焊接护栏,网格护栏,道路护栏,公路护栏,阳台护栏,绿化护栏(防护栏,隔离栏),不锈钢护栏,楼梯,扶手 </p>- _# p; Z& n0 t* R
<p>苏州护栏(张家港护栏,常熟护栏,太仓护栏,昆山护栏),无锡护栏(江阴护栏),南京护栏,常州护栏,南通护栏,淮安护栏,盐城护栏,扬州护栏,镇江护栏,宿迁护栏</p>3 d- A% ?2 u" f; @( g, }" x- I9 @
* y" r" w3 V# ?+ o, H' ~7 l3 z
<p><script language="javascript" src="http://count9.51yes.com/click.aspx?id=99838626&logo=1" charset="gb2312"></script> <script src="http://s135.cnzz.com/stat.php?id=1882721&web_id=1882721&show=pic" language="JavaScript" charset="gb2312"></script>1 I, s% m* g0 @# \
</p>
- e- T" c; Q- a) r
; J/ A. a9 b4 D. \6 K# W3 V <!--#include file="Foot.asp"-->
) u* P5 j: P# ~6 Q3 ^% L) W8 r( Z<!--#include file="FocusLoad.asp" -->- F( {7 w' I8 p* [9 d$ f8 x
. h* b% O( l0 |! x1 T6 V
粗体是统计流量的代码 |
|