<%@ Reference Page="~/admin/backup/operate.aspx" %>
<%@ Page Language="c#" Inherits="WebApp.Admin.Web12Control" CodeBehind="WebControl.aspx.cs" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>网站运行控制</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/adminCssEdit.htm" -->

    <script language="javascript" type="text/javascript">
			function showDetail(id)
			{
				showModalDialog("WebDetail.aspx?applyID="+id,window, "dialogWidth:760px;dialogHeight:500px;help:no;scroll:no;status:no");
			}
    </script>

</head>
<body>
    <div class="list-func-box func-box">
        <div class="hd">
            子站运行控制列表</div>
        <form id="frmWebControl" method="post" runat="server">
        <div class="bd">
            <div class="function-hd">
                <div class="search-box fr">
                </div>
                <!--/search-box-->
                <div class="action-field">
                    子站服务器：<asp:DropDownList ID="ddlServerList" runat="server"></asp:DropDownList>&nbsp;<asp:Button ID="btnQuery" CssClass="btn" runat="server" OnClick="btnQuery_Click" Text="查看" />
                </div>
                <!--/action-field-->
            </div>
            <div class="function-bd">
            <asp:DataGrid ID="webList" runat="server" AutoGenerateColumns="False" class="list-table"
                DataKeyField="pkID" OnItemCommand="webList_ItemCommand" OnItemDataBound="webList_ItemDataBound">
                <Columns>
                    <asp:BoundColumn DataField="pkID" HeaderText="ID" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="applyID" HeaderText="网站ID" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="SchoolName" HeaderText="网站名称" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="域名" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:HyperLink ID="linkSchool" runat="server" NavigateUrl='<%# GetDomainName(Convert.ToInt32(DataBinder.Eval(Container, "DataItem.applyID").ToString())) %>'
                                Text='<%# DataBinder.Eval(Container, "DataItem.domainName") %>' Target="_blank">
                            </asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="web信息" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="lblWebInfo" runat="server" Style="cursor: default" Text='<%# DataBinder.Eval(Container, "DataItem.IP") %>'
                                ToolTip='<%# "IP：" + DataBinder.Eval(Container, "DataItem.IP") + "\r\n端口：" + DataBinder.Eval(Container, "DataItem.port") %>'>
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="数据库信息" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:Label ID="lblDBInfo" runat="server" Style="cursor: default" Text='<%# DataBinder.Eval(Container, "DataItem.dbIP") %>'
                                ToolTip='<%# "数据库IP：" + DataBinder.Eval(Container, "DataItem.dbIP") + "\r\n数据库名称：" + DataBinder.Eval(Container, "DataItem.dbName") %>'>
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="webState" HeaderText="网站状态" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="执行" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnRun" runat="server" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.schoolName") %>'
                                CommandName="operate">运行</asp:LinkButton>&nbsp;
                            <asp:LinkButton ID="btnDelete" runat="server" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.schoolName") %>'
                                CommandName="Delete">删除</asp:LinkButton>&nbsp;
                            <asp:LinkButton ID="btnEdit" runat="server" CommandName="Edit">编辑</asp:LinkButton>
                            <asp:LinkButton ID="btnDetail" runat="server" CommandName="Detail">详细信息</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="webId" HeaderText="webId" Visible="False" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="dbId" HeaderText="dbId" Visible="False" HeaderStyle-CssClass="title"></asp:BoundColumn>
                </Columns>
            </asp:DataGrid>
           
            </div>
        </div>
        <div class="ft">
            <div class="pagination">
             <asp:Label ID="lblPage" runat="server"></asp:Label>
                <input id="Hidden1" runat="server" type="hidden" value="-1" />
            </div>
        </div>
        </form>
    </div>
</body>
</html>
