<!--#include file="../fy_inc/fy.User.asp"-->
 <!--#include file="../fy_inc/cls_pageview.asp"-->
<% 
	 dim  UserHS
    	Set UserHS = New ACT_User
	IF Cbool(UserHS.UserLoginChecked)=false then
	  echo "<script>top.location.href ='login.asp' ;</script>"
	  Response.end
	End If	
 
  %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员中心</title>
<script language="JavaScript" src="main.js"></script>
 <link href="images/css.css" rel="stylesheet" type="text/css" />
 </head>
<body style="background-color:#fff">
<div id="head">
  <div id="logo"><a href="index.asp" alt=""><img src="images/logo_member.gif" alt="fycms"></a></div><div id="banner"></div>
</div>
<div id="membermenu">
<!--#include file="menu.asp"-->

</div>
 
<div id="main">
<div id="left">
  <div id="treemenu">
    <h5>信息管理</h5>
    <ul>
        <li><a href="logmoney.asp">资金明细</a></li>
		<li><a href="logpoint.asp">点券明细</a></li>
		<li><a href="logedays.asp">有效期明细</a></li>
 		<li><a href="card.asp">充值卡充值 </a></li>
		<li><a href="exchange.asp?Action=Point">兑换<%=fycms.fycms_Sys(24)%></a></li>
		<li><a href="exchange.asp?Action=Edays">兑换有效期</a></li>
		<li><a href="exchange.asp?Action=Money"><%=fycms.fycms_Sys(24)%>兑换账户资金</a></li>
     </ul>
  </div>
  <ol>
    <li class="local"><a href="<%= fycms.Domain%>">返回网站首页</a></li>
    <li class="exit"><a href="Checklogin.asp?Action=LoginOut">退出登录</a></li>
  </ol>
</div>
  <div id="right">

<p id="position"><strong>当前位置：</strong><a href="index.asp">会员中心</a> 点券明细 </p>
<div class="clear"></div>
<div class="clear"></div>

<table cellpadding="0" cellspacing="1" class="table_list">
<tr>
  <td bgcolor="#F7FCFF"><a href="logmoney.asp">资金明细</a>
				<a href="logpoint.asp">点券明细</a>
				<a href="logedays.asp">有效期明细</a>
				 </td>
</tr>
</table>
 <table cellpadding="0" cellspacing="1" class="table_list">
  <caption>查询我的点券明细&nbsp;<a href='?'><font color=red>·所有记录</font></a> ·<a href='?Flag=1'>收入记录[<%=conn.execute("select count(id) from Point_Log_fy where PointFlag=1 and UserID=" & UserHS.UserID & "")(0)%>]</a> ·<a href='?Flag=2'>支出记录[<%=conn.execute("select count(id) from Point_Log_fy where PointFlag=2 and UserID=" & UserHS.UserID & "")(0)%>]</a>
		  </caption>
<tr>
<th width="80" height="25" align="center"><strong> 用户名</strong></th>
<th width="180" height="25" align="center"><strong>消费时间</strong></th>
<th width="71" height="25" align="center"><strong>收入点券</strong></th>
<th width="74" align="center"><strong>支出点券</strong></th>
<th width="55" height="25" align="center"><strong>摘要</strong></th>
<th width="72" height="25" align="center"><strong>余额</strong></th>
<th width="72" height="25" align="center"><strong>重复次数</strong></th>
<th width="75" height="25" align="center"><strong> 操作员</strong></th>
<th width="239" align="center"><strong>备注</strong></th>
</tr>
<% 
 
 	Dim strLocalUrl,InPoint,OutPoint
	strLocalUrl = request.ServerVariables("SCRIPT_NAME")
	
	Dim intPageNow
	intPageNow = request.QueryString("page")
	
	Dim intPageSize, strPageInfo
	intPageSize = 20
	
	Dim arrinfo, i
	Dim sql, sqlCount,Sqls,pages
	pages = "page"
 
 
 If ChkNumeric(fycms.S("Flag"))=1 Or ChkNumeric(fycms.S("Flag"))=2 Then
 	sql="Select ID,UserID,AddDate,IP,Point,PointFlag,Times,Userlog,Descript,CurrPoint From Point_Log_fy Where PointFlag=" & ChkNumeric(fycms.S("Flag")) & " And  UserID=" & UserHS.UserID & " order by id desc"
	Else
	  sql="Select ID,UserID,AddDate,IP,Point,PointFlag,Times,Userlog,Descript,CurrPoint From Point_Log_fy Where UserID=" & UserHS.UserID & " order by id desc"
	End if
 
     	sqlCount = "SELECT Count([ID])" & _
			" FROM [Point_Log_fy]  Where UserID=" & UserHS.UserID
		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 = pages
		clsRecordInfo.objConn = Conn		
		arrinfo = clsRecordInfo.arrinfo
		strPageInfo = clsRecordInfo.strPageInfo
		Set clsRecordInfo = nothing
 		If IsArray(arrinfo) Then
			For i = 0 to UBound(arrinfo, 2)
 	%>
   <form action="?" method="post" name="fycmsform" >
 <tr>
 


      <td class="splittd" width="80" align="center"><%=fycms.UserM(arrinfo(1,i))%></td>
    <td class="splittd" align="center"><%=arrinfo(2,i)%></td>
    <td class="splittd" align="right"><%if arrinfo(5,I)=1 Then echo arrinfo(4,I) & "点":InPoint=InPoint+arrinfo(4,I) ELSE echo "-"%></td>
    <td class="splittd" align="right"><%if arrinfo(5,I)=2 Then echo arrinfo(4,I) & "点":OutPoint=OutPoint+arrinfo(4,I) ELSE echo "-"%></td>
    <td class="splittd" align="center"><%if arrinfo(5,I)=1 Then echo "<font color=red>收入</font>" Else echo "支出"%></td>
    <td class="splittd" align="center"><%=arrinfo(9,i)%></td>
    <td class="splittd" align="center"><%=arrinfo(6,i)%></td>
    <td class="splittd" align="center"><%=arrinfo(7,i)%></td>
	<td class="splittd"><%=arrinfo(8,i)%></td>
  
 
</tr>

<% 
	Next
	End If
	%>
  
  
  <tr >    <td class="splittd" colspan='5' align='right'>本页合计：</td>    <td class="splittd" align='right'><%=InPoint%>点</td>    <td class="splittd" align='right'><%=ChkNumeric(OutPoint)%>点</td>    <td class="splittd" colspan='4'>&nbsp;</td>  </tr> 
  <% Dim totalinpoint:totalinpoint=conn.execute("Select sum(Point) From Point_Log_fy where UserID=" & UserHS.UserID & " AND PointFlag=1")(0)
     Dim TotalOutPoint:TotalOutPoint=conn.execute("Select sum(Point) From Point_Log_fy where UserID=" & UserHS.UserID & " AND  PointFlag=2")(0)
	 If ChkNumeric(totalInPoint)=0 Then totalInPoint=0
	 If ChkNumeric(TotalOutPoint)=0 Then TotalOutPoint=0
  %>
    <tr>    <td class="splittd" colspan='5' align='right'>所有合计：</td>    <td class="splittd" align='right'><%=ChkNumeric(totalInPoint)%>点</td>    <td class="splittd" align='right'><%=ChkNumeric(totalOutPoint)%>点</td>    <td class="splittd" colspan='4' align='center'>累计还剩：<%=totalInPoint-totalOutPoint%>点</td>  </tr> 
  
   <tr>
    <td colspan="12">
<div id="pages">
<%= strPageInfo%>
 </div>     
    </td>
    </tr>   
    
    </form>
     </table>
 
<span id="toggle_pannel" style="display:none;"></span>
<div class="clear"></div>
</div>
  </div>  
<!--#include file="foot.asp"-->
 
</body>
</html>