📄 picroll.asp
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>滚动图片</title>
<style>
<!--
.body,td,table {color: #333333; font-size: 9pt;}
a {text-decoration: none;color: #333333; }
a:link {text-decoration: none; color: #333333;}
a:visited {text-decoration: none; color: #666666;}
a:hover {color: #FF6600;}
.textheight {line-height: 20px;}
-->
</style>
</head>
<body style="background-color=transparent" > <!--设置背景为透明-->
<div id=demo style="overflow: hidden; width: 100%; height: 200px">
<table border=0 align=left cellpadding=0 cellspacing="0" cellspace="0">
<tbody>
<tr>
<td id=demo1 valign=top>
<table cellspacing=0 cellpadding=0 width="100%" align=center border=0>
<tbody>
<%
on error resume next
path=config("path")
'path="/new/"
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
pvspace=trim(request("pvspace"))
phspace=trim(request("phspace"))
topen=trim(request("topen"))
picw=trim(request("picw"))
pich=trim(request("pich"))
picx=trim(request("picx"))
if picx="" then picx="10"
n=trim(request("n"))
if n="" then n=20
n=int(n)
pictitlecolor=trim(request("pictitlecolor"))
if pictitlecolor="" then pictitlecolor="000000"
pictitlesize=trim(request("pictitlesize"))
if pictitlesize="" then pictitlesize="10"
lm=trim(request("lm"))
page=trim(request("page"))
if page="" then page=1
if lm="" then lm=0
sql="select * from [news] where ( pic like '%.jpg%' or pic like '%.JPG%' or pic like '%.gif%' or pic like '%.GIF%' ) 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"
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.recordcount <>0 then
%> <tr valign=top>
<%
for xxxx=1 to picx
if n<>0 then
ttt="<br><font color="&pictitlecolor&" style='font-size:"&pictitlesize&"pt'>"&titleb(rs("title"),n)&"</font>"
end if
title=rs("title")
id=rs("id")
hit=rs("hit")
%>
<td align='center' valign="middle" style='line-height:120%'> <a href=<%=fun_html_url(id)%> target='_blank' title='<%=title%> [点击:<%=hit%>]'><img src=<%=rs("pic")%> width=<%=picw%> height=<%=pich%> hspace=<%=phspace%> vspace=<%=pvspace%> border=0 ><%if topen=1 then%><span class="textheight"><%=ttt%></span>
<%end if%> </a></td>
<%
rs.movenext
if rs.eof then exit for
next
end if
conn.close
set conn=nothing
%>
</tr>
</tbody>
</table>
</td>
<td id=demo2 valign=top></td>
</tr>
</tbody>
</table>
</div>
<script>
var speed=15
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,speed)}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -