PageRenderTime 33ms CodeModel.GetById 25ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/BlogEngine/BlogEngine.NET/admin/Pages/RecaptchaLogViewer.aspx

#
ASP.NET | 117 lines | 113 code | 4 blank | 0 comment | 4 complexity | a1a885e20ac37f86b59c5b6d34c96512 MD5 | raw file
  1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RecaptchaLogViewer.aspx.cs"
  2    Inherits="Admin.Pages.RecaptchaLogViewer" EnableViewState="true" %>
  3
  4<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5<html xmlns="http://www.w3.org/1999/xhtml">
  6<head runat="server">
  7    <title>Recaptcha Log</title>
  8    <style type="text/css">
  9        body
 10        {
 11            font: 11px verdana;
 12            margin: 0;
 13            overflow: hidden;
 14        }
 15        #title
 16        {
 17            background: #F1F1F1;
 18            border-bottom: 1px solid silver;
 19            padding: 10px;
 20        }
 21        label
 22        {
 23            font-weight: bold;
 24        }
 25        #phDetails
 26        {
 27            padding: 10px;
 28            height: 390px;
 29            overflow: auto;
 30            overflow-x: auto;
 31        }
 32        #bottom
 33        {
 34            background: #F1F1F1;
 35            border-top: 1px solid silver;
 36            padding: 10px;
 37            text-align: right;
 38        }
 39    </style>
 40    <script type="text/javascript">
 41        function ESCclose(evt) {
 42            if (!evt) evt = window.event;
 43
 44            if (evt && evt.keyCode == 27) {
 45                closeRecaptchaLogViewer();
 46            }
 47        }
 48        function closeRecaptchaLogViewer() {
 49            var cDocument = parent.document;
 50            var cBody = cDocument.body;
 51
 52            var iframe = cDocument.getElementById('RecaptchaLogDetails');
 53            var div = cDocument.getElementById('RecaptchaLogLayer');
 54
 55            cBody.removeChild(iframe);
 56            cBody.removeChild(div);
 57            cBody.style.position = '';
 58            return false;
 59        }
 60    </script>
 61</head>
 62<body scroll="no" onkeypress="ESCclose(event)">
 63    <form id="form1" runat="server">
 64    <div id="title">
 65        <label>
 66            Recaptcha Log</label>
 67    </div>
 68    <div id="phDetails">
 69        <ul>
 70            <li><b>Attempts:</b> The number of tries before a successful captcha submission. This
 71                includes the successful attempt.</li>
 72            <li><b>Time to Post:</b> The time (in seconds) from the original page load to when the
 73                user has sucessfully posted a comment.</li>
 74            <li><b>Time to Solve:</b> The time to solve the captcha from either the original page
 75                load, or the last unsuccessful captcha attempt.</li>
 76        </ul>
 77        <asp:GridView runat="server" ID="RecaptchaLog" BorderColor="#f8f8f8" BorderStyle="solid"
 78            BorderWidth="1px" RowStyle-BorderWidth="0" RowStyle-BorderStyle="None" GridLines="None"
 79            Width="100%" AlternatingRowStyle-BackColor="#f8f8f8" AlternatingRowStyle-BorderColor="#f8f8f8"
 80            HeaderStyle-BackColor="#F1F1F1" CellPadding="3" ShowFooter="true" AutoGenerateColumns="False">
 81            <EmptyDataTemplate>
 82                There are no successful reCaptcha submissions to display.
 83            </EmptyDataTemplate>
 84            <Columns>
 85                <asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="24">
 86                    <ItemTemplate>
 87                        <%#Gravatar(DataBinder.Eval(Container.DataItem, "Email").ToString(), DataBinder.Eval(Container.DataItem, "Author").ToString())%>
 88                    </ItemTemplate>
 89                </asp:TemplateField>
 90                <asp:BoundField DataField="Date" HeaderText="<%$ Resources:labels, date %>" ItemStyle-HorizontalAlign="Center"
 91                    HtmlEncode="false" DataFormatString="{0:dd-MMM-yyyy HH:mm}" />
 92                <asp:TemplateField HeaderText="<%$ Resources:labels, author %>" ItemStyle-HorizontalAlign="Center">
 93                    <ItemTemplate>
 94                        <asp:HyperLink runat="server" NavigateUrl='<%# string.Format("mailto:{0}", DataBinder.Eval(Container.DataItem, "Email")) %>'
 95                            Text='<%#DataBinder.Eval(Container.DataItem, "Author")%>' />
 96                    </ItemTemplate>
 97                </asp:TemplateField>
 98                <asp:TemplateField HeaderText="<%$ Resources:labels, website %>" ControlStyle-Width="200">
 99                    <ItemTemplate>
100                        <asp:Label Text='<%# GetWebsite(DataBinder.Eval(Container.DataItem, "Website"))%>'
101                            runat="server" />
102                    </ItemTemplate>
103                </asp:TemplateField>
104                <asp:BoundField DataField="RecaptchaAttempts" HeaderText="Attempts" ItemStyle-HorizontalAlign="Center" />
105                <asp:BoundField DataField="CommentTime" HeaderText="Time to Post" HtmlEncode="false"
106                    ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N1}" />
107                <asp:BoundField DataField="RecaptchaTime" HeaderText="Time to Solve" HtmlEncode="false"
108                    ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N1}" />
109            </Columns>
110        </asp:GridView>
111    </div>
112    <div id="bottom">
113        <input type="button" value="Cancel" onclick="return closeRecaptchaLogViewer()" />
114    </div>
115    </form>
116</body>
117</html>