Хранилища Subversion kbase

Редакция

Редакция 6 | Редакция 9 | К новейшей редакции | Только различия | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

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