28 if (!defined(
'NOREQUIREUSER')) {
29 define(
'NOREQUIREUSER',
'1');
31 if (!defined(
'NOREQUIRESOC')) {
32 define(
'NOREQUIRESOC',
'1');
34 if (!defined(
'NOREQUIRETRAN')) {
35 define(
'NOREQUIRETRAN',
'1');
37 if (!defined(
'NOTOKENRENEWAL')) {
38 define(
'NOTOKENRENEWAL',
'1');
40 if (!defined(
'NOLOGIN')) {
41 define(
'NOLOGIN',
'1');
43 if (!defined(
'NOREQUIREMENU')) {
44 define(
'NOREQUIREMENU',
'1');
46 if (!defined(
'NOREQUIREHTML')) {
47 define(
'NOREQUIREHTML',
'1');
49 if (!defined(
'NOREQUIREAJAX')) {
50 define(
'NOREQUIREAJAX',
'1');
52 if (!defined(
'NOSESSION')) {
53 define(
'NOSESSION',
'1');
56 require_once __DIR__.
'/../../main.inc.php';
61 if (empty($dolibarr_nocache)) {
62 header(
'Cache-Control: max-age=10800, public, must-revalidate');
64 header(
'Expires: '.gmdate(
'D, d M Y H:i:s',
dol_now(
'gmt') + 10800).
' GMT');
66 header(
'Cache-Control: no-cache');
70 $manifest =
new stdClass();
73 $manifest->name = constant(
'DOL_APPLICATION_TITLE');
74 if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
75 $manifest->name = $conf->global->MAIN_APPLICATION_TITLE;
79 $manifest->theme_color = !empty($conf->global->MAIN_MANIFEST_APPLI_THEME_COLOR) ? $conf->global->MAIN_MANIFEST_APPLI_THEME_COLOR :
'#F05F40';
80 $manifest->background_color = !empty($conf->global->MAIN_MANIFEST_APPLI_BG_COLOR) ? $conf->global->MAIN_MANIFEST_APPLI_BG_COLOR :
"#ffffff";
81 $manifest->display =
"standalone";
82 $manifest->splash_pages =
null;
83 $manifest->icons = array();
85 if (!empty($conf->global->MAIN_MANIFEST_APPLI_LOGO_URL)) {
86 $icon =
new stdClass();
87 $icon->src = $conf->global->MAIN_MANIFEST_APPLI_LOGO_URL;
88 if ($conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE) {
89 $icon->sizes = $conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE.
"x".$conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE;
91 $icon->sizes =
"512x512";
93 $icon->type =
"image/png";
94 $manifest->icons[] = $icon;
95 } elseif (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED)) {
96 if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)) {
97 $iconRelativePath =
'logos/thumbs/'.$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI;
98 $iconPath = $conf->mycompany->dir_output.
'/'.$iconRelativePath;
99 if (is_readable($iconPath)) {
100 $imgSize = getimagesize($iconPath);
101 if (!empty($imgSize)) {
102 $icon =
new stdClass();
103 $icon->src = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($iconRelativePath);
104 $icon->sizes = $imgSize[0].
"x".$imgSize[1];
105 $icon->type =
"image/png";
106 $manifest->icons[] = $icon;
111 if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL)) {
112 $iconRelativePath =
'logos/thumbs/'.$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL;
113 $iconPath = $conf->mycompany->dir_output.
'/'.$iconRelativePath;
114 if (is_readable($iconPath)) {
115 $imgSize = getimagesize($iconPath);
117 $icon =
new stdClass();
118 $icon->src = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($iconRelativePath);
119 $icon->sizes = $imgSize[0].
"x".$imgSize[1];
120 $icon->type =
"image/png";
121 $manifest->icons[] = $icon;
126 if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED)) {
127 $iconRelativePath =
'logos/'.$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED;
128 $iconPath = $conf->mycompany->dir_output.
'/'.$iconRelativePath;
129 if (is_readable($iconPath)) {
130 $imgSize = getimagesize($iconPath);
132 $icon =
new stdClass();
133 $icon->src = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($iconRelativePath);
134 $icon->sizes = $imgSize[0].
"x".$imgSize[1];
135 $icon->type =
"image/png";
136 $manifest->icons[] = $icon;
143 if (empty($manifest->icons)) {
144 $icon =
new stdClass();
145 $icon->src = DOL_URL_ROOT.
'/theme/dolibarr_256x256_color.png';
146 $icon->sizes =
"256x256";
147 $icon->type =
"image/png";
148 $manifest->icons[] = $icon;
152 print json_encode($manifest);
dol_now($mode='auto')
Return date for now.
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.