<%@ Page Language="c#" Inherits="WebApp.serverSetting" EnableEventValidation="false" CodeBehind="serverSetting.aspx.cs" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>站点服务设置</title>
    <meta name="description" content="站点服务设置" />
    <!--#include file = "../assets/head.htm" -->
    
</head>
<body class="no-skin">
    <form id="form1" method="post" runat="server">
    <div class="main-content-inner">
        <!-- #section:basics/content.breadcrumbs -->
        <div class="breadcrumbs" id="breadcrumbs">

            <script type="text/javascript">
                try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
            </script>

            <ul class="breadcrumb">
                <li><i class="ace-icon fa fa-home home-icon"></i>主页 </li>
                <li>站点运行监控</li>
                <li class="active">站点API设置</li>
            </ul>
            <!-- /.breadcrumb -->
            <!-- /section:basics/content.searchbox -->
        </div>
        <!-- /section:basics/content.breadcrumbs -->
        <div class="page-content">
            <div class="page-header">
                <div class="row">
				    <div class="col-xs-4">
				        <asp:DropDownList ID="ddlServerList" runat="server"></asp:DropDownList>
				        &nbsp;
				        <asp:Button ID="btnQuery" CssClass="btn btn-sm btn-primary" runat="server" OnClick="btnQuery_Click" Text="查看" />
				        &nbsp;&nbsp;
				        <asp:Button ID="btnUpdate" class="btn btn-sm btn-primary" runat="server" Text="批量更新" OnClick="Btn_Click"></asp:Button>
				    </div>
			    </div><!-- /.page-header -->
			    
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <asp:HiddenField ID="hfidstr" runat="server" />
                    <asp:HiddenField ID="hftitlestr" runat="server" />
                    <asp:GridView ID="GridView1" runat="server" CssClass="table table-striped table-bordered table-hover"
                        AutoGenerateColumns="false" CellSpacing="-1" GridLines="None" OnPreRender="GridView1_PreRender" OnRowCommand="GridView1_RowCommand" DataKeyNames="pkId">
                        <Columns>
                            <asp:TemplateField HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                                <HeaderTemplate>
                                    <asp:CheckBox ID="cbAll" Text=" " runat="server" onclick="GridSelectAll('GridView1',this.checked)" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                            <asp:BoundField DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hide" ItemStyle-CssClass="hide" FooterStyle-CssClass="hide"></asp:BoundField>
                            
                            <asp:HyperLinkField DataNavigateUrlFields="domainName" DataNavigateUrlFormatString="http://{0}" DataTextField="schoolName" HeaderText="站点名称" Target="_blank" />
                            
                            <asp:TemplateField HeaderText="版本号" HeaderStyle-CssClass="hidden-480" ItemStyle-CssClass="hidden-480">
                                <ItemTemplate>
                                    <b class="blue"><%# Eval("versionId") %></b>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                            <asp:BoundField DataField="updatestate" HeaderText="更新状态" />
                            
                            <asp:BoundField DataField="apiUpdateTime" HeaderText="更新时间" DataFormatString="{0:yyyy-MM-dd}" />
                            
                            <asp:TemplateField HeaderText="API设置"> 
                                <ItemTemplate>
                                    <div class="action-buttons">
							            <asp:LinkButton ID="btnapi" runat="server" CommandName="updateapi" data-toggle="tooltip" data-placement="bottom" title="更新API" OnClientClick="return confirm('您确定要更新该子站API接口吗？');"><i class="ace-icon glyphicon glyphicon-refresh green"></i></asp:LinkButton>
						            </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Visible="False" />
                    </asp:GridView>
                    <div class="clearfix">
                        <div class="col-xs-12">
                            <asp:Label ID="lblPage" runat="server"></asp:Label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <asp:HiddenField ID="hfhttp" runat="server" Value="http://" />
    <asp:HiddenField ID="hfapi" runat="server" Value="/service/sitedataex.ashx" />
    </form>
    <!--#include file = "../assets/foot.htm" -->
    <script src="../assets/js/wpcms.js" type="text/javascript"></script>
	<script type="text/javascript">

        jQuery(function ($) {
            
            $("input[type='checkbox']").addClass("ace");
            $("input[type='checkbox']").next().addClass("lbl");
            
            $("#btnUpdate").click(function () {
                if (GridSelectCheck('GridView1', true)) {
                    return true;
                }
                else {
                    return false;
                }
            });
            
        });
        
    </script>
</body>
</html>
