dolibarr 23.0.3
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2016 Raphaƫl Doursenaud <rdoursenaud@gpcsolutions.fr>
5 * Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
28define('ALLOWED_IF_UPGRADE_UNLOCK_FOUND', 1);
29include_once 'inc.php';
34'@phan-var-force string $conffile'; // From inc.php
35include_once '../core/class/html.form.class.php';
36include_once '../core/class/html.formadmin.class.php';
37
38global $langs;
39
40$err = 0;
41
42// If the config file exists and is filled, we're not on first install so we skip the language selection page
43if (file_exists($conffile) && isset($dolibarr_main_url_root)) {
44 //header("Location: '.$dolibarr_main_url_root.'/install/check.php?testget=ok");
45 header("Location: check.php?testget=ok");
46 exit;
47}
48
49$langs->load("admin");
50
51
52/*
53 * View
54 */
55
56$formadmin = new FormAdmin(null); // Note: $db does not exist yet but we don't need it, so we put ''.
57
58pHeader("", "check"); // Next step = check
59
60
61if (!is_readable($conffile)) {
62 print '<br>';
63 print '<span class="opacitymedium">'.$langs->trans("NoReadableConfFileSoStartInstall").'</span>';
64}
65
66
67// Ask installation language
68print '<br><br><div class="center">';
69print '<table>';
70
71print '<tr>';
72print '<td>'.$langs->trans("DefaultLanguage").' : </td><td>';
73print $formadmin->select_language('auto', 'selectlang', 1, array(), 0, 1);
74print '</td>';
75print '</tr>';
76
77print '</table></div>';
78
79
80
81//print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>';
82
83// If there's no error, we display the next step button
84if ($err == 0) {
85 pFooter(0);
86}
global $dolibarr_main_url_root
Class to generate html code for admin pages.
$conffile
pHeader($subtitle, $next, $action='set', $param='', $forcejqueryurl='', $csstable='main-inside')
Show HTML header of install pages.
Definition inc.php:541
pFooter($nonext=0, $setuplang='', $jscheckfunction='', $withpleasewait=0, $morehtml='')
Print HTML footer of install pages.
Definition inc.php:635