<!-- #include file="../../include/skin.asp" -->
<%
'****************************************************
' HS CMS 2006      Power by eebaa.com
' Email: yz_xiaojun@163.com
' Web: http://www.eebaa.com
' Copyright (C) 2004 eebaa.com All Rights Reserved.
'****************************************************
Dim TmpBlog
tit_fir="博客"
indes_url="blog"
sub hsblog_top()
dim tmp1
tmp1=vbcrlf&"<table cellspacing=0 cellpadding=0 border=0 width='100%' background='images/bg.jpg' height=155>"&_
vbcrlf&"<tr valign=top>"&_
vbcrlf&"<td height='50%' align=center width=85><img src='images/index.gif' border=0 width=85 height=70></td>"&_
vbcrlf&"</td><td rowpan=2 align=right width='*'>"&blog_menu()&"</td></tr>"&_
vbcrlf&"<tr class=tr><td>"&_
vbcrlf&"<table cellspacing=1 cellpadding=4 class=table border=0 height='100%'>"
if login_mode<>"" then
tmp1=tmp1&vbcrlf&"<tr class=tr><td><a href=blog.asp?userid="&login_id&">进入我的博客</a></td></tr>"
tmp1=tmp1&vbcrlf&"<tr class=tr><td><a href=../user/blog.asp>管理我的博客</a></td></tr>"
else
tmp1=tmp1&vbcrlf&"<tr class=tr><td>进入我的博客</td></tr>"
tmp1=tmp1&vbcrlf&"<tr class=tr><td>管理我的博客</td></tr>"
end if
tmp1=tmp1&vbcrlf&"<tr class=tr><td><a href=blogreg.asp>申请新的博客</a></td></tr></table></td></tr></table>"
response.write tmp1
end sub

function blog_menu()
blog_menu="<table cellspacing=1 cellpadding=0 border=0 bgcolor='#CCCCCC'><tr>"&_
vbcrlf&"<a  href='./'><td class=trs style=""cursor:pointer;"" width=80 align=center>博客首页</td></a>" & _
vbcrlf&"<a  href='list.asp'><td class=trs style=""cursor:pointer;"" width=80 align=center>博客列表</td></a>" & _
vbcrlf&"<a  href='list_article.asp'><td class=trs style=""cursor:pointer;"" width=80 align=center>日志阅读</td></a>" & _
vbcrlf&"<a  href='list_photo.asp'><td class=trs style=""cursor:pointer;"" width=80 align=center>照片欣赏</td></a>" & _
vbcrlf&"<a  href='tags.asp'><td class=trs style=""cursor:pointer;"" width=60 align=center>TAGS</td></a>" & _
vbcrlf&"</tr></table>"
end function

sub hscms_blog_login(tit,body)
dim tmp
    tmp=vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>" & _
        vbcrlf&"<tr><td class=td>&nbsp;"&tit&"</td></tr>" & _
        vbcrlf&"<tr class=tr><td>"&body&"</td></tr>" & _
        vbcrlf&"</table>"&ukong
    response.write tmp
	TmpBlog=tmp
end sub

sub hscms_blog_table(tit,body)
dim tmp
    tmp=vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>" & _
        vbcrlf&"<tr><td class=td>&nbsp;"&tit&"</td></tr>" & _
        vbcrlf&"<tr class=tr><td>"&body&"</td></tr>" & _
        vbcrlf&"</table>"&ukong
    response.write tmp
end sub

sub hsblog_newblog(num)
sql="select top "&num&" blogname,username,tim from blog order by id desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td width=70%'><a href=blog.asp?userid="&rs("username")&">"&rs("blogname")&"</a></td><td width='30%' align=right><font class=gray>"&mid(joekoe_cms.time_type(rs("tim"),4),6,5)&"</font></td></tr>" 
rs.movenext
loop
tmp1=tmp1&vbcrlf&"</table>"
rs.close
call hscms_blog_table("最新博客",tmp1)
end sub

sub hsblog_hotblog(num)
sql="select top "&num&" blogname,username,hits from blog order by hits desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td width='80%'><a href=blog.asp?userid="&rs("username")&">"&rs("blogname")&"</a></td><td width='20%' align=right><font class=gray>"&rs("hits")&"</font></td></tr>" 
rs.movenext
loop
tmp1=tmp1&vbcrlf&"</table>"
rs.close
call hscms_blog_table("热门博客",tmp1)
end sub



sub left_newarticle(num)
sql="select top "&num&" id,username,topic,tim  from blog_data where hidden=1 and type='article' order by id desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=blog_view.asp?user="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,16)&"</a></td><td  width='30%' align=right><font class=gray >"&mid(joekoe_cms.time_type(rs("tim"),4),6,5)&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>"
call hscms_blog_table("最新文章",tmp1)
end sub

sub left_hotarticle(num)
sql="select top "&num&" id,username,topic,count  from blog_data where hidden=1 and type='article' order by count desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=blog_view.asp?user="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,16)&"</a></td><td  width='30%' align=right><font class=gray >"&("count")&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>"
call hscms_blog_table("热门文章",tmp1)
end sub

sub left_newphoto(num)
sql="select top "&num&" id,username,topic,tim  from blog_data where hidden=1 and type='photo' order by id desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=photo_view.asp?user="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,18)&"</a></td><td  width='30%' align=right><font class=gray >"&mid(joekoe_cms.time_type(rs("tim"),4),6,5)&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>"
call hscms_blog_table("最新照片",tmp1)
end sub

