Хранилища Subversion ant

Редакция

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

<?php

/**
 *  
 *  Codename: ant-ng - generator of sources.list for apt-distributives
 *  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/template.php";
require_once ROOT."/lib/core.php";
require_once ROOT."/lib/security.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");

$cookie = "asHash";
$webroot = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/";
$manager = "./manager.php";
$process = "./process.php";
$picture = ROOT."/img/d/";

$secure = new Security();
$core   = new Core($db, PREFIX, $secure, $cookie);
$tmpl   = new Template(ROOT."/templates/");

$tmpl->assign('host',$webroot);
$tmpl->assign('header',$core->getEngineAttr('codename'));
$tmpl->assign('engine',$core->getEngineAttr('codename')." ".$core->getEngineAttr('version'));
$tmpl->assign('description',$core->getEngineAttr('description'));

?>