<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="../Conn.asp"-->
<!--#include file="../Task/TaskConfig.asp"-->
<!--#include file="../HSK_Cls/HSK.CommonCls.asp"-->
<!--#include file="../HSK_Cls/HSK.AdministratorCls.asp"-->
<!--#include file="Include/Session.asp"-->
<%
Dim KSCls
Set KSCls = New Statistics
KSCls.HSK_Run()
Set KSCls = Nothing

Class Statistics
        Private KS,RS
		Private Sub Class_Initialize()
			Set KS=New PublicCls
		End Sub
        Private Sub Class_Terminate()
			Call CloseConn()
			Set KS=Nothing
		End Sub
        Sub HSK_Run()
'		On Error Resume Next
		If Not KS.ReturnPowerResult(0, "KMUA10005") Then
				Response.Write ("<script>$(parent.document).find('#BottomFrame')[0].src='javascript:history.back();';</script>")
				Call KS.ReturnErr(1, "")
		End If
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Include/Admin_Style.CSS" rel="stylesheet" type="text/css">
<style type="text/css">
.blue{color:#00F;}
.gray{color:#999;}
.red{color:#F00; height:42px;}
.orange,.orange a{color:#FF5500;}
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div class='topdashed sort'>账务综合统计</div>
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
  <tr class="sort">
      <td width=100 height="30" colspan="3" align="left">&nbsp; 利润统计</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td colspan="2" align=left class="splittd red">说明：账号可用资金及可用发布点包含管理员及新注册会员赠送资金和发布点，以下有关发布点价格均按默认<span class="blue"><%=FormatNumber(TaskCardPrice1,2,-1)%></span>元/点计算,供参考值,因会有购买一钻或二钻卡价格差异)</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">所有用户账号可用余额共计：<span class="orange"><%
		Dim NewRegUserMoney: NewRegUserMoney = KS.Setting(38): If Not IsNumerIc(NewRegUserMoney) Then NewRegUserMoney=0
		Dim NewRegUserPoint
		If KS.ChkClng(KS.U_G(2,"chargetype")) = 1 Then
			NewRegUserPoint = KS.ChkClng(KS.U_G(2,"grouppoint"))
		Else
			NewRegUserPoint = KS.Setting(40)
		End If
		If Not IsNumeric(NewRegUserPoint) Then NewRegUserPoint=0
	    Dim TotalMoney: TotalMoney = Conn.Execute("SELECT SUM(Money) FROM KS_User WHERE (Money > 0)")(0)
		Dim NewRegTotalMoney: NewRegTotalMoney = Conn.Execute("SELECT SUM(Money) FROM KS_User WHERE (Money = " & NewRegUserMoney & ") AND (Point = " & NewRegUserPoint & ") AND (KS_TotalScore = 0)")(0)
		KS.Echo TotalMoney
		%>
	  </span> 元<br><span class="gray">[含新注册会员未产生消费的赠送金额：<%=NewRegTotalMoney%> 元]</span></td>
      <td align=left class="splittd">已发布未完成任务押扣金额：<span class="orange"><%
	  Dim NFTotalPrice: NFTotalPrice = Conn.Execute("SELECT SUM(KS_TotalPrice) FROM KS_U_sxyrw WHERE (KS_Status < 5)")(0)
	  If Not KS.IsNul(NFTotalPrice) Then
	  	  KS.Echo NFTotalPrice
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">所有用户账号可用发布点共计：<span class="orange"><%
	  Dim AccountPoint: AccountPoint = Conn.Execute("SELECT SUM(Point) FROM KS_User WHERE (Point > 0)")(0)
	  Dim NewRegTotalPoint: NewRegTotalPoint = Conn.Execute("SELECT SUM(Point) FROM KS_User WHERE (Money = " & NewRegUserMoney & ") AND (Point = " & NewRegUserPoint & ") AND (KS_TotalScore = 0)")(0)
	  If Not KS.IsNul(AccountPoint) Then
		  KS.Echo AccountPoint
	  Else
	  	  AccountPoint = 0
	  	  KS.Echo "0"
	  End If
	  %>
	  </span> 点<br><span class="gray">[含新注册会员未产生消费的赠送发布点：<%=NewRegTotalPoint%> 点]</span></td>
      <td align=left class="splittd">合计人民币约：<span class="orange"><%=AccountPoint * TaskCardPrice1%></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">已发布未完成任务押扣发布点共计：<span class="orange"><%
	  Dim NFTotalPoint: NFTotalPoint = Conn.Execute("SELECT SUM(KS_TotalPoint) FROM KS_U_sxyrw WHERE (KS_Status < 5)")(0)
	  If Not KS.IsNul(NFTotalPoint) Then
	  	  KS.Echo NFTotalPoint
	  Else
	  	  NFTotalPoint = 0
		  KS.Echo "0"
	  End If
	  %></span> 点</td>
      <td align=left class="splittd">合计人民币约：<span class="orange"><%=NFTotalPoint * TaskCardPrice1%></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">平台充值共计：<span class="orange"><%=Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 1) AND (Remark <> '注册新会员,赠送!') AND (Remark <> '发布点兑换所得') AND (InfoID = 0)")(0)%></span> 元</td>
      <td align=left class="splittd">今日充值共计：<span class="orange"><%
	  Dim TodayInMoney: TodayInMoney = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 1) AND (Remark <> '注册新会员,赠送!') AND (Remark <> '发布点兑换所得') AND (InfoID = 0) AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  If Not KS.IsNul(TodayInMoney) Then
	  	  KS.Echo TodayInMoney
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元 &nbsp; 昨日充值共计：<span class="orange"><%
	  Dim YesterDay_InMoney: YesterDay_InMoney = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 1) AND (Remark <> '注册新会员,赠送!') AND (Remark <> '发布点兑换所得') AND (InfoID = 0) AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  If Not KS.IsNul(YesterDay_InMoney) Then
	  	  KS.Echo YesterDay_InMoney
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元</td>
  </tr>
<tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">平台发布点兑换资金共计：<span class="orange"><%
	  Dim Total_Point2Money: Total_Point2Money = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 1) AND (Remark = '发布点兑换所得')")(0)
	  If Not KS.IsNul(Total_Point2Money) Then
	  	  KS.Echo Total_Point2Money
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元</td>
      <td align=left class="splittd">今日发布点兑换资金共计：<span class="orange"><%
	  Dim Today_Point2Money: Today_Point2Money = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 1) AND (Remark = '发布点兑换所得') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  If Not KS.IsNul(Today_Point2Money) Then
	  	  KS.Echo Today_Point2Money
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元 &nbsp; 昨日发布点兑换资金共计：<span class="orange">
        <%
	  Dim YesterDay_Point2Money: YesterDay_Point2Money = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 1) AND (Remark = '发布点兑换所得') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  If Not KS.IsNul(YesterDay_Point2Money) Then
	  	  KS.Echo YesterDay_Point2Money
	  Else
		  KS.Echo "0"
	  End If
	  %>
      </span>元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
    <td width="8%" class="splittd">&nbsp;</td>
      <td width="35%" align=left class="splittd" height="30">平台提现共计：<span class="orange"><%
	  Dim TiXian: TiXian = Conn.Execute("SELECT SUM(Money) FROM TiXian WHERE Status<>1")(0)
	  If Not KS.IsNul(TiXian) Then
	  	  KS.Echo TiXian
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元</td>
      <td align=left class="splittd">今日提现共计：<span class="orange"><%
	  Dim TodayTiXian: TodayTiXian = Conn.Execute("SELECT SUM(Money) FROM TiXian WHERE Status<>1 AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = 0)")(0)
	  If Not KS.IsNul(TodayTiXian) Then
	  	  KS.Echo TodayTiXian
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元 &nbsp; 昨日提现共计：<span class="orange"><%
	  Dim YesterDay_TiXian: YesterDay_TiXian = Conn.Execute("SELECT SUM(Money) FROM TiXian WHERE Status<>1 AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = -1)")(0)
	  If Not KS.IsNul(YesterDay_TiXian) Then
	  	  KS.Echo YesterDay_TiXian
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">今日购买发布点：<span class="orange"><%
	  Dim TodayPoint: TodayPoint = Conn.Execute("SELECT SUM(Point) FROM KS_LogPoint WHERE (InOrOutFlag = 1) AND (Descript LIKE '%购买%' OR Descript = '通过充值卡获得的点数' OR Descript = '账户资金兑换所得') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = 0)")(0)
	  If Not KS.IsNul(TodayPoint) Then
		  KS.Echo TodayPoint
	  Else
	  	  TodayPoint = 0
		  KS.Echo TodayPoint
	  End If
	  %></span> 点</td>
      <td align=left class="splittd">今日购买发布点合计约：<span class="orange"><%=TodayPoint * TaskCardPrice1%></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">昨日购买发布点：<span class="orange"><%
	  Dim YesterDay_Point: YesterDay_Point = Conn.Execute("SELECT SUM(Point) FROM KS_LogPoint WHERE (InOrOutFlag = 1) AND (Descript LIKE '%购买%' OR Descript = '通过充值卡获得的点数' OR Descript = '账户资金兑换所得') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = -1)")(0)
	  If Not KS.IsNul(YesterDay_Point) Then
		  KS.Echo YesterDay_Point
	  Else
	  	  YesterDay_Point = 0
		  KS.Echo YesterDay_Point
	  End If
	  %></span> 点</td>
      <td align=left class="splittd">昨日购买发布点合计约：<span class="orange"><%=YesterDay_Point * TaskCardPrice1%></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
      <td width="35%" align=left class="splittd" height="30">今日完成任务利润发布点共计：<span class="orange">
      <%
	  Dim Today_PointProfit: Today_PointProfit = Conn.Execute("SELECT SUM(Point) FROM LogProfit WHERE IncomeType = 1 AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = 0)")(0)
	  Dim Today_DelTaskProfit: Today_DelTaskProfit = Conn.Execute("SELECT SUM(Point) FROM LogProfit WHERE IncomeType = 2 AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = 0)")(0)
	  If Not KS.IsNul(Today_PointProfit) Then
		  KS.Echo Today_PointProfit
	  Else
	  	  Today_PointProfit = 0
	      KS.Echo "0"
	  End IF
	  %>
      </span> 点<%
	  If Not KS.IsNul(Today_DelTaskProfit) Then
		  KS.Echo " + 删除任务利润发布点共计：<span class=""orange"">" & Today_DelTaskProfit & "</span> 点"
	  Else
	  	  Today_DelTaskProfit = 0
	  End IF
	  %></td>
      <td align=left class="splittd">今日任务利润合计约：<span class="orange"><%=(Today_PointProfit + Today_DelTaskProfit) * TaskCardPrice1%></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
      <td width="35%" align=left class="splittd" height="30">昨日完成任务利润发布点共计：<span class="orange">
      <%
	  Dim YesterDay_PointProfit: YesterDay_PointProfit = Conn.Execute("SELECT SUM(Point) FROM LogProfit WHERE IncomeType = 1 AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = -1)")(0)
	  Dim YesterDay_DelTaskProfit: YesterDay_DelTaskProfit = Conn.Execute("SELECT SUM(Point) FROM LogProfit WHERE IncomeType = 2 AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = -1)")(0)
	  If Not KS.IsNul(YesterDay_PointProfit) Then
		  KS.Echo YesterDay_PointProfit
	  Else
	  	  YesterDay_PointProfit = 0
	      KS.Echo "0"
	  End IF
	  %>
      </span> 点<%
	  If Not KS.IsNul(YesterDay_DelTaskProfit) Then
		  KS.Echo " + 删除任务利润发布点共计：<span class=""orange"">" & YesterDay_DelTaskProfit & "</span> 点"
	  Else
	  	  YesterDay_DelTaskProfit = 0
	  End IF
	  %></td>
      <td align=left class="splittd">昨日任务利润合计约：<span class="orange"><%=(YesterDay_PointProfit + YesterDay_DelTaskProfit) * TaskCardPrice1%></span> 元</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="" colspan="2" align=left class="splittd" height="30">今日消费支出金额共计：<span class="orange">
	  <%
	  Dim TodayOutMoney: TodayOutMoney = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  Dim TodayOutMoney_Mob: TodayOutMoney_Mob = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark = '发送手机短信') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  Dim TodayOutMoney_Task: TodayOutMoney_Task = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark LIKE '%区发布了%') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  Dim TodayOutMoney_VIPCard: TodayOutMoney_VIPCard = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark LIKE '%购买充值卡%VIP%') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  Dim TodayOutMoney_PointCard: TodayOutMoney_PointCard = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark LIKE '%购买%发布点%') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  Dim TodayMoney2Point: TodayMoney2Point = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark = '用于兑换发布点') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = 0)")(0)
	  If Not KS.IsNul(TodayOutMoney) Then
	  	  KS.Echo TodayOutMoney
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元<%
	  If Not KS.IsNul(TodayOutMoney_Mob) Then KS.Echo " <span class=""gray"">[含会员发手机短信费："& TodayOutMoney_Mob &" 元]</span>"
	  If Not KS.IsNul(TodayOutMoney_Task) Then KS.Echo " <span class=""gray"">[含发布任务担保金："& TodayOutMoney_Task &" 元]</span>"
	  If Not KS.IsNul(TodayOutMoney_PointCard) Then KS.Echo " <span class=""gray"">[含购买发布点："& TodayOutMoney_PointCard &" 元]</span>"
	  If Not KS.IsNul(TodayMoney2Point) Then KS.Echo " <span class=""gray"">[含资金兑换发布点："& TodayMoney2Point &" 元]</span>"
	  If Not KS.IsNul(TodayOutMoney_VIPCard) Then KS.Echo " <span class=""gray"">[含购买VIP会员卡："& TodayOutMoney_VIPCard &" 元]</span>"
	  If Not KS.IsNul(TodayTiXian) Then KS.Echo " <span class=""gray"">[含申请提现："& TodayTiXian &" 元]</span>"
	  %></td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="" colspan="2" align=left class="splittd" height="30">昨日消费支出金额共计：<span class="orange"><%
	  Dim YesterDay_OutMoney: YesterDay_OutMoney = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  Dim YesterDay_OutMoney_Mob: YesterDay_OutMoney_Mob = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark = '发送手机短信') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  Dim YesterDay_OutMoney_Task: YesterDay_OutMoney_Task = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark LIKE '%区发布了%') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  Dim YesterDay_OutMoney_VIPCard: YesterDay_OutMoney_VIPCard = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark LIKE '%购买充值卡%VIP%') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  Dim YesterDay_OutMoney_PointCard: YesterDay_OutMoney_PointCard = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark LIKE '%购买%发布点%') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  Dim YesterDay_Money2Point: YesterDay_Money2Point = Conn.Execute("SELECT SUM(Money) FROM KS_LogMoney WHERE (IncomeOrPayOut = 2) AND (Remark = '用于兑换发布点') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", LogTime) = -1)")(0)
	  If Not KS.IsNul(YesterDay_OutMoney) Then
	  	  KS.Echo YesterDay_OutMoney
	  Else
		  KS.Echo "0"
	  End If
	  %></span> 元<%
	  If Not KS.IsNul(YesterDay_OutMoney_Mob) Then KS.Echo " <span class=""gray"">[含会员发手机短信费："& YesterDay_OutMoney_Mob &" 元]</span>"
	  If Not KS.IsNul(YesterDay_OutMoney_Task) Then KS.Echo " <span class=""gray"">[含发布任务担保金："& YesterDay_OutMoney_Task &" 元]</span>"
	  If Not KS.IsNul(YesterDay_OutMoney_PointCard) Then KS.Echo " <span class=""gray"">[含购买发布点："& YesterDay_OutMoney_PointCard &" 元]</span>"
	  If Not KS.IsNul(YesterDay_Money2Point) Then KS.Echo " <span class=""gray"">[含资金兑换发布点："& YesterDay_Money2Point &" 元]</span>"
	  If Not KS.IsNul(YesterDay_OutMoney_VIPCard) Then KS.Echo " <span class=""gray"">[含购买VIP会员卡："& YesterDay_OutMoney_VIPCard &" 元]</span>"
	  If Not KS.IsNul(YesterDay_TiXian) Then KS.Echo " <span class=""gray"">[含申请提现："& YesterDay_TiXian &" 元]</span>"
	  %></td>
  </tr>
</table><br />
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
  <tr class="sort">
      <td width=100 height="30" colspan="3" align="left">&nbsp; 任务统计</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">淘宝区共发布任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20100598989251'")(0)%></span> 个</td>
      <td align=left class="splittd">淘宝区共已完成任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20100598989251' AND (KS_Status = 5)")(0)%></span> 个</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">淘宝区今日发布任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20100598989251' AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = 0)")(0)%></span> 个</td>
      <td align=left class="splittd">淘宝区今日完成任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20100598989251' AND (KS_Status = 5) AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", KS_EndDate) = 0)")(0)%></span> 个</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">拍拍区共发布任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20104912544927'")(0)%></span> 个</td>
      <td align=left class="splittd">拍拍区共已完成任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20104912544927' AND (KS_Status = 5)")(0)%></span> 个</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">拍拍区今日发布任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20104912544927' AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", AddDate) = 0)")(0)%></span> 个</td>
      <td align=left class="splittd">拍拍区今日完成任务：<span class="orange"><%=Conn.Execute("SELECT Count(ID) FROM KS_U_sxyrw WHERE TID = '20104912544927' AND (KS_Status = 5) AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", KS_EndDate) = 0)")(0)%></span> 个</td>
  </tr>
</table><br />
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
  <tr class="sort">
      <td width=100 height="30" colspan="3" align="left">&nbsp; 会员统计</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">平台共有会员：<span class="orange"><%=Conn.Execute("SELECT COUNT(UserID) FROM KS_User")(0)%></span> 个</td>
      <td align=left class="splittd">今日注册会员：<span class="orange"><%=Conn.Execute("SELECT COUNT(UserID) FROM KS_User WHERE (DATEDIFF("& DataPart_D &", "& SqlNowString &", RegDate) = 0)")(0)%></span> 个</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">VIP会员共有：<span class="orange"><%=Conn.Execute("SELECT COUNT(UserID) FROM KS_User WHERE GroupID = 17")(0)%></span> 个</td>
      <td align=left class="splittd">今日加入VIP会员共有：<span class="orange"><%=Conn.Execute("SELECT COUNT(UserID) FROM KS_User WHERE GroupID = 17 AND ((DATEDIFF("& DataPart_D &", "& SqlNowString &", RegDate) = 0) OR (DATEDIFF("& DataPart_D &", "& SqlNowString &", BeginDate) = 0))")(0)%></span>个</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">普通会员共有：<span class="orange"><%=Conn.Execute("SELECT COUNT(UserID) FROM KS_User WHERE GroupID = 2")(0)%></span> 个</td>
      <td align=left class="splittd">&nbsp;</td>
  </tr>
</table><br />
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
  <tr class="sort">
      <td width=100 height="30" colspan="3" align="left">&nbsp; 推广统计</td>
  </tr>
  <tr class='list' onMouseOver="this.className='listmouseover'" onMouseOut="this.className='list'">
  	  <td width="8%" class="splittd">&nbsp;</td>
	  <td width="35%" align=left class="splittd" height="30">平台由推广进来的会员有：<span class="orange"><%=Conn.Execute("SELECT COUNT(UserID) FROM KS_User WHERE (AllianceUser IS NOT NULL) AND (AllianceUser <> '')")(0)%></span> 人</td>
      <td align=left class="splittd">今日由推广进来的会员有：<span class="orange"><%=Conn.Execute("SELECT COUNT(UserID) FROM KS_User WHERE (AllianceUser IS NOT NULL) AND (AllianceUser <> '') AND (DATEDIFF("& DataPart_D &", "& SqlNowString &", RegDate) = 0)")(0)%></span> 人</td>
  </tr>
</table>
</body>
</html>
<%
End Sub
				
End Class
%> 
