<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/function.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>首页</title>

<link href="new/css.CSS" rel="stylesheet" type="text/css" />
<style type="text/css">
BODY {
	scrollbar-face-color:#DDDDDD;
	scrollbar-highlight-color: #bcbcbc;
	scrollbar-shadow-color: #bcbcbc;
	scrollbar-3dlight-color: #F5F5F5;
	scrollbar-darkshadow-color: #F5F5F5;
	scrollbar-track-color: #F0F0F0;
	scrollbar-arrow-color: #FFFFFF;
	margin-left: 5px;
	margin-top: 5px;
	margin-right: 5px;
	margin-bottom: 5px;
}
</style>
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
<style type=text/css>
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#E8E8E8; }
.menu_title  { }
.menu_title span  {
	position:relative;
	color:#333333;
	font-weight:bold;
	left: -1px;
}
.menu_title2  { }
.menu_title2 span  { position:relative; color:#333333; font-weight:bold; }
.style2 {color: #FF0000}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="50%" valign="top"><fieldset>
<legend class=menu_title id=menuTitle1 style="cursor:hand;" onClick="showsubmenu(1)" onmouseover=this.className='menu_title1'; onmouseout=this.className='menu_title1';><strong><font color="#ff6600" style="font-size:12">最近访问&nbsp;</font></strong></legend>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0" style="display:" id='submenu1'>
  <tr>
    <td><%userid=request("userid")
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&userid&" order by userid desc"
rs.open sql,Conn_User,1,1
username=rs("username")

rs.close
set rs=nothing
%>
                              <%
userid=request("userid")
set rs=server.createobject("adodb.recordset")
rs.open "select * from [user] where userID="&userid &" order by userID desc",conn_user,1,1
if rs("link")<>"" then %>
                             
                              
							  <%link=rs("link")%>
							  <%
set rsf=server.createobject("adodb.recordset")
sql="select * from [user] where UserName='"&link&"' order by userID desc"
rsf.open sql,Conn_User,1,1
%>
<a href=user.asp?userid=<%=rsf("userid")%> target=_blank><%=rs("link")%></a>
<%else%>
 暂时没有访客                            <%end if%></td>
  </tr>
</table>
    </fieldset> </td>   <td width="50%" valign="top"><fieldset>
<legend class=menu_title id=menuTitle1 style="cursor:hand;" onClick="showsubmenu(2)" onmouseover=this.className='menu_title1'; onmouseout=this.className='menu_title1';><strong><font color="#ff6600" style="font-size:12">最新收藏&nbsp;</font></strong></legend>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0" style="display:" id='submenu2'>
  <tr>
    <td><%userid=request("userid")
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&userid&" order by userid desc"
rs.open sql,Conn_User,1,1
username=rs("username")

rs.close
set rs=nothing
%>
                        <%set rs=server.createobject("adodb.recordset")

rs.open "select * from v where username='"&username&"' order by vid desc",conn_user,1,1 
if rs.recordcount=0 then
%>
                        暂时没有收藏
                        <%else%>
                        <img src="user/head2.gif"><a href="<%=rs("content")%>" target="_blank"><font style='FONT-SIZE: 12px' color='<%=rs("titlefontcolor")%>'><%=left (rs("title"),13)%>...</font></a>
                        <%end if%>
          </td>
  </tr>
</table>
</fieldset></td>
  </tr>
</table>



<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td valign="top"><fieldset>
      <legend class=menu_title id=menuTitle1 style="cursor:hand;" onClick="showsubmenu(3)" onmouseover=this.className='menu_title1'; onmouseout=this.className='menu_title1';><strong><font color="#ff6600" style="font-size:12">我的相册&nbsp;</font></strong></legend>
      <table border="0" align="center" cellpadding="0" cellspacing="0" style="display:" id='submenu3'>
     
          <td><%userid=request("userid")
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&userid&"  order by userid desc"
rs.open sql,Conn_User,1,1
username=rs("username")

rs.close
set rs=nothing
%>
                      <%set rs=server.createobject("adodb.recordset")
rs.open "select top 5 * from photo where editor='"&username&"' and Deleted=false order by photoid desc",conn,1,1
if rs.recordcount=0 then%>
<br>
暂时没有相册<br>
<br>

<% 
else
	rs.PageSize =9 '每页记录条数
	iCount=rs.RecordCount '记录总数
	iPageSize=rs.PageSize
	maxpage=rs.PageCount 
	page=request("page")
	if Not IsNumeric(page) or page="" then
		page=1
	else
		page=cint(page)
	end if
	if page<1 then
		page=1
	elseif  page>maxpage then
		page=maxpage
	end if
	rs.AbsolutePage=Page
	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	%>
                      <table border="0" cellpadding="6" cellspacing="0">
                        <Tr>
                          <%for i=1 to x%>
                          <td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                            <Tr>
                              <td width="70" height="70" colspan="3" bgcolor="#F2f2f2" style="{background-image: URL(<%=rs("PhotoUrl_Thumbsm")%>);
background-position: center; 
background-repeat: no-repeat; 
background-attachment: fixed;}" ><%if rs("photourl")<>"" then%>
                                  <table  border="0" align="center" cellpadding="0" cellspacing="0">
                                    <tr>
                                      <td align="center"><a href=photo_show.asp?photoid=<%=rs("photoID")%> target="_blank"><img src="user/kong.gif" width="70" height="70" border="0"></a></td>
                                    </tr>
                                  </table>
                              <%else
  end if%>                              </td>
                            </Tr>
                          </table></td>
                          <%if i mod 5=0 then%>
                        </Tr>
                        <%else%>
                        <%end if%>
                        <%rs.movenext
  next
  %>
            </table>
                      <%
end if
rs.close
set rs=nothing%>
          </td>
        </tr>
		
      </table>
    </fieldset></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td valign="top"><fieldset>
      <legend class=menu_title id=menuTitle1 style="cursor:hand;" onClick="showsubmenu(6)" onmouseover=this.className='menu_title1'; onmouseout=this.className='menu_title1';><strong><font color="#ff6600" style="font-size:12">我的日志&nbsp;</font></strong></legend>
      <table width="98%" border="0" align="center" cellpadding="3" cellspacing="0" id='submenu6' style="display:">
       
	   <tr>
          <td height="5"></td>
        </tr> <tr>
          <td align="center"><%userid=request("userid")
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&userid&" order by userid desc"
rs.open sql,Conn_User,1,1
username=rs("username")

rs.close
set rs=nothing
%>
            <%set rs=server.createobject("adodb.recordset")

rs.open "select top 5 * from article where editor='"&username&"' order by articleid desc",conn,1,1 
if rs.recordcount=0 then
%>
<br>
暂时还没有日志<br>
<br>
<%else%>
<%i=0%>
<%do while not rs.eof%>
<table width=100% height="29" border="0" cellpadding="0" cellspacing="0">
  <tr >
                <td width="15" height="30" align="center" class="line"><img src=user/head.gif></td>
    <td class="line"><%
  set classrs=server.createobject("adodb.recordset")
classrs.open "select * from articleclass where classid="&rs("classid"),conn,1,1
%>
      [&nbsp;<a href=logclass.asp?userid=<%=userid%>&classid=<%=classrs("classID")%>><%=classrs("classname")%></a>&nbsp;]&nbsp;<a href=user.asp?userid=<%=userid%>&mdid=logs&htm=article_show.asp?articleid=<%=rs("ArticleID")%>&menu=userlogs.asp?userid=<%=userid%> target="_top"><% if rs("TitleFontColor")<>"" then%><font color=<%=rs("TitleFontColor")%>><%=left(rs("title"),22)%></font><%else%><%=left(rs("title"),22)%><%end if%></a>&nbsp;&nbsp;<font style="font-size:10px" color="#999999">(<%=FormatDateTime(rs("updatetime"),2)%>)</font>
      <%if FormatDateTime(rs("UpdateTime"),1)=FormatDateTime(now,1) then%>
      &nbsp;<img src=user/ico_new.gif border="0">
      <%else%>
      <% end if%>    </td>
  </tr>
</table>

<%rs.movenext
		loop%>
<%end if%></td>
        </tr>
        <tr>
          <td height="6"></td>
        </tr>
      </table>
    </fieldset></td>
  </tr>
</table>
</body>
</html>
