<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="JuSNS.Web.system.group.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></span> 
   </div> 
   <div id="DivErr" runat="server"></div>
   <form id="form1" runat="server">
   <div id="mainbody">
            <asp:Repeater runat="server" ID="Rpt_GroupList">
                <HeaderTemplate>
                    <table width="100%" border="0" cellpadding="3" cellspacing="1" class="maintable">
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="maintablelist">
                        <td width="10%" rowspan="3" align="center" valign="middle">
                            <img src="<%# DataBinder.Eval(Container.DataItem, "Portrait")%>" width="48" height="48" /></td>
                        <td width="30%">
                            <a href="../../home/group/group.aspx?GroupID=<%# DataBinder.Eval(Container.DataItem, "GroupID")%>" target="_blank"><strong><%# DataBinder.Eval(Container.DataItem, "GroupName")%></strong></a></td>
                        <td width="20%">
                            创建人：<a href="../../user/?r=<%# DataBinder.Eval(Container.DataItem, "UserID")%>" target="_blank"><%# DataBinder.Eval(Container.DataItem, "UserName")%></a></td>
                        <td width="30%">
                            创建时间：<%# Convert.ToDateTime( DataBinder.Eval(Container.DataItem, "PostTime")).ToString("yyyy-MM-dd")%></td>
                        <td width="10%" rowspan="3">
                            <a href="javascript:del(<%# DataBinder.Eval(Container.DataItem, "GroupID")%>);">删除</a>|
                            <%# GetRec(DataBinder.Eval(Container.DataItem, "IsRec"),DataBinder.Eval(Container.DataItem, "GroupID"))%>
                            </td>
                    </tr>
                    <tr class="maintablelist">
                        <td>
                            主题数：<%# DataBinder.Eval(Container.DataItem, "Cnt")%></td>
                        <td>
                            成员数：<%# DataBinder.Eval(Container.DataItem, "Members")%></td>
                        <td>
                            公告：<%# DataBinder.Eval(Container.DataItem, "Bulletin")%></td>
                    </tr>
                    <tr class="maintablelist">
                        <td>
                            网络属性：<%# DataBinder.Eval(Container.DataItem, "Name")%></td>
                        <td>
                            公开程度：<%#JuSNS.Home.UserGroup.getPublicityName((JuSNS.Model.EnumGroupPrivacy)DataBinder.Eval(Container.DataItem, "Publicity"))%></td>
                        <td>
                            状态：正常</td>
                    </tr>
                <tr >
               <td colspan="5" style="background-color:#eeeeee;"></td> 
                </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater><div class="pagination" runat="server" id="DivPage" align="center">
                        </div>
            <table width="100%" border="0" cellpadding="3" cellspacing="1">
                <tr class="maintablepage">
                    <td>
                        <div align="center">
                            搜索群组
                            <asp:TextBox ID="Key" runat="server" Width="200"></asp:TextBox><asp:Button ID="Button1"
                                runat="server" Text=" 搜索 " OnClick="Button1_Click" /></div>
                        
                    </td>
                </tr>
            </table>
        </div>
    </form>
    </td>
  </tr>
</table>
</body>
</html>
<script language="javascript" type="text/javascript">
function del(id)
{
    if(confirm('你确认删除此群组吗?'))
        self.location="index.aspx?action=del&id="+id;
}

function IsRec(id,st)
{
    if(confirm('确定要进行此操作吗?'))
        self.location="index.aspx?action=isRec&st="+st+"&id="+id;
}
</script>