dolibarr 21.0.0-beta
index.php
1<?php
2/*
3 * Copyright (C) 2024 Anthony Damhet <a.damhet@progiseize.fr>
4 *
5 * This program and files/directory inner it is free software: you can
6 * redistribute it and/or modify it under the terms of the
7 * GNU Affero General Public License (AGPL) as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU AGPL for more details.
15 *
16 * You should have received a copy of the GNU AGPL
17 * along with this program. If not, see <https://www.gnu.org/licenses/agpl-3.0.html>.
18 */
19
20$res=0;
21if (! $res && file_exists("../../main.inc.php")) : $res=@include '../../main.inc.php';
22endif;
23if (! $res && file_exists("../../../main.inc.php")) : $res=@include '../../../main.inc.php';
24endif;
25if (! $res && file_exists("../../../../main.inc.php")) : $res=@include '../../../../main.inc.php';
26endif;
27
28// Protection if external user
29if ($user->socid > 0) : accessforbidden();
30endif;
31
32// Includes
33dol_include_once('admin/tools/ui/class/documentation.class.php');
34
35// Load documentation translations
36$langs->load('uxdocumentation');
37
38//
39$documentation = new Documentation($db);
40
41// Output html head + body - Param is Title
42$documentation->docHeader();
43
44// Set view for menu and breadcrumb
45$documentation->view = array('Components');
46
47// Output sidebar
48$documentation->showSidebar(); ?>
49
50<div class="doc-wrapper">
51
52 <?php $documentation->showBreadCrumb(); ?>
53
54 <div class="doc-content-wrapper">
55
56 <h1 class="documentation-title"><?php echo $langs->trans('DocComponentsTitle'); ?></h1>
57 <p class="documentation-text"><?php echo $langs->trans('DocComponentsMainDescription'); ?></p>
58
59 <?php $documentation->showSummary(); ?>
60 </div>
61
62</div>
63<?php
64// Output close body + html
65$documentation->docFooter();
66?>
Class to manage UI documentation.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.