function tabc($s = '') { println(stencil_tabc($s)); }
function OuterHTML() { $res = ''; $n = count($this->pages); $p = "count={$n};"; for ($i = 0; $i < $n; $i++) { $p .= 'tab' . $i . '=' . prepare_arg($this->pages[$i]['title']) . ';'; } if ($this->settings['name'] == '') { $suff = 'tabctrl'; } else { $suff = $this->settings['name']; } if (isset($GLOBALS[$suff]) && $GLOBALS[$suff] != '') { $active = $GLOBALS[$suff]; } else { $active = 0; } if ($active < 0) { $active = 0; } if ($active >= count($this->pages)) { $active = count($this->pages) - 1; } $p .= ';active=' . $active; $url = $this->settings['url']; if ($url == '') { $url = content_url_get_full(); } $p .= ';url=' . prepare_arg($url); $res .= stencil_tabo($p . ';suff=' . prepare_arg($this->settings['name'])); $res .= $this->pages[$active]['src']; $res .= stencil_tabc(); return $res; }