<%top if Request.Cookies("username")=empty then error("
  • 您还未登录社区") title=HTMLEncode(Request("title")) content=HTMLEncode(Request.Form("content")) lookdate=HTMLEncode(Request("lookdate")) adddate=HTMLEncode(Request("adddate")) hide=int(Request("hide")) id=int(Request("id")) if Request("menu")="add" then if title=empty then error("
  • 您没有输入日记主题") if content=empty then error("
  • 您没有输入日记内容") sql="insert into calendar(title,username,content,hide,adddate) values ('"&title&"','"&Request.Cookies("username")&"','"&content&"','"&hide&"','"&adddate&"')" conn.Execute(SQL) message="
  • 添加日记成功
  • 返回日记
  • 返回日历
  • 返回论坛首页" succeed(""&message&"") elseif Request("menu")="del" then if membercode > 3 then conn.execute("delete from [calendar] where id="&id&"") else conn.execute("delete from [calendar] where id="&id&" and username='"&Request.Cookies("username")&"'") end if message="
  • 删除成功
  • 返回日历
  • 返回论坛首页" succeed(""&message&"") elseif Request("menu")="editok" then conn.execute("update [calendar] set title='"&title&"',content='"&content&"',hide='"&hide&"' where id="&id&" and username='"&Request.Cookies("username")&"'") message="
  • 编辑日记成功
  • 返回日记
  • 返回日历
  • 返回论坛首页" succeed(""&message&"") end if %>
       <%ClubTree%> → 我的日记

    <% if Request("menu")="show" then %>
    近期个人日记 <%=lookdate%> 日记
    <% sql="select top 20 * from calendar where username='"&Request.Cookies("username")&"' order by id Desc" Set Rs=Conn.Execute(sql) Do While Not RS.EOF %> "><%=rs("title")%>
    <% RS.MoveNext loop RS.Close %>
    <% sql="select * from calendar where (hide=0 or username='"&Request.Cookies("username")&"') and adddate='"&lookdate&"' order by id Desc" rs.Open sql,Conn,1 pagesetup=10 '设定每页的显示数量 rs.pagesize=pagesetup TotalPage=rs.pagecount '总页数 PageCount = cint(Request.QueryString("ToPage")) if PageCount <1 then PageCount = 1 if PageCount > TotalPage then PageCount = TotalPage if TotalPage>0 then rs.absolutepage=PageCount '跳转到指定页数 i=0 Do While Not RS.EOF and i
    <%=rs("title")%>



    "> " onclick="checkclick('您确定要删除此条日记?')"> 作者:<%=rs("username")%>  时间:<%=rs("addtime")%>

    <% RS.MoveNext loop RS.Close %>
    [ ]
    添加日记
    日记标题:
    日记内容:
      

    <% htmlend elseif Request("menu")="edit" then sql="select * from calendar where id="&id&"" Set Rs=Conn.Execute(sql) if ""&rs("username")&""<>""&Request.Cookies("username")&"" then error2("该日记非您所写!") %>
    "> ">
    编辑日记
    日记标题: ">
    日记内容:
      

    <% RS.Close htmlend end if %>
    公元月  
    <%=conn.execute("Select count(id)from [calendar]")(0)%> 篇日记

    时间

    û

    <% sql="select top 16 * from calendar where hide=0 order by id Desc" Set Rs=Conn.Execute(sql) Do While Not RS.EOF %> <% RS.MoveNext loop RS.Close %>
    "><%=rs("title")%>
    <% htmlend %>