<%top title=HTMLEncode(Request("title")) content=ContentEncode(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 experience<2 then error("
  • 您还没有资格在论坛发表日记。") if Request.Cookies("username")=empty then error("
  • 您还未登录社区") if title=empty then error("
  • 您没有输入日志主题") if content=empty then error("
  • 您没有输入日志内容") if adddate="" then adddate=""&year(now)&"-"&month(now)&"-"&day(now)&"" if id=0 then sql="insert into calendar(title,username,content,hide,adddate) values ('"&title&"','"&Request.Cookies("username")&"','"&content&"','"&hide&"','"&adddate&"')" conn.Execute(SQL) else conn.execute("update calendar set title='"&title&"',content='"&content&"',hide='"&hide&"' where id="&id&" and username='"&Request.Cookies("username")&"'") end if message="
  • 发表日志成功
  • 返回个人日志
  • 返回"&adddate&"日志
  • 返回日历
  • 返回论坛首页" 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 error2("删除成功!") end if %>
       <%ClubTree%> → 社区日志 我的日志 >发表日志

    <% select case Request("menu") case "" Default case "show" show case "newcalendar" newcalendar end select sub newcalendar if Request.Cookies("username")=empty then error("
  • 您还未登录社区") if Request("id")<>empty then sql="select * from calendar where id="&id&"" Set Rs=Conn.Execute(sql) username=rs("username") content=rs("content") title=rs("title") adddate=rs("adddate") hide=rs("hide") Set Rs = Nothing if username<>""&Request.Cookies("username")&"" then error2("只有原作者才能编辑该日志!") end if %>
    发表日志
    日志标题:
    日志内容:
      
    <% end sub sub show %>
    ><%=Cdate(lookdate)+1%>......<%=lookdate%>社区日志......><%=Cdate(lookdate)-1%>
    <% if lookdate<>"" then lookdateSQL="and adddate='"&lookdate&"'" sql="select * from calendar where (hide=0 or username='"&Request.Cookies("username")&"') "&lookdateSQL&" order by id Desc" pagesetup=10 '设定每页的显示数量 TotalPage=getPageCount(sql,pagesetup) '总页数 PageCount = cint(Request.QueryString("ToPage")) if PageCount > TotalPage then PageCount = TotalPage if PageCount <1 then PageCount = 1 sql=sql&" limit "&(pagecount-1)*pagesetup&","&pagesetup '跳转到指定页数 i=0 rs.Open sql,Conn,1 Do While Not RS.EOF i=i+1 username=rs("username") content=ReplaceText(rs("content"),"<[^>]*>","") if len(content)>200 then content=left(""&content&"",200)&"..." %>
    <%=rs("title")%>

    <%=content%> <%if rs("hide")=1 then%>

    注:本篇日志为隐藏状态<%end if%>
    ">阅读全文 | <%if Request.Cookies("username")=username then%> ">编辑 <%else%> 编辑 <%end if%> | <%if username= Request.Cookies("username") or membercode > 3 then%> " onclick="checkclick('您确定要删除此条日志?')">删除 <%else%> 删除 <%end if%> | <%=rs("addtime")%> by <%=username%>
    <% RS.MoveNext loop RS.Close %>
    [ ]
    <% end sub sub Default %>
    公元月  
    公开日志

    时间

    û

    <% sql="select * from calendar where hide=0 order by id Desc limit 0,20" Set Rs=Conn.Execute(sql) Do While Not RS.EOF %>
  • [<%=rs("adddate")%>]"><%=rs("title")%>...<%=rs("username")%>
  • <% RS.MoveNext loop RS.Close %>
    <% end sub htmlend %>