📄 diary_show.asp
字号:
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="images/bg2.gif">
<tr>
<td colspan="3" height="1" bgcolor="#E32D3F"></td>
</tr>
<tr>
<td colspan="3" height="30" class="titletext"> <font color="#E32D3F">心情日记</font></td>
</tr>
<tr>
<td colspan="3" height="1" background="images/hline.gif"></td>
</tr>
<tr>
<td>
<%
If WhoCanSee = 0 And cint(Session("u_id")) <> cint(Request("AccountID")) Then
Response.Write "关闭了日记本"
ElseIf WhoCanSee = 2 And Not IsMember() Then
Response.Write "您还没登录,不能看到日记 "
ElseIf WhoCanSee = 1 And Not IsFriend(Request("AccountID")) And cint(Session("u_id")) <> cint(Request("AccountID")) Then
Response.Write "只有" & NickName & "的好友才能看到日记"
Else
%>
<!----------------------主体部分开始---------------------------->
<!--#include File="../conn.asp"-->
<%
AccountID=Request("AccountID")
SQLStr = "Update diary Set Hit = Hit + 1 Where ID = " & Request("ID")
conn.Execute(SQLStr)
Set Rs = Server.CreateObject("ADODB.Recordset")
SQLStr = "Select Topic,UpdateTime,Weather,Mood,Body From diary Where ID = " & Request("ID")
Rs.Open SQLStr,conn,1,1
%>
<div align="center">
<center>
<table border="0" cellpadding="0" width="100%" height=100% bordercolor="#FFECEC" cellspacing="0">
<tr>
<td colspan="3" height=26> <b class=title><%=Server.HTMLEncode( Rs("Topic"))%></b></td>
</tr>
<tr>
<td colspan="3" height=1 background="images/hline.gif" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height=26>日期:<%=Year(Rs("UpdateTime"))%>年<%=Month(Rs("UpdateTime"))%>月<%=Day(Rs("UpdateTime"))%>日
</td>
<td height="26">天气:<%=Server.HTMLEncode( Rs("Weather"))%> </td>
<td height="26">心情:<%=Server.HTMLEncode( Rs("Mood"))%></td>
</tr>
<tr>
<td colspan="3" height=1 background="images/hline.gif" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height=100% bordercolorlight="#FF9900" bordercolordark="#FF9900" colspan="3">
<table border="0" cellpadding="0" width="100%" cellspacing="0">
<tr>
<td height="8" bordercolorlight="#FFECEC" bordercolordark="#FFECEC"></td>
</tr>
<tr>
<td bordercolorlight="#FFECEC" bordercolordark="#FFECEC" valign=top>
<%=Rs("Body")%> </td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<%
Rs.Close()
%>
<!----------------------主体部分结束---------------------------->
<%
'End If
%> </td>
<td background="images/vline.gif" width="1"></td>
<td width="150" valign=top><img src=images/home_index_diary.jpg width=150 height=150>
<%
If cint(AccountID) = cint(Session("u_id")) Then
%>
<p align=center> <a href=H_Diary_Edit.asp?Mod=Add&AccountID=<%=AccountID%>>[新添]</a>
<a href=H_Diary_Edit.asp?Mod=Edit&AccountID=<%=AccountID%>&ID=<%=Request("ID")%>>[编辑]</a>
<a href=H_Diary_Del.asp?AccountID=<%=AccountID%>&ID=<%=Request("ID")%>>[删除]</a>
<%
End If
%>
<br><br><p align=left>
<%
SQLStr = "Select Top 1 ID,Topic From diary Where AccountID = " & AccountID & " And ID > " & Request("ID") & " Order By ID"
Rs.Open SQLStr,conn,1,1
If Not Rs.Eof Then
%>
<font color=red>上一篇</font> <a href=H_Diary_Show.asp?AccountID=<%=AccountID%>&ID=<%=Rs("ID")%>><%=Server.HTMLEncode ( Left(Rs("Topic"),10) )%>……</a><br>
<%
End If
Rs.Close()
SQLStr = "Select Top 1 ID,Topic From diary Where AccountID = " & AccountID & " And ID < " & Request("ID") & " Order By ID Desc"
Rs.Open SQLStr,conn,1,1
If Not Rs.Eof Then
%>
<font color=red>下一篇</font> <a href=H_Diary_Show.asp?AccountID=<%=AccountID%>&ID=<%=Rs("ID")%>><%=Server.HTMLEncode ( Left(Rs("Topic"),10) )%>……</a><br>
<%
End If
Rs.Close()
%>
</td>
</tr>
<%
End IF
%>
<tr>
<td colspan="3" height="1" background="images/hline.gif"></td>
</tr>
</table>
</center>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -