ASP slide news code: <!-This is a homepage file-> <html>
<head>
<meta http-equiv = content-type content = text /html; charset = gb2312 />
<Title> Slide News </Title>
</head>
<body>
<!-#Include file = diaoyong.asp->
</body>
</html> <!-Just call the following file. This is a file name: Diaoyong.asp file Flash files in the fabric->
<%
'Slide news
Db = ../webjx_data/webjx_data.asp
Set conn = server.createObject (adodb.connection)
Connstr = provider = microsoft.jet.OLEDB.4.0; data source = & server.mappath (db)
Conn.open connstr
SQL = Select Top 5 * From [Music_list_tupian_system] where iswnumssex = 'Rotent ads' Order by Iswnumsid Desc
set rs = server.createObject (Adodb.oldSet)
RS.Oopen SQL, CONN, 1,1
if not rs.eof then
k = 1
Num_total = RS.RCORDCOUNT
for i = 1 to 5
if i> num_total then exit for
if i = 1 THEN
imgurn = img/& rs (iswnumsphoto)
if len (RS (iswnumsuser))> = 18 then
imgtext11 = left (RS (iswnumsuser), 18) & ... & ...
else
imgtext11 = RS (iswnumsuser)
end if
imglink11 = RS (IswnumsClass)
end if
if i = 2 THEN
Imgurl22 = Img/& RS (iswnumsphoto)
if len (RS (iswnumsuser))> = 18 then
imgtext22 = left (RS (iswnumsuser), 18) & ... & ...
else
imgtext22 = RS (iswnumsuser)
end if
imglink22 = RS (IswnumsClass)
end if
if i = 3 THEN
Imgurl33 = Img/& RS (iswnumsphoto)
if len (RS (iswnumsuser))> = 18 then
imgtext33 = left (RS (iswnumsuse), 18) & ... & ...
else
imgtext33 = RS (Iswnumsuser)
end if
imglink33 = RS (IswnumsClass)
end if
if i = 4 THEN
Imgurl44 = Img/& RS (iswnumsphoto)
if len (RS (iswnumsuser))> = 18 then
imgtext44 = left (RS (iswnumsuse), 18) & ... & ...
else
imgtext44 = RS (Iswnumsuser)
end if
imglink44 = RS (IswnumsClass)
end if
if i = 5 THEN
Imgurl55 = Img/& RS (iswnumsphoto)
if len (RS (iswnumsuser))> = 18 then
imgtext55 = left (RS (iswnumsuser), 18) & ... & ...
else
imgtext55 = RS (Iswnumsuser)
end if
imglink55 = RS (IswnumsClass)
end if
rs.movenext
k = k+1
next
else
Response.write has no data for the time being!
end if
%>
<A Target = _Self Href = Javascript: Gourl ()> <span class = F14B>
<script type = Text/JavaScript>
Imgurl1 = <%= Imgurl11%>;
imgtext1 = <%= Imgtext11%>
imglink1 = escape (<%= Imglink11%>);
imgurl2 = <%= Imgurl22%>;
imgtext2 = <%= Imgtext22%>
imglink2 = escape (<%= Imglink22%>);
Imgurl3 = <%= Imgurl33%>;
imgtext3 = <%= Imgtext33%>
imglink3 = escape (<%= Imglink33%>);
imgURL4 = <%= Imgurl44%>;
imgtext4 = <%= Imgtext44%>
imglink4 = escape (<%= Imglink44%>);
Imgurl5 = <%= Imgurl55%>;
imgtext5 = <%= Imgtext55%>
imglink5 = escape (<%= Imglink55%>); var Focus_width = 200
var Focus_height = 160
var text_height = 18
var swf_height = focus_height+text_height
<%if num_total = 1 then%>
varge pics = Imgurl1
var links = imglink1
var texts = imgtext1
<%Elseif Num_total = 2 THEN%>
varge pics = Imgurl1+|+Imgurl2
var links = imglink1+|+imglink2
var texts = Imgtext1+|+Imgtext2
<%Elseif Num_total = 3 THEN%>
varge pics = Imgurl1+|+Imgurl2+|+Imgurl3
var links = Imglink1+|+Imglink2+|+Imglink3
Var Texts = Imgtext1+|+Imgtext2+|+Imgtext3
<%Elseif Num_total = 4 THEN%>
varge pics = Imgurl1+|+Imgurl2+|+Imgurl3+|+Imgurl4
var links = Imglink1+|+Imglink2+|+Imglink3+|+Imglink4
Var Texts = Imgtext1+|+Imgtext2+|+Imgtext3+|+Imgtext4
<%elseif num_total = 5 thatn%>
varge pics = Imgurl1+|+Imgurl2+|+Imgurl3+|+Imgurl4+|+Imgurl5
var links = Imglink1+|+Imglink2+|+Imglink3+|+Imglink4+|+IMGLINK5
Var Texts = Imgtext1+|+Imgtext2+|+Imgtext3+|+Imgtext4+|+Imgtext5
<%End IF%>
document.write ('<object classid = clsid: d27cdb6e-AE6D-11CF-96B8-444553540000 = http: //fpdownload.macromedia.com/pub/shockwavwavav E/Cabs/Flash/SWFLASH.CAB#Version = 6,0, 0,0 width = ' + focus_width +' height = ' + swf_height +'> ');
document.write ('<Param name = AllowScriptaccess Value = SameDomain> <Param Name = Movie Value = FOCUS.SWF> <Param Name = Quality = HIGH> < Param name = bgcolor value =#f0f0f0> ');
document.write ('<Param name = menu value = false> <sem name = wmode value = opaque>');
document.write ('<Param name = Flashvars value = PICS ='+PICS+'& Links ='+Links+'& Texts+Texts+' & BorderWidth = '+FOC US_WIDTH+'& Borderheight ='+Focus_height+'& TextHeight ='+Text_height+'>'> );
document.write ('<embed src = pixViewer.swf Wmode = OPAQUE = PICS ='+PICS+'& Links+Links+' & Texts+'& borderWidth = '+Focus_width+' & Borderheight = '+Focus_height+' & TextHeight = ' +text_height+'menu = false bgcolor =#f0f0f0f0 Quality = high width ='+focus_width+'height ='+focus_heightacccccccccccccccccccccccccccccccccccccccccccccc ESS = SAMEDOMAIN TYPE = Application/X-SHOCKWAVE-FLASH Pluginspage = http://www.macromedia.com /go/getflashplayer/> '); document.write (' </object> ');
</script>
</span> </a> <span ID = Focustext class = f14b> </span>