grommunio /
grommunio-web
| 1 | <?php |
||
| 2 | include BASE_PATH . 'server/includes/loader.php'; |
||
| 3 | include BASE_PATH . 'server/includes/templates/serverinfo.php'; |
||
| 4 | |||
| 5 | $loader = new FileLoader(); |
||
| 6 | |||
| 7 | $versionInfo['webapp'] = $loader->getVersion(); |
||
| 8 | $serverConfig = array_merge($serverConfig, [ |
||
| 9 | 'base_url' => BASE_URL, |
||
| 10 | 'webapp_title' => $webappTitle, |
||
| 11 | 'using_sso' => false, |
||
| 12 | 'disable_full_gab' => !ENABLE_FULL_GAB, |
||
| 13 | 'plugin_webappmanual_url' => PLUGIN_WEBAPPMANUAL_URL, |
||
| 14 | 'enable_shared_rules' => ENABLE_SHARED_RULES, |
||
| 15 | 'always_enabled_plugins' => $GLOBALS['PluginManager']->expandPluginList(ALWAYS_ENABLED_PLUGINS_LIST), |
||
| 16 | 'enable_advanced_settings' => ENABLE_ADVANCED_SETTINGS ? true : false, |
||
| 17 | 'post_max_size' => getMaxPostRequestSize(), |
||
| 18 | 'max_file_uploads' => getMaxFileUploads(), |
||
| 19 | 'client_timeout' => defined('CLIENT_TIMEOUT') && is_numeric(CLIENT_TIMEOUT) && CLIENT_TIMEOUT > 0 ? CLIENT_TIMEOUT : false, |
||
| 20 | 'active_theme' => Theming::getActiveTheme(), |
||
| 21 | 'icons_primary_color' => Theming::getPrimaryIconColor(), |
||
| 22 | 'icons_secondary_color' => Theming::getSecondaryIconColor(), |
||
| 23 | 'json_themes' => Theming::getJsonThemes(), |
||
| 24 | 'iconsets' => Iconsets::getIconsets(), |
||
| 25 | 'active_iconset' => Iconsets::getActiveIconset(), |
||
| 26 | 'iconsets_about' => Iconsets::getAboutTexts(), |
||
| 27 | 'version_info' => $GLOBALS['PluginManager']->getPluginsVersion(), |
||
| 28 | 'is_vcfimport_supported' => function_exists('mapi_vcftomapi'), |
||
| 29 | 'is_icsimport_supported' => function_exists('mapi_mapitoical'), |
||
| 30 | 'color_schemes' => json_decode(COLOR_SCHEMES), |
||
| 31 | 'default_categories' => json_decode(DEFAULT_CATEGORIES), |
||
| 32 | 'maximum_eml_files_in_zip' => MAX_EML_FILES_IN_ZIP, |
||
| 33 | 'powerpaste' => [ |
||
| 34 | 'powerpaste_word_import' => POWERPASTE_WORD_IMPORT, |
||
| 35 | 'powerpaste_html_import' => POWERPASTE_HTML_IMPORT, |
||
| 36 | 'powerpaste_allow_local_images' => POWERPASTE_ALLOW_LOCAL_IMAGES, |
||
| 37 | ], |
||
| 38 | 'shared_store_polling_interval' => SHARED_STORE_POLLING_INTERVAL, |
||
| 39 | 'prefetch_email_enabled' => PREFETCH_EMAIL_ENABLED, |
||
| 40 | 'prefetch_email_strategy' => PREFETCH_EMAIL_STRATEGY, |
||
| 41 | 'prefetch_email_count' => PREFETCH_EMAIL_COUNT, |
||
| 42 | 'prefetch_email_interval' => PREFETCH_EMAIL_INTERVAL, |
||
| 43 | 'enable_dompurify' => ENABLE_DOMPURIFY_FILTER, |
||
| 44 | 'enable_file_previewer' => ENABLE_FILE_PREVIEWER, |
||
| 45 | 'enable_themes' => ENABLE_THEMES, |
||
| 46 | 'enable_iconsets' => ENABLE_ICONSETS, |
||
| 47 | 'enable_widgets' => ENABLE_WIDGETS, |
||
| 48 | ]); |
||
| 49 | if (CONTACT_PREFIX) { |
||
| 50 | $serverConfig['contact_prefix'] = json_decode(CONTACT_PREFIX); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 51 | } |
||
| 52 | if (CONTACT_SUFFIX) { |
||
| 53 | $serverConfig['contact_suffix'] = json_decode(CONTACT_SUFFIX); |
||
| 54 | } |
||
| 55 | if (defined('ADDITIONAL_COLOR_SCHEMES')) { |
||
| 56 | $serverConfig['additional_color_schemes'] = json_decode((string) ADDITIONAL_COLOR_SCHEMES); |
||
| 57 | } |
||
| 58 | if (defined('ADDITIONAL_CATEGORIES')) { |
||
| 59 | $serverConfig['additional_default_categories'] = json_decode((string) ADDITIONAL_CATEGORIES); |
||
| 60 | } |
||
| 61 | ?> |
||
| 62 | <!DOCTYPE html> |
||
| 63 | <html> |
||
| 64 | |||
| 65 | <head> |
||
| 66 | <meta name="Generator" content="grommunio-web v<?php echo $loader->getVersion(); ?>"> |
||
| 67 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
||
| 68 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
||
| 69 | <title><?php echo $webappTitle; ?></title> |
||
| 70 | <link rel="icon" href="<?php echo $favicon; ?>" type="image/x-icon"> |
||
| 71 | <link rel="shortcut icon" href="<?php echo $favicon; ?>" type="image/x-icon"> |
||
| 72 | |||
| 73 | <script><?php require BASE_PATH . 'client/fingerprint.js'; ?></script> |
||
| 74 | |||
| 75 | <!-- load the login css first as we need it immediately! --> |
||
| 76 | <link rel="stylesheet" href="client/resources/css/external/login.css" > |
||
| 77 | <?php |
||
| 78 | $loader->cssOrder(); |
||
| 79 | echo Theming::getStyles($theme); |
||
| 80 | $iconsetStylesheet = Iconsets::getActiveStylesheet(); |
||
| 81 | ?> |
||
| 82 | <link id="grommunio-iconset-stylesheet" rel="stylesheet" href="<?php echo $iconsetStylesheet; ?>" > |
||
| 83 | </head> |
||
| 84 | |||
| 85 | <body class="zarafa-webclient theme-<?php echo strtolower((string) $theme ?: 'basic'); |
||
| 86 | echo ' ' . $hideFavorites; |
||
| 87 | echo ' ' . $scrollFavorites; |
||
| 88 | echo ' ' . $unreadBorders; ?>"> |
||
| 89 | <div id="loading-mask"> |
||
| 90 | <div id="form-container" class="loading" style="visibility: hidden;"> |
||
| 91 | <div id="bg"></div> |
||
| 92 | <div id="content"> |
||
| 93 | <div class="left"> |
||
| 94 | <div id="logo"></div> |
||
| 95 | </div> |
||
| 96 | <div class="right"> |
||
| 97 | </div> |
||
| 98 | </div> |
||
| 99 | </div> |
||
| 100 | </div> |
||
| 101 | |||
| 102 | <!-- Translations --> |
||
| 103 | <script src="index.php?version=<?php echo $loader->getVersion(); ?>&load=translations.js&lang=<?php echo $Language->getSelected(); ?>"></script> |
||
| 104 | <!-- JS Files --> |
||
| 105 | <?php |
||
| 106 | $loader->jsOrder(); |
||
| 107 | // get URL data from session and dump it for client to use |
||
| 108 | $urlActionData = []; |
||
| 109 | if (!empty($_SESSION['url_action'])) { |
||
| 110 | $urlActionData = $_SESSION['url_action']; |
||
| 111 | |||
| 112 | // remove data from session so if user reloads webapp then we will again not execute url action |
||
| 113 | unset($_SESSION['url_action']); |
||
| 114 | } |
||
| 115 | ?> |
||
| 116 | |||
| 117 | <script><?php require BASE_PATH . 'client/resize.js'; ?></script> |
||
| 118 | <script> |
||
| 119 | settings = <?php echo $GLOBALS["settings"]->getJSON(); ?>; |
||
| 120 | persistentsettings = <?php echo $GLOBALS["settings"]->getPersistentSettingsJSON(); ?>; |
||
| 121 | languages = <?php echo $Language->getJSON(); ?>; |
||
| 122 | user = <?php echo json_encode($GLOBALS['mapisession']->getUserInfo()); ?>; |
||
| 123 | version = <?php echo json_encode($versionInfo); ?>; |
||
| 124 | serverconfig = <?php echo json_encode($serverConfig); ?>; |
||
| 125 | urlActionData = <?php echo json_encode($urlActionData); ?>; |
||
| 126 | |||
| 127 | Ext.onReady(Zarafa.loadWebclient, Zarafa); |
||
| 128 | </script> |
||
| 129 | </body> |
||
| 130 | </html> |
||
| 131 |