add 'Fresh Blue' style from umts-tools.jerryweb.org
[diogenes.git] / include / diogenes.common.inc.php
CommitLineData
6855525e
JL
1<?php
2/*
3 * Copyright (C) 2003-2004 Polytechnique.org
4 * http://opensource.polytechnique.org/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 // define Diogenes core classes
22 require_once 'diogenes.globals.inc.php';
23 require_once 'diogenes/diogenes.database.inc.php';
24 require_once 'diogenes.session.inc.php';
25 require_once 'diogenes.cvs.inc.php';
26 require_once 'Plugins.php';
27
28 // get custom definitions
29 $globals = new DiogenesGlobals();
30 require_once 'diogenes.config.inc.php';
31
32 // location of the Diogenes library
33 if (!isset($globals->libroot))
34 $globals->libroot = $globals->root."/lib";
35
36 // connect to database
37 $globals->dbconnect();
38
39 // read extra options from database
40 $globals->readOptions();
41
42 // set up the plugin holder
43 $globals->plugins = new Diogenes_Plugins($globals->db, $globals->root . "/plugins", $globals->spoolroot . "/diogenes_c");
44
45 // set up the icons
46 $globals->icons = new DiogenesIcons();
47
48 // do we want to debug database calls ?
49 if ($globals->debugdatabase)
50 $globals->db->trace_on();
51
52 // environment variable for gettext
53 bindtextdomain("diogenes", "{$globals->root}/locale");
54 textdomain("diogenes");
55 if (isset($_COOKIE['lang'])) {
56 putenv("LANG={$_COOKIE['lang']}");
57 setlocale(LC_ALL,$_COOKIE['lang']);
58 }
59
60?>