📄 diary_look.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #include file="conn.asp" -->
<!-- #include file="../diary_folder.asp" -->
<%
Function Html_Encode(str) '将字符串中的str中的HTML代码进行过滤
If Trim(Str)="" Or IsNull(str) then
Html_Encode=""
else
'str=Replace(str,">",">")
'str=Replace(str,"<","<")
str=replace(str,"'","'") '单引号
str=replace(str,""","""") '双引号
str=replace(str,">",">") '>
str=replace(str,"<","<") '<
str=replace(str,"&","&") '&
'str=Replace(str,Chr(32)," ")
'str=Replace(str,Chr(9)," ")
'str=Replace(str,Chr(34),""")
'str=Replace(str,Chr(39),"'")
'str=Replace(str,Chr(13),"")
'str=Replace(str,Chr(10) & Chr(10), "</p><p>")
'str=Replace(str,Chr(10),"<br> ")
Html_Encode=str
end if
End Function
id = Request("id")
set rs=server.CreateObject("ADODB.Recordset")
if id = "" then '写入日记成功后点击查看
SQL="select top 1 * from diary order by date_insert desc"
else
SQL="select * from diary where id ="&id
end if
rs.open SQL,conn,2,3
if not rs.eof then
rs("look_counter") = rs("look_counter")+1
rs.update
id=rs("id")
Response.Write("id="&rs("id")&"&")
Response.Write("HYname="&rs("HYname")&"&")
set HYrs=server.CreateObject("ADODB.Recordset")
HYSQL="select * from HuiYuan where HYname='"&rs("HYname")&"'"
HYrs.open HYSQL,conn,1,1
body=Html_Encode(rs("body"))
'日记本访问地址
diary_qianMing = "<br> <font color='#FF6600' SIZE= '12' FACE= '宋体'>此日记本访问地址: "& diary_folder &"/diary.asp?id="&HYrs("id")&"</font>"
diary_qianMing = diary_qianMing & "<br><font color='#B1B1B1' SIZE= '12' FACE= '宋体'>--------------------------------------------</font><br><font color='#335CB9' SIZE= '12' FACE= '宋体'>"&HYrs("diary_foreword")&"</font><br>"
Response.Write("diary_qianMing="&diary_qianMing&"&")
Response.Write("body="&body&"&")
if not rs("date_UP")="" then
HYname_UP = "<br><font color='#B1B1B1' SIZE= '12' FACE= '宋体'>-------此篇日记由</font><font color='#335CB9' SIZE= '12' FACE= '宋体'>"&rs("HYname_UP")&"</font><font color='#B1B1B1' SIZE= '12' FACE= '宋体'>于</font><font color='#335CB9' SIZE= '12' FACE= '宋体'>"&rs("date_UP")&"</font><font color='#B1B1B1' SIZE= '12' FACE= '宋体'>编辑过!</font><br>"
Response.Write("HYname_UP="&HYname_UP&"&")
end if
Response.Write("date_book="&rs("date_insert")&"&")
Response.Write("week="&rs("week")&"&")
Response.Write("weather="&rs("weather")&"&")
Response.Write("ifPassword="&rs("ifPassword")&"&")
Response.Write("title="&rs("title")&"&")
Response.Write("look_counter="&rs("look_counter")&"&")
Response.Write("bg_sound="&rs("bg_sound")&"&")
set rsPL=server.CreateObject("ADODB.Recordset")
PLSQL="select * from diary_PL where id ="&id&" order by PL_date desc"
rsPL.open PLSQL,conn,1,1
if not rsPL.eof then
rsPL.movefirst
do while not rsPL.eof
HYnamePL=rsPL("HYname")
PL_body=rsPL("PL_body")
PL_date=rsPL("PL_date")
PL_all_body1 = "<font color='#945531'>"&HYnamePL&"</font>/"&FormatDateTime(PL_date,2)&"<br><font color='#989898'>"&PL_body&"</font><br>"
PL_all_body2 = PL_all_body2&PL_all_body1
rsPL.movenext
loop
Response.Write("PL_counter="&rsPL.Recordcount&"&")
Response.Write("PL_all_body=<font color='#335CB9' size='12'><b>网友评论:</b></font><br>"&PL_all_body2&"&")
else
Response.Write("PL_counter="&rsPL.Recordcount&"&")
Response.Write("PL_all_body=<font color='#335CB9' size='12'><b>网友评论:</b></font><br>还没有相关评论!&")
end if
Response.Write("look_diary=1&")
else
Response.Write("look_diary=0")
end if
rs.close
set rs=Nothing
CloseDataConn()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -