⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 picnews.asp

📁 ASP+SQL2000+
💻 ASP
字号:
<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<!--#include file=include/function.asp -->
<%
dim shu,news,bigclassid,smallclassid,typeid,specialid,order,time,path,click
bigclassid=request.querystring("bigclassid")
typeid=request.querystring("typeid")
smallclassid=request.querystring("smallclassid")
specialid=request.querystring("specialid")
shu=request.querystring("shu")
order=request("order")
time=request.querystring("time")
title=request.querystring("title")
click=request.querystring("click")
Path =  "/"
if shu<>"" then   '显示数目,不加为10
ss=shu
else
ss=4
end if
if order="click" then  '排序方式,click为按点击率
oo="click"
else
oo="newsid"
end if
if time="0" then  '显示时间,0为不显示
tt=0
else
tt=1
end if
if click="0" then  '显示点击数,0为不显示
cc=0
else
cc=1
end if
if title<>"" then   '显示数目,不加为10
nn=title
else
nn=10
end if
if typeid<>"" then
	set rs=conn.execute("SELECT top "&ss&" * FROM news  where typeid="&typeid&" and checkked=1 and picname is not null order by "&oo&" desc")
else
if bigclassid<>"" then
	set rs=conn.execute("SELECT top "&ss&" * FROM news  where bigclassid="&bigclassid&" and checkked=1 and picname is not null order by "&oo&" desc")
else
if smallclassid<>"" then
	set rs=conn.execute("SELECT top "&ss&" * FROM news  where smallclassid="&smallclassid&" and checkked=1 and picname is not null order by "&oo&" desc")
else
if specialid<>"" then
	set rs=conn.execute("SELECT top "&ss&" * FROM news  where specialid="&specialid&" and checkked=1 and picname is not null order by "&oo&" desc")
else
	set rs=conn.execute("SELECT top "&ss&" * FROM news where checkked=1 and picname is not null order by "&oo&" desc")
end if
end if
end if
end if
if rs.eof and rs.bof then %>
     document.write('<div align="center">没有</div>');
  <% else %>
      document.write('<table border=0 cellpadding=0 cellspacing=3 width=88 height=120 align=center><tr>');
<%do while not rs.eof
fileExt=lcase(getFileExtName(rs("picname")))
title=trim(rs("title"))
title=replace(title,"<br>","")
if strcomp(left(title,nn),title)<0 then
%>
document.write('<td align=center><A class=class href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%><img width="160" height="120" src="uploadfile/<%=rs("picname")%>" border=0><%end if%><br><%=gotTopic(title,nn)%></A></td>');			
<%else%>
document.write('<td align=center><A class=class href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%><img width="160" height="120" src="uploadfile/<%=rs("picname")%>" border=0><%end if%><br><%=gotTopic(title,nn)%></A></td>');
<%end if
rs.movenext 
loop 
%>
document.write('</tr>');
<%end if
Rs.Close
set Rs=nothing

function getFileExtName(fileName)
dim pos
pos=instrrev(filename,".")
if pos>0 then
getFileExtName=mid(fileName,pos+1)
else
getFileExtName=""
end if
end function
%>
document.write('</table>');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -