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

    <!--#include file = admin_conn.asp -->
<!--#include file = titleb.asp -->
<%
CodePage=936
'ON ERROR RESUME NEXT
lm=trim(request("lm"))
if lm="" then lm=0
if (not isNumeric(lm)) then
	lm=0
end if

path=trim(config("path"))
w=trim(chkhtm(request("w")))
h=trim(chkhtm(request("h")))

if w="" then w="100"
if h="" then h="100"
if n="" then n=50

n=int(n)


function qxalttu(nr)
	nr=trim(nr)
	nr=replace(nr,"ALT","alt")
	nr=replace(nr,"ALT","alt")
	nr=replace(nr,"ALT","alt")
	nr=replace(nr,"ALT","alt")
	nr=replace(nr,"ALT","alt")
	if instr(nr," ")<>0 then
		aaa=split(nr," ")
		nr=aaa(0)
	end if
	qxalttu=nr
end function


function titlepic(nr)
	nr=trim(nr)
	nr=replace(nr," ","")	
	nr=replace(nr,"""","")
	titlepic=titleb(nr,n)
end function


set rs = server.CreateObject ("adodb.recordset")
sql = "select top 6 id,title,pic,lm,lm2,lm3,filename from news where ( pic like '%.jpg%' or 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 , id desc"
rs.open sql,conn,1,1
if rs.recordcount=0 then
  Response.Write "<BR><center>无图片信息</center>"
  rs.close:set rs=nothing
  conn.close:set conn=nothing
  Response.end
end if

for i=1 to rs.recordcount
	
	pic1=qxalttu(rs("pic"))
	title1=titleb(rs("title"),n)
	id1=rs("id")
	filename1=rs("filename")
	rs.movenext
	if rs.eof then exit for
	
	pic2=qxalttu(rs("pic"))
	title2=titleb(rs("title"),n)
	id2=rs("id")
	filename2=rs("filename")
	rs.movenext
	if rs.eof then exit for
	
	pic3=qxalttu(rs("pic"))
	title3=titleb(rs("title"),n)
	id3=rs("id")
	filename3=rs("filename")
	rs.movenext
	if rs.eof then exit for
	
	pic4=qxalttu(rs("pic"))
	title4=titleb(rs("title"),n)
	id4=rs("id")
	filename4=rs("filename")
	rs.movenext
	if rs.eof then exit for
	
	pic5=qxalttu(rs("pic"))
	title5=titleb(rs("title"),n)
	id5=rs("id")
	filename5=rs("filename")
	rs.movenext
	if rs.eof then exit for
	
	pic6=qxalttu(rs("pic"))
	title6=titleb(rs("title"),n)
	id6=rs("id")
	filename6=rs("filename")
	rs.movenext
	if rs.eof then exit for	
	
next

rs.close
set rs=nothing 
conn.close
set conn=nothing

if trim(filename1)<>"0" then
	url1=path&filename1
else
	url1=path&"News_View.asp?newsid="&id1
end if

if trim(filename2)<>"0" then
	url2=path&filename2
else
	url2=path&"News_View.asp?newsid="&id2
end if

if trim(filename3)<>"0" then
	url3=path&filename3
else
	url3=path&"News_View.asp?newsid="&id3
end if

if trim(filename4)<>"0" then
	url4=path&filename4
else
	url4=path&"News_View.asp?newsid="&id4
end if

if trim(filename5)<>"0" then
	url5=path&filename5
else
	url5=path&"News_View.asp?newsid="&id5
end if

if trim(filename6)<>"0" then
	url6=path&filename6
else
	url6=path&"News_View.asp?newsid="&id6
end if


%>
				var config='4|0xffffff|0x666666|60|0xFDA7CC|0x666666|0x000000';
				var files='',links='', texts='';
				files+='|<%=pic1%>';links+='|<%=url1%>';texts+='|<%=title1%>';
				files+='|<%=pic2%>';links+='|<%=url2%>';texts+='|<%=title2%>';
				files+='|<%=pic3%>';links+='|<%=url3%>';texts+='|<%=title3%>';
				files+='|<%=pic4%>';links+='|<%=url4%>';texts+='|<%=title4%>';
				files+='|<%=pic5%>';links+='|<%=url5%>';texts+='|<%=title5%>';
				files+='|<%=pic6%>';links+='|<%=url6%>';texts+='|<%=title6%>';
				files=files.substring(1);links=links.substring(1);texts=texts.substring(1);
				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="<%=w%>" height="<%=h%>">');
				document.write('<param name="movie" value="<%=path%>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='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />');
				document.write('<embed src="<%=path%>playswf.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" menu="false" quality="high" width="<%=w%>" height="<%=h%>" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
				document.write('</object>');