<%@ page language="C#" autoeventwireup="true" inherits="admin_user, aoshuosoft" %>

<!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 runat="server">
    <title>用户管理</title>
    <link href="admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>        
        <asp:Panel ID="addedituser" runat="server" Width="100%" Visible="false">
            <table class="adminmaintable" border="0" cellpadding="3" cellspacing="1">
                <tr>
                    <td class="bt" colspan="2" style="text-align: center">
                        <asp:Label ID="actionbt" runat="server" Text="" Width="210px"></asp:Label></td>
                </tr>
                <tr>
                    <td width="15%">
                        用户等级：</td>
                    <td>
                        <asp:DropDownList ID="qx" CssClass="downlist" runat="server">
                            <asp:ListItem Value="2">普通</asp:ListItem>
                            <asp:ListItem Value="3">高级</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td width="15%">
                        所属分类：</td>
                    <td>
                        <asp:DropDownList ID="selectsort" CssClass="downlist" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td width="15%">
                        用户名：</td>
                    <td>
                        <asp:TextBox ID="name" CssClass="textput" runat="server" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        密码：</td>
                    <td>
                        <asp:TextBox ID="password" runat="server" CssClass="textput" Width="200px" TextMode="Password"></asp:TextBox>&nbsp;
                        <asp:Label ID="editpassword" runat="server" Text="不修改密码请留空！" Width="248px" Visible="false"></asp:Label></td>
                </tr>
                <tr>
                    <td width="15%">
                        确认密码：</td>
                    <td>
                        <asp:TextBox ID="passwordtwo" runat="server" CssClass="textput" Width="200px" TextMode="Password"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        密码提示问题：</td>
                    <td>
                        <asp:TextBox ID="question" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        密码提示答案：</td>
                    <td>
                        <asp:TextBox ID="result" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        真实姓名：</td>
                    <td>
                        <asp:TextBox ID="reallyname" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        电子邮箱：</td>
                    <td>
                        <asp:TextBox ID="mail" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        性 别：
                    </td>
                    <td><asp:DropDownList ID="sex" CssClass="downlist" runat="server">
                        <asp:ListItem Value="男">男</asp:ListItem>
                        <asp:ListItem Value="女">女</asp:ListItem>
                    </asp:DropDownList></td>
                </tr>
                <tr>
                    <td width="15%">
                        QQ：</td>
                    <td>
                        <asp:TextBox ID="qq" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        MSN：
                    </td>
                    <td>
                        <asp:TextBox ID="msn" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        公司名称：</td>
                    <td>
                        <asp:TextBox ID="corporation" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        联系电话：
                    </td>
                    <td>
                        <asp:TextBox ID="phone" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        联系地址：</td>
                    <td>
                        <asp:TextBox ID="address" runat="server" CssClass="textput" Height="58px" TextMode="MultiLine"
                            Width="436px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center">
                        <asp:Button ID="adduser" runat="server" Text="添 加" Width="80px" OnClick="adduser_Click" />
                        <asp:Button ID="edituser" runat="server" Text="修 改" Width="80px" OnClick="edituser_Click" /></td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="user" runat="server" Width="100%" Visible="false">
            <asp:GridView OnPageIndexChanging="GridView1_PageIndexChanging" ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="True" CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="20">
                <Columns>
                    <asp:TemplateField HeaderText="用户名"><ItemTemplate><a href="user.aspx?action=edituser&id=<%#Eval("id") %>"><%#Eval("name").ToString().PadRight(100).Remove(10) %></a></ItemTemplate></asp:TemplateField>
                    <asp:BoundField DataField="reallyname" HeaderText="真实姓名" />
                    <asp:BoundField DataField="sex" HeaderText="性别" />
                    <asp:BoundField DataField="phone" HeaderText="联系电话" />
                    <asp:BoundField DataField="sj" HeaderText="注册时间" />
                    <asp:TemplateField HeaderText="编辑"><ItemTemplate><a href="user.aspx?action=edituser&id=<%#Eval("id") %>">编辑</a></ItemTemplate></asp:TemplateField>
                    <asp:TemplateField HeaderText="删除"><ItemTemplate><a href="user.aspx?action=deluser&id=<%#Eval("id") %>" onclick="return confirm('删除将不可恢复，您真的要删除吗？')">删除</a></ItemTemplate></asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#EFF3FB" />
                <EditRowStyle BackColor="#2461BF" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
                        <asp:Literal ID="tj" runat="server"></asp:Literal></asp:Panel>
        <asp:Panel ID="addeditsort" runat="server" Width="100%" Visible="false">
            <table class="adminmaintable" border="0" cellpadding="3" cellspacing="1">
                <tr>
                    <td class="bt" colspan="2" style="text-align: center; height: 35px;">
                        <asp:Label ID="actionbttwo" runat="server" Text="" Width="209px"></asp:Label></td>
                </tr>
                <tr>
                    <td width="15%" >
                        分类名称：</td>
                    <td>
                        <asp:TextBox ID="sortname" runat="server" CssClass="textput" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="15%">
                        分类说明：</td>
                    <td>
                        <asp:TextBox ID="sortexplain" runat="server" CssClass="textput" Height="58px" TextMode="MultiLine"
                            Width="436px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center">
                        <asp:Button ID="addsort" runat="server" Text="添 加" Width="80px" OnClick="addsort_Click" />
                        <asp:Button ID="editsort" runat="server" Text="修 改" Width="80px" OnClick="editsort_Click" /></td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="sort" runat="server" Width="100%" Visible="false">
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="True" CellPadding="4" ForeColor="#333333" GridLines="None">
            <Columns>
                <asp:TemplateField HeaderText="分类名称"><ItemTemplate><a href="user.aspx?action=editsort&id=<%#Eval("id") %>"><%#Eval("name").ToString().PadRight(100).Remove(10) %></a></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="编辑"><ItemTemplate><a href="user.aspx?action=editsort&id=<%#Eval("id") %>">编辑</a></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除"><ItemTemplate><a href="user.aspx?action=delsort&id=<%#Eval("id") %>" onclick="return confirm('删除将不可恢复，您真的要删除吗？')">删除</a></ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#EFF3FB" />
            <EditRowStyle BackColor="#2461BF" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
            <asp:Literal ID="tjtwo" runat="server"></asp:Literal></asp:Panel>
       </div>
    </form>
</body>
</html>
