index.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. # ***** BEGIN LICENSE BLOCK *****
  3. # This file is part of DotClear.
  4. # Copyright (c) 2004 Olivier Meunier and contributors. All rights
  5. # reserved.
  6. #
  7. # DotClear 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 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # DotClear 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 DotClear; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. #
  21. # ***** END LICENSE BLOCK *****
  22. define('NOT_CHECK_CONFIG',true);
  23. require dirname(__FILE__).'/prepend.php';
  24. $installed = file_exists(dirname(__FILE__).'/../conf/config.php');
  25. if (!$installed) {
  26. $ses->reg('step',2);
  27. }
  28. require dirname(__FILE__).'/__top.php';
  29. echo '<h2>'.__('Welcome on DotClear installation').'</h2>';
  30. echo '<p>'.__('You are about to install DotClear. Please choose your language and encoding.').'</p>';
  31. # On tente de déterminer la première langue
  32. $dlang = '';
  33. if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']))
  34. {
  35. $acclang = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
  36. $L = explode(';', $acclang[0]);
  37. $dlang = substr(trim($L[0]),0,2);
  38. }
  39. if(!$installed)
  40. {
  41. echo
  42. '<form action="check.php" method="post">'.
  43. '<p class="field"><label class="float" for="lang">'.__('Language').' :</label> '.
  44. form::combo('lang',l10n::getISOcodes(1),$dlang).'</p>'.
  45. '<p class="field"><label class="float" for="encoding">'.__('Encoding').' :</label> '.
  46. form::combo('encoding',array('ISO-8859-1'=>'ISO-8859-1','UTF-8'=>'UTF-8'),'UTF-8').'</p>'.
  47. '</p>'.
  48. '<p><input type="submit" class="submit" value="'.__('Go').' &#187;" /></p>'.
  49. '</form>';
  50. }
  51. else
  52. {
  53. echo
  54. '<p class="important">'.__('DotClear is still installed.').'</p>';
  55. }
  56. echo
  57. '<p>'.__('Note: You must accept session cookies to use this installer.').'</p>';
  58. ?>
  59. <?php require dirname(__FILE__).'/__bottom.php'; ?>