header.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * Copyright 2021, 2024 5 Mode
  4. *
  5. * This file is part of SnipSwap.
  6. *
  7. * SnipSwap is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * SnipSwap is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with SnipSwap. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. * header.php
  21. *
  22. * Header page.
  23. *
  24. * @author Daniele Bonini <my25mb@aol.com>
  25. * @copyrights (c) 2016, 2024, 5 Mode
  26. */
  27. use fivemode\fivemode\Page;
  28. use fivemode\fivemode\Session;
  29. Page::clearJSBuffer();
  30. //if (User::issetInstance()) {
  31. // $user = &User::getInstance();
  32. // $attrLang = $user->getLanguage();
  33. //} else {
  34. $attrLang = Session::get("lang", APP_DEF_LANG);
  35. //}
  36. ?>
  37. <!DOCTYPE html>
  38. <html lang="<?php echo $attrLang;?>" xmlns="http://www.w3.org/1999/xhtml">
  39. <head>
  40. <meta charset="UTF-8"/>
  41. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  42. <!--
  43. <?php echo APP_LICENSE; ?>
  44. -->
  45. <?php
  46. if (defined("PAGE_TITLE")) {
  47. $pageTitle = PAGE_TITLE;
  48. } else {
  49. $pageTitle = APP_NAME;
  50. }
  51. ?>
  52. <title><?php echo $pageTitle; ?></title>
  53. <link rel="shortcut icon" href="/favicon.ico?v=<?php echo time();?>" />
  54. <?php
  55. if (defined("PAGE_DESCRIPTION")) {
  56. $pageDescription = PAGE_DESCRIPTION;
  57. } else {
  58. $pageDescription = "The 404 error's place.";
  59. }
  60. ?>
  61. <meta name="description" content="<?php echo $pageDescription; ?>"/>
  62. <?php
  63. $customKeywords = "";
  64. $pageKeywords = $pageTitle . PHP_SPACE . strtolower(str_replace(".", PHP_STR, $pageDescription)) . PHP_SPACE . $customKeywords . PHP_SPACE . APP_NAME;
  65. $pageKeywords = str_replace(PHP_HYPHEN, PHP_SPACE, $pageKeywords);
  66. $pageKeywords = str_replace(PHP_SPACE, ",", $pageKeywords);
  67. $pageKeywords = str_replace(",,,", ",", $pageKeywords);
  68. $pageKeywords = str_replace(",,", ",", $pageKeywords);
  69. //$pageKeywords = str_replace(".", PHP_STR, $pageKeywords);
  70. ?>
  71. <meta name="keywords" content="<?php echo $pageKeywords;?>"/>
  72. <meta name="author" content="5 Mode"/>
  73. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  74. <script src="/js/common.js?v=<?php echo time();?>" type="text/javascript"></script>
  75. <script src="/js/bootstrap.min.js" type="text/javascript"></script>
  76. <script src="/js/sha.js" type="text/javascript"></script>
  77. <script src="/js/htmlencode.js" type="text/javascript"></script>
  78. <script src="/js/serialize-javascript.js" type="text/javascript"></script>
  79. <script src="/js/<?php echo SCRIPT_NAME; ?>.js" type="text/javascript" defer></script>
  80. <?php if (SCRIPT_NAME === "home"): ?>
  81. <script src="/js/cube-code.js" type="text/javascript"></script>
  82. <script src="/js/dragndrop-code.js" type="text/javascript"></script>
  83. <?php endif; ?>
  84. <link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet">
  85. <link href="/css/style.css?v=<?php echo time();?>" type="text/css" rel="stylesheet">
  86. <script>
  87. <?php if (!stripos(APP_SCRIPTS_WITHOUT_HEADER, "|". SCRIPT_NAME . "|")): ?>
  88. window.addEventListener("load", function() {
  89. loadPageHeader("<?php echo SCRIPT_NAME; ?>", "<?php echo urlencode($q); ?>", "<?php echo urlencode($catMaskedPath); ?>", "<?php echo $platform; ?>");
  90. loadPageFooter("<?php echo SCRIPT_NAME; ?>");
  91. }, true);
  92. <?php endif; ?>
  93. </script>
  94. </head>
  95. <body>
  96. <div id="HCsplash" style="padding-top: 40px; text-align:center;color:#d4b0dc;font-family:'Bungee Hairline';">
  97. <div id="myh1" style="position:relative; top:80px;"><H1>SnipSwap</H1></div><br><br><br><br>
  98. <img src="/res/code.png" style="width:310px;">
  99. </div>
  100. <div class="header2" style="margin-top:18px; margin-bottom:18px; color:#000000; display:none;">
  101. &nbsp;&nbsp;<a href="http://snipswap.org" target="_self" style=" text-decoration: none;"><img src="/res/code.png" style="width:25px;">&nbsp;SnipSwap</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://github.com/par7133/SnipSwap" style=""><span style="">on</span> github</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:info@snipswap.org" style=""><span style="">for</span> feedback</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:+39-331-4029415" style="font-size:13px;background-color:#15c60b;border:2px solid #15c60b;color:#000000;height:27px;text-decoration:none;">&nbsp;&nbsp;get support&nbsp;&nbsp;</a>&nbsp;&nbsp;&nbsp;<input type="password" id="Password" name="Password" placeholder="new password" style="font-size:11px;">&nbsp;&nbsp;<a href="#" onclick="showEncodedPassword();" style="position:relative; left:0px; top:0px; font-size:13px; font-weight:900; color:green;"><?php echo(getResource("Hash Me", $curLocale));?>!</a>
  102. </div>
  103. <div class="body-area">
  104. <div class="header" style="height: fit-content; min-height: 250px;"><!-- Here is the content of the header --></div>