Хранилища Subversion ant

Сравнить редакции

Не учитывать пробелы Редакция 369 → Редакция 370

/branches/ant-ng/custom-index.php
14,8 → 14,8
 
require_once dirname(__FILE__)."/init.php";
 
echo $tmpl->assign('body',$core->showDistributionForm());
$tmpl->assign('body',$core->showDistributionForm());
 
//$tmpl->display('default.tpl');
$tmpl->display('default.tpl', array('body'));
 
?>
/branches/ant-ng/lib/template.php
25,12 → 25,20
}
public function display($name, $attrs = null) {
//TODO написать функцию шаблонизатора
$content = implode('',$this->path.$name);
foreach ($attrs as $attr) {
$content = str_replace("{".$attr."}", $this->__get($attr), $content);
}
 
return $content;
}
 
public function assign($attr, $value) {
return $this->self[$attr] = $value;
}
 
public function __get($attr = null) {
return $this->self[$attr];
}
 
}
?>