<%@ control language="VB" autoeventwireup="false" inherits="RCC_Hostmatic_CC_WebStats, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/ResourcesQuota.ascx" TagName='ResourceQuota' TagPrefix='EM' %>

<script type="text/javascript" language="javascript">
    function OpenStats(AU, SID, UN, PWD) {
        //alert("IN");
        var src = "<body><form name='statsform' action='";
        src = src + AU;
        src = src + "' method='post' onsubmit='GoToStats()'>";
        src = src + "<input type='hidden' name='shortcutLink' value='autologin' id='shortcutLink'>";
        src = src + "<input type='hidden' name='txtSiteID' id='txtSiteID' value='" + SID + "'>";
        src = src + "<input type='hidden' name='txtUser' id='txtUser' value='" + UN + "'>";
        src = src + "<input type='hidden' name='txtPass' id='txtPass' value='" + PWD + "' />";
        src = src + "</form><p></p></body>";
        //alert(src);
        var WindowObject = window.open("", "StatsLogin", "width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes");
        WindowObject.document.writeln(src);
        WindowObject.document.close();
        WindowObject.focus();
        WindowObject.document.forms[0].submit();

    }
</script>

<div class="col-xs-12">
    <div class="card">
        <div class="header">
            <div class="displayInlineBlock">
                <h2>
                    <asp:Literal ID="Ltl_SubsInfo" runat="server" /></h2>
            </div>
            <asp:LinkButton ID="Btn_GoBack" runat="server" Text="<%$ Resources:Content,String1045 %>" CausesValidation="false"
                CssClass="btn btn-primary waves-effect pull-right m-t--4px" />
        </div>
        <div class="body">
            <div class="row">
                <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow" runat="server">
                    <div class="card">
                        <div class="header">
                            <h3><%= Resources.Content.GN00001320%></h3>
                        </div>
                        <div class="body">
                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button ID="Btn_AddStatsSite" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,SMI662%>" CausesValidation="false" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-xs-12">
                    <asp:GridView ID="Gv_WebStats" runat="server" AllowPaging="true" DataSourceID="" CssClass="table table-bordered table-striped table-hover"
                        AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">

                        <Columns>
                            <asp:TemplateField HeaderText="<%$ Resources:Content,SMI663%>" HeaderStyle-CssClass="col-xs-10" ItemStyle-CssClass="col-xs-10">
                                <ItemTemplate>
                                    <asp:Label ID="Lbl_WebStatsName" runat="server"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000360%>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                <ItemTemplate>
                                    <%--<asp:LinkButton ID="LB_View" runat="server" CssClass="LinkButtonEdit" CommandName="WSView" CausesValidation="false" Text="View Stats"></asp:LinkButton>--%>
                                    <asp:HyperLink ID="HL_View" runat="server" Text="<%$ Resources:Content,SMI0350%>" CssClass="btn btn-primary waves-effect"></asp:HyperLink>

                                    <asp:LinkButton ID="LB_Remove" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="WSRemove" CausesValidation="false" Text='<%$ Resources:Content, GN0000278 %>'></asp:LinkButton>
                                    <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>" TargetControlID="LB_Remove">
                                    </EM:ConfirmButtonExtender>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
            </div>
        </div>
    </div>
</div>

<%--Resources Grid Pannel--%>
<ajax:UpdatePanel ID="UP_Resources" UpdateMode="Always" runat="server">
    <ContentTemplate>
        <asp:Button ID="Btn_Display" runat="server" Style="display: none;" />
        <asp:Panel ID="Panel3" runat="server" BorderColor="ActiveBorder" BorderStyle="Groove" ScrollBars="Auto"
            Style="display: none" CssClass="width-modal-popup-auto">
            <EM:ResourceQuota runat="server" ID="ResourceQuotaView" />
        </asp:Panel>

        <EM:ModalPopupExtender X="150" runat="server" ID="MPE_Resource" BackgroundCssClass="modalBackground" DropShadow="false"
            PopupControlID="Panel3" TargetControlID="Btn_Display">
        </EM:ModalPopupExtender>
    </ContentTemplate>
</ajax:UpdatePanel>
