<?php
/*
stelib_tabsheetmenu.php [ Libreria DataBase ]
Stefano Sangalli
01 novembre 2004
*/
//! tabSheetMenu(): oggetto per la connessione con diversi database server.
/*!
Questo oggetto permette di creare menu di tipo tabSheet all'interno di pagine singole.
*/
class tabSheetMenu extends Page{
/// E' l'array che contiene le pagine da includere, nella forma ETICHETTA|URL
var $TABLIST=array();
/// Costruttore
function tabSheetMenu(
/// array degli item, nella forma ETICHETTA|URL
$tabList
) {
for ($cont=0;$cont<count($tabList);$cont++) {
$this->AddMenuItem($tabList[$cont]);
}
}
/// Aggiunge una voce al menu
function AddMenuItem(
/// Voce del menu: scrivere ETICHETTA|URL
$item
) {
array_push($this->TABLIST,$item);
}
/// Disegna il menu
function designTabSheetMenu() {
if ($GLOBALS["mosConfig_live_site"] && $GLOBALS["cur_template"]) {
$css_file=$GLOBALS["mosConfig_live_site"]."/templates/".$GLOBALS["cur_template"]."/css/template_css.css";
} else {
$css_file=THEME."/css.css";
}
echo "<link href=\"".$css_file."\" rel=\"stylesheet\" type=\"text/css\" />";
echo "<link href=\"".THEME."/css_tabsheet.css\" rel=\"stylesheet\" type=\"text/css\" />";
echo "<div class=\"tabSheet\">";
echo "<ul>";
for ($cont=0;$cont<count($this->TABLIST);$cont++) {
$tmpArray=explode('|',$this->TABLIST[$cont]);
if ($_GET["tabSheet"] == $cont) { $id="id=\"current\""; } else { $id=""; }
echo "<li ".$id." style=\"margin:0px;padding:0px;background-image:none;\"><a href=\"".$tmpArray[1]."\" target=\"_self\"><span>".$tmpArray[0]."</span></a></li>";
}
echo "</ul>";
echo "</div>";
}
}