<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditGroup.aspx.cs" Inherits="Manage_EditGroup" %>

<%@ Import Namespace ="Spaces" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>控制面板 - 文章管理</title>

<link href="General2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
form{padding:0;margin:0}
fieldset{border:1px solid #669900}
legend{font-weight:bold;color:#000}
input{padding-top:2px;}
.sec_nav {color:#438b47;}
.sec_nav a{text-decoration:none;color:#438b47}
.sec_nav a:hover{text-decoration:underline;}
.form_border{border-left:1px solid #ACD373;border-right:1px solid #ACD373;background:#fff;}
.form_in{line-height:120%;}
.form_in th{background:#c5d7e2}
img {border:0px  }
-->
</style>
    <script src="<%=Globals.ApplicationPath %>/Include/js/dialog.js" type="text/javascript"></script>

    <script src="<%=Globals.ApplicationPath %>/Include/js/base.js" type="text/javascript"></script>
    <script>
    function check_title(sStr)
{
	if (sStr.length == '')
	{
		_error_msg_show('友情连接名称不能为空');
		return false;
	}
	else if (sStr.length > 28)
	{
		_error_msg_show('友情连接名称长度不能超过28个字符或14个汉字');
		return false;
	}
	return true;
}

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div align="center">
            &nbsp;
            &nbsp;</div>
        
        <table width="640" border="0" align="center" cellpadding="0" cellspacing="0" class="black333333_red_noline">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="3" height="3"><img src="img/O_angle_up_left.gif" width="3" height="3"></td>
          <td bgcolor="#ACD373" width="100%"></td>
          <td width="3"><img src="img/O_angle_up_right.gif" width="3" height="3"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
       <td bgcolor="#acd373" height=30>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ffffff"><B><%=Globals.Text["editgroup_groupmanagement"]%></B></font> 
                    </td>
  </tr>
  <tr>
    <td class="form_border">
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="20">&nbsp;</td>
          <td>&nbsp;<asp:Label ID="Label1" runat="server"><%=Globals.Text["editgroup_groupmanagement"]%></asp:Label></td>
          <td width="20">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><table width="100%"  border="0" cellspacing="0" cellpadding="0" class="black333333_red_noline">
              <tr> 
                <td align="right" > 
                </td>
              </tr>
              <tr> 
                <td> <fieldset>
                  <legend>&nbsp;<%=Globals.Text["editgroup_groupmanagement"]%>&nbsp;</legend>
                  <div align="right">
                      <%=Globals.Text["userlist_usermanagepage"]%><br>
                      <%=Globals.Text["userlist_manageediting"]%><br>
                    <br>
                  </div>
                  </fieldset></td>
              </tr>
              <tr> 
                <td height="5"></td>
              </tr>
              <tr> 
                <td ></td>
              <tr> 
                <td> 
                  <!-- 功能列表 -->
                  <!-- /功能列表 -->
                  <!-- 分类列表 -->
                  <!-- /分类列表 -->
                </td>
              </tr>
            </table></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>
              &nbsp;
              &nbsp;&nbsp;<asp:GridView ID="GroupView"   runat="server" CellPadding="3" CellSpacing="2" BackColor="White" CssClass="black333333_red_noline" AutoGenerateColumns="False" Width="100%" BorderWidth="0px">
                                   
                         <RowStyle BackColor="#EEF5E2"  />
                    <HeaderStyle BackColor="#669900" ForeColor="White" />    
                                        <columns>
                <asp:TemplateField HeaderText="组编号">
                    <ItemTemplate>
                        <asp:Label ID="GroupID" runat="server" Text='<%# Bind("GroupID") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                         <asp:Label ID="GroupID" runat="server" Text='<%# Bind("GroupID") %>'></asp:Label>
                    </EditItemTemplate>
                     <FooterTemplate>
                    增加组
                    </FooterTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="组名">
                    <ItemTemplate>
                        <asp:Label ID="GroupName" runat="server" Text='<%# Bind("GroupName") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="GroupName" runat="server" Text='<%# Bind("GroupName") %>' onblur="check_title(this.value)"></asp:TextBox>
                    </EditItemTemplate>
                     <FooterTemplate>
                    <asp:TextBox ID="GroupName" runat="server" ></asp:TextBox>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="U盘空间大小">
                    <ItemTemplate>
                       <asp:Label ID="TotalSize" runat="server" Text='<%# Eval("TotalSize")+"M" %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                    
                             <asp:TextBox ID="TotalSize" runat="server" Text='<%# Eval("TotalSize")+"M" %>'></asp:TextBox>  
                    </EditItemTemplate>
                 
                     <FooterTemplate>
                     <asp:TextBox ID="TotalSize" runat="server" ></asp:TextBox>
                    </FooterTemplate> 
                </asp:TemplateField>
                <asp:TemplateField HeaderText="默认组">
                    <ItemTemplate>
                        <asp:Label ID="DefaultGroup" runat="server" Text='<%# Convert.ToBoolean(Eval("DefaultGroup"))?"默认组":"非默认组" %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:CheckBox ID="DefaultGroup" runat="server" Checked='<%# Convert.ToBoolean(Eval("DefaultGroup"))  %>'/>
                    </EditItemTemplate>
                       <FooterTemplate>
                     <asp:CheckBox ID="DefaultGroup" runat="server" />
                    </FooterTemplate> 
                </asp:TemplateField>
                
                                            <asp:CommandField ShowEditButton="True"  EditText="&lt;img src='./img/edit.gif' width='20' height='18' /&gt;" HeaderText="编辑">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:CommandField>
                                            <asp:CommandField ShowDeleteButton="True" DeleteText="<img src='./img/icon_del.gif' width='14' height='14' />" ItemStyle-HorizontalAlign= "Center" HeaderText="删除" />
              
            </columns>
            
                                       
                                        </asp:GridView></td>
          <td>
          </td>
        </tr>
          <tr>
              <td>
              </td>
              <td>
                  &nbsp;<fieldset>
                      <legend>&nbsp;<%=Globals.Text["editgroup_addusergroup"]%>&nbsp;</legend>
                      <div align="center">
                        <table>
                            <tr>
                                <td align="right">
                                    <%=Globals.Text["editgroup_groupname"]%></td>
                                <td>
                                    <asp:TextBox  id="txtGroupName" runat="server"  ></asp:TextBox></td>
                                <td rowspan="3">
                                    <asp:Button ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" OnClientClick="return chkForm()" />
                                    
                                    <script type="text/javascript">
                                    function isDigit(s)
{
var patrn=/^[\d]+$/;
if (!patrn.exec(s)) return false
return true
}
                                    function chkForm()
                                    {
                                     var menuName=$('<%=txtGroupName.ClientID %>').value;
                                     if(menuName.trim()=="")
    {
    _error_msg_show('请输入友情组名！:S')
     return false;
    }
    var address=$('<%=txtTotalSize.ClientID %>').value;
                if(address.trim()=="")
                       {
    _error_msg_show('请输入U盘空间大小！:S')
                          return  false;
                     }
                     if(!isDigit(address))
	{
	
	  _error_msg_show('价格只能是数字:S');
	 event.keyCode = 0 ;
	}
                     return true;
                     }
                                    </script>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <%=Globals.Text["editgroup_space"]%></td>
                                <td>
                                    <asp:TextBox ID="txtTotalSize" runat="server"  Text="10"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <%=Globals.Text["editgroup_defaultgroup"]%></td>
                                <td align="left">
                                    <asp:CheckBox ID="chkDefaultGroup" runat="server" Text="是否默认组" ToolTip="是否默认组" /></td>
                            </tr>
                        </table>
                          <br />
                      </div>
                  </fieldset>
                  <br />
              </td>
              <td>
              </td>
          </tr>
    </table></td>
  </tr>
  <tr>
    <td height="30" bgcolor="#E3F0D0"  align=center >&nbsp;  </td>
  </tr>
  <tr>
    <td>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="3"><img src="images/O_angle_down_left.gif" width="3" height="3"></td>
          <td height="3" background="images/O_angle_bottom.gif" width="100%"></td>
          <td width="3"><img src="images/O_angle_down_right.gif" width="3" height="3"></td>
        </tr>
    </table></td>
  </tr>
</table>
    </form>
</body>
</html>
<asp:literal runat="server" iD="Message"></asp:literal>
