dolibarr/htdocs/install/index.php

81 lines
2.4 KiB
PHP
Raw Permalink Normal View History

<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
2025-02-03 14:28:54 +01:00
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
2004-02-02 02:41:33 +01:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
2004-02-02 02:41:33 +01:00
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2004-02-02 02:41:33 +01:00
*/
2004-12-04 16:06:15 +01:00
/**
2008-10-25 19:27:15 +02:00
* \file htdocs/install/index.php
* \ingroup install
* \brief Show page to select language. This is done only for a first installation.
* For a reinstall this page redirect to page check.php
2008-10-25 19:27:15 +02:00
*/
define('ALLOWED_IF_UPGRADE_UNLOCK_FOUND', 1);
2012-08-23 02:46:16 +02:00
include_once 'inc.php';
include_once '../core/class/html.form.class.php';
include_once '../core/class/html.formadmin.class.php';
2004-01-27 15:36:40 +01:00
global $langs;
$err = 0;
2015-07-06 16:33:45 +02:00
// If the config file exists and is filled, we're not on first install so we skip the language selection page
2021-02-22 15:18:01 +01:00
if (file_exists($conffile) && isset($dolibarr_main_url_root)) {
header("Location: check.php?testget=ok");
exit;
}
$langs->load("admin");
2005-02-12 18:14:35 +01:00
2008-10-25 19:27:15 +02:00
/*
* View
*/
2023-01-06 19:34:45 +01:00
$formadmin = new FormAdmin(null); // Note: $db does not exist yet but we don't need it, so we put ''.
2008-10-25 19:27:15 +02:00
pHeader("", "check"); // Next step = check
2022-05-06 20:03:59 +02:00
if (!is_readable($conffile)) {
print '<br>';
print '<span class="opacitymedium">'.$langs->trans("NoReadableConfFileSoStartInstall").'</span>';
}
// Ask installation language
2014-11-25 20:13:43 +01:00
print '<br><br><div class="center">';
2010-09-15 20:07:53 +02:00
print '<table>';
print '<tr>';
print '<td>'.$langs->trans("DefaultLanguage").' : </td><td>';
2025-02-03 14:28:54 +01:00
print $formadmin->select_language('auto', 'selectlang', 1, array(), 0, 1);
2005-10-30 01:42:54 +02:00
print '</td>';
2010-09-15 20:07:53 +02:00
print '</tr>';
2014-11-25 20:13:43 +01:00
print '</table></div>';
2022-05-06 20:03:59 +02:00
//print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>';
2004-01-27 15:36:40 +01:00
2015-07-06 16:33:45 +02:00
// If there's no error, we display the next step button
2021-02-22 15:18:01 +01:00
if ($err == 0) {
pFooter(0);
}