<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="manageDomainToLayout.aspx.cs" Inherits="Web.Wpdcc.manageDomainToLayout" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
	<HEAD>
		<title>system</title>
		<meta content="False" name="vs_showGrid">
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="javascript">
	function creatNavigation()
	{
	  window.open("creatNavigation.aspx?name="+document.all.navPage.value+"","导航页制作","center:yes,width=800,height=600,status=1,resizable=yes,scrollbars=yes");
	}
	function returnNavigation(name)
	{
	  document.all.navPage.value="name";
	}
	
	function openwindow(pkId,name)
	{
	  window.open("accredit.aspx?pkId="+pkId+"&name="+name+"","权限管理","center:yes,width=400,height=450,status=1,resizable=yes,scrollbars=yes");
	}
	
	function foreColor2()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.pageBgColor.value=arr; 
    Table2.bgColor=arr;}

}
function tableColor2()
{
Table2.bgColor=document.system.PageBgColor.value;
}
	function foreColor4()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.upBgColor.value=arr; 
    Table4.bgColor=arr;}

}
function tableColor4()
{
Table4.bgColor=document.system.upBgColor.value;
}
	function foreColor6()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.upFontColor.value=arr; 
    Table6.bgColor=arr;}

}
function tableColor6()
{
Table6.bgColor=document.system.upFontColor.value;
}
	function foreColor8()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.downBgColor.value=arr; 
    Table8.bgColor=arr;}

}
function tableColor8()
{
Table8.bgColor=document.system.downBgColor.value;
}
	function foreColor10()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.downFontColor.value=arr; 
    Table10.bgColor=arr;}

}
function tableColor10()
{
Table10.bgColor=document.system.downFontColor.value;
}
	function foreColor12()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.leftTableColor.value=arr; 
    Table12.bgColor=arr;}

}
function tableColor12()
{
Table12.bgColor=document.system.leftTableColor.value;
}
	function foreColor14()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.middleTableColor.value=arr; 
    Table14.bgColor=arr;}

}
function tableColor14()
{
Table14.bgColor=document.system.middleTableColor.value;
}
	function foreColor16()
{

var arr = showModalDialog("selcolor.htm" , "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
    if(arr!=null)
    {document.system.rightTableColor.value=arr; 
    Table16.bgColor=arr;}

}
function tableColor16()
{
Table16.bgColor=document.system.rightTableColor.value;
}
function openwin(name)
         {
		   var arr = showModalDialog("./editor/Dialog/imgFile.htm?directory=system&name="+name+"&FileId=0", window, "dialogWidth:400px;dialogHeight:150px;help:no;scroll:no;status:no");
		   if(arr!=null)
		   {
		    var module=eval("document.system."+name);
		    module.value=arr;		    
		   }
	     }
function swf(name)
         {
		   var arr = showModalDialog("./editor/Dialog/flashFile.htm?directory=system&name="+name+"&FileId=0", window, "dialogWidth:400px;dialogHeight:150px;help:no;scroll:no;status:no");
		   if(arr!=null)
		   {
		    var module=eval("document.system."+name);
		    module.value=arr;		    
		   }
	     }




		</script>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<style type="text/css">
		</style>
		<link href="../Css/Admin_STYLE.CSS" rel="stylesheet" type="text/css">
	</HEAD>
	<body leftmargin="0" topmargin="0">
		<form id="system" method="post" runat="server">
			<div align="center">
				<table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align="center">
					<tr align="center">
						<td height="25" class="topbg">
                            根据域名指定新闻页</td>
					<tr>
						<td height="23" class="tdbg" align="center">
                            <asp:GridView ID="DomainToLayoutGD" runat="server" CellPadding="4" Width="100%" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" BackColor="#99CCFF" BorderStyle="Solid" BorderWidth="1px" CellSpacing="1" DataKeyNames="pkId" OnRowDeleting="DomainToLayoutGD_RowDeleting" OnRowEditing="DomainToLayoutGD_RowEditing">
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#6375D6" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#999999" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:BoundField DataField="pkId" HeaderText="编号" />
                                    <asp:BoundField DataField="domain" HeaderText="域名" />
                                    <asp:BoundField DataField="layoutTemplateId" HeaderText="新闻页布局编号" />
                                    <asp:BoundField DataField="memo" HeaderText="备注" />
                                    <asp:CommandField EditText="修改" HeaderText="编辑" ShowEditButton="True">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:CommandField>
                                    <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                                Text="删除" OnClientClick="if (!confirm('真的要删除吗?')){ return false;}"></asp:LinkButton>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                                ShowSummary="False" ValidationGroup="myValidationG" />
                            <asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True"
                                ShowSummary="False" ValidationGroup="myValidationG2" />
                            <br />
                            <asp:DetailsView ID="domainToLayoutDV" runat="server" Height="50px" Width="367px" AutoGenerateRows="False" BackColor="#99CCFF" BorderStyle="Solid" CellPadding="4" CellSpacing="1" DefaultMode="Edit" ForeColor="#333333" GridLines="None" OnItemUpdating="domainToLayoutDV_ItemUpdating" OnModeChanging="domainToLayoutDV_ModeChanging" DataKeyNames="pkId" OnItemInserting="domainToLayoutDV_ItemInserting">
                                <Fields>
                                    <asp:TemplateField ShowHeader="False">
                                        <EditItemTemplate>
                                            修 改
                                        </EditItemTemplate>
                                        <InsertItemTemplate>
                                            添 加
                                        </InsertItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="编号">
                                        <EditItemTemplate>
                                            <asp:Label ID="pkId" runat="server" Text='<%# Bind("pkId") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <InsertItemTemplate>
                                            <asp:Label ID="pkId" runat="server" Text='<%# Bind("pkId") %>'></asp:Label>
                                        </InsertItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("pkId") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="域名">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="domain" runat="server" Text='<%# Bind("domain") %>'></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="domain"
                                                ErrorMessage='域名不包括"http://",结尾没有"/"' ValidationExpression="([\w-]+\.)+[\w-]+" Display="None" SetFocusOnError="True" ValidationGroup="myValidationG">域名不包括"http://",结尾没有"/"</asp:RegularExpressionValidator>
                                        </EditItemTemplate>
                                        <InsertItemTemplate>
                                            <asp:TextBox ID="domain" runat="server" Text='<%# Bind("domain") %>'></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="domain"
                                                Display="None" ErrorMessage='域名不包括"http://",结尾没有"/"' ValidationExpression="([\w-]+\.)+[\w-]+"
                                                ValidationGroup="myValidationG2">域名不包括"http://",结尾没有"/"</asp:RegularExpressionValidator>
                                        </InsertItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("domain") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="新闻页布局编号">
                                        <EditItemTemplate>
                                            <asp:DropDownList ID="LayoutTemplateID" SelectedValue='<%#Bind("layoutTemplateId") %>' DataSource='<%#LayoutTemplateDataBind()%>' DataTextField="name" DataValueField="pkId" runat="server" Width="132px">
                                            </asp:DropDownList>
                                        </EditItemTemplate>
                                        <InsertItemTemplate>
                                            <asp:DropDownList ID="LayoutTemplateID" DataSource='<%#LayoutTemplateDataBind()%>' DataTextField="name" DataValueField="pkId" runat="server" Width="132px">
                                            </asp:DropDownList>
                                        </InsertItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("layoutTemplateId") %>'></asp:Label>
                                        </ItemTemplate>
                                        <HeaderStyle Width="100px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="备注">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="memo" runat="server" Text='<%# Bind("memo") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                        <InsertItemTemplate>
                                            <asp:TextBox ID="memo" runat="server" Text='<%# Bind("memo") %>'></asp:TextBox>
                                        </InsertItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label4" runat="server" Text='<%# Bind("memo") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField ShowHeader="False">
                                        <EditItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" CommandArgument='<%# Bind("pkId") %>'
                                                Text="[更 新] " ValidationGroup="myValidationG"></asp:LinkButton>
                                            &nbsp;&nbsp;
                                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                                Text=" [取 消]"></asp:LinkButton>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
                                                Text="编 辑"></asp:LinkButton>
                                        </ItemTemplate>
                                        <InsertItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Insert" Text="[插 入] " ValidationGroup="myValidationG2"></asp:LinkButton>
                                            &nbsp; &nbsp;
                                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                                Text=" [取 消]"></asp:LinkButton>
                                        </InsertItemTemplate>
                                    </asp:TemplateField>
                                </Fields>
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <CommandRowStyle BackColor="#E9ECF1" Font-Bold="True" HorizontalAlign="Center" Font-Overline="False" />
                                <RowStyle BackColor="#F7F6F3" BorderColor="#F7F6F3" ForeColor="#333333" />
                                <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <HeaderStyle BackColor="#6375D6" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                                <EditRowStyle BackColor="#E9ECF1" HorizontalAlign="Center" Font-Bold="True" Font-Overline="False" Font-Underline="False" />
                                <AlternatingRowStyle BackColor="#E9ECF1" ForeColor="#284775" />
                                <InsertRowStyle HorizontalAlign="Center" BackColor="#E9ECF1" Font-Bold="True" />
                            </asp:DetailsView>
                            <asp:Button ID="Add" runat="server" OnClick="Add_Click" Text="添 加..." />
                            &nbsp;&nbsp;
						</td>
					</tr>
				</table>
			</div>
		</form>
	</body>
</HTML>
