www.gusucode.com > 学校共青团组织网站源代码 > 学校共青团组织网站源代码/626/js-flashpic.asp

    <!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<!--样式表不能要 -->
<%
'ON ERROR RESUME NEXT
lm=trim(request("lm2"))
if lm="" then lm=0
if (not isNumeric(lm)) then
  rem Response.Write "<Script Language=JavaScript>alert('栏目ID参数错误或有非法字符或没指定参数,请勿随意提交数据!');location.href='/';</Script>"
'rem 也是注释
  Response.Write "alert('栏目ID参数错误或有非法字符或没指定参数,请勿随意提交数据!');location.href='/';"
response.end  
end if



path=config("path")



w=trim(Request("w"))
h=trim(Request("h"))
n=trim(Request("n"))
eg=trim(Request("eg"))


if w="" then w=200
if h="" then h=160
if n="" then n=30
if eg="" then eg=1

n=int(n)
eg=int(eg)


set rs = server.CreateObject ("adodb.recordset")
sql = "select top 6 id,title,pic,lm,lm2,lm3 from news where ( pic like '%.jpg%' and pic like '%.JPG%' ) and sh=1 "
if lm<>"0" then sql=sql&" and (lm='"&lm&"' or lm2='"&lm&"' or lm3='"&lm&"') "
sql=sql&" order by ontop desc , updat desc , id desc"
rs.open sql,conn,1,1
if rs.recordcount=0 then
  Response.Write "document.write('<BR><center><font style=font-size:9pt>无图片信息</font></center>');"
'这儿改了
  rs.close:set rs=nothing
  conn.close:set conn=nothing
  Response.end
end if



for i=1 to rs.recordcount

pic1=rs("pic")
title1=titleb(rs("title"),n)
id=rs("id")
rs.movenext
if rs.eof then exit for

pic2=rs("pic")
title2=titleb(rs("title"),n)
id2=rs("id")

rs.movenext
if rs.eof then exit for

pic3=rs("pic")
title3=titleb(rs("title"),n)
id3=rs("id")
rs.movenext
if rs.eof then exit for

pic4=rs("pic")
title4=titleb(rs("title"),n)
id4=rs("id")
rs.movenext
if rs.eof then exit for

pic5=rs("pic")
title5=titleb(rs("title"),n)
id5=rs("id")
rs.movenext
if rs.eof then exit for

pic6=rs("pic")
title6=titleb(rs("title"),n)
id6=rs("id")
rs.movenext
if rs.eof then exit for 

next




rs.close
set rs=nothing 
%>
//这儿没在asp里面,就直接写document.write
document.write("<a target=_blank href='javascript:goUrl()'><span class='f14b'>");



imgUrl1="<%=pic1%>";
imgtext1="<%=title1%>";
//imgLink1=escape("<%=path%>news_view.asp?newsid=<%=id%>");
imgLink1=escape("<%=fun_html_url(id)%>");
imgUrl2="<%=pic2%>";
imgtext2="<%=title2%>";
imgLink2=escape("<%=fun_html_url(id2)%>");
imgUrl3="<%=pic3%>";
imgtext3="<%=title3%>";
imgLink3=escape("<%=fun_html_url(id3)%>");
imgUrl4="<%=pic4%>";                             //只显示指定张的修改
imgtext4="<%=title4%>";
imgLink4=escape("<%=fun_html_url(id4)%>");
imgUrl5="<%=pic5%>";
imgtext5="<%=title5%>";
imgLink5=escape("<%=fun_html_url(id5)%>");
imgUrl6="<%=pic6%>";
imgtext6="<%=title6%>";
imgLink6=escape("<%=fun_html_url(id6)%>");



var swf_width=<%=w%>
var swf_height=<%=h%>
<%if n=0 then %>
var text_height=0
<%else%>
var text_height=20
<% end if%>
var focus_height = swf_height+text_height

var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5+"|"+imgUrl6
var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5+"|"+imgLink6
var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5+"|"+imgtext6

<%if eg=1 then %>

var config='6|0xffffff|0x666666|60|0xFFFFFF|0xFF0000|0x000000';
//-- config 参数设置-- 自动播放时间(秒)|文字颜色|文字背景色|文字背景透明度|按键数字颜色|当前按键颜色|普通按键色彩 --

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="<%=finddir(request.servervariables("URL"))%>images/playswf.swf" >');
document.write('<param name="quality" value="high" >');
document.write('<param name="menu" value="false" >');
document.write('<param name=wmode value="opaque" >');
document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+pics+'&bcastr_link='+links+'&bcastr_title='+texts+'" >');
document.write('<embed src="<%=finddir(request.servervariables("URL"))%>images/playswf.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+pics+'&bcastr_link='+links+'&bcastr_title='+texts+'" menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >');
document.write('</object>');

<%
end if 
if eg=2 then
%>

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ focus_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="<%=finddir(request.servervariables("URL"))%>images/playswf2.swf"><param name=wmode value=transparent><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+swf_width+'&borderheight='+swf_height+'&textheight='+text_height+'">');
document.write('<embed src="playswf2.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+swf_width+'&borderheight='+swf_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >');
document.write('</object>');

<%
end if 
if eg=3 then
%>

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ focus_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="<%=finddir(request.servervariables("URL"))%>images/playswf3.swf"><param name=wmode value=transparent><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+swf_width+'&borderheight='+swf_height+'&textheight='+text_height+'">');
document.write('<embed src="playswf3.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+swf_width+'&borderheight='+swf_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >');
document.write('</object>');

<%end if%>

document.write("</span></a>");