Хранилища Subversion ant

Редакция

Авторство | Последнее изменение | Открыть журнал | Скачать | RSS

<?php

/**
 *  
 *  Codename: ant-ng - generator of sources.list for Debian and
 *  distributives, based on Debian
 *  http://alex-w.org.ru/p/antng/
 *
 *  Copyright (c) 2009 Alexander Wolf
 *  Dual licensed under the MIT and GNU LGPL licenses.
 *  http://alex-w.org.ru/p/antng/license
 *
 */


define('ROOT', dirname(__FILE__));

require_once ROOT."/lib/config.php";
require_once ROOT."/lib/DB.php";
require_once ROOT."/lib/Smarty.class.php";
require_once ROOT."/lib/core.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");

$core   = new Core;
$smarty = new Smarty;

?>