BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

privatefooter.php 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. declare(strict_types=1);
  3. $ENV = ENV::go();
  4. $Sep = '&emsp;';
  5. #$Sep = '&ensp;&middot;&ensp;';
  6. # End <div#content>, begin <footer>
  7. # This needs to be <main>, in each page
  8. echo $HTML = '</div></main><footer>';
  9. /*
  10. # Disclaimer
  11. if (!empty($Options['disclaimer'])) {
  12. echo $HTML = <<<HTML
  13. <div id="disclaimer_container">
  14. None of the files shown here are actually hosted on this server.
  15. The links are provided solely by this site's users.
  16. These BitTorrent files are meant for the distribution of backup files.
  17. By downloading the BitTorrent file, you are claiming that you own the original file.
  18. The administrator of this site ($ENV->SITE_DOMAIN) holds <em>no responsibility</em>
  19. if these files are misused in any way and cannot be held responsible for what its users post.
  20. </div>
  21. HTML;
  22. }
  23. */
  24. # Sessions
  25. if (count($UserSessions) > 1) {
  26. foreach ($UserSessions as $ThisSessionID => $Session) {
  27. if ($ThisSessionID !== $SessionID) {
  28. $LastActive = $Session;
  29. break;
  30. }
  31. }
  32. }
  33. # User meta
  34. $LastUpdate = time_diff($LastActive['LastUpdate']);
  35. $IP = (apcu_exists('DBKEY') && $LastActive['IP'] && $LastActive['IP'] !== '0.0.0.0'
  36. ? (Crypto::decrypt($LastActive['IP']))
  37. : '[Encrypted]');
  38. if (!empty($LastActive)) {
  39. echo $HTML = <<<HTML
  40. <p>
  41. <a href="user.php?action=sessions">
  42. <span class="tooltip" title="Manage sessions">
  43. Last activity:
  44. </span>
  45. $LastUpdate
  46. <span class="tooltip" title="Manage sessions">
  47. from
  48. $IP
  49. </span>
  50. </a>
  51. </p>
  52. HTML;
  53. }
  54. # Site meta
  55. $Year = date('Y');
  56. $Load = sys_getloadavg();
  57. echo $HTML = <<<HTML
  58. <p>
  59. Site and design
  60. &copy;
  61. $Year
  62. $ENV->SITE_NAME
  63. $Sep
  64. <a href='/sections/legal/canary.txt'>Warrant Canary</a>
  65. </p>
  66. HTML;
  67. # Script meta
  68. $MicroTime = number_format(((microtime(true) - $ScriptStartTime) * 1000), 5);
  69. $Used = Format::get_size(memory_get_usage(true));
  70. $Load = number_format($Load[0], 2).' '.number_format($Load[1], 2).' '.number_format($Load[2], 2);
  71. $Date = date('M d Y');
  72. $Time = date('H:i');
  73. echo $HTML = <<<HTML
  74. <p>
  75. <strong>Time:</strong>
  76. $MicroTime ms
  77. $Sep
  78. <!--
  79. <strong>Used:</strong>
  80. $Used
  81. $Sep
  82. -->
  83. <strong>Load:</strong>
  84. $Load
  85. $Sep
  86. <strong>Date:</strong>
  87. $Date,
  88. $Time
  89. </p>
  90. HTML;
  91. if (DEBUG_MODE || check_perms('site_debug')) {
  92. echo $HTML = <<<HTML
  93. <!-- Begin Debugging -->
  94. <div id="site_debug">
  95. HTML;
  96. $Debug->perf_table();
  97. $Debug->flag_table();
  98. $Debug->error_table();
  99. $Debug->sphinx_table();
  100. $Debug->query_table();
  101. $Debug->cache_table();
  102. $Debug->vars_table();
  103. $Debug->ocelot_table();
  104. echo $HTML = <<<HTML
  105. </div>
  106. <!-- End Debugging -->
  107. HTML;
  108. }
  109. global $NotificationSpans;
  110. if (!empty($NotificationSpans)) {
  111. foreach ($NotificationSpans as $Notification) {
  112. echo "$Notification\n";
  113. }
  114. }
  115. echo $HTML = '</footer></body></html>';