<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true" CodeBehind="FreeList.aspx.cs"
    Inherits="ETongJin.YM.Web.Admin.FreeList"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">
function CheckAll(obj)
{
var allcheck = document.getElementsByName("id");
for(i=0;i<allcheck.length;i++)
{
allcheck[i].checked = obj.checked;
}
}
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <table class="tableBorder" border="0" cellpadding="0" cellspacing="1">
        <tr>
            <th colspan="8">
                <table border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="80" style="color: #990000;">
                                        筛选：
                                    </td>
                                    <td width="90"><asp:DropDownList ID="ddlOrder" runat="server" AutoPostBack="true" onchange="if(this.value=='-1') return false;"
                                            OnSelectedIndexChanged="ddlOrder_SelectedIndexChanged">
                                            <asp:ListItem Text="排序方式" Value="-1" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="时间" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="用户ID" Value="2"></asp:ListItem>
                                            <asp:ListItem Text="商品ID" Value="3"></asp:ListItem>
                                            <asp:ListItem Text="金币数量" Value="4"></asp:ListItem>
                                        </asp:DropDownList>
                                        </td>
                                </tr>
                            </table>
            </th>
        </tr>
        <tr>
            <td width="30" class="td2">
                选中
            </td>
            <td class="td2" style="width: 36px">
                ID</td>
            <td width="60" class="td2">
                商品ID</td>
            <td width="45" class="td2">
                用户ID</td>
            <td class="td2" width="75">
                兑换的金币数</td>
            <td width="70" class="td2">
                IP</td>
            <td class="td2" width="80">
                时间</td>
            <td width="80" class="td2">
                常规操作
            </td>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
                <tr bgcolor="#FFFFFF" onmouseover="javascript:this.bgColor='#E3E1D7'" onmouseout="javascript:this.bgColor='#FFFFFF'"
                    style="text-align: center; height: 27">
                    <td>
                        <input name='id' type='checkbox' value='<%#Eval("id") %>' style="border: none" />
                    </td>
                    <td class="lefttd">
                       <%#Eval("id")%>
                    </td>
                    <td>
                       <a href="/Show.aspx?i=<%#Eval("pid") %>" target="_blank"> <%#Eval("pid")%></a>
                    </td>
                    <td><a href="/UserShow.aspx?i=<%#Eval("userid") %>" target="_blank">
                            <%# Eval("userid")%></a>
                        
                    </td>
                    <td><%#Eval("totalfee")%>
                       
                    </td>
                    <td> <%#Eval("IP")%>
                       
                    </td>
                    <td>
                        <%#Eval("addtime")%>
                    </td>
                    <td>
                        <asp:LinkButton ID="btnDel" runat="server" OnClick="btnDel_Click" CommandArgument='<%# Eval("id")%>'
                            OnClientClick="return confirm('删除后无法恢复，您是否确定删除？');">删除</asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td colspan="8" class="td2" style="text-align: left; height: 30px;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="180">
                            <input name='chkAll' type='checkbox' id='Checkbox1' onclick='CheckAll(this)' value='checkbox'
                                style="border: none" />选中本页显示的所记录
                        </td>
                        <td>
                            &nbsp; &nbsp; &nbsp;
                            <asp:Button ID="Button5" runat="server" Text="批量删除" OnClick="ButtonClick" CommandArgument="2" OnClientClick="return confirm('删除后无法恢复，您是否确定删除？');"/>
                            &nbsp;
                        </td>
                        <td>&nbsp;
                            
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <th colspan="8" style="text-align: center;">
                <div id="tnt_pagination">
                    <%= PageStr%></div>
                <div class="ym12_mian_y">
                </div>
            </th>
        </tr>
    </table>
</asp:Content>
