/**
* The required files
*/
require_once(HTML_MENU_PAGE_PATH.'/MenuHorizontal.php');
/**
* Generates a Menu Tab element
* <code>
* +---------+----------------------------+
* | menu1 |
* | menu2 |
* | : |
* +---------+----------------------------+
* Usage:
* $menu = new MenuTab($datareader,$text,$width,$class,$border,
* $cellpadding,$cellspacing,$summary,$caption);
* print $menu->getHtml();
* Or
* MenuTab:display($datareader,$text,$width,$class,$border,
* $cellpadding,$cellspacing,$summary,$caption);
* </code>
* @package menu
*/
class MenuTab extends MenuHorizontal {
/**
* Constructor
* @param DataReader $datareader The Data Reader object
* @param String $text The text header for the table
* @param String $width The Width for the table
* @param String $class The CSS Class name to use
* @param String $border The Border
* @param String $cellpadding The CellSpacing
* @param String $cellspacing The CellPadding
* @param String $summary The Summary
* @param String $caption The Caption
*/
function MenuTab($datareader='',$text='',$width='',$class='',$border='',$cellpadding='',$cellspacing='',$summary='',$caption='') {
$theText = $text !=''?$text :MENU_TAB_TEXT;
$theWidth = $width!=''?$width:MENU_TAB_VIEW_WIDTH;
$theClass = $class!=''?$class:MENU_TAB_VIEW_CLASS;
$theBorder = MENU_TAB_VIEW_BORDER;
$theCellpadding = MENU_TAB_VIEW_CELLPADDING;
$theCellspacing = MENU_TAB_VIEW_CELLSPACING;
$this->layout = LINK_LAYOUT_HORIZONTAL | LINK_LAYOUT_TRIANGLE | LINK_LAYOUT_FILL_OUT;
$this->MenuHorizontal($datareader,$theText,$theWidth,$theClass,$theBorder,$theCellpadding,$theCellspacing,$summary,$caption);
}
/**
* Get the CSS class Name for this component
* @return String The CSS class name
*/
function getCssClass() {
return CSS_MENU_TAB;
}
/**
* Toogle the request parameters which will minimize or maximize this component
* @return array The array of key=>value pair
*/
function getMinimize() {
return $this->getToogle(REQUEST_LINK_SHOW, LINK_SHOW, LINK_SHOW_MENU_TAB);
}
/**
* Get the html for the Tab menu links
* @return String The html
*/
function getHtml() { // TODO, TabStart, TabEnd, etc. CSS
$html = $this->html;
if (LINK_SHOW & LINK_SHOW_MENU_TAB && HTTP_USER_AGENT!=HTTP_USER_AGENT_P900) {
$html .= "<!-- MenuTab -->\r\n";
if (CACHE_MENU && $this->getCacheFileName(CACHE_MENU_PATH)!='' && file_exists($this->getCacheFileName(CACHE_MENU_PATH))) {
$html .= $this->content($this->getCacheFileName(CACHE_MENU_PATH));
} else {
$html .= $this->getColumns();
if (CACHE_MENU) {
$this->save($html, CACHE_MENU_PATH);
}
}
} else {
$html .= $this->getMaximize();
}
return $html;
}
/**
* Display html
* <code>
* Usage:
* MenuTab::display($datareader,$text,$width,$class,$border,
* $cellpadding,$cellspacing,$summary,$caption);
* </code>
* @static
* @param DataReader $datareader The Data Reader object
* @param String $text The text header for the table
* @param String $width The Width for the table
* @param String $class The CSS Class name to use
* @param String $border The Border
* @param String $cellpadding The CellSpacing
* @param String $cellspacing The CellPadding
* @param String $summary The Summary
* @param String $caption The Caption
*/
function display($datareader='',$text='',$width='',$class='',$border='',$cellpadding='',$cellspacing='',$summary='',$caption='') {
$html = new MenuTab($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
$html->addHtml();
}
}
?>
<td class="menuTab" valign="top"><!-- Kontakt os --><a id="Link50" class="menuTab" href="http://www.hvepseeksperten.dk/FormMail/?baseEMNE=" title="Kontakt os via email
">Kontakt os</a>
</td>
<td class="menuTab" valign="top"><!-- Kontakt os --><a id="Link54" class="menuTab" href="http://www.hvepseeksperten.dk/FormMail/?baseEMNE=" title="Kontakt os via email
">Kontakt os</a>
</td>