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

📄 jjs.asp

📁 ASP源程序采用天空软件小偷中心核件制成
💻 ASP
字号:
<!--#include file="conn.asp" -->
<%
dim kind, path,classID,NclassID
jclassid=request("jclassid") '大分类
jnclassid=request("jnclassid") '小分类
kind=request("kind")    '首页调用类型hits表示浏览排行,downnum表示下载排行,pinglun表示评论排行,dateandtime表示最新
best=cint(request("best")) '为1是最新推荐
hots=cint(request("hots"))'hots为1的时候为精彩推荐
'主题最多显示字数,字母算一个汉字算两个
if request("max")="" then
 maxlen=30
else
 maxlen=request("max")
end if
'显示小分类型的,默认为经济型的
if request("show")="big" then
show="big"
end if

'显示的行数
if request("list")="" then
listNum=10
else 
listNum=cint(request("list"))
end if 

const hitColor="red"		'点击数的颜色
const new_color="red"		'新文章日期的颜色
const old_color="gray"		'旧文章日期的颜色
dim rs,sql,str,str1,topicLen,topic
Path="http://"&request.servervariables("server_name")&replace(request.servervariables("script_name"),"jjs.asp","")
set rs=server.createObject("Adodb.recordset")
sql="select top "&listNum&" * from download"

 if jnclassid<>"" then  
      sql=sql&" where  nclassid="&jnclassid&""
   elseif jclassid<>"" then 
      sql=sql&" where  classid="&jclassid&""
  end if 
if hots=1 then
      sql=sql&" where  hots=1"
end if 

if kind<>"" then
 sql=sql&" order by "&kind&" desc"
else
sql=sql&" order by dateandtime desc"
end if
rs.MaxRecords =listnum
rs.open sql,conn,3,3
if rs.bof and rs.eof then 
str=str+"<li> 未找到!"
else
i=1
rs.movefirst
do while not rs.eof
	topic=left(rs("showname"),maxLen)
	set rs1=server.createObject("Adodb.recordset")
	set rs2=server.createObject("Adodb.recordset")
    sql1="select class from Aclass where classid="&rs("classid")
	rs1.open sql1,conn,3,3
	classname=rs1("class")
	rs1.close
	sql2="select Nclass from Anclass where Nclassid="&rs("Nclassid")
	rs2.open sql2,conn,3,3
	nclass=rs2("Nclass")
	rs2.close 	
	if show="big" then
	str=str &" <img src='"&imgurl&"'>&nbsp;["&nclass&"]<a href='"&Path&"view.asp?id="+Cstr(rs("id"))+"' target='_blank'  showname='"&replace(replace(server.HTMLencode(rs("showname"))," ","&nbsp;"),"'","&nbsp;")&"') ><u>"+Topic+"</u></a> &nbsp;"
	else
	str=str &"<img border='0' src='http://www.7k7k.com/images2/j2.gif' width='12' height='11'><a href='"&Path&"view.asp?id="+Cstr(rs("id"))+"' target='_blank' showname='"&replace(replace(server.HTMLencode(rs("showname"))," ","&nbsp;"),"'","&nbsp;")&"') >"+Topic+"</a>" end if
	str=str & "<font color="
	if rs("dateandtime")>=date-1 then
		str=str & new_color
 	else
		str=str & old_color
	end if
	'是否显示时间   1为显示	
	if request("time")=1 then
	str=str &">("& Month(rs("DateAndTime"))&"."&Day(rs("DateAndTime"))&")</font><br>"
	else
	str=str&"></font>"
    end if
	rs.moveNext
	i=i+1
	if i>listNum then exit do
	loop
end if
rs.close : conn.close
set rs=nothing : set conn=nothing
response.write "document.write ("&Chr(34)&str&Chr(34)&");"
%>

⌨️ 快捷键说明

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