<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" CodeBehind="KS.UserCount.aspx.cs" Inherits="Kesion.NET.WebSite.Admin.User.KS_UserCount" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.BLL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
    <script src="/admin/images/Chart.js"></script>
    <asp:Panel ID="ListPanel" runat="server" Width="100%">
        <div class="content-area mt20">
            <div class="myTitle clearfix"><asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" CssClass="fr button">导出</asp:LinkButton>用户统计</div>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="sTable"> 
            	<tr>
                	<td width="100" align="right" class="Lheight36">客户端：</td>
                    <td>
                        <span class="ml20"><a<%=KSCMS.S("showType")==""||KSCMS.S("showType")=="0"?" class='greenFont'":string.Empty %> href="KS.UserCount.aspx?showType=0&flag=<%=flag%>">所有客户端</a></span>
                        <span class="ml20"><a<%=KSCMS.S("showType")=="1"?" class='greenFont'":string.Empty %> href="?showType=1&flag=<%=flag%>">PC端</a></span>
                        <span class="ml20"><a<%=KSCMS.S("showType")=="2"?" class='greenFont'":string.Empty %> href="?showType=2&flag=<%=flag%>">微信端</a></span>
                        <span class="ml20"><a<%=KSCMS.S("showType")=="3"?" class='greenFont'":string.Empty %> href="?showType=3&flag=<%=flag%>">WAP端</a></span>
                        <span class="ml20"><a<%=KSCMS.S("showType")=="4"?" class='greenFont'":string.Empty %> href="?showType=4&flag=<%=flag%>">APP端</a></span>
                    </td>
                </tr>
                <tr>
                	<td width="100" align="right" class="Lheight36">选择时间段：</td>
                    <td>
                        <span class="ml20"><a<%=KSCMS.S("flag")==""||KSCMS.S("flag")=="0"?" class='greenFont'":string.Empty %> href="KS.UserCount.aspx?flag=0&showType=<%=showType%>">今日</a></span>
                        <span class="ml20"><a<%=KSCMS.S("flag")=="1"?" class='greenFont'":string.Empty %> href="?flag=1&showType=<%=showType%>">昨日</a></span>
                        <span class="ml20"><a<%=KSCMS.S("flag")=="2"?" class='greenFont'":string.Empty %> href="?flag=2&showType=<%=showType%>">最近7日</a></span>
                        <span class="ml20"><a<%=KSCMS.S("flag")=="3"?" class='greenFont'":string.Empty %> href="?flag=3&showType=<%=showType%>">最近30日</a></span>
                        <spanx class="ml20"><a<%=KSCMS.S("flag")=="4"?" class='greenFont'":string.Empty %> href="?flag=4&showType=<%=showType%>">按时间段</a></span>
                        <%if (KSCMS.S("flag") == "4")
						  { %>
							<asp:TextBox CssClass="textbox Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" Width="150" ID="TxtBeginDate" runat="server"></asp:TextBox>
							至&nbsp;&nbsp;<asp:TextBox CssClass="textbox Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" Width="150" ID="TxtEndDate" runat="server"></asp:TextBox>
							<asp:Button ID="BtnSearch" runat="server" Text="查询" CssClass="button" OnClick="BtnSearch_Click" />
						<%} %>
                    </td>
                </tr>
                <tr style="display:none;">
                	<td width="100" align="right" class="Lheight36"></td>
                    <td>
						<%if (KSCMS.S("flag") == "4")
                          { %>
                        	<div class="tips"><asp:Label ID="LabTips" runat="server"></asp:Label></div>
                        <%} %>
                    </td>
                </tr>
            </table>
            <table width="99%" style="margin-top: 10px" border="0" cellpadding="1" cellspacing="1" class="CTable">
                <tr>
                    <td align="center">
                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="650" height="400" id="OrderGeneral" align="middle">
                            <param name="FlashVars" value="&dataXML=<graph caption='会员注册统计(单位：人)' decimalPrecision='2' formatNumberScale='0' showPercentageValues='0' showNames='1' showValues='1' showPercentageInLabel='0' pieYScale='45' pieBorderAlpha='40' pieFillAlpha='70' pieSliceDepth='15' pieRadius='100' outCnvBaseFontSize='13' baseFontSize='12'><%=InialStr() %></graph>">
                            <param name="movie" value="../../ks_inc/part/pie3d.swf?chartWidth=650&chartHeight=400">
                            <param name="quality" value="high">
                            <param name="bgcolor" value="#FFFFFF">
                            <param name="wmode" value="opaque" />
                            <embed src="../../ks_inc/part/pie3d.swf?chartWidth=650&chartHeight=400" flashvars="&dataXML=<graph caption='订单来源统计(单位：个)' decimalPrecision='2' formatNumberScale='0' showPercentageValues='0' showNames='1' showValues='1' showPercentageInLabel='0' pieYScale='45' pieBorderAlpha='40' pieFillAlpha='70' pieSliceDepth='15' pieRadius='100' outCnvBaseFontSize='13' baseFontSize='12'><%=InialStr() %></graph>" quality="high" bgcolor="#FFFFFF" width="650" height="400" wmode="opaque" name="OrderGeneral" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
                        </object>
                    </td>
                </tr>
            </table>
            <asp:Repeater ID="Repeater1" runat="server">
                <HeaderTemplate>
                    <table width="99%" border="0" cellpadding="2" cellspacing="1" class="CTable">
                        <tr align="center" class="CTitle">

                            <td width="50" align="center"><b>序号</b></td>
                            <td width="80" align="center"><b>客户端</b></td>
                            <td align="center"><b>会员</b></td>
                            <td align="center"><b>占总会员比率</b></td>
                           

                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tdbg">
                        <td align="center">
                            <%#Container.ItemIndex+1%>
                        </td>
                        <td align="center">
                            <%# Utils.OrderDeviceName(Utils.StrToInt(Eval("OrderDevice"))) %>
                        </td>
                        <td align="center">
                           <a href="?action=userdetail&itemflag=<%#flag%>&OrderDevice=<%#Eval("OrderDevice")%>"><%#GetUserCount(Utils.StrToInt(Eval("OrderDevice")),flag) %></a>
                        </td>

                        <td align="center">
                           <%#GetUserCountRate(Utils.StrToInt(Eval("OrderDevice")),flag).ToString("f2") %>%
                        </td>

                       
                    </tr>

                </ItemTemplate>
                <FooterTemplate>

                    <tr class="tdbg" style="display: <%# bool.Parse((Repeater1.Items.Count==0).ToString())?"":"none"%>">
                        <td class="Ctd" style="text-align: center" colspan="12">
                            <div class="empty">没有会员注册统计的数据</div>
                        </td>
                    </tr>
                </FooterTemplate>
            </asp:Repeater>
        </div>
    </asp:Panel>

    <asp:Panel ID="Panel1" runat="server">
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
    </asp:Panel>


</asp:Content>
