ASP Slide News Code: <! - Ceci est un fichier de page d'accueil-> <html>
<adal>
<META HTTP-Equiv = Content-Type Content = Text / HTML;
<Title> Slide News </Title>
</ head>
<body>
<! - # Inclure file = diaoyong.asp->
</docy>
</html> <! - Appelez simplement le fichier suivant.
<%
'Slide News
Db = ../webjx_data/webjx_data.asp
Définir Conn = Server.CreateObject (ADODB.Connection)
Connstr = fournisseur = Microsoft.Jet.oledb.4.0;
Conn.Open Connstr
SQL = Sélectionnez le top 5 * dans [music_list_tupian_system] où IswnumSEX = 'Rotent Ads' Order by Iswnumsid Desc
set rs = server.createObject (adodb.oldset)
Rs.OOPEN SQL, Conn, 1,1
Si ce n'est pas Rs.Eof alors
k = 1
Num_total = Rs.rcordCount
pour i = 1 à 5
Si i> num_total, alors sortez pour
Si i = 1 alors
imgurn = img / & rs (iswnumsphoto)
Si Len (Rs (isWnumSuser))> = 18 alors
IMGText11 = Left (RS (IswnumSuser), 18) & ... & ...
autre
imgtext11 = rs (iswnumSuser)
terminer si
imglink11 = rs (iswnumsclass)
terminer si
Si i = 2 alors
IMGURL22 = IMG / & RS (ISWNUMSPHOTO)
Si Len (Rs (isWnumSuser))> = 18 alors
IMGText22 = Left (RS (IswnumSuser), 18) & ... & ...
autre
imgtext22 = rs (iswnumSuser)
terminer si
IMGLINK22 = RS (ISWNUMSCLASS)
terminer si
Si i = 3 alors
Imgurl33 = img / & rs (iswnumsphoto)
Si Len (Rs (isWnumSuser))> = 18 alors
IMGText33 = Left (RS (IswnumSuse), 18) & ... & ...
autre
imgtext33 = rs (iswnumSuser)
terminer si
imglink33 = rs (iswnumsclass)
terminer si
Si i = 4 alors
Imgurl44 = img / & rs (iswnumsphoto)
Si Len (Rs (isWnumSuser))> = 18 alors
IMGText44 = Left (RS (IswnumSuse), 18) & ... & ...
autre
imgtext44 = rs (iswnumSuser)
terminer si
IMGLINK44 = RS (ISWNUMSCLASS)
terminer si
Si i = 5 alors
IMGURL55 = IMG / & RS (ISWNUMSPHOTO)
Si Len (Rs (isWnumSuser))> = 18 alors
IMGText55 = Left (RS (IswnumSuser), 18) & ... & ...
autre
imgtext55 = rs (iswnumSuser)
terminer si
IMGLINK55 = RS (ISWNUMSCLASS)
terminer si
Rs.MovEnext
k = k + 1
suivant
autre
Response.Write n'a pas de données pour le moment!
terminer si
%>
<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_height = 160
var text_height = 18
var swf_height = focus_height + text_height
<% si num_total = 1 alors%>
varge pics = imgurl1
var liens = imglink1
var textes = imgtext1
<% Elseif num_total = 2 alors%>
varge pics = imgurl1 + | + imgurl2
var links = imglink1 + | + imglink2
var textes = imgtext1 + | + imgtext2
<% Elseif num_total = 3 alors%>
varge pics = imgurl1 + | + imgurl2 + | + imgurl3
var links = imglink1 + | + imglink2 + | + imglink3
Var textes = imgtext1 + | + imgtext2 + | + imgtext3
<% Elseif num_total = 4 alors%>
varge pics = imgurl1 + | + imgurl2 + | + imgurl3 + | + imgurl4
var liens = imglink1 + | + imglink2 + | + imglink3 + | + imglink4
Var textes = imgtext1 + | + imgtext2 + | + imgtext3 + | + imgtext4
<% elseif num_total = 5 thatn%>
varge pics = imgurl1 + | + imgurl2 + | + imgurl3 + | + imgurl4 + | + imgurl5
var links = imglink1 + | + imglink2 + | + imglink3 + | + imglink4 + | + imglink5
Var textes = imgtext1 + | + imgtext2 + | + imgtext3 + | + imgtext4 + | + imgtext5
<% Fin si%>
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 = permetscriptAccess value = saamedomain> <param name = film value = focus.swf> <param name = qualité = 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 + '& textes + textes +' & borderwidth = '+ foc us_width +' & borderheight = '+ focus_height +' & textheight = '+ Text_height + '>'>);
Document.Write ('<embed src = pixViewer.swf wmode = opaque = pics =' + pics + '& liens + links +' & textes + '& borderwidth =' + focus_width + '& borderheight =' + focus_height + '& textheight =' + text_height + 'menu = false bgcolor = # f0f0f0f0 Quality = High width =' + focus_width + 'height =' + focus_heightacccccccccccccccccccccccccccccccccccccccccc ess = samedomain type = application / x-shockwave-flash > ');
</cript>
</span> </a> <span id = focustext class = f14b> </span>