⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.asp

📁 心情日记 功能: 1、 在线添加日记 2、 在线删除日记 3、 自行设定每页显示日记数 4、 自行设定日记是否公开 5、 自行设定是否不登陆就可以签写日记 6、 支持HTML代码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
IF ProgramOpen<>"True" Then
 IF Session("PROADMIN")<>True Then
   Response.Redirect "Login.asp"
   Response.End
 End IF
End IF

IF Request("del")<>"" and Session("PROADMIN")=True Then
   Sql = "Delete From diary Where id="&Request("del")
   Conn.Execute(Sql)
End IF
%>
<html>
<head>
<title>零度简单日记本</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="style.css" rel=stylesheet><BGSOUND src="" loop=infinite>
<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
<style type="text/css">
<!--
.style1 {color: #808080}
-->
</style></head>
<body>
<table width="670" border="0" align="center" cellspacing="0" style="BORDER-COLLAPSE: collapse">
  <tr> 
    <td align="center"> <table width="460" height="207" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center"><img src="images/top.gif" width="770" height="210"></td>
        </tr>
      </table>
      <table width="600" border="0" cellspacing="0" cellpadding="0" style="BORDER-COLLAPSE: collapse">
        <tr>
          <td width="230">  
		    <script language="javascript" src="images/date.js"></script></td> 
          <td width="370">
		    <div align="left"><img src="images/nologin.gif" width="10" height="12">&nbsp;「<a href="http://jiangnan.hn8868.com/" target="_blank">&nbsp;本站主页&nbsp;</a>」「<a href="Write.asp">&nbsp;签写日记&nbsp;</a>」
              <%IF ProgramOpen="True" and Session("PROADMIN")<>True Then%>
           「<a href=Login1.asp>&nbsp;删除日记&nbsp;</a>」
            <%End IF%>
            <%IF Session("PROADMIN")=True Then%>
            「<a href=Logout.asp>&nbsp;<font color=red>退出管理</font>&nbsp;</a>」
            <%End IF%>&nbsp;<img src="images/nologin.gif" width="10" height="12"></div></td>
        </tr>
      </table>
      <br><br>
      <table cellspacing=3 cellpadding=5 width=600 border=1 style="BORDER-COLLAPSE: collapse">
        <tbody> 
        <%
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From diary Order BY id DESC"
Rs.Open Sql,conn,1,1
IF Not Rs.Eof Then

totalrecord=rs.recordcount
IF Request("s")="" Then
ShowNum=ShowTopic
Else
ShowNum=Request("s")
End IF
rs.pagesize=ShowNum
maxpage=rs.pagecount

requestpage=clng(request("p"))

if requestpage="" or requestpage=0 then
   requestpage=1
end if
if resquestpage>maxpage then
    resquestpage=maxpage
end if

if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if

for i=1 to rs.pagesize and not rs.bof
%>
        <tr> 
          <td width=600> 
            <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse">
              <tr> 
                <td class=font>  <%=Rs("year")%>年<%=Rs("month")%>月<%=Rs("day")%>日 
                  <%IF Rs("weather")<>"" Then%>
                      天气: <%=Rs("weather")%>
                  <%End IF%>
  心情:<img src="<%=rs("face")%>">                </td>
              </tr>
            </table>
          </td>
        </tr>

        <tr> 
          <td colspan="2" valign="top" height="27"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td><%=Rs("content")%></td>
              </tr>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
            </td>
        </tr>
        <tr align="right"> 
          <td height="100" colspan="2" valign="top"><img src="images/sign.gif" width="300" height="12"><br> 
            <%IF Session("PROADMIN")=True Then%>
            <a href=Default.asp?del=<%=Rs("id")%>><font color=red>删除</font></a> 
            <%End IF%>          <br></td>
        </tr>
        <%
Rs.MoveNext
if rs.eof then exit for
next
End IF
Rs.Close
Set Rs=Nothing
Call CloseDB
%>
        <tr> 
          <td colspan="2"> 
            <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
              <tr> 
                <td colspan="2" height="9">共有<%=maxpage%>页 [ 
                  <%
For i=1 to maxpage
Response.Write "<a href=Default.asp?p="&i&"&s="&ShowNum&">"&i&"</a> "
Next
%>
                  ] </td>
              </tr>
            </table>
          </td>
        </tr>
        </tbody> 
      </table>
       
      <table width="600" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="416" align="center" bgcolor="#FFFFFF"><img src="images/top01.gif" width="770" height="164" border="0"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -