Редакция 389 |
Редакция 460 |
К новейшей редакции |
Авторство |
Сравнить с предыдущей |
Последнее изменение |
Открыть журнал
| Скачать
| 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/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://d.alex-w.org.ru/p/ant-ng/"; //TODO Автоматизировать нахождение корневой веб-папки
$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'));
?>