<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="JuSNS.Web.system.gift.index" %>

<!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>
    <title id="ptitle" runat="server">礼物管理</title>
    <link href="../images/css/style.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript" src="../../js/ajax.js"></script>

    <script language="javascript" type="text/javascript" src="../../js/public.js"></script>


</head>
<body>
    <table width="99%" border="0" align="center" cellpadding="5" cellspacing="1">
        <tr>
            <td width="120" align="center" valign="top">
                <div class="menu">
                    <ul>
                        <%=this.GetSystemMenu(sort)%>
                    </ul>
                </div>
            </td>
            <td valign="top">
                <div class="navip">
                    <span class="Blue">
                    <a href="index.aspx">礼物管理</a> 
                    <a href="add.aspx">增加礼物</a> 
                    <a href="class.aspx">礼物分类</a> 
                        </span>
                </div>
               <div style="padding:6px 8px 0px 8px;">
                <div id="giftClass" runat="server"></div>
                <form id="form1" runat="server">
                       <asp:Repeater runat="server" ID="Rpt_UserList">
                            <HeaderTemplate>
                                <table width="100%" border="0" cellpadding="3" cellspacing="1" class="maintable">
                                    <tr class="maintablehead">
                                        <td style="width: 20%;">
                                            名称</td>
                                        <td align="center" style="width: 10%;">
                                            积分/被使用</td>
                                        <td align="center" style="width: 8%;">
                                            图片</td>
                                        <td align="center" style="width: 30%;">
                                            说明</td>
                                        <td align="center" style="width: 10%;">
                                            分类</td>
                                        <td align="center" style="width: 22%;">
                                            操作</td>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr class="maintablelist">
                                    <td>
                                        <%# DataBinder.Eval(Container.DataItem, "GName")%>
                                    </td>
                                    <td>
                                    <span title="需要积分:<%# DataBinder.Eval(Container.DataItem, "point")%>"><%# DataBinder.Eval(Container.DataItem, "point")%></span>/<span title="已被使用:<%# DataBinder.Eval(Container.DataItem, "point")%>次"><%# DataBinder.Eval(Container.DataItem, "UseNumber")%></span></td>
                                    <td align="center">
                                        <a href="../../template/images/gift/<%# DataBinder.Eval(Container.DataItem, "Picture")%>" target="_blank"><img style="border:0;" src="../../template/images/gift/<%# DataBinder.Eval(Container.DataItem, "Picture")%>" style="width:40px;" /></a>
                                    </td>
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Content")%>
                                    </td>
                                    <td align="center">
                                        <a href="index.aspx?c=<%# DataBinder.Eval(Container.DataItem, "classid")%>"><%# DataBinder.Eval(Container.DataItem, "CName")%></a>
                                    </td>
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "islock")%>|
                                        <a href="add.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "ID")%>">编辑</a>
                                        | <a href="javascript:Lock(<%# DataBinder.Eval(Container.DataItem, "ID")%>,1);">锁定</a>
                                        | <a href="javascript:Lock(<%# DataBinder.Eval(Container.DataItem, "ID")%>,0);">解锁</a>
                                        | <a href="javascript:del(<%# DataBinder.Eval(Container.DataItem, "ID")%>);">删除</a>
                                    </td>
                                </tr> 
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        <div class="pagination" runat="server" id="DivPage" align="center"></div>
                    
                </form>
                </div> 
                
            </td>
        </tr>
    </table>
</body>
</html>
<script language="javascript" type="text/javascript">
function del(id)
{
    if(confirm('你确认删除此礼物吗?'))
        self.location="?Type=del&id="+id;
}
function Lock(id,value)
{
    if(confirm('你确认锁定、解锁此礼物吗?'))
        self.location="?Type=Lock&id="+id+"&value="+value;
}
</script>