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

<%
'请勿改动下面这三行代码
const ChannelID=3
Const ShowRunTime="Yes"
SkinID=0
MaxPerPage=12
dim UserID
dim mdid,htm
mdid=trim(request("mdid"))
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
username=rs("db_user_usrename")
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
if rs.bof and rs.eof then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>找不到指定的用户<li>"
else
    photo=rs(db_User_photok)
	UserName=rs(db_User_Name)
	PageTitle=  UserName &"的个人主页"
	

%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=PageTitle%></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">
<!--
#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> 
BODY {
	scrollbar-face-color:#DDDDDD;
	scrollbar-highlight-color: #f2f2f2;
	scrollbar-shadow-color: #CCCCCC;
	scrollbar-3dlight-color: #F5F5F5;
	scrollbar-darkshadow-color: #F5F5F5;
	scrollbar-track-color: #F0F0F0;
	scrollbar-arrow-color: #FFFFFF;
	background-image: url();
	background-color: #f2f2f2;
}
</style>
<link href="new/css2.CSS" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</HEAD>
</head>

<body >

<%
set rsa=server.createobject("adodb.recordset")
rsa.open "select * from article where editor='"&username&"' order by articleid desc",conn,1,1 
%>

<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"><table width='100%' height="10" border='0' cellpadding='0' cellspacing='0'>
      <tr>
        <td height="6"></td>
      </tr>
    </table>
      <table width="140" height="18" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="user/logs.gif" width="75" height="11"></td>
      </tr>
    </table>    
    </td>
  </tr>
  <tr>
    <td height="120" align="center" valign="top"><table width="156" height="158" border="0" cellpadding="0" cellspacing="0" background="user/logbgs.gif">
          <tr>
            <td height="11"></td>
        </tr>
          <tr>
            
            <td height="25" align="left" valign="top"><table align="center" cellpadding cellspacing background="images/Diary_02_02.gif">
                <tr>
                  <td width="100%"><FORM NAME="fmNextPrev" ACTION="userlogs.asp?userid=<%=userid%>&mdid=logs&htm=log.asp?userid=<%=userid%>" METHOD=POST>
                      <TABLE WIDTH="132" BORDER=0 align="center" CELLPADDING=1 CELLSPACING=0 >
                        <TR VALIGN=MIDDLE ALIGN=CENTER>
                          <TD COLSPAN=7><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                            
                            </table>
                              <TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%" BORDER=0>
                                <TR ALIGN=CENTER>
                                  <TD WIDTH="10%" ALIGN=RIGHT ><input name="subPrev" type="image" src="user/p.gif" width="5" height="8" border="0">
                                      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td height="2"></td>
                                        </tr>
                                    </table></TD>
                                  <TD WIDTH="80%"><font style='FONT-SIZE: 11px' color='#333333'><b><%= Year(dtCurViewMonth)& "年" & MonthName(Month(dtCurViewMonth))%></B></FONT></TD>
                                  <TD WIDTH="10%" ALIGN=LEFT><input name="subNext" type="image" src="user/n.gif" width="5" height="8" border="0">                                  </TD>
                                </TR>
                            </TABLE></TD>
                        </TR>
                        <tr>
                          <td height="6"></td>
                        </tr>
                        
                      
                        <%
   dtCurViewDay = DtPrevSunday(dtCurViewMonth)
  
   For iWeek = 0 To 4
      Response.Write "<TR>" & vbCrLf

      For iDay = 0 To 6
	  
         Response.Write "<TD HEIGHT=15 ALIGN=right >"

         If Month(dtCurViewDay) = Month(dtCurViewMonth) Then
            If dtCurViewDay = dtToday Then
               fontColor = "today"

            Else
               fontColor = ""
            End If

         '---- Write day of month

set rsdd=server.createobject("adodb.recordset")

rsdd.open "select * from article where editor='"&username&"' and updatetime=#"&year(dtCurViewDay)&"-"&Month(dtCurViewDay)&"-"&Day(dtCurViewDay)&"# order by articleid desc",conn,1,1 

         if rsdd.recordcount>0 then
		 Response.Write "<font style='FONT-SIZE: 11px' color='"&fontColor&"' class=no ><a href=log.asp?userid="&userid&"&dates="&year(dtCurViewDay)&"-"&Month(dtCurViewDay)&"-"&Day(dtCurViewDay)& "&action=all target='dd'><strong><font style='FONT-SIZE: 11px'>"&Day(dtCurViewDay) & "</font></strong></a></FONT>"
         else
            Response.Write "<font style='FONT-SIZE: 11px' class='"&fontColor&"'>"&Day(dtCurViewDay) & "</FONT>"

end if

  
       rs.MoveFirst	
       While Not rs.EOF	' 判断是否过了最后一项
       
	happy=rs(5)
	If day(dtCurViewDay)=day(rs("diary"))and month(dtCurViewmonth)=month(rs("diary"))and year(dtCurViewmonth)=year(rs("diary"))Then
       
       For i=0 to rs.Fields.Count-1
       Next
       
       
            Response.Write " <a href='benri.asp?n="
            Response.Write Year(dtCurViewMonth)
            Response.Write "&y="
            Response.Write Month(dtCurViewMonth)
            Response.Write "&r="
            Response.Write Day(dtCurViewDay)
            Response.Write "' target=content >"
          
            Response.Write "</a>"

end if
rs.MoveNext	' 移到下一项
       Wend  
         '---Else
            '---Response.Write "?
         end if

         Response.Write "</TD>" & vbCrLf
         dtCurViewDay = DateAdd("d", 1, dtCurViewDay)
      Next
      Response.Write "</TR>" & vbCrLf
   Next



%>
                        <%REM --------END OF DRAW CALENDAR SECTION-------- %>
                      </TABLE>
                    <input type="hidden" Name="CURDATE" Value="<%=dtCurViewMonth%>">
                      <%
set rs=nothing
%>
                  </FORM></td>
                </tr>
            </table></td>
            
          </tr>
          <tr>
           
            <td height="1"></td>
           
          </tr>
        </table>
      <table border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td height="10"><a href="log.asp?userid=<%=userid%>&action=list" target="dd"><font class=no>列表显示</font></a>&nbsp;</td>
            <td width="14"><img src="user/lf_right.gif" width="7" height="5"></td>
          </tr>
      </table>
    </td>
  </tr>
  <tr align="center" valign="bottom">
    <td height="185"><%
set rsd=server.createobject("adodb.recordset")
sql="select * from [friend] where username='"&username&"' order by id desc"
rsd.open sql,Conn_User,1,1
%>
      <form name="formd">
        <select name="menu1" class="put" LANGUAGE=javascript onChange="window.open(this.value,'_blank','');">
          <option  selected> ---- 选择好友的空间 ---- </option>
          <%do while not rsd.eof%>
          <%
				useridf=rsd("fid")
set rst=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&useridf&" order by userid desc"
rst.open sql,Conn_User,1,3%>
          <option value="user.asp?userid=<%=rsd("fid")%>&mdid=indexd&htm=indexs.asp?userid=<%=rsd("fid")%>">&raquo;
            <%if rst("title")<>"" then%>
            <%=left (rst("title"),9)%>...
            <%else%>
            <%=rst("username")%>的空间
            <%end if%>
          </option>
          <%rsd.movenext
		loop%>
        </select>
    </form></td>
  </tr>
</table>
</body>
</html>
<%

end if

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