dolibarr/htdocs/install/index.php

70 lines
2.1 KiB
PHP
Raw 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>
2004-02-02 01:41:33 +00: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 01:41:33 +00: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 19:55:30 +00:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2004-02-02 01:41:33 +00:00
*/
2004-12-04 15:06:15 +00:00
/**
2008-10-25 17:27:15 +00: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 17:27:15 +00:00
*/
2012-08-23 00:46:16 +00:00
include_once 'inc.php';
include_once '../core/class/html.form.class.php';
include_once '../core/class/html.formadmin.class.php';
2004-01-27 14:36:40 +00:00
global $langs;
$err = 0;
2015-07-06 14:33:45 +00: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 14:18:01 +00:00
if (file_exists($conffile) && isset($dolibarr_main_url_root)) {
header("Location: check.php?testget=ok");
exit;
}
$langs->load("admin");
2005-02-12 17:14:35 +00:00
2008-10-25 17:27:15 +00:00
/*
* View
*/
$formadmin = new FormAdmin(''); // Note: $db does not exist yet but we don't need it, so we put ''.
2008-10-25 17:27:15 +00:00
pHeader("", "check"); // Next step = check
// Ask installation language
2014-11-25 19:13:43 +00:00
print '<br><br><div class="center">';
2010-09-15 18:07:53 +00:00
print '<table>';
print '<tr>';
print '<td>'.$langs->trans("DefaultLanguage").' : </td><td>';
print $formadmin->select_language('auto', 'selectlang', 1, 0, 0, 1);
2005-10-29 23:42:54 +00:00
print '</td>';
2010-09-15 18:07:53 +00:00
print '</tr>';
2014-11-25 19:13:43 +00:00
print '</table></div>';
2019-11-28 11:40:53 +00:00
print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>';
2004-01-27 14:36:40 +00:00
2015-07-06 14:33:45 +00:00
// If there's no error, we display the next step button
2021-02-22 14:18:01 +00:00
if ($err == 0) {
pFooter(0);
}