<!--#include file="../fy.Function.asp"-->
<!--#include file="../../fy_inc/cls_pageview.asp"-->
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>content</title>
<link rel="stylesheet" type="text/css" href="../css/base.css">
<link rel="stylesheet" type="text/css" href="../css/content.css">
</head>
<body>
<div class="content"> 
	<div class="breadnav">当前位置：<a href="#">后台首页</a> >> 会员点卷日志</div>
   <% 	ConnectionDatabase	

		if request("Action")="del" then
		  Dim Param
		  Select Case ChkNumeric("DelType")
		   Case 1
			Param="datediff('d',adddate," & NowString & ")>11"
		   Case 2
			Param="datediff('d',adddate," & NowString & ")>31"
		   Case 3
			 Param="datediff('d',adddate," & NowString & ")>61"
		   Case 4
			Param="datediff('d',adddate," & NowString & ")>91"
		   Case 5
			Param="datediff('d',adddate," & NowString & ")>181"
		   Case 6
			Param="datediff('d',adddate," & NowString & ")>366"
		  End Select
		  If Param<>"" Then Conn.Execute("Delete From Point_Log_fy Where 1=1 and " & Param)
		  Call fycms.ActErr("已按所给的条件，删除了点券明细的相关记录！","","")
		end if

Dim strLocalUrl
	strLocalUrl = request.ServerVariables("SCRIPT_NAME")
	Dim intPageNow
	intPageNow = request.QueryString("page")
	Dim intPageSize, strPageInfo
	intPageSize = 10
	Dim arrinfo, i
	Dim sql, sqlCount
	sql = "SELECT [ID],[UserID],[AddDate],[IP],[Point],[PointFlag],[Times],[UserLog],[Descript]" & _
		" FROM [Point_Log_fy]"& _
		"ORDER BY [ID] deSC"
	sqlCount = "SELECT Count([ID])" & _
			" FROM [Point_Log_fy]"
		Dim clsRecordInfo
		Set clsRecordInfo = New Cls_PageView
			clsRecordInfo.intRecordCount = 2816
			clsRecordInfo.strSqlCount = sqlCount
			clsRecordInfo.strSql = sql
			clsRecordInfo.intPageSize = intPageSize
			clsRecordInfo.intPageNow = intPageNow
			clsRecordInfo.strPageUrl = strLocalUrl
			clsRecordInfo.strPageVar = "page"
		clsRecordInfo.objConn = Conn		
		arrinfo = clsRecordInfo.arrinfo
		strPageInfo = clsRecordInfo.strPageInfo
		Set clsRecordInfo = nothing
	 %>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <thead>
	 <tr>
      <th>用户名</th>
	  <th>消费时间</th>
	  <th>IP地址</th>
	  <th>收入点券</th>
	  <th>支出点券</th>
	  <th>摘要</th>
	  <th>重复次数</th>
	  <th>操作员</th>
	  <th>备注</th>
	  </tr>
    </thead>
  <%
		Dim bgColor
		If IsArray(arrinfo) Then
			For i = 0 to UBound(arrinfo, 2)
	%>
  <tr>
    <td><%= arrinfo(1,i) %></td>
    <td><%= arrinfo(2,i) %></td>
    <td><%= arrinfo(3,i) %></td>
    <td><%= arrinfo(4,i) %></td>
    <td><%= arrinfo(5,i) %></td>
    <td><%if arrinfo(5,i)=1 Then echo "<font color=red>收入</font>" Else echo "支出"%></td>
    <td><%= arrinfo(6,i) %></td>
    <td><%= arrinfo(7,i) %></td>
    <td><%= arrinfo(8,i) %></td>
  </tr>
  <% 
	Next
	End If
	%>
    </table>
    <div class="pagelist">
    	<%= strPageInfo%>
   </div>
</div>
</body>
</html>
