root/trunk/includes/includes.inc.php
| Revision 16, 2.2 KB (checked in by alexx, 7 years ago) |
|---|
| Line | |
|---|---|
| 1 | <?php |
| 2 | /****************************************************** Open .node *** |
| 3 | * Description: |
| 4 | * Status: Stable. |
| 5 | * Author: Alexandre Dath <alexandre@dotnode.com> |
| 6 | * $Id$ |
| 7 | * |
| 8 | * Copyright (C) 2005 Alexandre Dath <alexandre@dotnode.com> |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by |
| 12 | * the Free Software Foundation; either version 2 of the License, or |
| 13 | * (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software Foundation, |
| 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 23 | ******************** http://opensource.ikse.net/projects/dotnode ***/ |
| 24 | |
| 25 | include('config.inc.php'); |
| 26 | |
| 27 | include('Mail.php'); // PEAR |
| 28 | |
| 29 | include('DB.php'); // PEAR |
| 30 | |
| 31 | include('smarty.inc.php'); |
| 32 | include('functions.inc.php'); |
| 33 | |
| 34 | // To handle difference in PHP_SELF under Apache1 and Apache2 |
| 35 | if( ereg("\?", $_SERVER['REQUEST_URI']) ) |
| 36 | list($_SERVER['PHP_SELF']) = split("\?", $_SERVER['REQUEST_URI']); |
| 37 | else |
| 38 | $_SERVER['PHP_SELF'] = $_SERVER['REQUEST_URI']; |
| 39 | |
| 40 | if(valid_lang(normalize_lang($_COOKIE['lang']))) |
| 41 | { |
| 42 | $lang = normalize_lang($_COOKIE['lang']); |
| 43 | } |
| 44 | elseif($_SERVER['HTTP_ACCEPT_LANGUAGE']) |
| 45 | { |
| 46 | $accepted_language = get_pref_language_array($_SERVER['HTTP_ACCEPT_LANGUAGE']); |
| 47 | foreach($accepted_language as $language) |
| 48 | { |
| 49 | list($lang) = split('-',$language); |
| 50 | if(valid_lang(normalize_lang($lang))) |
| 51 | { |
| 52 | $lang = normalize_lang($lang); |
| 53 | break; |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | if(!isset($lang)) |
| 59 | { |
| 60 | $lang = 'en_US'; |
| 61 | } |
| 62 | |
| 63 | $nyrk['lang'] = $lang; |
| 64 | $_SMARTY['lang'] = $lang; |
| 65 | putenv("LANG=$lang.UTF-8"); |
| 66 | |
| 67 | setlocale (LC_TIME, $lang.'.UTF-8'); |
| 68 | setlocale (LC_MESSAGES, $lang.'.UTF-8'); |
| 69 | |
| 70 | # setlocale (LC_TIME, $lang.'.UTF-8'); |
| 71 | |
| 72 | bindtextdomain('dotnode', LOCALEPATH); |
| 73 | textdomain('dotnode'); |
| 74 | bind_textdomain_codeset('dotnode', 'UTF-8'); |
| 75 | |
| 76 | include('labels.inc.php'); |
| 77 | include('menus.inc.php'); |
| 78 | include('table_fields.inc.php'); |
| 79 | include('access_fields.inc.php'); |
| 80 | |
| 81 | ?> |
Note: See TracBrowser
for help on using the browser.
