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

📄 admin_adddiary.asp

📁 功能简介: 1) 首页投票调查系统 2)FLASH导航清新直观(带FLA源文件
💻 ASP
📖 第 1 页 / 共 3 页
字号:

  ' if we walked off the end, set the offset based on page size
  If (MM_rs.EOF And Not MM_paramIsDefined) Then
    If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
      If ((MM_rsCount Mod MM_size) > 0) Then
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If

  ' reset the cursor to the beginning
  If (MM_rs.CursorType > 0) Then
    MM_rs.MoveFirst
  Else
    MM_rs.Requery
  End If

  ' move the cursor to the selected record
  i = 0
  While (Not MM_rs.EOF And i < MM_offset)
    MM_rs.MoveNext
    i = i + 1
  Wend
End If
%>
<%
' *** Move To Record: update recordset stats

' set the first and last displayed record
rsdia_first = MM_offset + 1
rsdia_last  = MM_offset + MM_size
If (MM_rsCount <> -1) Then
  If (rsdia_first > MM_rsCount) Then rsdia_first = MM_rsCount
  If (rsdia_last > MM_rsCount) Then rsdia_last = MM_rsCount
End If

' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 0) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    params = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For i = 0 To UBound(params)
      nextItem = Left(params(i), InStr(params(i),"=") - 1)
      If (StrComp(nextItem,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & params(i)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If

' set the strings for the move to links
If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&"
urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = urlStr & "0"
MM_moveLast  = urlStr & "-1"
MM_moveNext  = urlStr & Cstr(MM_offset + MM_size)
prev = MM_offset - MM_size
If (prev < 0) Then prev = 0
MM_movePrev  = urlStr & Cstr(prev)
%>
<html>
<head>
<title>NPW0.92-新的日记碎语</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="mystyle.css" type="text/css">
</head>
<body bgcolor="#D4DFE3" text="#000000" leftmargin="0" topmargin="0">
<!--#include file="incadmintop.asp" -->
<table width="100%" border="0" cellspacing="1" bgcolor="#B5C7D6">
  <tr bgcolor="#D6DFE7"> 
    <td width="28%" valign="top" bgcolor="#D6DFE7"> 
      <!--#include file="incadminleftmenu.asp" -->
	  </td>
    <td> 
      <table width="98%" border="0" cellspacing="1" align="center">
        <tr> 
          <td height="8"></td>
        </tr>
      </table>
      <table width="98%" border="0" cellspacing="1" align="center" bgcolor="#B5C7D6">
        <tr> 
          <td>&nbsp;<a href="index.asp"><img src="images/point1.gif" width="13" height="13" border="0" alt="返回首页"></a></td>
          <td class="fontcn" height="23"> 
            <div align="right">新的<a href="index.asp" target="_blank">日记碎语</a></div>
          </td>
        </tr>
      </table>
      <table width="98%" border="0" cellspacing="1" align="center" bgcolor="#D6D3CE">
        <tr bgcolor="#F7FFFF"> 
          <td width="6%" class="font" height="13"> 
            <div align="center"><b>id</b></div>
          </td>
          <td width="58%" class="font" height="13"> 
            <div align="center"><b>post date</b></div>
          </td>
          <td width="36%" class="font" height="13"> 
            <div align="center"><b>actions</b></div>
          </td>
        </tr>
        <% 
While ((Repeat1__numRows <> 0) AND (NOT rsdia.EOF)) 
%>
        <tr bgcolor="#F7FFFF"> 
          <td width="6%" class="font"> 
            <div align="center"><%=(rsdia.Fields.Item("d_id").Value)%></div>
          </td>
          <td width="58%" class="font"> 
            <div align="center"><%=(rsdia.Fields.Item("d_date").Value)%></div>
          </td>
          <td width="36%" class="font"> 
            <div align="center"><a href="admin_deldia.asp?d_id=<%=(rsdia.Fields.Item("d_id").Value)%>">del</a> 
              &nbsp;&nbsp;<a href="admin_editdia.asp?d_id=<%=(rsdia.Fields.Item("d_id").Value)%>">edit</a> 
              &nbsp;&nbsp;<a href="admin_viewdia.asp?d_id=<%=(rsdia.Fields.Item("d_id").Value)%>" target="_blank">view</a></div>
          </td>
        </tr>
        <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsdia.MoveNext()
Wend
%>
        <tr> 
          <% If rsdia.EOF And rsdia.BOF Then %>
          <td width="6%" class="fontcn" height="23" colspan="3" align="right" bgcolor="#F7FFFF"> 
            <div align="center">目前数据库内尚无记录!</div>
          </td>
          <% End If ' end rsdia.EOF And rsdia.BOF %>
        </tr>
        <tr> 
          <td width="6%" class="font" colspan="3" align="right" bgcolor="#F7FFFF"> 
            <table border="0" width="50%" class="font">
              <tr> 
                <td width="23%" align="center"> 
                  <% If MM_offset <> 0 Then %>
                  <a href="<%=MM_moveFirst%>">First</a> 
                  <% End If ' end MM_offset <> 0 %>
                </td>
                <td width="31%" align="center"> 
                  <% If MM_offset <> 0 Then %>
                  <a href="<%=MM_movePrev%>">Previous</a> 
                  <% End If ' end MM_offset <> 0 %>
                </td>
                <td width="23%" align="center"> 
                  <% If Not MM_atTotal Then %>
                  <a href="<%=MM_moveNext%>">Next</a> 
                  <% End If ' end Not MM_atTotal %>
                </td>
                <td width="23%" align="center"> 
                  <% If Not MM_atTotal Then %>
                  <a href="<%=MM_moveLast%>">Last</a> 
                  <% End If ' end Not MM_atTotal %>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <br>
      <table width="98%" border="0" cellspacing="1" align="center" class="docbutton">
        <form name="form1" method="POST" action="<%=MM_editAction%>">
          <tr bgcolor="#F7FFFF"> 
            <td colspan="2" height="25"><img src="images/sign.gif" width="299" height="12"></td>
          </tr>
		  <tr bgcolor="#F7FFFF"> 

⌨️ 快捷键说明

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