[ Index ]
 

Code source de Dotclear 1.2.5

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

title

Body

[fermer]

/inc/ -> post_config.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  
  23  
  24  /* --------------------------------------------------------
  25                  DO NOT EDIT THIS FILE
  26                 NE PAS EDITER CE FICHIER
  27  -------------------------------------------------------- */
  28  
  29  
  30  
  31  
  32  #Version de DotClear
  33  if (file_exists(dirname(__FILE__).'/../VERSION')) {
  34      define('DC_VERSION',trim(implode('',file(dirname(__FILE__).'/../VERSION'))));
  35  } else {
  36      define('DC_VERSION','?');
  37  }
  38  
  39  # Lancement des session si besoin
  40  define('DC_SESSION_NAME','dc_xd');
  41  if (defined('DC_START_SESSION') && !defined('DC_NO_SESSION')) {
  42      require dirname(__FILE__).'/session.php';
  43  }
  44  
  45  # Chargement du fichier ini
  46  require_once dirname(__FILE__).'/classes/class.ini.file.php';
  47  iniFile::read(dirname(__FILE__).'/../conf/dotclear.ini');
  48  
  49  # dc_img_root
  50  if (!defined('dc_img_root'))
  51  {
  52      if (!defined('dc_img_path') || dc_img_path == '') {
  53          if (dc_app_url != '' && strpos(dc_img_url,dc_app_url) === false) {
  54              define('dc_img_root',$_SERVER['DOCUMENT_ROOT'].'/'.dc_img_url);
  55          } else {
  56              define('dc_img_root',dirname(__FILE__).'/../'. str_replace(dc_app_url, "", dc_img_url));
  57          }
  58      } elseif (strpos(dc_img_path,'/') === 0) {
  59          define('dc_img_root',dc_img_path);
  60      } else {
  61          define('dc_img_root',$_SERVER['DOCUMENT_ROOT'].'/'.dc_img_path);
  62      }
  63  }
  64  
  65  # Chargement du layout d'URL
  66  if (dc_url_scan == 'path_info')
  67  {
  68      if (!defined('dc_format_post_url')) { define('dc_format_post_url','%04d/%02d/%02d/%d-%s'); }
  69      if (!defined('dc_format_cat_url')) { define('dc_format_cat_url','%s'); }
  70      if (!defined('dc_format_archive_url')) { define('dc_format_archive_url','%s/%02d'); }
  71      if (!defined('dc_format_day_url')) { define('dc_format_day_url','%s/%02d/%02d'); }
  72  }
  73  elseif (dc_url_scan == 'query_string')
  74  {
  75      if (!defined('dc_format_post_url')) { define('dc_format_post_url','?%04d/%02d/%02d/%d-%s'); }
  76      if (!defined('dc_format_cat_url')) { define('dc_format_cat_url','?%s'); }
  77      if (!defined('dc_format_archive_url')) { define('dc_format_archive_url','?%s/%02d'); }
  78      if (!defined('dc_format_day_url')) { define('dc_format_day_url','?%s/%02d/%02d'); }
  79  }
  80  else
  81  {
  82      if (!defined('dc_format_post_url')) { define('dc_format_post_url','%04d/%02d/%02d/%d-%s'); }
  83      if (!defined('dc_format_cat_url')) { define('dc_format_cat_url','%s'); }
  84      if (!defined('dc_format_archive_url')) { define('dc_format_archive_url','%s/%02d'); }
  85      if (!defined('dc_format_day_url')) { define('dc_format_day_url','%s/%02d/%02d'); }
  86  }
  87  
  88  # Chargement des locales
  89  if (!empty($_SESSION['sess_user_lang'])) {
  90      define('DC_LANG',$_SESSION['sess_user_lang']);
  91  } else {
  92      define('DC_LANG',dc_default_lang);
  93  }
  94  
  95  require_once dirname(__FILE__).'/libs/lib.l10n.php';
  96  l10n::init();
  97  
  98  # On vérifier si le fichie UPDATE est modifiable
  99  define('DC_UPDATE_FILE',dirname(__FILE__).'/../conf/UPDATE');
 100  
 101  if (defined('DC_UPDATE_FILE') && is_writable(DC_UPDATE_FILE)) {
 102      define('DC_UPDATE_FILE_W',true);
 103  }
 104  
 105  # Répertoire share
 106  define('DC_SHARE_DIR',dirname(__FILE__).'/../share');
 107  ?>


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