<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="space_moduledefmanage.aspx.cs" Inherits="Discuz.ForumPage.Admin.moduledefmanage" %>

<%@ Register Assembly="Discuz.Control" Namespace="Discuz.Control" TagPrefix="cc1" %>

<!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="../styles/datagrid.css" type="text/css" rel="stylesheet">
		<LINK href="../styles/dntmanager.css" type="text/css" rel="stylesheet">
		<LINK href="../styles/calendar.css" type="text/css" rel="stylesheet">
		<script language="javascript" src="../js/common.js"></script>
		<script type="text/javascript">
		    function submitAddApply()
		    {
			    if (typeof(Page_ClientValidate) == 'function') 
			    { 
				    if (Page_ClientValidate() == false) 
					    { return false; }
			    }
			    this.disabled=true;
			    document.getElementById('success').style.display = 'block';
			    HideOverSels('success');
			    __doPostBack('AddApply','');
		    }
		    function submitDeleteApply()
		    {
			    if (typeof(Page_ClientValidate) == 'function') 
			    { 
				    if (Page_ClientValidate() == false) 
					    { return false; }
			    }
			    if (confirm('将模块置为无效将导致用户正在使用的模块无法正常工作,确定要继续吗?'))
			    {
			        this.disabled=true;    			    
			        document.getElementById('success').style.display = 'block';
			        HideOverSels('success');
			        __doPostBack('DeleteApply','');
			    }
		    }
		    
		    function checkinput(obj, allobjid)
		    {
		        var allobj = document.getElementById(allobjid);
		        if (!obj.checked)
		            allobj.checked = false;
		    }
		    
		    function checkbyname(allobj, objname)
		    {
		        var boxs = document.getElementsByName(objname);
		        for (var i=0; i < boxs.length; i++)
		        {
		            boxs[i].checked = allobj.checked;
		        }
		        
		    }
		</script>
</head>
<body>
    <form id="form1" runat="server">
        <script type="text/javascript">showhint(0, '<ul><li>如果要使用新的模块, 请将模块的xml配置文件上传至space/modules文件夹</li></ul>');</script>
		<table width="100%">	
			<tr><td class="category">
			<input title="选中/取消选中 本页所有Case" onClick="checkbyname(this, 'url')" type="checkbox" name="chkall" id="chkall">全选/取消全选&nbsp;&nbsp;
			<cc1:Button ID="AddApply" runat="server" Text="置为有效" OnClick="AddApply_Click"></cc1:Button><cc1:Button id="DeleteApply" runat="server" Text="置为无效" ButtonImgUrl="../images/del.gif" OnClick="DeleteApply_Click"></cc1:Button>
			</td>
				 </tr>
		</table>
        <table width="100%">				
          <tr>
             <td width="2px"></td>
             <td>
				<cc1:datagrid id="DataGrid1" runat="server" PageSize="20">
					<Columns>
					
					<asp:TemplateColumn HeaderText="选择">
						<ItemTemplate>
						   <input id="url<%#DataBinder.Eval(Container, "DataItem.url").ToString()%>" onclick="javascript:checkinput(this, 'chkall')" type="checkbox" value="<%#DataBinder.Eval(Container, "DataItem.url").ToString()%>" name="url">						
                        </ItemTemplate>
					</asp:TemplateColumn>
					    <asp:BoundColumn DataField="modulestatus" HeaderText="模块状态"></asp:BoundColumn>
						<asp:BoundColumn DataField="moduledefname" HeaderText="模块名称"></asp:BoundColumn>
						<asp:BoundColumn DataField="moduledefcatelog" HeaderText="所属分类"></asp:BoundColumn>
						<asp:TemplateColumn HeaderText="模块类型">
						    <ItemTemplate>
						        <%#DataBinder.Eval(Container, "DataItem.moduledeftype")%>	
						    </ItemTemplate>
						</asp:TemplateColumn>
						<asp:BoundColumn DataField="moduledefop"></asp:BoundColumn>
					</Columns>
                    <PagerStyle Mode="NumericPages" />
                    <SelectedItemStyle CssClass="datagridSelectedItem" />
                    <HeaderStyle CssClass="category" />
				</cc1:datagrid>
				</td>
			</tr>
			<tr>
			    <td colspan="2" class="imageexample">
			        图例: <img title='模块当前无法正常工作' alt='模块当前无法正常工作' src='../images/state1.gif' />模块当前无法正常工作
			                <img title='模块可以正常工作' alt='模块可以正常工作' src='../images/state2.gif' />模块可以正常工作
			                <img title='尚未启用的模块' alt='尚未启用的模块' src='../images/state3.gif' />尚未启用的模块
			    </td>
			</tr>
		</table>
		</form>
		<%=footer%>
</body>
</html>
