为什么看不到自己发的日志?
麻烦看一下,为什么我写了日志上去以后,在查看我的日志的时候,还是提示"该用户暂时没有任何日志"
<%
username=HTMLEncode(Request("username"))
id=cint(Request("id"))
top
if id<>"" then
sql="select * from [calendar] where id="&id&" order by id Desc"
else
sql="select * from [calendar] where (hide=0 or username='"&Request.Cookies("username")&"') and username='"&username&"' order by id Desc"
end if
rs.Open sql,Conn,1
if rs.eof then error("<li>该用户暂时没有任何日志")
%>
<table class="a2" cellSpacing="1" cellPadding="4" width="97%" align="center" border="0">
<tr class="a3">
<td colSpan="2">
<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table2">
<tr>
<td height="18"> <img src="images/Forum_nav.gif"> <%ClubTree%> → <a href="calendar.asp">社区日志</a> → <span id=title><a href="blog.asp">网络日志</a></span></td>
<td align="right" height="18">
<img src="images/jt.gif"> <a href=calendar.asp?menu=newcalendar>发表日志</a></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table border="0" width="97%" align="center">
<tr>
<td align="center">
<table class="a2" style="WIDTH:100%" height="100%" cellspacing="1" cellpadding="3" border="0" id="table5">
<tr>
<td class="a1" align="middle" height="25"><b>网络日志</b></td>
</tr>
<tr align="middle">
<td bgcolor="#ffffff" align="left" height="100">
<%
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<pagesetup
i=i+1
username=rs("username")
content=rs("content")
if id="" then
content=ReplaceText(content,"<[^>]*>","")
if len(content)>200 then content=left(""&content&"",200)&"..."
end if
%>
<table border="0" width="100%" cellspacing="10">
<tr>
<td>
<b><font size="4"><%=rs("title")%></font></b><br>
<br><%=content%>
<%if rs("hide")=1 then%><br><br>注:<font color="#FF0000">本篇日志为隐藏状态</font><%end if%>
<hr>
<%if id="" then%>
<a href="?id=<%=rs("id")%>">阅读全文</a>
<%else%>
<font color="#C0C0C0">阅读全文</font>
<%end if%>
|
<%if Request.Cookies("username")=username then%>
<a href="calendar.asp?menu=newcalendar&id=<%=rs("id")%>">编辑</a>
<%else%>
<font color="#C0C0C0">编辑</font>
<%end if%>
|
<%if username= Request.Cookies("username") or membercode > 3 then%>
<a href="calendar.asp?menu=del&id=<%=rs("id")%>" onClick="checkclick('您确定要删除此条日志?')">删除</a>
<%else%>
<font color="#C0C0C0">删除</font>
<%end if%>
| <%=rs("addtime")%> by <a href="Profile.asp?username=<%=username%>"><%=username%></a></td>
</tr>
</table>
<%
RS.MoveNext
loop
RS.Close
%>