<%
'==================================
' 系统首页类文件
' 以 Bigik.cn 文件修改为基础(带标题小日历)
' 更新时间:
' 20080118 03

' blog.dengzhe.com
'==================================
'**********************************************
'日志列表处理
'**********************************************
function ContentList()'日志列表
Dim webLog,webLogArr,webLogArrLen,Log_Num,PageCount,CanRead,ViewType,ViewDraft,strSQL,ViewTag
Dim getCate,ArticleList
PageCount=0
set getCate=new Category
ViewDraft=checkstr(Request.QueryString("display"))
ViewTag=checkstr(Request.QueryString("tag"))
CanRead=False
If len(checkstr(Request.QueryString("distype")))>0 Then
Response.Cookies(CookieNameSetting)("ViewType")=checkstr(Request.QueryString("distype"))
else
if len(Request.Cookies(CookieNameSetting)("ViewType"))<1 then
if blog_DisMod then
Response.Cookies(CookieNameSetting)("ViewType")="list"
else
Response.Cookies(CookieNameSetting)("ViewType")="normal"
end if
end if
end if
Dim CT
CT=""
IF IsInteger(cateID)=True Then
getCate.load(cateID)
CT="分类: "&getCate.cate_Name&" | "
if getCate.cate_Secret then
if not stat_ShowHiddenCate and not stat_Admin then %>
<div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何日志!</strong></div>
<%
exit function
end if
end if
End If
If Request.Cookies(CookieNameSetting)("ViewType")="list" Then ViewType="list" Else ViewType="normal"
if ViewType="list" then
strSQL="log_ID,log_CateID,log_Author,log_Title,log_PostTime,log_IsShow,log_CommNums,log_QuoteNums,log_ViewNums,log_IsTop"
else
strSQL="log_ID,log_CateID,log_Author,log_Title,log_PostTime,log_IsShow,log_CommNums,log_QuoteNums,log_ViewNums,log_IsTop,log_Intro,log_Content,log_edittype,log_DisComment,log_ubbFlags,log_tag"
end if
'row序号: 0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15
If len(ViewTag)>0 then
dim getTag,getTID
set getTag=new tag
getTID=getTag.getTagID(ViewTag)
if getTID<>0 then
SQLFiltrate=SQLFiltrate & " log_tag LIKE '%{"&getTID&"}%' AND "
Url_Add=Url_Add & "tag="&Server.URLEncode(ViewTag)&"&"
CT="Tag: "&ViewTag&" | "
end if
set getTag=nothing
end if
'=================Load Cache List============================
set ArticleList=new ArticleCache
if ArticleList.loadCache and len(ViewTag)<1 and IsInteger(log_Year)=false and IsInteger(log_Month)=false and IsInteger(log_Day)=false and ViewDraft<>"draft" then
if IsInteger(cateID)=True then
ArticleList.outHTML "C"&cateID,ViewType,CT
else
if stat_Admin Or stat_ShowHiddenCate then
ArticleList.outHTML "A",ViewType,CT
else
ArticleList.outHTML "G",ViewType,CT
end if
end if
exit function
end if
'=================Load DB List===============================
if stat_ShowHiddenCate or stat_Admin then
SQL="SELECT "&strSQL&" FROM blog_Content "&SQLFiltrate&" log_IsDraft=false ORDER BY log_IsTop ASC,log_PostTime DESC"
else
SQL="SELECT "&strSQL&" FROM blog_Content As T,blog_Category As C "&SQLFiltrate&" T.log_CateID=C.cate_ID and C.cate_Secret=false and log_IsDraft=false ORDER BY log_IsTop ASC,log_PostTime DESC"
end if
'if stat_ShowHiddenCate or stat_Admin then
If ViewDraft="draft" and len(memName)>0 then
ViewType="list"
SQL="SELECT "&strSQL&" FROM blog_Content "&SQLFiltrate&" log_IsDraft=true and log_Author='"&memName&"' ORDER BY log_IsTop ASC,log_PostTime DESC"
end if
Set webLog=Server.CreateObject("Adodb.Recordset")
webLog.Open SQL,CONN,1,1
SQLQueryNums=SQLQueryNums+1
If webLog.EOF or webLog.BOF Then
If ViewDraft="draft" then%>
<div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何草稿!</strong></div>
<%else%>
<div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何日志!</strong></div>
<%end if
exit function
Else
If ViewDraft="draft" then Url_Add=Url_Add&"display=draft&"
If ViewType="list" Then blogPerPage=blogPerPage*4
webLog.PageSize=blogPerPage
webLog.AbsolutePage=CurPage
Log_Num=webLog.RecordCount
if webLog.EOF or webLog.BOF then %>
<div style="margin:10px 0px 10px 0px"><strong>抱歉,没有找到任何日志!</strong></div>
<%
exit function
end if
webLogArr=webLog.GetRows(Log_Num)
webLog.close
Set webLog=Nothing
webLogArrLen=Ubound(webLogArr,2)
If ViewDraft="draft" then%>
<div class="pageContent" style="text-align:Right;overflow:hidden;height

