PageRenderTime 26ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

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

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