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

📄 allguset.asp

📁 新婚来贺名单管理系统(单用户版)新婚举办婚宴需要登记来宾名单以及来宾给新人包的红包的礼金数 使用流程: 1.先将宴请宾客名单全部录入 2.婚宴当日为来宾签到 签到的同时记录来贺礼金(就是记录每位
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
  Session.Contents.Remove("MM_Username")
  Session.Contents.Remove("MM_UserAuthorization")
  MM_logoutRedirectPage = "index.asp"
  ' redirect with URL parameters (remove the "MM_Logoutnow" query param).
  if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
  If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    MM_newQS = "?"
    For Each Item In Request.QueryString
      If (Item <> "MM_Logoutnow") Then
        If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
        MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
      End If
    Next
    if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
  End If
  Response.Redirect(MM_logoutRedirectPage)
End If
%>
<!--#include file="Connections/conn.asp" -->
<%
if SessionN = "" Then
Response.Redirect "index.asp"
End if
%>
<%
Dim allGuestRS__MMColParam
allGuestRS__MMColParam = "1"
If (Session("MM_Username") <> "") Then 
  allGuestRS__MMColParam = Session("MM_Username")
  Session("allQD") = 1
End If
%>
<%
Dim allGuestRS
Dim allGuestRS_numRows

Set allGuestRS = Server.CreateObject("ADODB.Recordset")
allGuestRS.ActiveConnection = MM_conn_STRING
allGuestRS.Source = "SELECT * FROM Guest WHERE ren = '" + Replace(SessionN, "'", "''") + "'"
allGuestRS.CursorType = 0
allGuestRS.CursorLocation = 2
allGuestRS.LockType = 1
allGuestRS.Open()

allGuestRS_numRows = 0
%>
<%
Dim adminRs
Dim adminRs_numRows

Set adminRs = Server.CreateObject("ADODB.Recordset")
adminRs.ActiveConnection = MM_conn_STRING
adminRs.Source = "SELECT * FROM admin"
adminRs.CursorType = 0
adminRs.CursorLocation = 2
adminRs.LockType = 1
adminRs.Open()

adminRs_numRows = 0
%>

<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
allGuestRS_numRows = allGuestRS_numRows + Repeat1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim allGuestRS_total
Dim allGuestRS_first
Dim allGuestRS_last

' set the record count
allGuestRS_total = allGuestRS.RecordCount

' set the number of rows displayed on this page
If (allGuestRS_numRows < 0) Then
  allGuestRS_numRows = allGuestRS_total
Elseif (allGuestRS_numRows = 0) Then
  allGuestRS_numRows = 1
End If

' set the first and last displayed record
allGuestRS_first = 1
allGuestRS_last  = allGuestRS_first + allGuestRS_numRows - 1

' if we have the correct record count, check the other stats
If (allGuestRS_total <> -1) Then
  If (allGuestRS_first > allGuestRS_total) Then
    allGuestRS_first = allGuestRS_total
  End If
  If (allGuestRS_last > allGuestRS_total) Then
    allGuestRS_last = allGuestRS_total
  End If
  If (allGuestRS_numRows > allGuestRS_total) Then
    allGuestRS_numRows = allGuestRS_total
  End If
End If
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim allqdRS_total
Dim allqdRS_first
Dim allqdRS_last

' set the record count
allqdRS_total = allqdRS.RecordCount

' set the number of rows displayed on this page
If (allqdRS_numRows < 0) Then
  allqdRS_numRows = allqdRS_total
Elseif (allqdRS_numRows = 0) Then
  allqdRS_numRows = 1
End If

' set the first and last displayed record
allqdRS_first = 1
allqdRS_last  = allqdRS_first + allqdRS_numRows - 1

' if we have the correct record count, check the other stats
If (allqdRS_total <> -1) Then
  If (allqdRS_first > allqdRS_total) Then
    allqdRS_first = allqdRS_total
  End If
  If (allqdRS_last > allqdRS_total) Then
    allqdRS_last = allqdRS_total
  End If
  If (allqdRS_numRows > allqdRS_total) Then
    allqdRS_numRows = allqdRS_total
  End If
End If
%>


<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (allGuestRS_total = -1) Then

  ' count the total records by iterating through the recordset
  allGuestRS_total=0
  While (Not allGuestRS.EOF)
    allGuestRS_total = allGuestRS_total + 1
    allGuestRS.MoveNext
  Wend

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

  ' set the number of rows displayed on this page
  If (allGuestRS_numRows < 0 Or allGuestRS_numRows > allGuestRS_total) Then
    allGuestRS_numRows = allGuestRS_total
  End If

  ' set the first and last displayed record
  allGuestRS_first = 1
  allGuestRS_last = allGuestRS_first + allGuestRS_numRows - 1
  
  If (allGuestRS_first > allGuestRS_total) Then
    allGuestRS_first = allGuestRS_total
  End If
  If (allGuestRS_last > allGuestRS_total) Then
    allGuestRS_last = allGuestRS_total
  End If

End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (allqdRS_total = -1) Then

  ' count the total records by iterating through the recordset
  allqdRS_total=0
  While (Not allqdRS.EOF)
    allqdRS_total = allqdRS_total + 1
    allqdRS.MoveNext
  Wend

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

  ' set the number of rows displayed on this page
  If (allqdRS_numRows < 0 Or allqdRS_numRows > allqdRS_total) Then
    allqdRS_numRows = allqdRS_total
  End If

  ' set the first and last displayed record
  allqdRS_first = 1
  allqdRS_last = allqdRS_first + allqdRS_numRows - 1
  
  If (allqdRS_first > allqdRS_total) Then
    allqdRS_first = allqdRS_total
  End If
  If (allqdRS_last > allqdRS_total) Then
    allqdRS_last = allqdRS_total
  End If

End If
%>


<%
Dim MM_paramName 
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

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

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_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)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' 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
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新婚来贺名单管理系统</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 9pt;
	color: #000000;
}
body {
	background-image: url(images/bg.gif);
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: underline;
	color: #FFFF00;
}
a:active {
	text-decoration: none;
	color: #FF0000;
}
.style4 {color: #FFFF00}
.style3 {font-size: 18pt;
	font-family: "隶书";
	font-weight: bold;
	color: #FFFF00;
}
-->
</style></head>

<body>
<div align="center" class="style1">
  <p class="style3">新婚来贺名单管理系统</p>
</div>
<p align="center"><a href="index.asp"><img src="images/LOGO.gif" width="178" height="98" border="0"></a></p>
<div align="center">现在是北京时间&nbsp;<%=now()%>&nbsp;欢迎您:[&nbsp;<strong><%=SessionN%></strong>&nbsp;]! 预计客人[&nbsp;<strong><%=(allGuestRS_total)%></strong>&nbsp;]位,已到客人[&nbsp;<strong><%=(allqdRS_total)%></strong>&nbsp;]位!客人礼金共计[&nbsp;<strong><% 
if (allGuestRS_total) = "0" Then
Response.Write "¥0.00"
Else
Response.Write FormatCurrency((Mrs.Fields.Item("Expr1000").Value), -1, -1, -2, -2)
End if
%></strong>&nbsp;]元<br>
  <a href="XadminP.asp"><strong>修改管理员登陆信息</strong></a>
</div>
<hr width="100%" size="1" color="#FFFF00" noshade>
<table width="298" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><form name="form2" method="post" action="QianDao.asp">
    <td>输入客人姓名直接签到:</td>
    <td>
      <input name="Chname" type="text" id="Chname" size="15">
        <input type="submit" name="Submit" value="签到">
    </td>
  </form></tr>
</table><br>
<div align="center"><a href="<%= MM_Logout %>">退出系统</a>&nbsp;&nbsp;<a href="luru.asp"><strong>录入客人名单</strong></a>
  <% If Not allGuestRS.EOF Or Not allGuestRS.BOF Then %>
  <table width="100%" border="1" cellpadding="0" cellspacing="1" bordercolor="#990000" bgcolor="#FFFF00">
    <tr align="center" valign="middle" bgcolor="#FF0000">
      <td width="10%" height="20" bgcolor="#EC0000"><strong> 客人姓名 </strong></td>
      <td width="7%" bgcolor="#EC0000"><strong> 客人性别 </strong></td>
      <td width="10%" bgcolor="#EC0000"><strong>与新人关系</strong></td>
      <td width="8%" bgcolor="#EC0000"><strong>来贺礼金</strong></td>
      <td width="15%" bgcolor="#EC0000"><strong>更新时间</strong></td>
      <td width="18%" bgcolor="#EC0000"><strong>备注</strong></td>
      <td width="10%" bgcolor="#EC0000"><strong>联系电话</strong></td>
      <td width="10%" bgcolor="#EC0000"><strong>签到</strong></td>
      <td width="12%" bgcolor="#EC0000"><strong>管理</strong></td>
    </tr>
  </table>
  <% 
While ((Repeat1__numRows <> 0) AND (NOT allGuestRS.EOF)) 
%><br>
  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFF00" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FF0000'">
    <tr align="center" valign="middle" bgcolor="#FF0000"   onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFFF00'">
      <td width="10%" height="20"> <%=(allGuestRS.Fields.Item("Chname").Value)%></td>
      <td width="7%"> <%=(allGuestRS.Fields.Item("sex").Value)%></td>
      <td width="10%"><%=(allGuestRS.Fields.Item("Relation").Value)%></td>
      <td width="8%"><%=(allGuestRS.Fields.Item("M").Value)%> </td>
      <td width="15%"><%=(allGuestRS.Fields.Item("Ltime").Value)%></td>
      <td width="18%"><%=(allGuestRS.Fields.Item("TXT").Value)%></td>
      <td width="10%"><%=(allGuestRS.Fields.Item("tel").Value)%></td>
      <td width="10%"><%
	  if (allGuestRS.Fields.Item("Y").Value) = 0 Then
	  Response.Write "<a href=guestQD.asp?id="
	  Response.Write (allGuestRS.Fields.Item("id").Value)
	  Response.Write ">未签到</a>"
	  Else
	  Response.Write "<font color=FFFF00>已签到</font>"
	  End if
	  %></td>
      <td width="12%" bgcolor="#FF0000"><a href="Xguest.asp?id=<%=(allGuestRS.Fields.Item("id").Value)%>">修改</a>&nbsp;<a href="Dguest.asp?id=<%=(allGuestRS.Fields.Item("id").Value)%>">删除</a>&nbsp;<%
	  if (allGuestRS.Fields.Item("Y").Value) = 0 Then
	  Response.Write "<a href=guestQD.asp?id="
	  Response.Write (allGuestRS.Fields.Item("id").Value)
	  Response.Write "><font color=FFFF00><strong>签到</strong></font></a>"
	  Else
	  Response.Write ""
	  End if
	  %></td>
    </tr>
  </table>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  allGuestRS.MoveNext()
Wend
%>
  <% End If ' end Not allGuestRS.EOF Or NOT allGuestRS.BOF %>
</div>
<form name="form1" method="POST" action="<%=MM_editAction%>">
  <div align="center">
    <% If allGuestRS.EOF And allGuestRS.BOF Then %>
    <span class="style4">很抱歉!查无满足条件记录!</span>
    <% End If ' end allGuestRS.EOF And allGuestRS.BOF %>
<p><a href="<%= MM_Logout %>">退出系统</a>&nbsp;&nbsp;<a href="luru.asp"><strong>录入客人名单</strong></a></p>
  </div>
</form>
<p>&nbsp;</p>
<!--#include file="Copyright.htm" -->
</body>
</html>

<%
adminRs.Close()
Set adminRs = Nothing
%>
<%
allqdRS.Close()
Set allqdRS = Nothing
%>
<%
Mrs.Close()
Set Mrs = Nothing
%>
<%
allGuestRS.Close()
Set allGuestRS = Nothing
%>

⌨️ 快捷键说明

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