dolibarr 24.0.0-beta
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License 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 General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26define('NOSCANPOSTFORINJECTION', 1);
27define('NOSTYLECHECK', 1);
28
29// Load Dolibarr environment
30require '../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
33
44// Load translation files required by the page
45$langs->loadLangs(array("admin", "other", "website"));
46
47if (!$user->admin) {
49}
50
51'
52@phan-var-force Website $object
53@phan-var-force WebsitePage $objectpage
54';
55
56$conf->dol_hide_leftmenu = 1; // Force hide of left menu.
57
58$error = 0;
59$website = GETPOST('website', 'alpha');
60$page = GETPOST('page', 'alpha');
61$pageid = GETPOSTINT('pageid');
62$action = GETPOST('action', 'aZ09');
63
64if (GETPOST('delete')) {
65 $action = 'delete';
66}
67if (GETPOST('preview')) {
68 $action = 'preview';
69}
70if (GETPOST('create')) {
71 $action = 'create';
72}
73if (GETPOST('editmedia')) {
74 $action = 'editmedia';
75}
76if (GETPOST('editcss')) {
77 $action = 'editcss';
78}
79if (GETPOST('editmenu')) {
80 $action = 'editmenu';
81}
82if (GETPOST('setashome')) {
83 $action = 'setashome';
84}
85if (GETPOST('editmeta')) {
86 $action = 'editmeta';
87}
88if (GETPOST('editcontent')) {
89 $action = 'editcontent';
90}
91
92if (empty($action)) {
93 $action = 'preview';
94}
95
96//$permissiontoadd = $user->hasRight('collab', 'read');
97//$permissiontodelete = $user->hasRight('collab', 'delete');
98
99
100/*
101 * Actions
102 */
103
104// None
105
106
107/*
108 * View
109 */
110
111$form = new Form($db);
112
113$help_url = '';
114
115llxHeader('', $langs->trans("WebsiteSetup"), $help_url, '', 0, 0, '', '', '', '', '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">');
116
117print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><div>';
118print '<input type="hidden" name="token" value="'.newToken().'">';
119if ($action == 'create') {
120 print '<input type="hidden" name="action" value="add">';
121}
122
123
124print '<div class="centpercent websitebar">';
125
126
127
128
129print "</div>\n</form>\n";
130
131// End of page
132llxFooter();
133$db->close();
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to manage generation of HTML components Only common components must be here.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.