Login   Register  
PHP Classes
elePHPant
Icontem

File: Example.subtab.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rafia alotibi  >  Tab Control  >  Example.subtab.php  >  Download  
File: Example.subtab.php
Role: Example script
Content type: text/plain
Description: Sample usage subtab
Class: Tab Control
Output a tab link bar using HTML tables
Author: By
Last change:
Date: 2005-12-03 20:21
Size: 1,122 bytes
 

Contents

Class file image Download
<?php
include 'tab_control.php';

$tab = new tab_control();

$tab->add_tab(0,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=0','Welcome');
$tab->add_tab(1,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=1','Categories','Example');
$tab->add_tab(2,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=2','Programs');
$tab->add_tab(3,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=3','File');

$tab->set_current($_GET[subtabid]);

$tab->set_style( array('width'    =>"96%",
                       
'border'   =>"#D9D9D9",
                       
'bgcolor'  =>"#F1F1F1",
                       
'current'  =>"#FFFFFF",
                       
'uncurrent'=>"#F1F1F1"
                       
));
                       
$tabs $tab->get_out('<center>Welcome in tab control</center>');
$tab = new tab_control('ltr');
$tab->set_current($_GET[tabid]);
$tab->add_tab(0,'Example.subtab.php?tabid=0','Tab 1',$tabs);
$tab->add_tab(1,'Example.subtab.php?tabid=1','Tab 2','Example Tab 2');
$tab->add_tab(2,'Example.subtab.php?tabid=2','Tab 3','Example Tab 3');
echo 
$tab->get_out('<center>'.$tabs);
?>