<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/Conn_User.asp"-->

<%
dim UserID
dim mdid,htm
mdid=trim(request("mdid"))
menu=trim(request("menu"))
htm=trim(request("htm"))
UserID=trim(request("UserID"))
if UserID="" then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>请指定UserID</li>"
	call WriteErrMsg()
	response.end
else
	UserID=Clng(UserID)
end if

indexs="indexs.asp"
if UserID="del" then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>该用户已被管理员删除</li>"
	call WriteErrMsg()
	response.end
else
	UserID=Clng(UserID)
end if
strFileName="UserInfo.asp?UserID=" & UserID
sql="select * from " & db_User_Table & " where " & db_User_ID & "=" & UserID
set rs=server.createobject("adodb.recordset")
rs.open sql,Conn_User,1,3
if rs.bof and rs.eof then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>找不到指定的用户<br>"
	call WriteErrMsg()
else
    photo=rs(db_User_photok)
	UserName=rs(db_User_Name)
	PageTitle=  UserName &"的小屋"
if cint(Request.Cookies("asp163")("userhits")) <> userid then
rs(db_User_hits)=rs(db_User_hits)+1
Response.Cookies("asp163")("userhits") = userid
rs.update
else
end if

	

%><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%if rs(db_user_title)<>"" then%>
              <%=rs(db_user_title)%>
              <%else%>
              "<%= UserName %>"
的空间
<%end if%></title>
<style type="text/css">
<!--
body {
	background-image: url();
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #a09887;
}

-->
</style>
<style type="text/css">
<!--
.STYLE1 {color: #000000}
.STYLE2 {color: #FFFFFF}
#Layer1 {
	position:absolute;
	left:70px;
	top:128px;
	width:85px;
	height:40px;
	z-index:1;
}
#Layer2 {
	position:absolute;
	left:84px;
	top:55px;
	width:360px;
	height:28px;
	z-index:2;
}
-->
</style>
<style type="text/css">
BODY {
	scrollbar-face-color:#DDDDDD;
	scrollbar-highlight-color: #cccccc;
	scrollbar-shadow-color: #CCCCCC;
	scrollbar-3dlight-color: #F5F5F5;
	scrollbar-darkshadow-color: #F5F5F5;
	scrollbar-track-color: #F0F0F0;
	scrollbar-arrow-color: #FFFFFF;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 8px;
	margin-bottom: 0px;
}
</style>
<link href="new/css.CSS" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<style type="text/css">
<!--
#Layer3 {
	position:absolute;
	left:808px;
	top:21px;

	z-index:1;
}
-->
</style>
</HEAD>
</head>

<body onselectstart="return false">
<div id="Layer3">
<%if rs(db_user_userg)<>"" then%><img src="userg/<%=rs(db_User_userg)%>.gif"><%else%><%end if%></div>
<table width="932" height="538" border="0" cellpadding="0" cellspacing="0"  background="bg/<%if rs(db_user_photok)<>"" then%><%=rs(db_User_photok)%>.gif<%else%>001.gif<%end if%>">
  <tr>
    <td>&nbsp;</td>
    <td height="42">&nbsp;</td>
  </tr>
  <tr>
    <td width="43">&nbsp;</td>
    <td valign="top"><table width="726" height="443" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="6" colspan="3" valign="bottom"><img src="user/bg1.gif" width="726" height="6"></td>
      </tr>
      <tr>
        <td width="6" background="user/bgleft.gif">&nbsp;</td>
        <td width="664" valign="top" bgcolor="#FFFFFF"><table width="100%" height="8" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td></td>
          </tr>
        </table>
          <table width="97%" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="22" align="left" valign="top"><table width="100%" height="3" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td></td>
              </tr>
            </table>
              <img src="user/index.gif" width="17" height="16"></td>
            <td><font style='FONT-SIZE: 14px' color='#000000'><strong>
              <%if rs(db_user_title)<>"" then%>
              <font color=<%=rs(db_user_titlecolor)%>><%=rs(db_user_title)%></font>
              <%else%>
              "<%= UserName %>"
