1
0

index.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaCore UNA Core
  7. * @{
  8. */
  9. if (!file_exists("./inc/header.inc.php")) {
  10. // this is dynamic page - send headers to not cache this page
  11. $now = gmdate('D, d M Y H:i:s') . ' GMT';
  12. header("Expires: $now");
  13. header("Last-Modified: $now");
  14. header("Cache-Control: no-cache, must-revalidate");
  15. header("Pragma: no-cache");
  16. $bHasInstaller = file_exists("install/index.php");
  17. $sTitle = $bHasInstaller ? 'Initiating Installation' : 'Installation files are missing';
  18. header('Content-Type: text/html; charset=utf-8');
  19. ?>
  20. <!DOCTYPE html>
  21. <html lang="en">
  22. <head>
  23. <meta charset="utf-8" />
  24. <meta name="viewport" content="width=device-width, initial-scale=1" />
  25. <title><?php echo htmlspecialchars($sTitle, ENT_QUOTES, 'UTF-8'); ?></title>
  26. <?php if ($bHasInstaller): ?>
  27. <meta http-equiv="refresh" content="2;url=install/index.php" />
  28. <?php endif; ?>
  29. <style>
  30. :root {
  31. --bx-flash-bg: #f4f5f7;
  32. --bx-flash-text: #111827;
  33. --bx-flash-muted: #6b7280;
  34. --bx-flash-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  35. }
  36. html, body {
  37. margin: 0;
  38. height: 100%;
  39. }
  40. body {
  41. min-height: 100vh;
  42. display: flex;
  43. align-items: center;
  44. justify-content: center;
  45. background: var(--bx-flash-bg);
  46. font-family: var(--bx-flash-font);
  47. color: var(--bx-flash-text);
  48. -webkit-font-smoothing: antialiased;
  49. }
  50. .bx-install-flash {
  51. text-align: center;
  52. padding: 24px;
  53. }
  54. .bx-install-flash img {
  55. display: block;
  56. width: 64px;
  57. height: 64px;
  58. margin: 0 auto 20px;
  59. border-radius: 16px;
  60. }
  61. .bx-install-flash p {
  62. margin: 0;
  63. font-size: 16px;
  64. font-weight: 550;
  65. letter-spacing: -0.01em;
  66. color: var(--bx-flash-muted);
  67. }
  68. .bx-install-flash-pulse {
  69. animation: bx-install-flash-pulse 1.4s ease-in-out infinite;
  70. }
  71. @keyframes bx-install-flash-pulse {
  72. 0%, 100% { opacity: 0.35; }
  73. 50% { opacity: 1; }
  74. }
  75. </style>
  76. </head>
  77. <body>
  78. <div class="bx-install-flash">
  79. <img src="install/img/logo.svg" alt="UNA" />
  80. <p class="bx-install-flash-pulse"><?php echo htmlspecialchars($sTitle, ENT_QUOTES, 'UTF-8'); ?></p>
  81. </div>
  82. <?php if ($bHasInstaller): ?>
  83. <script>setTimeout(function () { location.href = 'install/index.php'; }, 1400);</script>
  84. <?php endif; ?>
  85. </body>
  86. </html>
  87. <?php
  88. exit;
  89. }
  90. require_once('./inc/header.inc.php');
  91. require_once(BX_DIRECTORY_PATH_INC . "profiles.inc.php");
  92. if (!isLogged() && getParam('sys_site_splash_enabled') && false === strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp')) {
  93. require_once("./splash.php");
  94. exit;
  95. }
  96. $_GET['i'] = 'home';
  97. require_once("./page.php");
  98. /** @} */