dolibarr 19.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 *
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
27define('ALLOWED_IF_UPGRADE_UNLOCK_FOUND', 1);
28include_once 'inc.php';
29include_once '../core/class/html.form.class.php';
30include_once '../core/class/html.formadmin.class.php';
31
32global $langs;
33
34$err = 0;
35
36// If the config file exists and is filled, we're not on first install so we skip the language selection page
37if (file_exists($conffile) && isset($dolibarr_main_url_root)) {
38 header("Location: check.php?testget=ok");
39 exit;
40}
41
42$langs->load("admin");
43
44
45/*
46 * View
47 */
48
49$formadmin = new FormAdmin(null); // Note: $db does not exist yet but we don't need it, so we put ''.
50
51pHeader("", "check"); // Next step = check
52
53
54if (!is_readable($conffile)) {
55 print '<br>';
56 print '<span class="opacitymedium">'.$langs->trans("NoReadableConfFileSoStartInstall").'</span>';
57}
58
59
60// Ask installation language
61print '<br><br><div class="center">';
62print '<table>';
63
64print '<tr>';
65print '<td>'.$langs->trans("DefaultLanguage").' : </td><td>';
66print $formadmin->select_language('auto', 'selectlang', 1, 0, 0, 1);
67print '</td>';
68print '</tr>';
69
70print '</table></div>';
71
72
73
74//print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>';
75
76// If there's no error, we display the next step button
77if ($err == 0) {
78 pFooter(0);
79}
Class to generate html code for admin pages.
pHeader($subtitle, $next, $action='set', $param='', $forcejqueryurl='', $csstable='main-inside')
Show HTML header of install pages.
Definition inc.php:516
pFooter($nonext=0, $setuplang='', $jscheckfunction='', $withpleasewait=0, $morehtml='')
Print HTML footer of install pages.
Definition inc.php:605