📄 index.asp
字号:
<h1>
<a href="index.asp?blog_id=<%=blogObj.blogId%>"><%=blogObj.blogTitle%></a>
<% if blogCatObj.catId<>"" then %>
-<%=blogCatObj.CatName%>
<% end if %>
</h1>
<h2><%=filterHTML(blogObj.blogDesc)%></h2>
</DIV>
<DIV id=left>
<div class=sidebar>
<DIV class=photo><IMG src="<%=blogObj.photoUrl%>" ></DIV>
<H2>栏目分类</H2>
<UL>
<%
blogCats = blogObj.getBlogCats()
if isArray(blogCats) then
count = ubound(blogCats)
if count>0 then
for i=0 to count-1
set blogCat = blogCats(i)
%>
<LI>
<a href="index.asp?blog_id=<%=blogCat.blogId%>&cat_id=<%=blogCat.catId%>" ><%=blogCat.catName%></a>
</LI>
<%
next
end if
end if
%>
</UL>
<H2>最新文章</H2>
<UL>
<%
topItems = blogObj.getTopItems()
if isArray(topItems) then
count = ubound(topItems)
if count>0 then
for i=0 to count-1
set item = topItems(i)
if (not item.isSecret)_
or (item.userId<>"" and item.userId=userObj.userId)_
or (userRightObj.canReadSecret) then
title_trim = "" & item.title
if len(title_trim)>12 then
title_trim = left(title_trim,11) & ".."
end if
user_name_trim = "" & item.userName
if len(user_name_trim)>12 then
user_name_trim = left(user_name_trim,11) & ".."
end if
%>
<LI>
<a href="detail.asp?blog_id=<%=item.blogId%>&content_id=<%=item.itemId%>" ><%=title_trim%></a>
<br>
-- <%=user_name_trim%><!-- at <$BlogNewItemTime$>-->
</LI>
<%
end if
next
end if
end if
%>
</UL>
<H2>最新回复</H2>
<UL>
<%
topComments = blogObj.getTopComments()
if isArray(topComments) then
count = ubound(topComments)
if count>0 then
for i=0 to count-1
set comment = topComments(i)
if (not comment.isSecret)_
or (comment.userId<>"" and comment.userId=userObj.userId)_
or (userRightObj.canReadSecret) then
title_trim = "" & comment.title
if len(title_trim)>12 then
title_trim = left(title_trim,11) & ".."
end if
user_name_trim = comment.userName
if len(user_name_trim)>11 then
user_name_trim = left(user_name_trim,11) & ".."
end if
%>
<LI>
<a href="detail.asp?blog_id=<%=comment.blogId%>&content_id=<%=comment.itemId%>#comment<%=comment.commentId%>" ><%=title_trim%></a>
<br>
-- <%=user_name_trim%><!-- at <%=FORMATDATETIME(comment.insertTime,vbShortTime)%>-->
</LI>
<%
end if
next
end if
end if
%>
</UL>
<H2>站内链接</H2>
<UL>
<%
set mlHost = new MLHostClass
mlHost.load()
hostedBlogs = mlHost.getBlogs()
if isArray(hostedBlogs) then
count = ubound(hostedBlogs)
if count>0 then
for i=0 to count-1
%>
<LI>
<a href="index.asp?blog_id=<%=hostedBlogs(i).blogId%>"><%=hostedBlogs(i).blogTitle%></a>
</LI>
<%
next
end if
end if
%>
</UL>
<!--
<H2>最新中文BLOG</H2>
<LI>
<script type="text/javascript" src="http://www.cnblog.org/rings/cache/new.inc"> </script>
</LI>
-->
<%
linkGroups = blogObj.getLinkGroups()
if isArray(linkGroups) then
count = ubound(linkGroups)
if count>0 then
for i=0 to count-1
set linkGroup = linkGroups(i)
%>
<H2><%=linkGroup.groupName%></H2>
<UL>
<%
links = linkGroup.links
if isArray(links) then
linkCount = ubound(links)
if linkCount>0 then
for linkIndex=0 to linkCount-1
set link = links(linkIndex)
%>
<LI>
<a href="<%=link.linkUrl%>" title="<%=link.linkDesc%>" ><%
if link.linkImg<>"" then
response.write "<img border=0 src=" & link.linkImg &" >"
else
response.write link.linkName
end if
%></a>
</LI>
<%
next
end if
end if
%>
</UL>
<%
next
end if
end if
%>
<UL>
<LI>
<a href= target=_blank></a>
</LI>
</UL>
</div><!-- end of id=slidbar -->
</DIV><!-- end of id=left -->
<DIV id=center>
<div class=tools >
欢迎<%=userObj.userName%><% if userObj.userName<>"" and userObj.userId="" then response.write(" [未登录]") end if %>!
<%
if userObj.isFound then
if userRightObj.canPost then %>
|
<a href=edit.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%> >发表文章</a>
<%
end if
if (userObj.userId<>"") then %>
| <a href=userinfo.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&pageno=<%=pageNo%>>用户资料</a>
<% end if %>
<% if (userRightObj.canManage) then %>
| <a href=admin/basic.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&pageno=<%=pageNo%>>控制面板</a>
<% end if %>
| <a href=logout.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>>退出</a>
<%
else
%>
| <a href=register.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&pageno=<%=pageNo%>>注册</a>
| <a href=login.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>>登录</a>
<%
end if
%>
</div>
<DIV class=content >
<%
call assertConnected()
blogItems = blogCatObj.getBlogItems(pageNo)
if not isArray(blogItems) then
response.write("尚无文章")
else
count = ubound(blogItems)
if count<1 then
response.write("尚无文章")
else
for i=0 to count-1
set blogItem = blogItems(i)
if not isEmpty(blogItem.itemId) then
start_date_str = FORMATDATETIME(blogItem.startDate, vbShortDate)
end_date_str = FORMATDATETIME(blogItem.endDate, vbShortDate)
insert_time_str = FORMATDATETIME(blogItem.insertTime, vbShortDate)
if (not blogItem.isSecret)_
or (blogItem.userId<>"" and blogItem.userId=userObj.userId)_
or (userRightObj.canReadSecret) then
%>
<a name="<%=blogItem.itemId%>"></a>
<h2> <% if start_date_str = insert_time_str and end_date_str = insert_time_str then
date_str = insert_time_str
elseif start_date_str = end_date_str then
date_str = end_date_str
else
date_str = start_date_str & " ~ " & end_date_str
end if
'if date_str <> last_date_str then
response.write (date_str)
last_date_str = date_str
'end if
%>
<%
if not isNull(blogItem.catId) and not isEmpty(blogItem.catId) and blogItem.catId<>"" and blogItem.catId<>"null" then
%>[::<a href="index.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogItem.catId%>" title=查看该分类下的文章><%=blogItem.catName%></a>::]<%
end if
%>
</h2>
<h3 style="cursor:hand" onclick="switchDisplay(<%=blogItem.itemId%>)"><%=blogItem.title%></h3>
<div id="excerpt_<%=blogItem.itemId%>"><%=blogItem.excerpt%></div>
<div id="content_<%=blogItem.itemId%>" style="display:<%
if blogItem.showContent=1 then
display_content = true
elseif blogItem.showContent=0 then
display_content = false
else
display_content = blogObj.showContent
end if
if display_content=True then
%>block<% end if %><%
if blogItem.showContent=1 then
display_content = true
elseif blogItem.showContent=0 then
display_content = false
else
display_content = blogObj.showContent
end if
if display_content<>True then
%>none<% end if %>"><% if blogItem.isSecret then
response.write("<div>--保密内容--</div>")
end if
response.write(blogItem.detail)
%><%
if not isNull(blogItem.more) and not isEmpty(blogItem.more) then
%><p><a href="detail.asp?blog_id=<%=blogObj.blogId%>&content_id=<%=blogItem.itemId%><% if blogCatObj.catId<>"" then response.write "&cat_id=" & blogCatObj.catId end if %><% if pageNo<>1 then response.write "&pageno=" & pageNo end if %>#more">阅读详细内容...</a></p><%
end if
%></div>
<div id="more_<%=blogItem.itemId%>" onclick="switchDisplay(<%=blogItem.itemId%>)" style="cursor:hand; display:<%
if blogItem.showContent=1 then
display_content = true
elseif blogItem.showContent=0 then
display_content = false
else
display_content = blogObj.showContent
end if
if display_content=True then
%>none<% end if %><%
if blogItem.showContent=1 then
display_content = true
elseif blogItem.showContent=0 then
display_content = false
else
display_content = blogObj.showContent
end if
if display_content<>True then
%>block<% end if %>" title="显示内容">More...</a></div>
<div id="less_<%=blogItem.itemId%>" onclick="switchDisplay(<%=blogItem.itemId%>);document.location.href='#<%=blogItem.itemId%>';" style="cursor:hand;display:<%
if blogItem.showContent=1 then
display_content = true
elseif blogItem.showContent=0 then
display_content = false
else
display_content = blogObj.showContent
end if
if display_content=True then
%>block<% end if %><%
if blogItem.showContent=1 then
display_content = true
elseif blogItem.showContent=0 then
display_content = false
else
display_content = blogObj.showContent
end if
if display_content<>True then
%>none<% end if %>" title="隐藏内容" >- </div>
<div class="posted">
<a href="user.asp?user_id=<%=blogItem.userId%>&blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&pageno=<%=pageNo%>"><%=blogItem.userName%></a> <%
if start_date_str = insert_time_str and end_date_str = insert_time_str then
response.write FORMATDATETIME(blogItem.insertTime,vbLongTime)
else
response.write blogItem.insertTime
end if
%>
<% if (userObj.userId<>"" and userObj.userId=blogItem.userId ) or userRightObj.canManage then %>| <a href=edit.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&content_id=<%=blogItem.itemId%>&pageno=<%=pageNo%>> 编辑</a> <% end if %>
<% if (userObj.userId<>"" and userObj.userId=blogItem.userId ) or userRightObj.canDelete then %>| <a href="#" onclick="javascript:if (confirm('确认删除吗?')){document.location.href='delete.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&content_id=<%=blogItem.itemId%>&pageno=<%=pageNo%>';}" >删除</a> <% end if %>
| <a href="detail.asp?blog_id=<%=blogObj.blogId%>&content_id=<%=blogItem.itemId%><% if blogCatObj.catId<>"" then response.write "&cat_id=" & blogCatObj.catId end if %><% if pageNo<>1 then response.write "&pageno=" & pageNo end if %> ">全文链接</a>
| <a href="detail.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&content_id=<%=blogItem.itemId%>&pageno=<%=pageNo%>#trackback" >引用(<%=blogItem.trackCount%>)</a>
<% if (userObj.userId<>"" and userObj.userId=blogItem.userId ) or userRightObj.canReply then %>| <a href="detail.asp?blog_id=<%=blogObj.blogId%>&cat_id=<%=blogCatObj.catId%>&content_id=<%=blogItem.itemId%>&pageno=<%=pageNo%>#reply" >回复(<%=blogItem.replyCount%>)</a><% end if %>
</div>
<%
else
'response.write "一篇隐藏文章"
end if ' end of if blogItem.isSecret
'response.flush
end if ' end of if not isEmpty(blogItem.itemId)
next
end if ' end of if count<1
end if ' end of if not isArray(blogItems)
%>
<%
if blogCatObj.totalItemCount>0 then
dim link_url
link_url = "index.asp?blog_id=" & blogObj.blogId
if not isEmpty(blogCatObj.catId) and blogCatObj.catId<>"" then
link_url = link_url & "&cat_id=" & blogCatObj.catId
end if
response.write(getPageLink(blogCatObj.totalPageCount, pageNo, blogCatObj.pageSize, blogCatObj.totalItemCount, link_url , "pageno"))
end if
%>
</div><!-- end of content -->
<p align=center>
<a href=list.asp target="_blank">所有文章</a>
</p>
<p align=center>
<a href=#top>返回页顶</a>
</p>
<p align=center>
<a target="_blank" href=rss.asp><img border=0 src=images/xml.gif title='RSS feed of misslog.com'></a>
</p>
<p align=center>
Powered by <A href=http://www.misslog.com>Misslog</a> | Design by <a href=http://www.blueyr.com target=_blank>BlueYr</a>
</p>
</DIV><!-- end of id=center -->
</DIV><!-- end of id=container-->
</center>
</BODY>
</HTML>
<!--#include file="../../end.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -