123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?php
- # ***** BEGIN LICENSE BLOCK *****
- # This file is part of DotClear.
- # Copyright (c) 2004 Olivier Meunier and contributors. All rights
- # reserved.
- #
- # DotClear 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 2 of the License, or
- # (at your option) any later version.
- #
- # DotClear 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
- # along with DotClear; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- #
- # ***** END LICENSE BLOCK *****
- /* --------------------------------------------------------
- DO NOT EDIT THIS FILE
- NE PAS EDITER CE FICHIER
- -------------------------------------------------------- */
- #Version de DotClear
- if (file_exists(dirname(__FILE__).'/../VERSION')) {
- define('DC_VERSION',trim(implode('',file(dirname(__FILE__).'/../VERSION'))));
- } else {
- define('DC_VERSION','?');
- }
- # Lancement des session si besoin
- define('DC_SESSION_NAME','dc_xd');
- if (defined('DC_START_SESSION') && !defined('DC_NO_SESSION')) {
- require dirname(__FILE__).'/session.php';
- }
- # Chargement du fichier ini
- require_once dirname(__FILE__).'/classes/class.ini.file.php';
- iniFile::read(dirname(__FILE__).'/../conf/dotclear.ini');
- # dc_img_root
- if (!defined('dc_img_path')) {
- define('dc_img_root',$_SERVER['DOCUMENT_ROOT'].'/'.dc_img_url);
- } elseif (strpos(dc_img_path,'/') === 0) {
- define('dc_img_root',dc_img_path);
- } else {
- define('dc_img_root',$_SERVER['DOCUMENT_ROOT'].'/'.dc_img_path);
- }
- # Chargement du layout d'URL
- if (dc_url_scan == 'path_info')
- {
- if (!defined('dc_format_post_url')) { define('dc_format_post_url','%04d/%02d/%02d/%d-%s'); }
- if (!defined('dc_format_cat_url')) { define('dc_format_cat_url','%s'); }
- if (!defined('dc_format_archive_url')) { define('dc_format_archive_url','%s/%02d'); }
- if (!defined('dc_format_day_url')) { define('dc_format_day_url','%s/%02d/%02d'); }
- }
- elseif (dc_url_scan == 'query_string')
- {
- if (!defined('dc_format_post_url')) { define('dc_format_post_url','?%04d/%02d/%02d/%d-%s'); }
- if (!defined('dc_format_cat_url')) { define('dc_format_cat_url','?%s'); }
- if (!defined('dc_format_archive_url')) { define('dc_format_archive_url','?%s/%02d'); }
- if (!defined('dc_format_day_url')) { define('dc_format_day_url','?%s/%02d/%02d'); }
- }
- else
- {
- if (!defined('dc_format_post_url')) { define('dc_format_post_url','%04d/%02d/%02d/%d-%s'); }
- if (!defined('dc_format_cat_url')) { define('dc_format_cat_url','%s'); }
- if (!defined('dc_format_archive_url')) { define('dc_format_archive_url','%s/%02d'); }
- if (!defined('dc_format_day_url')) { define('dc_format_day_url','%s/%02d/%02d'); }
- }
- # Chargement des locales
- if (!empty($_SESSION['sess_user_lang'])) {
- define('DC_LANG',$_SESSION['sess_user_lang']);
- } else {
- define('DC_LANG',dc_default_lang);
- }
- require_once dirname(__FILE__).'/libs/lib.l10n.php';
- l10n::init();
- # On vérifier si le fichie UPDATE est modifiable
- define('DC_UPDATE_FILE',dirname(__FILE__).'/../conf/UPDATE');
- if (defined('DC_UPDATE_FILE') && is_writable(DC_UPDATE_FILE)) {
- define('DC_UPDATE_FILE_W',true);
- }
- # Répertoire share
- define('DC_SHARE_DIR',dirname(__FILE__).'/../share');
- ?>
|