的空间
<%end if%>
            </strong></font>&nbsp;<font style='FONT-SIZE:11px' color='#000000'>点击:<%=rs(db_User_hits)%></font></td>
            <td align="right" valign="bottom"><table height="25" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td><a href=http://<%= UserID %>.<%=SiteUrl%>><font style='FONT-SIZE: 11px' color='#000000'>http://<%= UserID %>.<%=SiteUrl%></font></a>&nbsp;</td>
                <td valign="bottom"><%if CheckUserLogined()=true then
			  UserNamed=Request.Cookies("asp163")("UserName")
			  if Request.Cookies("asp163")("UserName")<>rs(db_User_Name) then
			  rs(db_User_link)=Request.Cookies("asp163")("UserName")
			  rs.update
			  else
			  end if
			  set userq=server.createobject("adodb.recordset")
sql="select * from [user] where UserName='"&UserNamed&"' order by userid desc"
userq.open sql,Conn_User,1,1
userw=userq("userid")
%>
                    <%if userw<>userid then%>
                    <a href="user.asp?userid=<%=userw%>&mdid=man&htm=fsave.asp?fid=<%= UserID %>" target="_blank"><img src="user/f.gif" border=0></a>
                    <%else%>
                    <%end if%>
                    <% else
end if%>
                    <table width="100%" height="2"  border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td></td>
                      </tr>
                    </table></td>
              </tr>
            </table></td>
           
          </tr>
        </table>
          <table width="97%" height="1" border="0" align="center" cellpadding="0" cellspacing="0" background="user/line.gif">
            <tr>
              <td></td>
            </tr>
          </table>
          <table width="97%" height="1" border="0" align="center" cellpadding="0" cellspacing="0" >
            <tr>
              <td></td>
            </tr>
          </table>
          <table width="97%" height="385" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><iframe frameborder=0 src="indexuser.asp?userid=<%=userid%>&htm=<%=htm%>&menu=<%=menu%>" width="645" height="385" marginwidth="0" marginheight="0"  scrolling="no" name=cc id=aa></iframe></td>
            </tr>
          </table>
          </td>
        <td width="56" valign="top" background="user/bgright.gif"><table width="51" border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td height="60">&nbsp;</td>
          </tr>
          <%
	 
	  if mdid="indexd" or mdid="" then
	  %>
          <tr>
            <td height="28" background="user/tab_on.gif"><div align="center" class="STYLE1"><a href="indexs.asp?userid=<%=UserID%>" target="dd"><strong><font color="#ff6600">首页</font></strong></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%else%>
          <tr>
            <td height="28" background="user/tab_off.gif"><div align="center" class="STYLE1 STYLE2"><a href="user.asp?userid=<%=UserID%>&mdid=indexd&htm=indexs.asp?userid=<%=UserID%>" target="_self"><font color="#8E8E8E">首页</font></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%end if%>
          <%if mdid="logs" then%>
          <tr>
            <td height="28" background="user/tab_on.gif"><div align="center" class="STYLE1 STYLE2 STYLE1"><a href="log.asp?userid=<%=UserID%>&action=all" target="dd"><strong><font color="#ff6600">日志</font></strong></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%else%>
          <tr>
            <td height="28" background="user/tab_off.gif"><div align="center" class="STYLE1 STYLE2 STYLE1"><a href="user.asp?userid=<%=UserID%>&mdid=logs&htm=log.asp?userid=<%=UserID%>&menu=userlogs.asp?userid=<%=UserID%>" target="_self"><font color="#8E8E8E">日志</font></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%end if%>
          <%if mdid="photos" then%>
          <tr>
            <td height="28" background="user/tab_on.gif"><div align="center" class="STYLE2"><a href="photo.asp?userid=<%=UserID%>" target="dd"><strong><font color="#ff6600">相册</font></strong></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%else%>
          <tr>
            <td height="28" background="user/tab_off.gif"><div align="center" class="STYLE2"><a href="user.asp?userid=<%=UserID%>&mdid=photos&htm=photo.asp?userid=<%=UserID%>&menu=userphotos.asp?userid=<%=UserID%>" target="_self"><font color="#8E8E8E">相册</font></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%end if%>
          <%if mdid="gbooks" then%>
          <tr>
            <td height="28" background="user/tab_on.gif"><div align="center" class="STYLE2"><a href="gbook.asp?userid=<%=UserID%>" target="dd"><strong><font color="#ff6600">留言</font></strong></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%else%>
          <tr>
            <td height="28" background="user/tab_off.gif"><div align="center" class="STYLE2"><a href="user.asp?userid=<%=UserID%>&mdid=gbooks&htm=gbook.asp?userid=<%=UserID%>" target="_self"><font color="#8E8E8E">留言</font></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%end if%>
          <%if mdid="vs" then%>
          <tr>
            <td height="28" background="user/tab_on.gif"><div align="center" class="STYLE2"><a href="v.asp?userid=<%=UserID%>" target="dd"><strong><font color="#ff6600">收藏</font></strong></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%else%>
          <tr>
            <td height="28" background="user/tab_off.gif"><div align="center" class="STYLE2"><a href="user.asp?userid=<%=UserID%>&mdid=vs&htm=v.asp?userid=<%=UserID%>" target="_self"><font color="#8E8E8E">收藏</font></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%end if%>
          <%
	  if CheckUserLogined()=true then
	  UserNames=Request.Cookies("asp163")("UserName")
	  set rs=server.CreateObject("ADODB.recordset")
	  sql="select * from [user] where username='"&usernames&"'"
	  rs.open sql,conn_user,1,1
	  user=rs("userid")
	 
	  If user=UserID then
	  
	  %>
          <%if mdid="man" then%>
          <tr>
            <td height="28" background="user/tab_on.gif"><div align="center" class="STYLE2"><a href="usermanage.asp?userid=<%=UserID%>" target="dd"><strong><font color="#ff6600">管理</font></strong></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%else%>
          <tr>
            <td height="28" background="user/tab_off.gif"><div align="center" class="STYLE2"><a href="user.asp?userid=<%=UserID%>&mdid=man&htm=usermanage.asp?userid=<%=UserID%>" target="_self"><font color="#8E8E8E">管理</font></a></div></td>
          </tr>
          <tr>
            <td height="5" ></td>
          </tr>
          <%end if%>
          <%else
	  end if%>
          <%
	  else
	  end if
	  %>
        </table></td>
      </tr>
      <tr>
        <td height="6" colspan="3" valign="top"><img src="user/bg2.gif" width="726" height="6"></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="932" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="1" bgcolor="#000000"></td>
  </tr>
  <tr>
    <td height="32" bgcolor="#f2f2f2"><table width="96%" border="0" align="right" cellpadding="0" cellspacing="0">
      <tr>
        <td width="470"><% call ShowUserLogin() %></td>
        <td width="7">&nbsp;</td>
        <td width="300">公告：
          
            <%
set rs=server.createobject("adodb.recordset")
rs.open "select top 1 * from Announce order by ID desc",conn,1,1 
%>
            
            <%if rs.recordcount=0 then %>
           暂时没有公告!!!
           
            <%else%>
            <%
do while not rs.eof
%>
<a href="announce.asp?id=<%=rs("id")%>" target="_blank"><font color="<%=rs("titlecolor")%>"><%=rs("title")%></font></a>
              &nbsp;<font color='#999999' style='FONT-SIZE: 10px'><%=month(rs("DateAndTime"))%>.<%=day(rs("DateAndTime"))%></font>
            
            <%rs.movenext
loop
%>
            <%end if%>
            <%rs.close
set rs=nothing%>
    </td>
        <td width="85"><a href="User_Reg.asp" target="_blank"><img src="user/reg.gif" width="85" height="20" border="0" /></a></td>
        <td width="7">&nbsp;</td>
      </tr>
    </table></td>
  </tr> <tr>
    <td height="1" bgcolor="#000000"></td>
  </tr>
</table>
</body>
</html>
<%

end if

rs.close
set rs=nothing
call CloseConn()
%>