Хранилища Subversion kbase

Редакция

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

<?php

/**
 *  KBase  
 *  http://alex-w.org.ru/p/kbase/
 *
 *  Copyright (c) 2009 Alexander Wolf
 *  Dual licensed under the MIT and GNU LGPL licenses.
 *  http://alex-w.org.ru/p/kbase/license
 *
 */


require_once dirname(__FILE__)."/config.inc.php";
require_once ROOT."/libs/DB.php";
require_once ROOT."/libs/core.php";
require_once ROOT."/libs/theme.php";
require_once ROOT."/libs/auth.php";

$dsn = array(
        'phptype'       => 'mysql',
        'username'      => DBUSER,
        'password'      => DBPASS,
        'hostspec'      => DBHOST,
        'database'      => DBNAME,
);
$options = array(
        'debug'         => 2,
        'portability'   => DB_PORTABILITY_ALL,
);

$db =& DB::connect($dsn, $options);
if (PEAR::isError($db)) {
    die($db->getMessage());
}
$db->setFetchMode(DB_FETCHMODE_ASSOC);
$query =& $db->query("SET NAMES utf8");

setlocale(LC_MESSAGES, KBLANG);
bindtextdomain(LDOMAIN, ROOT."/locale");
textdomain(LDOMAIN);
bind_textdomain_codeset(LDOMAIN, 'UTF-8');

$core   = new Core;
$theme  = new Theme;
$auth   = new Auth;

$cookie["sign"] = "_kbSign";
$cookie["hash"] = "_kbHash";

?>