diff --git a/includes/sys_template.php b/includes/sys_template.php index 96df3936..2ed37d19 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -38,25 +38,31 @@ function tabs($tabs, $selected = 0) $tab_header = []; $tab_content = []; foreach ($tabs as $header => $content) { - $class = ''; + $active = false; $id = $header; $href = '#' . $id; if (count($tab_header) == $selected) { - $class = 'active'; + $active = true; } if (is_array($content)) { $href = $content['href']; $content = null; $id = null; } - $tab_header[] = ''; - $tab_content[] = $content ? '
' + $tab_content[] = $content + ? '
' . $content - . '
' : ''; + . '
' + : ''; } return div('', [ '',