|
|
我搞了个统计网站流量及其来源地址的,用在别的老的网页里和新建的网页都可以,但是用在下面的网页里面就不可以了,源代码如下:3 k( e) K% F1 x/ i% n: y$ m& }
谁知道怎么回事请告诉我- v2 n0 ]% B6 ?0 J- X: }
e$ p5 G$ M" O' V( p; ]
文件名: main.asp 代码如下:" r1 x2 `0 q4 \: R
4 {1 ?% S( `! @
<!--#include file="Head.asp"-->
3 f$ v2 \$ f W( `( g) J <div id="Bodyer_index">0 V0 S. q2 ^- z; A
<div id="Bodyer_banner_index"> 9 y; j) c! f; G9 j: r
<script type="text/javascript">
7 l" L4 V; _# v/ v' ]9 o4 M <!--
% K1 t: l J8 L6 m6 c ! i2 L: {# w% P% Y$ F
var focus_width=850/ V% b- H2 Z* N; @. i$ G6 o
var focus_height=190- N( `1 a2 E5 i I$ [/ T% T
var text_height=0
# q$ e; S6 z& |9 E; s var swf_height = focus_height+text_height
$ } M' X& Q+ B d
8 D, O* _- v( _
% G# e, k. v; r8 I2 n var pics='<%=pic%>'$ A) o/ a/ w* p2 _7 g
var links='<%=link%>'3 g& P; _4 }$ [# i- N9 L
var texts='<%=texts%>' 2 p( h3 F6 T$ W4 s
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 +'">');* y* y. y' l: f4 N$ u
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="../Include/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000">');
9 z0 Z. I$ s0 i document.write('<param name="menu" value="false"><param name=wmode value="opaque">');5 a1 B, s$ w" @. H! W8 D3 _+ N
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');0 O1 e1 X, R' ]6 v5 J7 O) Q
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" />'); : w" x/ v2 \ B1 F% o7 b
document.write('</object>');
: y# W8 b- M1 W3 Z $ P% g6 m7 _3 F% j' W. ]3 l
//-->
( f) j' Q2 c5 w+ X; Y j' h/ q </script>
. g& @; r5 |) L- w: d' B</div>
0 v+ `) ]( X& g" } v. N4 Z <div id="Bodyer_left_index">
& Y6 ^6 L# u# ]2 x$ _ <div class="Bodyer_left_index_login"><%=Login()%></div>
0 j6 ~3 u6 Q/ D <div class="Bodyer_left_index_search"><%=Search()%></div>
7 `& R$ N7 ^: O% S* E* ] <div class="Bodyer_left_index_links"><%=FriendLink()%></div>
, x$ G. q' z9 e$ h% K <br/>5 ?5 K) F; j' R( @# M+ C4 P
</div>
# W$ C; O, T1 x/ e, Y9 ^9 Y9 m <div id="Bodyer_right_index">3 }) r0 \) t$ G. I
<div class="Bodyer_right_index_item"><img src="Images/Main_news.jpg" width="120" height="38" /></div> E( R) y$ k$ J7 i/ {2 Y3 t/ w1 W3 X
<div class="Bodyer_right_index_more"><a href="newslist.asp"><img src="Images/More.gif" width="29" height="5" border="0" /></a></div>
9 Z0 A6 ]8 \0 |$ e; p' f L" `, J <div class="Bodyer_right_index_list"> ~& H! L2 `0 m8 N7 h9 |
<div class="Bodyer_right_index_news"><%=News("0,")%></div>, f8 A& ?# E$ C0 i" t
</div>: g8 Z% E9 |/ ~7 Z
<div class="Bodyer_right_index_item"><img src="Images/Main_product.jpg" width="120" height="38" /></div>
/ k, w. s8 C4 z# P1 S/ s4 X3 E <div class="Bodyer_right_index_more"><a href="productlist.asp"><img src="Images/More.gif" width="29" height="5" border="0" /></a></div>2 n- s* r! p& U/ ~* Q V
<div class="Bodyer_right_index_list"><%=Products("0,",2,4)%><br/></div>
0 M) h$ R) |6 S5 A' k </div>
. k$ Z" X9 T' H3 g. F </div>
2 x, `! ^7 i! L3 P+ u <p>/ }. V3 `& [' |, h; S7 o
<%
) U) k- w. b8 ^ k rfunction FriendLink()
) K3 j/ |9 n7 V- N dim rs,sql5 K+ r: s4 Y& o k2 W( ]
set rs = server.createobject("adodb.recordset"). U2 v# U; Z1 [. \# {
sql="select top 4 * from liangjing_FriendLink where ViewFlag"&Language&" and LinkType order by id asc"
# p) l& E) x; E/ l rs.open sql,conn,1,1
2 W) }; d* ~! r- Q+ d if rs.eof then
* J; r+ k( R# u: W. i response.write "暂无相关信息"
. \& w& g0 r4 W) U: x else
$ ^; p+ x1 x2 [0 H! S8 d do while not rs.eof% ?/ `% @, J m9 z
response.write "<a href="""&rs("LinkUrl")&""" target=""_blank""><img src="""&rs("LinkFace"&Language)&""" alt="""&rs("LinkName"&Language)&"""></a><br/>"6 h# r0 I2 H+ H5 T$ M
rs.movenext2 u1 a0 n% q( O- k8 E l$ |8 b
loop
9 F; H: T5 H/ f& q/ N end if
) k! A% c6 a( d rs.close
; G( W, C/ ?8 c# x& Z set rs=nothing- @% W0 @" Q4 s: v" T
end function6 \; {. ^( D0 \' `; f. u5 s2 K" a% ]
function News(SortPath)2 O8 [1 d4 ?9 {6 |+ C
dim rs,sql,NewsName,NewFlag
7 V: Y+ D$ M4 J: D/ I( ~ set rs = server.createobject("adodb.recordset")
2 j+ {" p+ n( |- ]1 F sql="select top 7 * from liangjing_News where ViewFlag"&Language&" and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
+ R3 t/ L& h4 x, p rs.open sql,conn,1,16 Z; B, E$ y& l6 T' s1 t4 W
if rs.eof then
1 C0 y, Y- G* _0 c1 r/ h% z8 B* r, @ response.write "暂无相关信息"
; R) h4 ]9 G& U$ U) S" b/ K8 B else
$ P3 g) e! L- a N do while not rs.eof% L4 o7 T9 }* u: k/ N
if now()-rs("AddTime")<=2 then
6 p2 [; `' K2 O2 T1 t9 y' G) P" g NewsName=StrLeft(rs("NewsName"&Language),32). @+ O' h, a! T8 M
NewFlag=" <font style=""font-size:9px;color:red;""><strong>NEW</strong></font>"3 b/ h3 Q! g% S3 w2 K; F0 k9 @ f
else
4 F/ C4 E4 D3 X7 U& j NewsName=StrLeft(rs("NewsName"&Language),36)
4 K# n, ^# x' q' Z0 {- ~ NewFlag=""# Z1 D8 M2 S$ g& l4 h: l/ G$ ]
end if; ^# k% T l% P8 d- V0 x$ j
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/>"3 u: R& i0 U* x" [0 T
rs.movenext
+ l# {2 X: w6 l; c8 U8 n loop
8 X1 ~. ]1 t; C5 u6 y% e4 X1 Y( B end if
d2 b' e( K7 a% E% k2 C, g rs.close
J. Q- D! _* ]4 B3 Q- ` set rs=nothing
, l+ Q/ }4 F) D( y- U! j9 ?9 Gend function
% N$ p, c! f9 X$ F/ V9 _4 F2 G5 Qfunction Products(SortPath,trs,tds)
4 o( f$ U! q" S4 y' _" o, ^ dim rs,sql,tr,td,ProductName,SmallPicPath' ?. J, s' \8 _: {/ c4 E
set rs = server.createobject("adodb.recordset")
3 C% P0 I+ {( r, ~9 | sql="select top "&trs*tds&" * from liangjing_Products where ViewFlag"&Language&" and CommendFlag order by id desc"
0 V8 m* G7 @( W7 g 'sql="select top "&trs*tds&" * from liangjing_Products where ViewFlag"&Language&" and CommendFlag and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
% W6 D* Q) s5 p& _9 ]: r. T 'sql="select top "&trs*tds&" * from liangjing_Products where ViewFlag"&Language&" and NewFlag order by id desc"
; ]) |9 p0 E' J# c% n; Q9 y8 K rs.open sql,conn,1,19 Q. w. w- d7 O4 G% P1 T
if rs.eof then
( u4 ]: Z; f/ h3 f% F s response.write "暂无相关信息"% q0 D( I ^1 f1 _3 t3 \9 c2 E B3 s
else# v$ U5 l1 w0 h X4 P1 e; i
response.write "<table cellpadding=""0"" cellspacing=""0"">"! X3 D+ r' w2 ]. L) D
for tr=1 to trs
- E) s# r9 g- }/ E1 R! _ response.write "<tr>"
% S( B, t" u$ O4 y for td=1 to tds '填充数据到表格
: a+ k+ T) y0 h if StrLen(rs(" roductName"&Language))<=18 then
7 O: O3 w3 j: @ ProductName=rs(" roductName"&Language)# q. Z( @8 Q2 f% e5 ^, @) M
else . _1 o. v4 m4 P: {4 M: V/ P' r$ U" h
ProductName=StrLeft(rs(" roductName"&Language),16). D) R( b3 E6 D4 t& k3 d
end if
5 b/ z2 p1 I) x8 T+ v SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
) C+ ~/ C2 A6 @, c( {' i% k7 z. } response.write "<td>"! s m6 e! v/ |" P& N& o$ }
response.write "<table cellpadding=""2"" cellspacing=""0"" >" &_
7 ?) N' Q0 o$ L2 H+ ?4 T" U "<tr><td style=""border: 1px solid #ccc; width:120px; height:120px; text-align:center;"">" &_
R7 A$ D9 D2 a8 \8 f/ N "<a href=""ProductView.asp?ID="&rs("id")&""">" &_; n2 y( i- ?/ u
"<img src="""&SmallPicPath&"""javascript rawImage(this,120,120);"" alt="""&rs("ProductName"&Language)&""" />" &_" O. H7 k. ?$ S2 p4 F# v% [
"</a>" &_% F. D9 V- d5 v
"</td></tr>" &_
3 {$ x3 S2 r; I* f. ` "<tr><td style=""height:24px; text-align:center;"">" &_$ u6 n! H/ g9 E6 H6 U
"<a href=""ProductView.asp?ID="&rs("id")&""" title="""&rs("ProductName"&Language)&""">"&ProductName&"</a>" &_
0 Z! N. j2 S2 l0 f6 b$ q "</td></tr>" &_( C+ W$ K2 M5 \3 _5 K+ F+ [
"</table>"9 c K: b# d# w8 R% H; ]5 W8 R
response.write"</td><td width=""14""></td>"
: A" M, |! u% h' a rs.movenext" [! o+ r) g$ T3 w7 W, a. N- J
if rs.eof then exit for
4 E- X3 |$ a# z: w5 ^3 |8 ]0 i next# x8 V+ y# e. I, R1 J
Response.Write "</tr>"! r5 b4 j% Y; R3 V* d% A
if rs.eof then exit for
; {+ d( K5 e- }! t next
( G6 ]" S1 t( M response.write "</table>". `7 Y- M) r V5 V# L2 \* q. {0 _ d
end if$ J4 |# N3 n0 g- X" O
rs.close4 u. x6 T) F. f. g+ e: |3 p1 O8 A
set rs=nothing2 e4 I! i6 ]" w. t( ?
end function
: Q m6 E5 `* l0 I% ~%>
/ v; o; }! _; k9 W </p>
2 p2 Y# r g7 x7 H' y7 j <p>关键词: 护栏(栅栏),静电喷涂护栏(组装护栏),焊接护栏,网格护栏,道路护栏,公路护栏,阳台护栏,绿化护栏(防护栏,隔离栏),不锈钢护栏,楼梯,扶手 </p># A3 j) D9 \/ c, n
<p>苏州护栏(张家港护栏,常熟护栏,太仓护栏,昆山护栏),无锡护栏(江阴护栏),南京护栏,常州护栏,南通护栏,淮安护栏,盐城护栏,扬州护栏,镇江护栏,宿迁护栏</p>
9 q3 F! j$ @! ~) _8 ^/ \( j& X$ z6 |
) x E2 E$ }. X' w8 I <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># H% g: o3 K* m/ B, j3 @
</p>2 g, x6 B9 Y; J; S) M
8 S2 I: {& y, _1 o
<!--#include file="Foot.asp"-->, p. w1 ~3 J( v: z2 Q/ h) r' z7 ?
<!--#include file="FocusLoad.asp" -->
% L; v$ I% x5 l, Z6 ^. H( `0 E' R# `* k, V0 c3 L
粗体是统计流量的代码 |
|