px;line-height

0%"><span style="float:left">草稿列表</span><%=MultiPage(Log_Num,blogPerPage,CurPage,Url_Add,"","float

eft")%></div>
<%else%>
<div class="pageContent" style="text-align:Right;overflow:hidden;height

px;line-height

0%"><span style="float:left"><%=CT%></span><%=MultiPage(Log_Num,blogPerPage,CurPage,Url_Add,"","float

eft")%> 预览模式: <a href="<%=Url_Add%>distype=normal" accesskey="1">普通</a> | <a href="<%=Url_Add%>distype=list" accesskey="2">列表</a></div>
<%end if
If ViewType="list" Then%>
<div class="Content-body" style="text-align

eft"><table cellpadding="2" cellspacing="2" width="100%">
<%end if
Do Until PageCount=webLogArrLen+1 or PageCount=blogPerPage
IF IsInteger(cateID)=False Then
getCate.load(webLogArr(1,PageCount))
end if
'是否有权限查看日记
If stat_Admin=True then CanRead=True
If webLogArr(5,PageCount) Then CanRead=True
If webLogArr(5,PageCount)=False And webLogArr(2,PageCount)=memName then CanRead=True
If ViewType="list" Then
'====================================
' 列表模式
'====================================
OutList webLogArr,PageCount,getCate,ViewDraft,CanRead
Else
'====================================
' 正常模式
'====================================
OutNomal webLogArr,PageCount,getCate,CanRead
End If
PageCount=PageCount+1
CanRead=False
Loop
If ViewType="list" Then%>
</table></div>
<%end if%>
<div class="pageContent"><%=MultiPage(Log_Num,blogPerPage,CurPage,Url_Add,"","float:Left")%></div>
<%end If
end Function
' ----------------------- 输出普通模式--------------------
'------------------------ Bigik.cn 基础上的加强输出普通模式(带标题小日历)修正了一些asp错误
'------------------------ Start 20080115 01

