Хранилища Subversion ant

Редакция

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

Редакция Автор № строки Строка
304 alex-w 1
<?php
2
 
3
/**
4
 *  
5
 *  Codename: ant-ng - generator of sources.list for Debian and
6
 *  distributives, based on Debian
7
 *  http://alex-w.org.ru/p/antng/
8
 *
9
 *  Copyright (c) 2009 Alexander Wolf
10
 *  Dual licensed under the MIT and GNU LGPL licenses.
11
 *  http://alex-w.org.ru/p/antng/license
12
 *
13
 */
14
 
15
define('ROOT', dirname(__FILE__));
16
 
17
require_once ROOT."/lib/config.php";
18
require_once ROOT."/lib/DB.php";
19
require_once ROOT."/lib/Smarty.class.php";
20
require_once ROOT."/lib/core.php";
21
 
22
$dsn = array(
23
    'phptype'   => 'mysql',
24
    'username'  => DBUSER,
25
    'password'  => DBPASS,
26
    'hostspec'  => DBHOST,
27
    'database'  => DBNAME,
28
);
29
 
30
$options = array(
31
    'debug'         => 2,
32
    'portability'   => 'DB_PORTABILITY_ALL',
33
);
34
 
35
$db =& DB::connect($dsn, $options);
36
if (PEAR::isError($db)) {
37
    die($db->getMessage());
38
}
39
 
40
$db->setFetchMode(DB_FETCHMODE_ASSOC);
41
$query =& $db->query("SET NAMES utf8");
42
 
43
$core   = new Core;
44
$smarty = new Smarty;
45
 
46
?>