/**
* The required files
*/
require_once(HTML_MENU_PAGE_PATH.'/MenuHorizontal.php');
/**
* Generates a Menu Top element
* <code>
* +-------------------------------------+
* | menu1 | menu2 | menu3 | ... | menux |
* +-------------------------------------+
* Usage:
* $menu = new MenuTop($datareader,$text,$width,$class,$border,
* $cellpadding,$cellspacing,$summary,$caption);
* print $menu->getHtml();
* Or
* MenuTop:display($datareader,$text,$width,$class,$border,
* $cellpadding,$cellspacing,$summary,$caption);
* </code>
* @package menu
*/
class MenuTop 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 MenuTop($datareader='',$text='',$width='',$class='',$border='',$cellpadding='',$cellspacing='',$summary='',$caption='') {
$theText = $text !=''?$text :MENU_TOP_TEXT;
$theWidth = $width!=''?$width:MENU_TOP_VIEW_WIDTH;
$theClass = $class!=''?$class:MENU_TOP_VIEW_CLASS;
$theBorder = MENU_TOP_VIEW_BORDER;
$theCellpadding = MENU_TOP_VIEW_CELLPADDING;
$theCellspacing = MENU_TOP_VIEW_CELLSPACING;
$this->layout = LINK_LAYOUT_HORIZONTAL | LINK_LAYOUT_TRIANGLE | LINK_LAYOUT_FILL_OUT | LINK_LAYOUT_GOOGLE;
$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_TOP;
}
/**
* 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_TOP);
}
/**
* Get the html for the top menu links
* @return String The html
*/
function getHtml() {
$html = $this->html;
if (LINK_SHOW & LINK_SHOW_MENU_TOP && HTTP_USER_AGENT!=HTTP_USER_AGENT_P900) {
$html .= "<!-- MenuTop -->\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:
* MenuTop::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 MenuTop($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
$html->addHtml();
}
}
?>
<td class="menuTop" valign="top"><!-- Kontakt os --><a id="Link66" class="menuTop" href="http://www.hvepseeksperten.dk/FormMail/?baseEMNE=" title="Kontakt os via email
">Kontakt os</a>
</td>
<td class="menuTop" valign="top"><!-- Kontakt os --><a id="Link70" class="menuTop" href="http://www.hvepseeksperten.dk/FormMail/?baseEMNE=" title="Kontakt os via email
">Kontakt os</a>
</td>