<?php
## +---------------------------------------------------------------------------+
## | 1. Creating & Calling: |
## +---------------------------------------------------------------------------+
## *** define a relative (virtual) path to tabs.class.php file
define ("TABS_DIR", ""); /* Ex.: "tabs/" */
## *** include Tabs class
require_once(TABS_DIR."tabs.class.php");
## *** create Tabs object
$tabs = new Tabs();
## +---------------------------------------------------------------------------+
## | 2. General Settings: |
## +---------------------------------------------------------------------------+
## *** set unique numeric (integer-valued) identifier for Tabs
## *** (if you want to use several independently configured Tabs objects on single page)
$tabs->SetId(23);
## *** set style for Tabs
## *** "xp", "dark-red", "light-green", "g-style", "grey", "black" or your own style
$tabs->SetStyle("g-style");
## *** show debug info - false|true
$tabs->Debug(true);
## *** choose mode of displaying child tabs - links|dropdown|tabs
$tabs->SetChildTabsType("dropdown");
## *** set form submission type: "get", "post" or "ajax"
$tabs->SetSubmissionType("post");
## +---------------------------------------------------------------------------+
## | 3. Adding tabs: |
## +---------------------------------------------------------------------------+
## *** add tabs
## arguments:
## arg #1 - tab's caption
## arg #2 - file associated with this tab (optional)
## arg #3 - icon associated with this tab (optional)
## arg #4 - tab's tooltip
## Example 1: $tabs->AddTab("Title");
## Example 2: $tabs->AddTab("Title", "text.txt");
## Example 3: $tabs->AddTab("Title", "text.txt", "icon.gif");
## Example 4: $tabs->AddTab("Title", "text.txt", "icon.gif", "tooltip");
$son = $tabs->AddTab("Son's Title #1");
$son2 = $tabs->AddTab("Son's Title #2");
$grandson1=$son->AddTab("Grandson's Title #1");
$grandson2=$son->AddTab("Grandson's Title #2", "examples/code.php");
## +---------------------------------------------------------------------------+
## | 7. Draw Tabs: |
## +---------------------------------------------------------------------------+
$tabs->Display();
?>