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.

publicheader.php 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. global $LoggedUser;
  3. define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
  4. ?>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <title><?=display_str($PageTitle)?></title>
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="theme-color" content="#461640">
  12. <link rel="shortcut icon" href="static/common/icon.png?v=<?=md5_file('static/common/icon.png');?>">
  13. <link rel="manifest" href="/manifest.php">
  14. <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css">
  15. <?php
  16. $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
  17. foreach ($Scripts as $Script) {
  18. if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
  19. $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
  20. $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, SERVER_ROOT.STATIC_SERVER."functions/$Script.js", true));
  21. $ScriptStats['algo'] = INTEGRITY_ALGO;
  22. G::$Cache->cache_value("script_stats_$Script", $ScriptStats);
  23. } ?>
  24. <script src="<?=STATIC_SERVER."functions/$Script.js?v=$ScriptStats[mtime]"?>" type="text/javascript" integrity="<?="$ScriptStats[algo]-$ScriptStats[hash]"?>"></script>
  25. <?php
  26. }
  27. $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
  28. <meta name="bg_data" content="<?=$img[rand(0, count($img)-1)]?>">
  29. </head>
  30. <body>
  31. <div id="head"><span>
  32. <a href="login.php">Log In</a>
  33. <?php if (OPEN_REGISTRATION) { ?>
  34. | <a href="register.php">Register</a>
  35. <?php } ?>
  36. </span></div>
  37. <div id="content">
  38. <!-- todo: Put index page stats here -->
  39. <?php #include('/sections/login/stats.php'); ?>
  40. <table class="layout" id="maincontent">
  41. <tr>
  42. <td class="centered">
  43. <a href="/"><div id="logo"></div></a>
  44. <?php