dolibarr  16.0.5
manifest.json.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
4  * Copyright (C) 2007-2017 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
6  * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
7  * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FI8TNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
28 if (!defined('NOREQUIREUSER')) {
29  define('NOREQUIREUSER', '1');
30 }
31 if (!defined('NOREQUIREDB')) {
32  define('NOREQUIREDB', '1');
33 }
34 if (!defined('NOREQUIRESOC')) {
35  define('NOREQUIRESOC', '1');
36 }
37 if (!defined('NOREQUIRETRAN')) {
38  define('NOREQUIRETRAN', '1');
39 }
40 if (!defined('NOCSRFCHECK')) {
41  define('NOCSRFCHECK', '1');
42 }
43 if (!defined('NOTOKENRENEWAL')) {
44  define('NOTOKENRENEWAL', '1');
45 }
46 if (!defined('NOLOGIN')) {
47  define('NOLOGIN', '1');
48 }
49 if (!defined('NOREQUIREMENU')) {
50  define('NOREQUIREMENU', '1');
51 }
52 if (!defined('NOREQUIREHTML')) {
53  define('NOREQUIREHTML', '1');
54 }
55 if (!defined('NOREQUIREAJAX')) {
56  define('NOREQUIREAJAX', '1');
57 }
58 if (!defined('NOSESSION')) {
59  define('NOSESSION', '1');
60 }
61 
62 require_once __DIR__.'/../../main.inc.php';
63 
64 $appli = constant('DOL_APPLICATION_TITLE');
65 if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
66  $appli = $conf->global->MAIN_APPLICATION_TITLE;
67 }
68 
69 top_httphead('text/json');
70 // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
71 if (empty($dolibarr_nocache)) {
72  header('Cache-Control: max-age=10800, public, must-revalidate');
73  // For a text/json, we must set an Expires to avoid to have it forced to an expired value by the web server
74  header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + 10800).' GMT');
75 } else {
76  header('Cache-Control: no-cache');
77 }
78 
79 ?>
80 {
81  "name": "<?php echo $appli; ?>",
82  "icons": [
83  {
84  "src": "<?php echo DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; ?>",
85  "sizes": "256x256",
86  "type": "image/png"
87  }
88  ],
89  "theme_color": "#ffffff",
90  "background_color": "#ffffff",
91  "display": "standalone"
92 }
top_httphead
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
Definition: main.inc.php:1407
dol_now
dol_now($mode='auto')
Return date for now.
Definition: functions.lib.php:2845