<!-- #include file="include/set.asp" -->
<%
'****************************************************
' HSCMS 1.2      Power by 2332.cn
' Email: 116116089@qq.com
' Web: http://www.2332.cn
' Copyright (C) 2004 2332.com All Rights Reserved.
'****************************************************
tit_fir=""
tit="我的博客"
call web_head(0,0,0,0,0)
'---------------------------左边1 开始----------------------------
call hscms_blog_login("用户登陆",user_login())
'---------------------------左边1 结束----------------------------
call web_center(0)
'---------------------------中间1 开始----------------------------
call hsblog_top()
'---------------------------中间1 结束----------------------------
response.write web_right
response.write web_left(0)
'---------------------------左边2 开始----------------------------
call hsblog_newblog(8)
'---------------------------左边2 结束----------------------------
call web_center(0)
'---------------------------中间2 开始----------------------------
%>
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr valign=top>
<td width='50%' align=right>


<%call hsblog_newarticle(8)%>


</td>
<td width='50%'>

<%call hsblog_newphoto(8)%>

</td>
</tr>
</table>
<%
response.write ukong
'---------------------------中间2 结束----------------------------
response.write web_right
response.write web_left(0)
'---------------------------左边3 开始----------------------------
call hsblog_hotblog(8)
'---------------------------左边3 结束----------------------------
call web_center(0)
'---------------------------中间3 开始----------------------------
%>
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr valign=top>
<td width='50%' align=right>

<%call hsblog_pl1(8)%>

</td>
<td width='50%'>

<%call hsblog_pl2(8)%>

</td>
</tr>
</table>
<%
'---------------------------中间3 结束----------------------------
call web_end(0,0)

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?userid="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,35)&"</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?userid="&rs("username")&"&id="&rs("id")&">"&joekoe_cms.code_html(rs("topic"),1,35)&"</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,25)&"</a></td><td  width='30%' align=right><font class=gray >"&joekoe_cms.code_html(rs("rusername"),1,10)&"</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,25)&"</a></td><td  width='30%' align=right><font class=gray >"&joekoe_cms.code_html(rs("rusername"),1,10)&"</font></td></tr>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</table>" 
call hscms_blog_table("相册评论",tmp1)
end sub


'****************************************************
' HSCMS 1.2      Power by 2332.cn
' Email: 116116089@qq.com
' Web: http://www.2332.cn
' Copyright (C) 2004 2332.com All Rights Reserved.
'****************************************************
%>