Oppaitime'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 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?
  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="favicon.ico?v=<?=md5_file('favicon.ico');?>">
  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. <?
  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. ?>
  25. <script src="<?=STATIC_SERVER."functions/$Script.js?v=$ScriptStats[mtime]"?>" type="text/javascript" integrity="<?="$ScriptStats[algo]-$ScriptStats[hash]"?>"></script>
  26. <?
  27. }
  28. $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
  29. <meta name="bg_data" content="<?=$img[rand(0,count($img)-1)]?>">
  30. </head>
  31. <body>
  32. <div id="head"><span>
  33. <a href="login.php">Log in</a>
  34. <? if (OPEN_REGISTRATION) { ?>
  35. | <a href="register.php">Register</a>
  36. <? } ?>
  37. </span></div>
  38. <div id="content">
  39. <table class="layout" id="maincontent">
  40. <tr>
  41. <td class="centered">
  42. <a href="index.php"><div id="logo"></div></a>
  43. <?