admin_logs.html 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="el">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Logs - WiSearch Panel</title>
  7. <style>
  8. body { background-color: #121212; color: #e0e0e0; font-family: 'Segoe UI', Tahoma, sans-serif; margin: 0; padding: 20px; }
  9. /* Κοινό Header με το Admin Dashboard */
  10. .header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #333; padding-bottom: 15px; margin-bottom: 20px; }
  11. .title { color: #bb86fc; margin: 0; }
  12. .title span { color: #e0e0e0; }
  13. .nav-links a { color: #03dac6; text-decoration: none; margin-left: 15px; font-weight: bold; }
  14. .nav-links a:hover { text-decoration: underline; }
  15. /* Κεντρικό Κουτί (Ίδιο με τα Tabs του Dashboard) */
  16. .content-box { background: #1e1e1e; padding: 20px; border-radius: 8px; border: 1px solid #333; max-width: 1200px; margin: 0 auto; }
  17. h3 { color: #bb86fc; border-bottom: 1px solid #333; padding-bottom: 10px; margin-top: 0; }
  18. /* Στυλ Πίνακα */
  19. table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
  20. th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #333; }
  21. th { background-color: #2d2d2d; color: #03dac6; }
  22. /* Λεπτομέρειες των Logs */
  23. .guest { color: #9e9e9e; font-style: italic; }
  24. .user { color: #bb86fc; font-weight: bold; }
  25. .ip-code { background: #121212; padding: 3px 8px; border-radius: 4px; border: 1px solid #333; font-family: monospace; color: #03dac6; font-size: 13px; }
  26. .footer { margin-top: 40px; text-align: center; font-size: 12px; color: #9e9e9e; }
  27. .footer b { color: #e0e0e0; }
  28. </style>
  29. </head>
  30. <body>
  31. <div class="header">
  32. <h1 class="title">WiSearch <span>Panel</span></h1>
  33. <div class="nav-links">
  34. <a href="/">🏠 Αναζήτηση</a>
  35. <a href="/admin">⚙️ Πίνακας Ελέγχου</a>
  36. {% if session.get('user_role') == 'admin' %}
  37. <a href="/admin/users">👥 Χρήστες</a>
  38. {% endif %}
  39. <a href="/logout" style="color: #cf6679;">🚪 Έξοδος ({{ session.username }})</a>
  40. </div>
  41. </div>
  42. <div class="content-box">
  43. <h3>📜 Activity Logs (Τελευταίες 100 Αναζητήσεις)</h3>
  44. <table>
  45. <tr>
  46. <th>Ημερομηνία / Ώρα</th>
  47. <th>IP Διεύθυνση</th>
  48. <th>Χρήστης</th>
  49. <th>Search Prompt</th>
  50. </tr>
  51. {% for log in logs %}
  52. <tr>
  53. <td style="color: #9e9e9e;">{{ log.timestamp.strftime('%d/%m %H:%M:%S') }}</td>
  54. <td><span class="ip-code">{{ log.ip_address }}</span></td>
  55. <td>
  56. {% if log.username %}
  57. <span class="user">{{ log.username }}</span>
  58. {% else %}
  59. <span class="guest">Guest (Unregistered)</span>
  60. {% endif %}
  61. </td>
  62. <td style="color: #fff; font-weight: bold;">{{ log.search_query }}</td>
  63. </tr>
  64. {% else %}
  65. <tr>
  66. <td colspan="4" style="text-align: center; color: #9e9e9e; padding: 20px;">Δεν υπάρχουν καταγεγραμμένες αναζητήσεις ακόμα.</td>
  67. </tr>
  68. {% endfor %}
  69. </table>
  70. </div>
  71. <div class="footer">
  72. ⚡ Powered by <b>#6610 Maiden</b>
  73. </div>
  74. </body>
  75. </html>