📄 js-pic3.asp
字号:
<!--纪灯片调用方法:
<iframe name="xuaspic0" src="js-pic3.asp?lm2=栏目ID号&n=20&w=200&h=160" marginwidth="1" marginheight="1" width="200" height="160" scrolling="no" border="0" frameborder="0"></iframe>
其中:lm2=表示:新闻栏目ID号,w,h是图象的高度。
豪气冲天--2006-8-2改进。
-->
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<STYLE type="text/css">
<!--
a:link {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited {text-decoration: none; color: #000000 }
A:hover {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;line-height: 120%;table-layout:fixed;word-break:break-all}
p {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select {FONT-SIZE: 9PT;font-family: 宋体}
option {FONT-SIZE: 9pt;font-family: 宋体}
textarea {FONT-SIZE: 9pt;font-family: 宋体}
-->
</STYLE>
<%
'ON ERROR RESUME NEXT
lm2=trim(request("lm2"))
if lm2="" then lm2=0
if (not isNumeric(lm2)) then
Response.Write "<Script Language=JavaScript>alert('栏目ID参数错误或有非法字符或没指定参数,请勿随意提交数据!');location.href='/';</Script>"
response.end
end if
w=trim(request("w"))
h=trim(request("h"))
if w="" or not isNumeric(w) then w=200 '默认图片宽度值
if h="" or not isNumeric(h) then h=160 '默认图片高度值
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," ","")
titlepic=titleb(nr,n)
end function
path=config("path")
'path="/news/"
'Set rs = Server.CreateObject("ADODB.RecordSet")
'rs.Open "select * from [config]",conn,1,1
'if rs.recordcount<>0 then
' path=rs("path")
'end if
'rs.close
'set rs=nothing
set rs = server.CreateObject ("adodb.recordset")
sql = "select top 6 id,pic,title from news where ( pic like '%.jpg%' and pic like '%.JPG%') and sh=1 "
if lm2<>"0" then sql=sql&" and (lm='"&lm2&"' or lm2='"&lm2&"' or lm3='"&lm2&"') "
sql=sql&" order by ontop desc , updat 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")
rs.movenext
if rs.eof then exit for
pic2=qxalttu(rs("pic"))
title2=titleb(rs("title"),n)
id2=rs("id")
rs.movenext
if rs.eof then exit for
pic3=qxalttu(rs("pic"))
title3=titleb(rs("title"),n)
id3=rs("id")
rs.movenext
if rs.eof then exit for
pic4=qxalttu(rs("pic"))
title4=titleb(rs("title"),n)
id4=rs("id")
rs.movenext
if rs.eof then exit for
pic5=qxalttu(rs("pic"))
title5=titleb(rs("title"),n)
id5=rs("id")
rs.movenext
if rs.eof then exit for
pic6=qxalttu(rs("pic"))
title6=titleb(rs("title"),n)
id6=rs("id")
rs.movenext
if rs.eof then exit for
next
rs.close
set rs=nothing
%>
<script type="text/javascript">
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="<%=pic1%>";
imgLink[1]="<%=path%>news_view.asp?newsid=<%=id1%>";
imgUrl[2]="<%=pic2%>";
imgLink[2]="<%=path%>news_view.asp?newsid=<%=id2%>";
imgUrl[3]="<%=pic3%>";
imgLink[3]="<%=path%>news_view.asp?newsid=<%=id3%>";
imgUrl[4]="<%=pic4%>";
imgLink[4]="<%=path%>news_view.asp?newsid=<%=id4%>";
imgUrl[5]="<%=pic5%>";
imgLink[5]="<%=path%>news_view.asp?newsid=<%=id5%>";
imgUrl[6]="<%=pic6%>";
imgLink[6]="<%=path%>news_view.asp?newsid=<%=id6%>";
var imgPre=new Array();
var j=0;
for (i=1;i<=6;i++) {
if( (imgUrl[i]!="") && (imgLink[i]!="") ) {
j++;
} else {
break;
}
}
function playTran(){
if (document.all){
document.imgInit.filters[0].play();
}
}
function nextAd(){
if(adNum<j)adNum++ ;
else adNum=1;
if (document.all){
document.imgInit.filters[0].Transition=26;
document.imgInit.filters[0].apply();
}
document.images.imgInit.src=imgUrl[adNum];
playTran();
theTimer=setTimeout("nextAd()", 6000);
}
function goUrl(){
jumpUrl=imgLink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '')
window.open(jumpUrl,jumpTarget);
else
location.href=jumpUrl;
}
}
</script>
<div id="slideimg">
<a href="javascript:goUrl()">
<img style="border: 0 solid #000000; padding: 1;FILTER: progid:DXImageTransform.Microsoft.RevealTrans (duration=1,transition=3);
; border-color:#000000;color:#000000;margin-bottom:0px" src="javascript:nextAd()" width="<%=w%>" height="<%=h%>" border="0" name="imgInit">
</a>
</div>
<!--幻灯片新闻结束-->
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -