Редакция 359 |
Редакция 364 |
К новейшей редакции |
Авторство |
Сравнить с предыдущей |
Последнее изменение |
Открыть журнал
| Скачать
| 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";
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";
$secure = new Security
();
$core = new Core
($db, PREFIX
, $secure, $cookie);
$smarty = new Smarty
(); // TODO Вместо Smarty лучше написать свой очень простой шаблонизатор - монстра использовать не целесообразно
?>