index.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 <http://www.gnu.org/licenses/>.
  18. */
  19. /**
  20. * \file htdocs/install/index.php
  21. * \ingroup install
  22. * \brief Show page to select language. This is done only for a first installation.
  23. * For a reinstall this page redirect to page check.php
  24. */
  25. include_once 'inc.php';
  26. include_once '../core/class/html.form.class.php';
  27. include_once '../core/class/html.formadmin.class.php';
  28. global $langs;
  29. $err = 0;
  30. // If the config file exists and is filled, we're not on first install so we skip the language selection page
  31. if (file_exists($conffile) && isset($dolibarr_main_url_root))
  32. {
  33. header("Location: check.php?testget=ok");
  34. exit;
  35. }
  36. $langs->load("admin");
  37. /*
  38. * View
  39. */
  40. $formadmin=new FormAdmin(''); // Note: $db does not exist yet but we don't need it, so we put ''.
  41. pHeader("", "check"); // Next step = check
  42. // Ask installation language
  43. print '<br><br><div class="center">';
  44. print '<table>';
  45. print '<tr>';
  46. print '<td>'.$langs->trans("DefaultLanguage").' : </td><td>';
  47. print $formadmin->select_language('auto','selectlang',1,0,0,1);
  48. print '</td>';
  49. print '</tr>';
  50. print '</table></div>';
  51. print '<br><br>'.$langs->trans("SomeTranslationAreUncomplete");
  52. // If there's no error, we display the next step button
  53. if ($err == 0) pFooter(0);