首页调用源代码
<!--#include file="const.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="common/cache.asp" -->
<!--#include file="common/function.asp" -->
<!--#include file="common/ubbcode.asp" -->
<%
'File name: topblog.asp
'首页调用文件
'原文更新时间: 2005-12-25
'清风修改时间: 2006-09-22
'showType 输出类型,类型有五种
'留空 = [分类]标题+作者
'1 = [分类]标题+日期
'2 = 标题+作者
'3 = 标题+日期
'4 = 标题
'titleLength 标题长度
'authorLength 作者名称长度
'topLen 调用几条记录
'示例: <script language="javascript" src="你的网址/topblog.asp?showtype=4&TopLen=7&titleLength=50">
getInfo(1)
Response.Charset = "UTF-8"
Response.Expires=60
Dim cate_ID,FeedCate,FeedTitle,memName,FeedRows
Dim showType,titleLength,authorLength,topLen
cate_ID=CheckStr(Request.QueryString("cateID"))
showType=Request.QueryString("showType")
titleLength=Request.QueryString("titleLength")
authorLength=Request.QueryString("authorLength")
topLen = Request.QueryString("topLen")
If Not isinteger(topLen) Then topLen = 10
if IsInteger(titleLength)=false then titleLength=20
if IsInteger(authorLength)=false then authorLength=6
FeedCate=False
IF IsInteger(cate_ID) = False Then
SQL="Select TOP "&topLen&" L.log_ID,L.log_Title,l.log_Author,L.log_PostTime,C.cate_Name,C.cate_ID,log_IsTop FROM blog_Content AS L,blog_Category AS C Where C.cate_ID=L.log_cateID AND L.log_IsShow=true AND L.log_IsDraft=false and C.cate_Secret=false orDER BY log_IsTop,log_PostTime DESC"
Else
SQL="Select TOP "&topLen&" L.log_ID,L.log_Title,l.log_Author,L.log_PostTime,C.cate_Name,C.cate_ID,log_IsTop FROM blog_Content AS L,blog_Category AS C Where log_cateID="&cate_ID&" AND C.cate_ID=L.log_cateID AND L.log_IsShow=true AND L.log_IsDraft=false and C.cate_Secret=false orDER BY log_IsTop,log_PostTime DESC"
FeedCate=True
End If
Dim RS,DisIMG,i
Set RS=Conn.ExeCute(SQL)
if RS.EOF or RS.BOF then
ReDim FeedRows(0,0)
else
if FeedCate then FeedTitle=SiteName & " - " & RS("cate_Name")
FeedRows=RS.getrows()
end if
RS.close
set RS=nothing
Conn.Close
Set Conn=Nothing
if ubound(FeedRows,1)=0 then
%>
document.write ("没有找到任何日志")
<%
else
for i=0 to ubound(FeedRows,2)
select case showType
case 1:
%> &nbs
相关新闻>>
- 发表评论
-
- 最新评论 更多>>