<!--#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 &"的个人主页"
	

%>



<body>

<SCRIPT LANGUAGE="JavaScript">

          <!--

          function stopError() {
            return true;
          }

          window.onerror = stopError;

          // -->
          

</SCRIPT>


<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Untitled Document</title>
<link href="css/Mpage_main.css" rel="stylesheet" type="text/css">
<link href="css/Mpage_blog.css" rel="stylesheet" type="text/css">
<script language='javascript' src="../page_style/js/menu.js"></script>
</head>

<body style="margin-left:10px">
<br>
<div id="s_user_count" ><strong><span id="font_2">　 我的播客家园日志</span></strong></div>
<img src="page_style/icon/BLOG.gif" width="168" height="103">

<%
set rsa=server.createobject("adodb.recordset")
rsa.open "select * from article where editor='"&username&"' order by articleid desc",conn,1,1 
%>
<table width="100" border="0" cellspacing="0" cellpadding="0" id="blog_cld">
  <tr>
    <td><img src="../page_style/icon/BLOG1.gif" width="155" height="25"></td>
  </tr>
  <tr>
    <td background="../page_style/icon/blog2.gif"><font color="#0000FF"><img height="8" src="../images/no.gif" width="8"></font><font color="#FF0000"><b><%= Year(dtCurViewMonth)& "年" & MonthName(Month(dtCurViewMonth))%></B></font> </td>
  </tr>
  <tr>
    <td><img src="../page_style/icon/blog3.gif" width="155" height="8"></td>
  </tr>
  <tr>
    <td background="../page_style/icon/BLOG4.gif"><table width="144" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="16" colspan="7"><img src="../page_style/icon/blog6.gif" width="137" height="7"></td>
        </tr>
      <tr>
<td>　</td>
<td>　</td>
<td>　</td>
<td>　</td>
<td>　</td>
<td>　</td>
<td >


<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
%>                 
</td>
<td height="20" >
</td>
<td height="20" >
</td>
<td height="20" >
</td>
<td height="20" >
</td>
<td height="20" >
</td>
<td height="20" >
</td>
</tr>        <!--<td height="20" ><span id="font_2">1</span></td>-->
    </table></td>
  </tr>
  <tr>
    <td height="1" bgcolor="C7C7C7">
	</td>
  </tr>
</table>
<div id="blog_all"><li><a href="log.asp?userid=<%=userid%>&action=list" target=content><font class=no>查看该月所有日志</a> </li></div>
<div id="blog_all"><li><a href="User_articleadd.asp" target=content><font class=no>发表日志</a> </li></div>
</body>
</html>
<%
end if
rs.close
set rs=nothing
call CloseConn()
%>