<%@ page title="" language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="RCC_System_AuditLog, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="AjaxControls" Namespace="AjaxControls" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility"
    TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<asp:Content ID="Content5" ContentPlaceHolderID="CPH_Content" runat="Server">

    <%--<script language="javascript" type="text/javascript">
        function onChangeDateTXT(TB, HF) {
            alert("IN");
            var TXT = document.getElementById(TB);
            var HField = document.getElementById(HF);

            HField.value = TXT.value;
            alert(HField.value);
        }
    </script>--%>
    <ajax:UpdatePanel ID="UP_Filter" runat="server" UpdateMode="Conditional" RenderMode="Block">
        <ContentTemplate>

            <asp:Button ID="Dummy" runat="server" Style="display: none" />

            <asp:Panel ID="Panel1" runat="server" CssClass="width-modal-popup-auto"
                Style="display: none;">
                <div class="col-xs-12">
                    <div class="card">
                        <div class="header">
                            <h3>
                                <%= Resources.Content.Dev5000%>
                                <span>
                                    <button type="button" class="close" onclick="$find('<%=MP1.ClientID%>').hide();">&times;</button>
                                </span>
                            </h3>
                        </div>
                        <div class="body">
                            <div class="row">
                                <div class="col-xs-12">
                                    <div id="Div_ShowDetails" runat="server" />
                                    <div id="Div_ShowHistory" runat="server">
                                        <div id="Div_Previous" runat="server" class="col-xs-6">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.DGN1110612%>
                                                    </h3>
                                                </div>
                                                <div class="boxy">
                                                    <pre><asp:Literal ID="Lbl_LogDetailPrvs" runat="server" ></asp:Literal></pre>
                                                </div>
                                            </div>

                                        </div>

                                        <div id="Div_Current" runat="server" class="col-xs-6">
                                            <div class="card">
                                                <div class="header">
                                                    <h3>
                                                        <%= Resources.Content.strCurrent%>
                                                    </h3>
                                                </div>
                                                <div class="boxy">
                                                    <pre><asp:Literal ID="Lbl_LogDetailCurrent" runat="server" ></asp:Literal></pre>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12 row-label">
                                    <asp:Button ID="Btn_Close" CssClass="btn btn-primary waves-effect" runat="server" Text="<%$ Resources:Content,GN000150%>" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>

            <EM:ModalPopupExtender runat="server" ID="MP1" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="Panel1" TargetControlID="Dummy" CancelControlID="Btn_Close">
            </EM:ModalPopupExtender>

            <div class="col-xs-12">
                <div class="card">
                    <div class="body">
                        <EM:TabContainer ID="TC_AuditLogs" runat="server" OnClientActiveTabChanged="loadTabPanel">
                            <EM:TabPanel ID="Tab_Listing" runat="server" HeaderText="<%$ Resources:Content,Dev5000 %>" Enabled="true">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab0" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent0" runat="server" Visible="true">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3>
                                                            <%= Resources.Content.GN00001320%>                                                                                                                                 
                                                        </h3>
                                                    </div>
                                                    <div class="body">

                                                        <asp:Button ID="Btn_ExportToExcel" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,Ex001 %>' />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <asp:Panel ID="Pnl_Search" runat="server" DefaultButton="Btn_Search">
                                            <div class="row">
                                                <div class="panel-group search-panel" id="AS_AuditLogs" role="tablist" aria-multiselectable="true">
                                                    <div class="col-xs-12" role="tab" id="SH_AuditLogs">
                                                        <div class="card">
                                                            <div class="header" role="button" data-toggle="collapse" data-parent="#AS_AuditLogs" href="#<%= CSB_AuditLogs.ClientID%>" aria-expanded="true" aria-controls="SH_AuditLogs">
                                                                <h3>
                                                                    <%= Resources.Content.GN0000395%>
                                                                </h3>
                                                            </div>
                                                            <div id="CSB_AuditLogs" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_AuditLogs" aria-expanded="false">
                                                                <div class="row">
                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <div class="form-group display-date-input">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_DateAfter" runat="server"></asp:TextBox>
                                                                            </div>
                                                                        </div>

                                                                        <i runat="server" id="A_DRangeAfter" class="material-icons icon-calendar col-calendar"></i>
                                                                        <EM:CalendarExtender ID="CE_DRangeAfter" runat="server" TargetControlID="TxBx_DateAfter"
                                                                            Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>" PopupButtonID="A_DRangeAfter" CssClass="date__calendar">
                                                                        </EM:CalendarExtender>
                                                                    </div>
                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <div class="form-group display-date-input">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_DateBefore" runat="server"></asp:TextBox>
                                                                            </div>
                                                                        </div>

                                                                        <i runat="server" id="A_DRangeBefore" class="material-icons icon-calendar col-calendar"></i>
                                                                        <EM:CalendarExtender ID="CE_DRangeBefore" runat="server" TargetControlID="TxBx_DateBefore"
                                                                            Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>" PopupButtonID="A_DRangeBefore" CssClass="date__calendar">
                                                                        </EM:CalendarExtender>
                                                                    </div>
                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_IP" runat="server" />
                                                                                <asp:Label ID="Label2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN000174%>" CssClass="form-label"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-3 col-sm-6 col-xs-12" id="Td_LoginLabel" runat="server">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Login" runat="server" />
                                                                                <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0001248%>" CssClass="form-label"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <div class="form-group form-float">
                                                                            <div class="form-line">
                                                                                <asp:TextBox ID="TxBx_Details" runat="server" />
                                                                                <asp:Label ID="Label1" runat="server" EnableViewState="false"
                                                                                    Text="<%$ Resources:Content,DGN1110431%>" CssClass="form-label"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <div class="form-group form-float">
                                                                            <asp:DropDownList ID="DDL_EventGroup" runat="server">
                                                                            </asp:DropDownList>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                                                        <div class="form-group form-float">
                                                                            <asp:DropDownList ID="DDL_Event" runat="server">
                                                                            </asp:DropDownList>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-xs-12">
                                                                        <div class="form-group form-float">
                                                                            <asp:Button ID="Btn_Search" SkinID="searchButton" runat="server" Text="<%$ Resources:Content,GN0000391%>" CssClass="btn btn-primary" />
                                                                            <asp:Button ID="Btn_Clear" SkinID="searchButton" Visible="false" runat="server" Text="<%$ Resources:Content,String289 %>" CssClass="btn btn-primary" />
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="row" id="Tbl_ArchiveOps" runat="server">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header" role="button" data-toggle="collapse" data-parent="#AS_AuditLogs" href="#<%= CSB_AuditLogs.ClientID%>" aria-expanded="true" aria-controls="SH_AuditLogs">
                                                        <h3>
                                                            <%= Resources.Content.FAM0072%>
                                                        </h3>
                                                    </div>
                                                    <div class="body">
                                                        <asp:Button ID="Btn_LoadArchives" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,FAM0070 %>' />
                                                        <asp:Button ID="Btn_ClearArchives" class="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,FAM0071 %>' Visible="false" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <asp:Panel ID="Pnl_Listing" runat="server">
                                            <div class="double-scroll-wrapper1">
                                                <div></div>
                                            </div>
                                            <div class="double-scroll-wrapper2">
                                                <EM:MPGridView ID="GV_AuditLog" Style="width: 1250px;" CurrentSortExpression="DateStamp" CurrentSortDirection="Desc"
                                                    CssClass="table table-bordered table-hover table-striped table-responsive" runat="server" AllowPaging="true" AllowSorting="true"
                                                    EmptyDataText='<%$ Resources:Content, GN00001375 %>' AutoGenerateColumns="false">
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000721 %>"
                                                            HeaderStyle-Width="165px" SortExpression="DateStamp">
                                                            <ItemTemplate>
                                                                <asp:Label ID="Ltl_SDate" runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content, GN0001248 %>"
                                                            HeaderStyle-Width="250px" SortExpression="Login">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_Login" runat="server" Text="<%$ Resources:Content, GN0001248 %>" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content, GN000174 %>"
                                                            HeaderStyle-Width="130px" SortExpression="IPAddress">
                                                            <ItemTemplate>
                                                                <asp:Label ID="Ltl_IP" runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content,SMI727%>" HeaderStyle-Width="100px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="Ltl_EventGroup" runat="server" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content, GN0001287 %>" HeaderStyle-Width="100px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="LB_Event" runat="server" Text="<%$ Resources:Content, GN0001287 %>" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1110431%>" HeaderStyle-Width="500px">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="LB_Details" runat="server" />
                                                                <div id="Div_Details" runat="server" style="display: none" />
                                                                <asp:LinkButton class="btn btn-primary waves-effect" ID="LB_ShowChangesOnly" runat="server" Text='<%$ Resources:Content,History%>'></asp:LinkButton>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                    </Columns>
                                                    <PagerTemplate>
                                                        <EM:Pager ID="Pager" runat="server" />
                                                    </PagerTemplate>
                                                </EM:MPGridView>
                                            </div>
                                        </asp:Panel>

                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_Config" runat="server" HeaderText="<%$ Resources:Content,String483 %>">
                                <ContentTemplate>
                                    <asp:Button ID="Btn_Tab1" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal2" runat="server" Text='<%$ Resources:Content,String484%>' EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_Days" runat="server"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-5 col-xs-12">
                                                                <label class="form-label"><%= Resources.Content.SPT0010059 %></label>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal3" runat="server" Text='<%$ Resources:Content,GN0000752%>' EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:CheckBox ID="CB_SendEmail" runat="server" AutoPostBack="true" Text=" " />
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div id="Tr_HideShow" runat="server" visible="false">
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    *
                                                            <asp:Literal ID="Literal4" runat="server" Text='<%$ Resources:Content,String320%>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-4 col-xs-12">
                                                                    <div class="form-group">
                                                                        <div class="form-line">
                                                                            <asp:TextBox ID="TxBx_SendTo" runat="server"></asp:TextBox>
                                                                            <asp:RequiredFieldValidator ID="RFV_SendTo" runat="server" ControlToValidate="TxBx_SendTo" Display="None"
                                                                                ErrorMessage="<%$ Resources:Content,GN00008027%>" SetFocusOnError="true" ValidationGroup="Alog" Enabled="true">
                                                                            </asp:RequiredFieldValidator>
                                                                            <%--<asp:RegularExpressionValidator ID="REV_SendTo" Display="None" runat="server"
                                                                                ErrorMessage="<%$ Resources:Content,DGN1110038%>" ControlToValidate="TxBx_SendTo"
                                                                                SetFocusOnError="True" ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>"
                                                                                Enabled="true" ValidationGroup="Alog"></asp:RegularExpressionValidator>--%>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            </td>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                *
                                                        <asp:Literal ID="Literal5" runat="server" Text='<%$ Resources:Content,DGN1110162%>' EnableViewState="false" />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_FromEmail" runat="server"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="RFV_FromEmail" runat="server" ControlToValidate="TxBx_FromEmail" Display="None"
                                                                            ErrorMessage="From address is required" SetFocusOnError="true" ValidationGroup="Alog" Enabled="true">
                                                                        </asp:RequiredFieldValidator>
                                                                       <%-- <asp:RegularExpressionValidator ID="REV_FromEmail" Display="None" runat="server"
                                                                            ErrorMessage="<%$ Resources:Content,DGN1110038%>" ControlToValidate="TxBx_FromEmail"
                                                                            SetFocusOnError="True" ValidationExpression="<%$ Resources:MPRegex,EmailAddress %>"
                                                                            Enabled="true" ValidationGroup="Alog"></asp:RegularExpressionValidator>--%>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                            <div class="row">
                                                                <div class="col-sm-3 col-xs-12 row-label">
                                                                    <asp:Literal ID="Literal6" runat="server" Text='<%$ Resources:Content,USM0052%>' EnableViewState="false" />:
                                                                </div>
                                                                <div class="col-sm-9 col-xs-12">
                                                                    <div class="form-group">
                                                                        <asp:TextBox ID="TxBx_Body" runat="server" TextMode="MultiLine" Height="150px" CssClass="col-xs-12" />
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <asp:Button ID="Btn_Save" runat="server" SkinID="saveButton" Text="<%$ Resources:Content,GN0000281%>" ValidationGroup="Alog" CssClass="btn btn-primary btnAction" />
                                                                <asp:ValidationSummary DisplayMode="List" ShowMessageBox="true" ID="vs_Alog" runat="server" ValidationGroup="Alog" ShowSummary="false" CssClass="btn btn-primary" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>

                                </ContentTemplate>
                            </EM:TabPanel>
                        </EM:TabContainer>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </ajax:UpdatePanel>
</asp:Content>
