📄 picscroll_up.asp
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<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;}
-->
</style>
<TABLE style="DISPLAY: none" height=100% cellSpacing=0 cellPadding=0 width=100% border=0>
<TBODY>
<%
on error resume next
path=config("path")
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
Width=trim(request("Width"))
Height=trim(request("Height"))
picx=trim(request("picx"))
if picx="" then picx="4"
picw=trim(request("picw"))
if picw="" then picw="120"
pich=trim(request("pich"))
if pich="" then pich="100"
n=trim(request("n"))
if n="" then n=20
n=int(n)
pictitlecolor=trim(request("pictitlecolor"))
if pictitlecolor="" then pictitlecolor="000000"
lm=trim(request("lm"))
if lm="" then lm=0
if (not isNumeric(lm)) then
Response.Write "<Script Language=JavaScript>alert('栏目ID参数错误或有非法字符或没指定参数,请勿随意提交数据!');location.href='/';</Script>"
response.end
end if
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
for wwww=0 to 2
%>
<TR>
<TD id=News<%=wwww%>>
<TABLE height=100% cellSpacing=2 cellPadding=0 width=100% border=0>
<TBODY>
<TR>
<%
for mmmm=1 to picx
title=rs("title")
pic=rs("pic")
id=rs("id")
hit=rs("hit")
%>
<TD align="center"><table border=0 cellpadding=0 cellspacing=1 bgcolor=#d7d7d7><tr><td bgcolor=#ffffff><table border=0 cellspacing=2 cellpadding=0><tr><td><a target="_blank" href="<%=fun_html_url(rs("id"))%>" title="<%=title%>"><img border="0" src="<%=pic%>" width="<%=picw%>" height="<%=pich%>"></a></td></tr></table></td></tr></table>
<div style="padding-top:5px;"><a target="_blank" href="<%=fun_html_url(rs("id"))%>" title="<%=title%>"><%=titleb(rs("title"),n)%></a></div>
</td>
<%
rs.movenext
if rs.eof then exit for
next
%>
</TR></TBODY></TABLE>
</TD>
</TR>
<%
if rs.eof then exit for
next
else
Response.Write "<center>该栏目/图片不存在,可能已经删除或没有图片新闻!</center>"
rs.close:set rs=nothing
conn.close:set conn=nothing
Response.end
end if
conn.close
set conn=nothing
%>
</TBODY>
</table>
<!-- MultNewsEnd -->
<table width="100%" border="0" height="100%" align="center" cellpadding="0" cellspacing="0">
<tr><td>
<script language="javascript">
var intWidth =<%=Width%>; //宽度
var intHeight =<%=Height%>; //高度
var intAmount = 2;//每间隔滚动距离,可调节速度
var intArray=2;//滚动内容数组下标
var intDelayMS=24; //滚动时间间隔,豪秒12-36豪秒之间,太大的话滚动看起来不平滑
var intPauseMS=1000 * 10; //滚动暂停间隔,豪秒,即多长时间滚动一次
var scrollArray=new Array();//滚动内容数组
scrollArray[0]=News0.innerHTML;
scrollArray[1]=News1.innerHTML;
scrollArray[2]=News2.innerHTML;
function scroll_1(objDiv){
thisObjDiv=eval(objDiv);
if ((thisObjDiv.style.pixelTop>0)&&(thisObjDiv.style.pixelTop<=intAmount)){
thisObjDiv.style.pixelTop=0;
setTimeout("scroll_1(thisObjDiv)",intPauseMS);
setTimeout("scroll_2(scrollDiv_2)",intPauseMS);
return;
}
if (thisObjDiv.style.pixelTop>=thisObjDiv.offsetHeight*-1){
thisObjDiv.style.pixelTop-=intAmount;
setTimeout("scroll_1(thisObjDiv)",intDelayMS);
}
else{
thisObjDiv.style.pixelTop=intHeight;
thisObjDiv.innerHTML=scrollArray[intArray];
if (intArray==scrollArray.length-1){
intArray=0;
}
else{
intArray++;
}
}
}
function scroll_2(objDiv){
thisObjDiv2=eval(objDiv);
if ((thisObjDiv2.style.pixelTop>0)&&(thisObjDiv2.style.pixelTop<=intAmount)){
thisObjDiv2.style.pixelTop=0;
setTimeout("scroll_2(thisObjDiv2)",intPauseMS);
setTimeout("scroll_1(scrollDiv_1)",intPauseMS);
return;
}
if (thisObjDiv2.style.pixelTop>=thisObjDiv2.offsetHeight*-1){
thisObjDiv2.style.pixelTop-=intAmount;
setTimeout("scroll_2(scrollDiv_2)",intDelayMS);
}
else{
thisObjDiv2.style.pixelTop=intHeight;
thisObjDiv2.innerHTML=scrollArray[intArray];
if (intArray==scrollArray.length-1){
intArray=0;
}
else{
intArray++;
}
}
}
function Event_MOver(){
intAmount=0;
}
function Event_MOut(){
intAmount=2;
}
if (document.all){ //Only For IE
document.writeln("<span id=\"scrollContainer\" style=\"position:relative;width:"+intWidth+";height:"+intHeight+";overflow:hiden;background-color:#ffffff\">");
document.writeln("<div onMouseOver=\"Event_MOver();\" onMouseOut=\"Event_MOut();\" style=\"position:absolute;width:"+intWidth+";height:"+intHeight+";clip:rect(0 "+intWidth+" "+intHeight+" 0);left:0;top:0\">");
document.writeln("<div id=\"scrollDiv_1\" style=\"position:absolute;width:"+intWidth+";left:0;top:1;\">");
document.write(scrollArray[0]);
document.writeln("</div>");
document.writeln("<div id=\"scrollDiv_2\" style=\"position:absolute;width:"+intWidth+";left:0;top:0\">");
document.write(scrollArray[1]);
document.writeln("</div>");
document.writeln("</div>");
document.writeln("</span>");
scroll_1(scrollDiv_1);
scrollDiv_2.style.top=intHeight;
}
</script>
</td></tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -