0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: tabs_helper.php.tar
home/academiac/www/administrator/components/com_chronoforms/helpers/tabs_helper.php 0000604 00000002744 15137234017 0025122 0 ustar 00 <?php /** * CHRONOFORMS version 4.0 * Copyright (c) 2006 - 2011 Chrono_Man, ChronoEngine.com. All rights reserved. * Author: Chrono_Man (ChronoEngine.com) * @license GNU/GPL * Visit http://www.ChronoEngine.com for regular updates and information. **/ defined('_JEXEC') or die('Restricted access'); class TabsHelper { var $prefix = ''; var $active = ''; function __construct(){ } function Header($tabs = array(), $prefix = ''){ if(!empty($prefix)){ $this->prefix = $prefix; } $output = '<div class="tabs"> <ul> '; $counter = 0; foreach($tabs as $id => $title){ if(!empty($prefix)){ $id = $prefix.'_'.$id; } $class = ''; if($counter == 0){ $class = ' class="activetab"'; $this->active = $id; } $output .= '<li id="'.$id.'-panel-tab"'.$class.'><a href="#tabs" onClick="switchTab(\''.$id.'\'); return false;"><span>'.$title.'</span></a></li>'; $output .= "\n"; $counter++; } $output .= ' </ul> </div>'; return $output; } function tabStart($id = ''){ if(!empty($this->prefix)){ $id = $this->prefix.'_'.$id; } $style = ' style="display: none;"'; if($id == $this->active){ $style = ' style="display: block;"'; } $output = '<div id="'.$id.'-panel" class="tabs-panel"'.$style.'> <div class="tabs-panel-inner"> '; return $output; } function tabEnd(){ $output = '</div> </div> '; return $output; } }
©
2018.