<%@ Page Language="C#" Inherits="SiteServer.BackgroundPages.BackgroundConfigurationPublish" %>
<%@ Register TagPrefix="bairong" Namespace="BaiRong.Controls" Assembly="BaiRong.Controls" %>
<%@ Register TagPrefix="user" Namespace="UserCenter.Controls" Assembly="UserCenter.Pages" %>
<%@ Register TagPrefix="site" Namespace="SiteServer.Controls" Assembly="SiteServer.Controls" %>

<HTML>
<HEAD>
<!--#include file="../inc/html_head.inc"-->
<user:custom type="style" runat="server"></user:custom>

<bairong:Code type="Prototype" runat="server" />
<bairong:Code type="Scriptaculous" runat="server" />

<meta http-equiv="content-type" content="text/html;charset=gb2312">
</HEAD>
<body>
    <user:custom type="showpopwin" runat="server" />
    <form id="myForm" runat="server">
<bairong:Message runat="server"></bairong:Message>
      <DIV class="column">
        <div class="columntitle">站点发布配置</div>
        
        <table cellpadding="3" width="95%" align="center">
            <tr>
                <td width="200" align="left">
              <bairong:help HelpText="选择是否启用站点发布功能" Text="是否启用站点发布功能：" runat="server" ></bairong:help></td>
                <td width="734" align="left">
                <asp:RadioButtonList ID="IsPublishSite" runat="server" RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="IsPublishSite_SelectedIndexChanged"></asp:RadioButtonList>								</td>
            </tr>
            <tr id="RowFtpServer" runat="server">
              <td align="left" colspan="2" width="100%">
                            
    <ASP:DataGrid id="MyDataGrid" runat="server"
        Width="100%"
        Align="center"
        ShowHeader="true"
        ShowFooter="false"
        CellPadding="1"
        BorderWidth="0"
AutoGenerateColumns="false"
        DataKeyField="FtpServer"
        OnItemDataBound="MyDataGrid_ItemBound"
        HeaderStyle-CssClass="summary-title"
        ItemStyle-CssClass="tdbg"
        CellSpacing="1" >
    <HeaderStyle HorizontalAlign="center" Height="25" />
    <ItemStyle Height="25"/>

    <Columns>
        <asp:TemplateColumn>
            <ItemTemplate>
                <%# GetEditHtml((string)DataBinder.Eval(Container.DataItem,"FtpServerName"), (int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"))%>
            </ItemTemplate>
            <ItemStyle Width="40" HorizontalAlign="center" />
        </asp:TemplateColumn>
        <asp:BoundColumn
            HeaderText="服务器名称"
            DataField="FtpServerName" >
            <ItemStyle Width="130" HorizontalAlign="center" />
        </asp:BoundColumn>
        <asp:BoundColumn
            HeaderText="服务器地址"
            DataField="FtpServer" >
            <ItemStyle Width="130" HorizontalAlign="center" />
        </asp:BoundColumn>
        <asp:BoundColumn
            HeaderText="FTP用户名"
            DataField="FtpUserName" >
            <ItemStyle Width="130" HorizontalAlign="center" />
        </asp:BoundColumn>
        <asp:BoundColumn
            HeaderText="FTP根目录"
            DataField="FtpHomeDirectory" >
            <ItemStyle Width="70" HorizontalAlign="center" />
        </asp:BoundColumn>
        <asp:TemplateColumn HeaderText="是否启用">
            <ItemTemplate>
                <%# GetIsUseHtml((string)DataBinder.Eval(Container.DataItem,"FtpServerName"))%>
            </ItemTemplate>
            <ItemStyle Width="60" HorizontalAlign="center" />
        </asp:TemplateColumn>
        <asp:TemplateColumn>
            <ItemTemplate>
                <%# GetEnabledHtml((string)DataBinder.Eval(Container.DataItem,"FtpServerName"))%>
            </ItemTemplate>
            <ItemStyle Width="40" HorizontalAlign="center" />
        </asp:TemplateColumn>
        <asp:TemplateColumn>
            <ItemTemplate>
                <%# GetDeleteHtml((string)DataBinder.Eval(Container.DataItem,"FtpServerName"), (int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"))%>
            </ItemTemplate>
            <ItemStyle Width="40" HorizontalAlign="center" />
        </asp:TemplateColumn>
    </Columns>
</ASP:DataGrid>

<table width="95%" align="center">
<tr>
<td align="right"><table cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td>
        <asp:Button class="button" id="AddFtpServer" Text="添加发布服务器" runat="server" />
    </td>
  </tr>
</table></td>
</tr>
</table>
                
              </td>
            </tr>
            <tr>
              <td colspan="2" align="center">
                    <asp:Button class="button" id="Submit" text="保 存" onclick="Submit_OnClick" runat="server" />							  </td>
            </tr>
        </table>
      </div>
    </form>
</body>
</HTML>