sub left_hotphoto(num)
sql="select top "&num&" id,username,topic,count  from blog_data where hidden=1 and type='photo' order by count desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=photo_view.asp?user="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,18)&"</a></td><td  width='30%' align=right><font class=gray >"&rs("count")&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>"
call hscms_blog_table("热门照片",tmp1)
end sub



sub hsblog_newarticle(num)
sql="select top "&num&" id,username,topic,tim  from blog_data where hidden=1 and type='article' order by id desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=blog_view.asp?user="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,18)&"</a></td><td  width='30%' align=right><font class=gray >"&mid(joekoe_cms.time_type(rs("tim"),4),6,5)&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>"
call hscms_blog_table("最新博客日志",tmp1)
end sub



sub hsblog_newphoto(num)
sql="select top "&num&" id,username,topic,tim  from blog_data where hidden=1 and type='photo' order by id desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=photo_view.asp?user="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,18)&"</a></td><td  width='30%' align=right><font class=gray >"&mid(joekoe_cms.time_type(rs("tim"),4),6,5)&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>"
call hscms_blog_table("最新博客相片",tmp1)
end sub



sub hsblog_data()
  dim tmp1,blognum
  sql="select count(id) from blog "
  set rs=joekoe_cms.exec(sql,1)
  if not rs.eof then
  blognum=rs(0)
  else
  blognum=0
  end if
  rs.close
  tmp1=vbcrlf&"<table cellspacing=0 cellpadding=0 border=0 width='100%'><tr><td height="&dim_num(6)&">"&img_skin("h_")&"网站注册：<font class=red>"&num_reg&"</font> 人</td></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">"&img_skin("h_")&"最新注册："&format_user_name(new_username,0,"")&"</td></tr>" & _
	   vbcrlf&"<tr><td height="&dim_num(6)&">"&img_skin("h_")&"注册博客：<font class=red >"&blognum&"</font></td></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">"&img_skin("h_")&"当前在线：<font class=red>"&online_num&"</font> 人</td></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">"&img_skin("h_")&"最高在线：<font class=red alt='最高在线发生于："&max_tim&"'>"&max_online&"</font> 人</td></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">"&img_skin("h_")&"网站浏览：<font class=red alt='从 "&start_tim&" 起计算'>"&total_counter&"</font> 人次</td></tr></table>"

call hscms_blog_table("博客统计",tmp1)
end sub

sub hsblog_pl1(num)
sql="select top "&num&" re_id,rusername,rword,username from review where rsort='diary' order by rid desc"
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,1
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=blog_view.asp?userid="&rs("username")&"&id="&rs("re_id")&">"&joekoe_cms.code_html(rs("rword"),1,18)&"</a></td><td  width='30%' align=right><font class=gray >"&joekoe_cms.code_html(rs("rusername"),1,18)&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>"
call hscms_blog_table("博客日志评论",tmp1)
end sub

sub hsblog_pl2(num)
sql="select top "&num&" re_id,rusername,rword,username from review where rsort='photo' order by rid desc"
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,1
dim tmp1
tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=photo_view.asp?userid="&rs("username")&"&id="&rs("re_id")&" >"&joekoe_cms.code_html(rs("rword"),1,18)&"</a></td><td  width='30%' align=right><font class=gray >"&joekoe_cms.code_html(rs("rusername"),1,18)&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>" 
call hscms_blog_table("博客相册评论",tmp1)
end sub


Function index_hotblog(num)
sql="select top "&num&" blogname,username,hits from blog order by hits desc"
set rs=joekoe_cms.exec(sql,1)
dim tmp1
' tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
tmp1=vbcrlf&""
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td width='80%'><a href=blog/blog.asp?userid="&rs("username")&" title='["&idtoname(rs("username"))&"] 的博客' >"&rs("blogname")&"</a></td><td width='20%' align=right><font class=gray>"&rs("hits")&"</font></td></tr>" 
rs.movenext
loop

'tmp1=tmp1&vbcrlf&"</table>"
rs.close
'call hscms_blog_table("热门博客",tmp1)
index_hotblog=tmp1
end Function 

Function Index_Pl(num)
sql="select top "&num&" re_id,rusername,rword,username from review where rsort='diary' order by rid desc"
  call joekoe_cms.exec("",-1)
  rs.open sql,conn,1,1
dim tmp1
'tmp1=vbcrlf&"<table cellspacing=1 cellpadding=4 border=0 width='100%'>"
tmp1=vbcrlf&""
do while not rs.eof
tmp1=tmp1&vbcrlf&"<tr><td  width='70%'><a href=blog/blog_view.asp?userid="&rs("username")&"&id="&rs("re_id")&" alt='￥"&joekoe_cms.code_html(rs("rusername"),1,0)&"￥ 发表'>"&joekoe_cms.code_html(rs("rword"),1,12)&"</a></td></tr>"
rs.movenext
loop
rs.close
'tmp1=tmp1&vbcrlf&"</table>"
' call hscms_blog_table("博客日志评论",tmp1)
Index_Pl=tmp1
End Function 
'****************************************************
' HS CMS 2006      Power by eebaa.com
' Email: yz_xiaojun@163.com
' Web: http://www.eebaa.com
' Copyright (C) 2004 eebaa.com All Rights Reserved.
'****************************************************
%>