[ Index ]
 

Code source de Dotclear 1.2.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/install/ -> prepend.php (source)

   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  /*DEBUG_FLAG
  23  error_reporting(E_ALL);
  24  //*/
  25  
  26  # If you renamed your "ecrire" folder
  27  if (!defined('DC_ECRIRE')) {
  28      define('DC_ECRIRE','ecrire');
  29  }
  30  
  31  require_once dirname(__FILE__).'/../inc/magic_strip.php';
  32  
  33  require dirname(__FILE__).'/cookie.session.php';
  34  $ses = new cookieSession('DC_INSTALL');
  35  
  36  #Version de DotClear
  37  if (file_exists(dirname(__FILE__).'/../VERSION')) {
  38      define('DC_VERSION',trim(implode('',file(dirname(__FILE__).'/../VERSION'))));
  39  } else {
  40      define('DC_VERSION','?');
  41  }
  42  
  43  if (defined('STEP') && $ses->f('step') != STEP) {
  44      header('Location: index.php');
  45      exit;
  46  }
  47  
  48  require_once dirname(__FILE__).'/../inc/classes/class.mysql.php';
  49  require_once dirname(__FILE__).'/../inc/classes/class.blog.php';
  50  require_once dirname(__FILE__).'/../inc/classes/class.checklist.php';
  51  require_once dirname(__FILE__).'/../inc/classes/class.xmlsql.php';
  52  require_once dirname(__FILE__).'/../inc/classes/class.ini.file.php';
  53  require_once dirname(__FILE__).'/../inc/libs/lib.form.php';
  54  require_once dirname(__FILE__).'/../inc/libs/lib.util.php';
  55  require_once dirname(__FILE__).'/../inc/libs/lib.files.php';
  56  require_once dirname(__FILE__).'/../inc/libs/lib.l10n.php';
  57  
  58  
  59  if (!empty($_POST['lang'])) {
  60      $ses->reg('lang',$_POST['lang']);
  61  }
  62  if (!empty($_POST['encoding'])) {
  63      $ses->reg('encoding',$_POST['encoding']);
  64  }
  65  
  66  if ($ses->f('encoding') !== null && $ses->f('encoding') == 'UTF-8') {
  67      define('ENCODING','UTF-8');
  68      define('LANG_PREFIX','-utf8');
  69  } else {
  70      define('ENCODING','ISO-8859-1');
  71      define('LANG_PREFIX','');
  72  }
  73  
  74  l10n::init();
  75  if ($ses->f('lang') !== null) {
  76      l10n::set(dirname(__FILE__).'/../l10n/'.$ses->f('lang').LANG_PREFIX.'/install');
  77  }
  78  
  79  if (file_exists(dirname(__FILE__).'/../conf/config.php') && !defined('NOT_CHECK_CONFIG')) {
  80      header('Content-Type: text/plain');
  81      echo __('This weblog is still installed. You must remove conf/config.php first');
  82      exit;
  83  }
  84  
  85  # Conf
  86  
  87  $img_chk_on = '../'.DC_ECRIRE.'/images/check_on.png';
  88  $img_chk_off = '../'.DC_ECRIRE.'/images/check_off.png';
  89  $img_chk_wrn = '../'.DC_ECRIRE.'/images/check_wrn.png';
  90  
  91  ?>


Généré le : Fri Feb 23 21:40:15 2007 par Balluche grâce à PHPXref 0.7