function smarty_block_tabContent($params, $content, &$smarty, &$repeat) { require_once IBSINC . "tab.php"; /* create content of tabs parameter tab_name(string,required): name of tab title, that when it's selected, this content would be shown */ if (!is_null($content)) { $table_id = getTabTableID(FALSE); $tab_id = fixTabName($params["tab_name"]); return <<<END \t<div id="{$table_id}_{$tab_id}_content"> \t <table border="0" cellspacing="0" cellpadding="0" width="100%"> \t {$content} \t </table> \t</div> \t<script> \t\t{$table_id}.initContent("{$table_id}_{$tab_id}"); \t</script> END; } }
function smarty_block_tabTable($params, $content, &$smarty, &$repeat) { require_once IBSINC . "tab.php"; /* create header and footer of an tab constructs parameter tabs(string,required): "," seperated list of tab ids. tab ids are used for labling tabs and also used for dom ids, so they must be unique. They can contain white spaces parameter content_height(integer,optional): set height of contents, if this value is small, you'll see tab goes up n down parameter action_icon(boolean,optional): Tells which icon to use for form submit Can be on of "edit" "delete" "add" "load" "save" or "ok" default is "ok" */ if (!is_null($content)) { $table_id = getTabTableID(FALSE); $buttons = createButtons($params["tabs"], $table_id); $height = isset($params["content_height"]) ? $params["content_height"] : 200; return createTabTable($buttons, $content, $table_id, $height, $params["action_icon"]); } else { $table_id = getTabTableID(TRUE); } }