----- blog.dengzhe.com
function OutNomal(webLogArr,PageCount,getCate,CanRead)
if getCate.cate_Secret then
if not stat_ShowHiddenCate and not stat_Admin then exit function
end if
dim getTag
set getTag=new tag
%>
<div class="Content">
<div class="Content-top">
<div class="Date">
<div class="DateYM"><%=DateToStr(webLogArr(4,PageCount),"y-m2")%></div>
<div class="DateD"><%=DateToStr(webLogArr(4,PageCount),"d2")%></div>
<div class="DateW"><%=DateToStr(webLogArr(4,PageCount),"w2")%></div>
</div>
<div class="CheckPoint">
<div class="titleNbutton">
<h1 class="ContentTitle">
<%If CanRead Then%>
<a class="titleA" href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>"><%=HtmlEncode(webLogArr(3,PageCount))%></a>
<%Else%>
<a class="titleA" href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>">[隐藏日志]</a>
<%end If%>
<%if webLogArr(5,PageCount)=false or getCate.cate_Secret then%>
<img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_lock.gif" style="margin:10px 0px -3px 2px;" alt=""/>
<%end if%>
</h1>
<%If webLogArr(9,PageCount)=True Then%>
<div class="BttnE" onclick="TopicShow(this,'log_<%=webLogArr(0,PageCount)%>')"></div>
<%end if%>
</div>
<h2 class="ContentAuthor">
<img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/User.gif" style="margin:0px 4px -3px 0px" border="0" alt="作者"/>Posted by: <%=webLogArr(2,PageCount)%>
<%if stat_EditAll or (stat_Edit and webLogArr(2,PageCount)=memName) then%>
<a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/blogedit.asp?id=<%=webLogArr(0,PageCount)%>"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_edit.gif" style="margin:0px 0px -3px 0px" border="0" alt="编辑"/></a>
<%end if%>
<%if stat_DelAll or (stat_Del and webLogArr(2,PageCount)=memName) then%>
<a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/blogedit.asp?action=del&id=<%=webLogArr(0,PageCount)%>" onclick="if (!window.confirm('是否要删除该日志')) return false"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_del.gif" style="margin:0px 0px -3px 0px" border="0" alt="删除"/></a>
<%end if%>
<%if webLogArr(13,PageCount)=true then%>
<img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/comment.gif" style="margin:0px 0px -3px 0px" border="0" alt="评论"/>
<%=webLogArr(8,PageCount)%> Views
不用评论;
<%Else%>
<img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/comment.gif" style="margin:0px 0px -3px 0px" border="0" alt="评论"/>
<%=webLogArr(8,PageCount)%> Views
<a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>#comm_top"><%=webLogArr(6,PageCount)%> Comments</a>
<%end If%>
</h2>
</div>
</div>
<div id="log_<%=webLogArr(0,PageCount)%>"<%if webLogArr(9,PageCount)=true then %> style="display:none"<%end if%>>
<%if CanRead then
if webLogArr(12,PageCount)=1 then%>
<div class="Content-body">
<div class="Content-Text">
<%=UnCheckStr(UBBCode(webLogArr(10,PageCount),mid(webLogArr(14,PageCount),1,1),mid(webLogArr(14,PageCount),2,1),mid(webLogArr(14,PageCount),3,1),mid(webLogArr(14,PageCount),4,1),mid(webLogArr(14,PageCount),5,1)))%>
</div>
<%if webLogArr(10,PageCount)<>HtmlEncode(webLogArr(11,PageCount)) then%>
<a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>" class="more"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/skins/kelvin/viewmore.gif" style="margin:0;padding:0px;border:0px" alt="查看更多"/></a>
<%end if%>
<%else%>
<div class="Content-body">
<div class="Content-Text">
<%=UnCheckStr(webLogArr(10,PageCount))%>
</div>
<%if webLogArr(10,PageCount)<>webLogArr(11,PageCount) then%>
<a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/default.asp?id=<%=webLogArr(0,PageCount)%>" class="more"><img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/skins/kelvin/viewmore.gif" style="margin:0;padding:0px;border:0px" alt="查看更多"/></a>
<%end if%>
<%end if
Else%>
<div class="Content-body">该日志是隐藏日志,只有管理员或发布者可以查看!
<%end if%>
</div>
<div class="Content-bottom">
<div class="ContentBLeft"></div>
<div class="ContentBRight"></div>
<img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/folder.gif" style="margin:0px 0px -3px 0px" border="0" alt="分类"/>
<a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/default.asp?cateID=<%=webLogArr(1,PageCount)%>" title="<%=getCate.cate_Intro%>"><%=getCate.cate_Name%></a>
<%if len(webLogArr(15,PageCount))>0 then%>
<img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/tags.gif" style="margin:0px 4px -3px 0px;" alt="Tags"/><%=getTag.filterHTML(webLogArr(15,PageCount))%>
<%end if%>
</div>
</div>
</div>
<%
set getTag=nothing
end function
'------------------------ Bigik.cn 基础上的加强输出普通模式(带标题小日历)
'------------------------ End 20071228 05:01------- blog.dengzhe.com
' ----------------------- 输出列表模式 --------------------
function OutList(webLogArr,PageCount,getCate,ViewDraft,CanRead)
dim logLink,logIcon
if getCate.cate_Secret then
if not stat_ShowHiddenCate and not stat_Admin then exit function
end if%>
<tr><td valign="top">
<%If ViewDraft="draft" then
logLink="blogedit.asp?id="&webLogArr(0,PageCount)
logIcon="<a href=""blogedit.asp?id="&webLogArr(0,PageCount)&""" title=""编辑草稿""><img border=""0"" alt=""编辑草稿"" src=""images/drafts.gif"" style=""margin:0px 4px -2px 0px""/></a>"
else
logLink="article.asp?id="&webLogArr(0,PageCount)
logIcon="<a href=""default.asp?cateID="&webLogArr(1,PageCount)&""" ><img border=""0"" alt=""查看 "&getCate.cate_Name&" 的日志"" src="""&getCate.cate_icon&""" style=""margin:0px 2px -3px 0px""/></a>"
end if
If webLogArr(9,PageCount) Then %><b><%end If%>
<%=logIcon%>
<%If CanRead Then%>
<a href="<%=logLink%>" title="作者:<%=webLogArr(2,PageCount)%> 日期:<%=DateToStr(webLogArr(4,PageCount),"Y-m-d")%>"><%=HtmlEncode(webLogArr(3,PageCount))%></a>
<%Else%>
<a href="<%=logLink%>">[隐藏日志]</a>
<%end If
if webLogArr(5,PageCount)=false or getCate.cate_Secret then %>
<img src="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/images/icon_lock.gif" style="margin:0px 0px -3px 2px;" alt=""/>
<%end if%>
</td>
<%If webLogArr(9,PageCount) Then %></b><%end If%>
<%If not ViewDraft="draft" then %>
<td valign="top" width="60"><nobr><a href="../../../DOCUME~1/ADMINI~1/LOCALS~1/Temp/article.asp?id=<%=webLogArr(0,PageCount)%>#comm_top" title="评论"><%=webLogArr(6,PageCount)%></a> | <span title="引用通告"><%=webLogArr(7,PageCount)%></span> | <span title="阅读次数"><%=webLogArr(8,PageCount)%></span></nobr></td>
<%else%>
<td valign="top" width="60"><nobr><%=webLogArr(2,PageCount)%></span></nobr></td>
<%end if%>
</tr>
<%end function%>
哪位好心人帮忙,看下啊,我是个菜鸟,到底是哪个文件出了问题啊?
http://www.cehen.com