Initial Commit of AgileBill Open Source

This commit is contained in:
unknown
2008-11-26 14:50:40 -08:00
parent ae5a0fc25e
commit 02306ccc47
2954 changed files with 410976 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* Type: function
* Name: block
* Purpose: display an agilebill block
* Usage: {block module=? block=?}
* -------------------------------------------------------------
*/
function smarty_function_block($params, &$this)
{
extract($params);
if($module == 'TEMPLATE') {
$this->display('file:' . PATH_THEMES . '' . THEME_NAME . '/' . $smarty->template_dir . '' . $block . '.tpl');
} else {
if(is_file(PATH_THEMES . '' . THEME_NAME . '/blocks/' . $module . '/' . $block . '.tpl'))
$this->display('file:'. PATH_THEMES . '' . THEME_NAME . '/blocks/' . $module . '/' . $block . '.tpl' );
elseif (is_file(PATH_THEMES . '' . DEF_THEME_N . '/blocks/' . $module . '/' . $block . '.tpl'))
$this->display('file:' . PATH_THEMES . '' . DEF_THEME_N . '/blocks/' . $module . '/' . $block . '.tpl');
elseif (is_file(PATH_THEMES . 'default/blocks/' . $module . '/' . $block . '.tpl'))
$this->display('file:' . PATH_THEMES . 'default/blocks/' . $module . '/' . $block . '.tpl');
else
$this->display('file:'. PATH_THEMES . '' . DEF_THEME_N . '/blocks/core/invalid_page.tpl');
}
}
?>