<%@ Page Language="C#"  AutoEventWireup="true" Inherits="Veeam.Backup.WebApp.ErrorPage" 
Codebehind="Error.aspx.cs" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="head" runat="server">
    <title><%= GetTitle() %></title>
    <link rel="icon" href="./favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="./favicon.ico"  type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="./js/extjs/resources/css/ext-all.css" />
    <link rel="stylesheet" href="./css/veeam-theme.css" type="text/css" />
    <link rel="stylesheet" href="./css/main.css" type="text/css" />
</head>
<body class="error">
   <div id="panel" runat="server" style="padding: 10px;">
   <br />
   <div class="menu-strip-dashboard">&nbsp;</div>
    <table style="height: 100%; width: 100%" border="0">
        <tr>
            <td style="width: 100%; height: 80%; vertical-align: middle;" align="center" class="container">
                <table id="error-panel">
                    <tr id="trWhat" runat="server" >
                        <td valign="top">
                            <img id="imgExc" runat="server" src="~/css/images/warning_big.png" alt="Exception" />
                        </td>
                        <td class="alert">
                            <asp:Label ID="lblWhat" runat="server" Font-Bold="true"></asp:Label>
                        </td>
                    </tr>
                    <tbody id="tbodyException" runat="server" visible="False">
                        <tr>
                            <td>&nbsp;</td>
                            <td>
                                <asp:Label ID="lbExceptionMessage" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr id="trSettingsHint" runat="server" visible="False">
                            <td>&nbsp;</td>
                            <td id="tdErrorHint" runat="server" >
                            
                            </td>
                        </tr>
                    </tbody>
                    <tbody id="tbodyAcessDenied" runat="server" visible="false">
                        <tr>
                            <td>&nbsp;</td>
                            <td>
                                <b>Error message 401.2.:</b> Unauthorized: Logon failed due to server configuration. Verify
                                that you have permission to view this directory or page based on the credentials
                                you supplied and the authentication methods enabled on the Web server. Contact the
                                Web server's administrator for additional assistance.
                            </td>
                        </tr>
                    </tbody>
                    <tbody id="tbodyStackTrace" runat="server">
                        <tr>
                            <td colspan="2" align="right">
                                <a href="javascript:toggleStackTrace();" id="linkShowStack" style="font-weight:normal">Show stack</a> | <a style="font-weight: normal;" href="<%= Request.ApplicationPath %>">Back to Main page</a>
                            </td>
                        <tr>
                        </tr>                            
                            <td id="tdStackTrace" colspan="2" style="visibility:hidden">
                                <div id="ctStackTrace" style="width:97%; height:200px; overflow:auto; padding:10px; border:solid 1px;" runat="server">
                                </div>
                            </td>
                        </tr>
                    </tbody>
                    <tr>
                        <td><br /></td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            <table width="100%"><tr>
                                <td align="left">
                                    <asp:Button ID="btnTryAgain" OnClick="btnTryAgain_Click" runat="server" CssClass="selectbutton" Text="Try again" Visible="false" />&nbsp;
                                </td>
                                <td align="right">
                                    <a id="lnkShowLog" runat="server" href="~/Generated/log.txt">Show Log</a>
                                </td>
                            </tr></table>
                                
                        </td>
                    </tr>
                </table>
               
            </td>
        </tr>
    </table>
</div>
	<script type="text/javascript">

        var toggleStackTrace = function() {
            var el = document.getElementById('tdStackTrace');
            var link = document.getElementById('linkShowStack');
            if (el.style.visibility != 'hidden') {
                el.style.visibility = 'hidden';
                link.firstChild.data = "Show stack";
            } else {
                el.style.visibility = '';                
                link.firstChild.data = "Hide stack";
            }
        }
    </script>
</body>
</html>
