Хранилища Subversion kbase

Редакция

Редакция 28 | Содержимое файла | Сравнить с предыдущей | Последнее изменение | Открыть журнал | RSS

Редакция Автор № строки Строка
5 alex-w 1
<?php
2
 
3
/**
4
 *  KBase  
5
 *  http://alex-w.org.ru/p/kbase/
6
 *
7
 *  Copyright (c) 2009 Alexander Wolf
8
 *  Dual licensed under the MIT and GNU LGPL licenses.
9
 *  http://alex-w.org.ru/p/kbase/license
10
 *
11
 */
12
 
13
require_once dirname(__FILE__)."/config.inc.php";
6 alex-w 14
require_once ROOT."/libs/DB.php";
5 alex-w 15
require_once ROOT."/libs/core.php";
16
require_once ROOT."/libs/theme.php";
8 alex-w 17
require_once ROOT."/libs/auth.php";
5 alex-w 18
 
19
$dsn = array(
20
        'phptype'       => 'mysql',
21
        'username'      => DBUSER,
22
        'password'      => DBPASS,
23
        'hostspec'      => DBHOST,
24
        'database'      => DBNAME,
25
);
6 alex-w 26
$options = array(
5 alex-w 27
        'debug'         => 2,
28
        'portability'   => DB_PORTABILITY_ALL,
29
);
30
 
31
$db =& DB::connect($dsn, $options);
32
if (PEAR::isError($db)) {
33
    die($db->getMessage());
34
}
35
$db->setFetchMode(DB_FETCHMODE_ASSOC);
36
$query =& $db->query("SET NAMES utf8");
37
 
14 alex-w 38
setlocale(LC_MESSAGES, KBLANG);
9 alex-w 39
bindtextdomain(LDOMAIN, ROOT."/locale");
40
textdomain(LDOMAIN);
41
bind_textdomain_codeset(LDOMAIN, 'UTF-8');
42
 
5 alex-w 43
$core   = new Core;
44
$theme  = new Theme;
8 alex-w 45
$auth   = new Auth;
5 alex-w 46
 
29 alex-w 47
$cookie["sign"] = "_kbSign";
48
$cookie["hash"] = "_kbHash";
49
 
5 alex-w 50
?>