📄 show_diary.asp
字号:
<!--#include file="top.asp"-->
<!--#include file="ubb.asp"-->
<%
'=========================================================
' 随然日记本(多用户版) Version:3.0
' Date: 2004-11-15
' Script Written by 随然(dampure)
' 随然日记本演示地址:http://www.suiran.cn
'=========================================================
' Copyright (C) 2003,2004 真露无香. All rights reserved.
' Web: www.yongzi.com
' Diary:http://www.suiran.cn
'=========================================================
id=replace(request("id")," ","")
if isnumeric(id)=false or isnull(id)=true then
response.write "请指定正确的参数,或者通过日记本首页进行访问!"
response.end
end if
set rs=server.CreateObject ("ADODB.Recordset")
rs.open "select * from diary where id="&id,conn,1,3
rs("hits")=rs("hits")+1
rs.update
if rs("lock")=0 and rs("userid")<>session("userid") and session("admindiary")="" then
response.redirect "show_lock.asp?id="&id
response.end
end if
nr=replace(replace(replace(replace(replace(replace(rs("content"),"&","&"),"<","<"),">",">"),chr(13),"<br>"),chr(34),"""),chr(32)," ")
%>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center bgColor=#636562
border=0>
<TBODY>
<TR>
<TD>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle bgColor=#ffffff>
<TABLE height=2 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=2>
<TD bgColor=#f7f7f7 height=2></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD width=13>
<DIV align=left><FONT color=#996600 size=2></FONT></DIV></TD>
<TD width=402>
<DIV align=right><FONT color=#996600 size=2></FONT> </DIV></TD>
<TD width=118>
<DIV align=right><FONT color=#996600 size=2>阅读:<FONT
color=#999999><%=rs("hits")%> </FONT></FONT> </DIV></TD>
<TD width=18>
<DIV align=right></DIV></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center border=0>
<TBODY>
<TR>
<TD><IMG height=17 src="images/line_top.gif" width=609></TD></TR>
<TR>
<TD vAlign=top height=134>
<TABLE cellSpacing=0 cellPadding=0 width=609 border=0>
<TBODY>
<TR>
<TD width=11 background=images/line_left.gif
height=180> </TD>
<TD vAlign=top width=584 height=180>
<TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
<TBODY>
<TR>
<TD vAlign=center align=right width="13%"><IMG height=12
src="images/date.gif" width=49></TD>
<TD vAlign=bottom align=left width="25%"><FONT
color=#666666 size=2><%=rs("date")%></FONT></TD>
<TD vAlign=center align=right width="16%"><IMG height=12
src="images/weather.gif" width=86></TD>
<TD vAlign=bottom align=left width="8%"><FONT
face="Arial, Helvetica, sans-serif"><FONT color=#666666
size=2><%=rs("weather")%></FONT></FONT></TD>
<TD vAlign=center align=right width="9%"><IMG height=12
src="images/week.gif" width=54></TD>
<TD vAlign=bottom align=left width="29%"><FONT
color=#ffffff><FONT face="Arial, Helvetica, sans-serif"
size=2><FONT color=#999999><FONT color=#666666>星期 <%=findweek(rs("week"))%>
<%
function findweek(theweek)
select case theweek
case 1
findweek="日"
case 2
findweek="一"
case 3
findweek="二"
case 4
findweek="三"
case 5
findweek="四"
case 6
findweek="五"
case 7
findweek="六"
end select
end function
%>
</FONT></FONT></FONT></FONT></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
<TBODY>
<TR>
<TD><IMG height=12 src="images/top.gif"
width=584></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=2 width=570 align=center
border=0>
<TBODY>
<TR>
<TD height=50>
<%
set rs2=server.CreateObject ("ADODB.Recordset")
rs2.open "select * from admin where userid in(select userid from diary where id="&request("id")&")",conn,1,3
nickname=rs2("nickname")
pinglunlock=rs2("say")
rs2.close
%>
<DIV align=center><B><FONT
color=#666666><%=rs("title")%></FONT> </B><FONT
color=#996600> 作者:<%=nickname%></FONT>
</DIV></TD></TR>
<TR>
<TD class=input02 background=images/back.gif
height=9><FONT
color=#666666><%=ubbcode(rs("content"))%></FONT> <FONT
color=#996600> </FONT></TD></TR>
<TR>
<TD></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=584 border=0>
<TBODY>
<TR>
<TD><IMG height=12 src="images/bottom.gif"
width=584></TD></TR></TBODY></TABLE><BR></TD>
<TD width=14 background=images/line_right.gif
height=180> </TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD><IMG height=15 src="images/line_bottom.gif"
width=608></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=609 align=center border=0>
<TBODY>
<TR>
<TD> </TD>
</TR>
<TR>
<TD> <DIV align=center>
<%if rs("userid")=session("userid") then%>
<A
href="modify_diary.asp?id=<%=rs("id")%>" ><IMG
height=21 src="images/modify.gif" width=74 border=0></A> <A
href="del_diary.asp?id=<%=rs("id")%>" ><IMG
height=21 src="images/delete.gif" width=74 border=0></A>
<% if rs("lock")=0 then %>
<A href="pass_diary.asp?id=<%=rs("id")%>" ><IMG
height=21 src="images/thepass.gif" width=74 border=0></A>
<% end if %>
<%end if%>
<FONT
face=宋体><B>
<A href="#" onclick=window.close()><IMG
height=21 src="images/close.gif" width=74 border=0></A>
</DIV></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<DIV align=center>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD width="14%">
<DIV align=right><IMG height=17
src="images/pinglun.gif" width=37></DIV></TD>
<TD vAlign=center width="86%">
<DIV align=center></DIV></TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="96%">
<TBODY>
<TR>
<TD> </TD>
<TD> </TD></TR></TBODY></TABLE>
<%
set rsp=server.createobject("adodb.recordset")
sql="select * from say where diaryid="&request("id")
rsp.open sql,conn,1,1
if rsp.eof and rsp.bof then
response.write"<table align=center border=0 cellPadding=2 cellSpacing=0 width=400><tr><td align=center height=25 bgColor=#fffffa><FONT color=#666666 size=2>还没有人对该日记发表评论!</FONT></td></tr><table>"
else
do while not rsp.eof
set rsp2=server.CreateObject ("ADODB.Recordset")
rsp2.open "select * from admin where user='"&rsp("postuser")&"'",conn,1,3
postname=rsp2("nickname")
rsp2.close
%>
<TABLE align=center border=0 cellPadding=2 cellSpacing=0
width=400><TBODY>
<TR>
<TD bgColor=#e4e4e4> <FONT color=#666666
size=2>来自:</FONT><FONT size=2><A
href="diary.asp?user=<%=rsp("postuser")%>"
target=_blank><FONT color=#000000><%=postname%></FONT></A><FONT
color=#000000> </FONT> <FONT
color=#666666>时间:</FONT></FONT><FONT color=#000000
size=2><%=rsp("date")%></FONT> <FONT size=2>
</FONT><FONT size=2><%if rs("userid")=session("userid") or session("username")=rsp("postuser") then%><a href=del_pinglun.asp?id=<%=rsp("sayid")%>&diaryid=<%=request("id")%>>删除</a><%end if%> </FONT></TD></TR>
<TR>
<TD bgColor=#fffffa class=input02>
<TABLE align=center border=0 cellPadding=1 cellSpacing=0
width="98%">
<TBODY>
<TR>
<TD><FONT color=#cc6600 size=2>内容:</FONT><FONT
color=#666666
size=2><%=ubbcode(rsp("content"))%></FONT></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD> </TD></TR></TBODY></TABLE>
<%
rsp.movenext
loop
rsp.close
end if
%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD width="8%">
<DIV align=center></DIV></TD>
<TD vAlign=center width="92%">
<DIV align=center><IMG height=2 src="images/line02.gif"
width=549></DIV></TD></TR></TBODY></TABLE>
<FORM action=save_pinglun.asp method=post name=form1>
<TABLE align=center border=0 cellPadding=4 cellSpacing=0
width="66%">
<TBODY>
<TR>
<TD vAlign=top width=57 clasee="td">
<DIV align=right><FONT color=#000000
size=2>内容:</FONT></DIV></TD>
<TD width=329 clasee="td"><TEXTAREA <%if session("username")="" or pinglunlock=1 then response.write "disabled" %> class=input cols=40 name=content rows=8 style="background-image: url('images/diary_bg.jpg')"></TEXTAREA>
</TD></TR>
<TR>
<TD width=57 clasee="td"> </TD>
<TD width=329>
<%if pinglunlock=1 then%>
<FONT color=#cc6600
size=2>该日记主人已关闭评论功能,无法发表评论!</FONT>
<%elseif session("username")="" then%>
<FONT color=#cc6600
size=2>您尚未登陆,无法发表评论!</FONT><FONT size=2><A
href="login.asp"><FONT
color=#cc6600>请到随然日记本首页登陆</FONT></A></FONT>
<%else%>
<FONT color=#cc6600
size=2>您已经登陆,可以发表评论!</FONT>
<%end if%>
</TD></TR>
<TR>
<TD width=57 clasee="td">
<DIV align=right><INPUT name=diaryid type=hidden value=<%=request("id")%>> <INPUT name=username type=hidden value=<%=session("username")%>> </DIV></TD>
<TD width=329>
<DIV align=left> <INPUT name=Submit type=submit value=.发表评论.> <INPUT name=Submit2 type=reset value=".重 写.">
</DIV></TD></TR></TBODY></TABLE></FORM></DIV>
</TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width=609 align=center bgColor=#9c9a9d
border=0>
<TBODY>
<!--#include file="foot.asp"-->
</TR></TBODY></TABLE></TD></TR>
<TR>
<TD height=2><IMG height=8 src="images/top01.gif"
width=617></TD></TR></TBODY></TABLE>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -