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

📄 default.asp

📁 潇湘在线日记
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->

<%
function HTMLcode(fString)
if not isnull(fString) then
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
    fString = Replace(fString, CHR(10), "<BR>")
    HTMLcode = fString
end if
end function


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%></title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="资源" name=keywords>
<LINK href="style.css" type=text/css rel=stylesheet>
<script language="JavaScript" type="text/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>
</head>
<body bgColor=#ffffff leftMargin=0 topMargin=0>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="10%">&nbsp;</td>
    <td width="90%"><table width=600 border=0 align="center" cellpadding=1 cellspacing=1>
        <tbody>
          <tr align=right> 
            <td colspan=6> </td>
          </tr>
          <tr> 
            <td width="119"><img src="image/do.gif"  border="0"> <%=title%></td>
            <td width="474"><form name="form1" method="post" action="search.asp">
                <input name="sear" type="text" size="30" maxlength="30">
                <input type="submit" name="Submit" value="查询">
              </form></td>
          </tr>
          <%
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 colspan="2" valign="top"><table cellspacing=0 cellpadding=0 
  border=0 width=496>
                <tbody>
                  <tr> 
                    <td width="4"><img height=18 src="image/f1.gif" 
      width=18 border=0></td>
                    <td background=image/f2.gif height="18">&nbsp;</td>
                    <td width="4"><img height=18 src="image/f1.gif" 
      width=18 border=0></td>
                  </tr>
                  <tr> 
                    <td background=image/f3.gif width="18">&nbsp;</td>
                    <td valign=top width="100%"> <table cellpadding=0 border=0 width=100%>
                        <tbody>
                          <tr> 
                            <td width="53%"><img src="image/a.gif" width="10" height="10">&nbsp;<%=Rs("date")%>&nbsp;<%=Rs("title")%> 
                            </td>
                            <td width="47%" align="center"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                              <%IF Rs("weather")<>"" Then%>
                              <%=Rs("weather")%> 
                              <%End IF%>
                            </td>
                          </tr>
                          <tr> 
                            <td style="WORD-SPACING: 1px; LINE-HEIGHT: 150%"  valign="top" colspan="2"><%=htmlcode(server.htmlencode(Rs("content")))%> 
                              <%IF Session("PROADMIN")="True" Then%>
                              <br> <a href=Default.asp?del=<%=Rs("id")%>><font color=red>删除</font></a>&nbsp;&nbsp;<a href=edit.asp?edit=<%=Rs("id")%>><font color=red>编辑</font></a> 
                              <%End IF%>
                            </td>
                          </tr>
                        </tbody>
                      </table></td>
                    <td valign=top background=image/f3.gif width="18">&nbsp;</td>
                  </tr>
                  <tr> 
                    <td width="4"><img height=18 src="image/f1.gif" 
      width=18 border=0></td>
                    <td background=image/f2.gif></td>
                    <td width="4"><img height=18 src="image/f1.gif" 
      width=18 border=0></td>
                  </tr>
                </tbody>
              </table></td>
          </tr>
          <%
Rs.MoveNext
if rs.eof then exit for
next
End IF
Rs.Close
Set Rs=Nothing
Call CloseDB
%>
          <tr> 
            <td height="24" colspan="2"> <table width="496" border="0" align="center" cellpadding="2" cellspacing="0">
                <tr> 
                  <td width="31%" height="22">共有 <%=maxpage%> 页&nbsp;[ 
                    <%
For i=1 to maxpage
Response.Write "<a href=Default.asp?p="&i&"&s="&ShowNum&">"&i&"</a> "
Next
%>
                    ]&nbsp;&nbsp;</td>
                  <td width="69%" height="22" align="left"> &nbsp; <div align="right"><a href="login.asp"><img src="image/mail.gif"  alt="登陆" border="0"></a> 
                      <%IF Session("PROADMIN")="True" or POPWrite="True" Then%>
                      &nbsp;<a href="Write.asp"><img src="image/mail.gif"  alt="签写" border="0"></a> 
                      <%End IF%>
                      <%IF Session("PROADMIN")="True" then%>
                      &nbsp;<a href=Logout.asp><img src="image/mail.gif" alt="退出" border="0"></a> 
                      <%End IF%>
                    </div></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="24" colspan="2">&nbsp;</td>
          </tr>
          <tr> 
            <td height="24" colspan="2"><table cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#4F4F4F" width="496">
                <tr> 
                  <td width="100%" align=center> Copyright &copy; <a href="http://www.mapdof.com">麻婆豆腐工作室 纳米</a> &nbsp; Ver:mapdofplus</td>
                </tr>
              </table></td>
          </tr>
        </tbody>
      </table></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

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