/branches/ant-ng/manager.php |
---|
21,9 → 21,9 |
switch ($action) { |
case 'empty': |
$smarty->assign('header', "Вход"); |
$smarty->assign('body', $core->showSigninForm()); |
$smarty->display('default.tpl'); |
$tmpl->assign('header', "Вход"); |
$tmpl->assign('body', $core->showSigninForm()); |
$tmpl->display('default.tpl'); |
break; |
case 'exit': |
setcookie($cookie, '', time()-10); |
/branches/ant-ng/custom-index.php |
---|
14,8 → 14,8 |
require_once dirname(__FILE__)."/init.php"; |
$smarty->assign('body',$core->showDistributionForm()); |
$tmpl->assign('body',$core->showDistributionForm()); |
$smarty->display('default.tpl'); |
$tmpl->display('default.tpl'); |
?> |
/branches/ant-ng/lib/template.php |
---|
Новый файл |
0,0 → 1,32 |
<?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 |
* |
*/ |
/** |
* Description of Template |
* |
* @author alexw |
*/ |
class Template { |
private $path = NULL; |
function __construct($folder) { |
$this->path = $folder; |
} |
// Применить шаблон |
function doTemplate($name) { |
//TODO написать функцию шаблонизатора |
} |
} |
?> |
/branches/ant-ng/init.php |
---|
45,6 → 45,7 |
$secure = new Security(); |
$core = new Core($db, PREFIX, $secure, $cookie); |
$smarty = new Smarty(); // TODO Вместо Smarty лучше написать свой очень простой шаблонизатор - монстра использовать не целесообразно |
$tmpl = new Template(ROOT."/templates/"); |
//TODO Вместо Smarty лучше написать свой очень простой шаблонизатор - монстра использовать не целесообразно |
?> |
/branches/ant-ng/index.php |
---|
70,8 → 70,8 |
</script> |
"; |
$smarty->assign('scripts', $scripts); |
$tmpl->assign('scripts', $scripts); |
$smarty->display('default.tpl'); |
$tmpl->display('default.tpl'); |
?> |