'); echo(''); echo(''); echo(''); echo(''); exit(); } //////////////////////////////////////////////////////// // Erzeugt eine Menue-Id. Dabei werden die Umlaute durch // entsprechende Buchstabenkombinationen ersetzt und // Leerzeichen entfernt. //////////////////////////////////////////////////////// function getMenuId($name) { return str_replace(array(' ','ä','ö','ü','ß','&'), array('','ae','oe','ue','ss','+'), strtolower($name)); } //////////////////////////////////////////////////////// // Erzeugt die Mausereignisse fuer die Elemente. //////////////////////////////////////////////////////// function getMenuEvents($type) { return 'onmouseover="'.$type.'MouseOver(this)" onmouseout="'.$type.'MouseOut(this)"'; } //////////////////////////////////////////////////////// // Fuegt der Submenueliste und der Menueliste links // Eintraege hinzu. //////////////////////////////////////////////////////// function addSubMenu($entries,$key,$menuitem,$menutype) { global $menuid,$idx,$submenus,$leftmenu,$class; global $thispage,$conid,$nl,$idlist,$user; $idx++; foreach ( $entries as $subkey => $subentry ) { $submenuid = $key.'.'.$subkey; if ( $subentry != '' && !is_array($subentry) ) $submenuid = $key.'.'.$subentry.'.'.$subkey; $submenuid = getMenuId($submenuid); $class[$idx] = 'menuitem'.($submenuid==$conid?'sel':''); $id = $submenuid; $code = ''; $caption = $subkey; // Eintrag fuer das Menue an der Seite erzeugen $addmenu = ''; switch ( $menutype ) { case 'file': { $id = getMenuId($key.'.index.'.$subkey); $mainid = $id; $caption = $subentry['name']; if ( $menuitem['hascategories'] ) { if ( is_array($subentry['items']) && count($subentry['items']) > 0 ) { $keys = array_keys($subentry['items']); $id .= '.'.$keys[0]; } else { $id .= '.1'; $code .= '&code='.encodeRequest('cmd=edit.category&key=1'); } if ( substr($conid,0,strlen($mainid)) == $mainid ) { if ( is_array($subentry['items']) ) { foreach( $subentry['items'] as $subkey1 => $subentry1 ) { $addmenu .= ' - '.$subentry1['name'].''.$nl; if ( $user['flags.admin'] ) { $addmenu .= ' Ändern'; } $addmenu .= '
'.$nl; } } if ( $user['flags.admin'] ) { $subkey1 = intval($subkey1)+1; $addmenu .= ' - Neue Kategorie
'.$nl; } } } else { $submenuid = getMenuId($key.'.index.'.$subkey); } break; } } if ( $menuid == $idlist[0] ) { $leftmenu .= ''; if ( $menutype == 'file' && $user['flags.admin'] ) $leftmenu .= ' Ändern'; $leftmenu .= '
'.$nl.$addmenu; } $submenus .= ''.str_replace(' ',' ',$caption).''.$nl; $idx++; } if ( $menutype == 'file' && substr($conid,0,strlen($menuid)) == $menuid && $user['flags.admin'] ) { $subkey = intval($subkey)+1; $leftmenu .= 'Neue Gruppe
'.$nl; } } //////////////////////////////////////////////////////// // Erstellung der Elemente fuer die Menues. //////////////////////////////////////////////////////// $nl = "\r\n"; $idx = 0; $class = array(); $submenus = ''; $menus = ''.$nl .''.$nl .''; $conid = 'galerie'; if ($_REQUEST['CON'] != '') $conid = $_REQUEST['CON']; $idlist = explode('.',$conid); $basedir = 'content/'.$idlist[0].'/'; $content = $basedir.($idlist[1]!=''?$idlist[1]:'index').'.php'; $submenu = ''; $leftmenu = ''; if ( $user['flags.admin'] ) $menu['Benutzer'] = array('type' => 'entries'); foreach ( $menu as $key => $entry ) { $menuid = getMenuId($key); switch ( $entry['type'] ) { case 'entries': { if ( is_array($entry['entries']) ) { $class[$idx] = 'menu'.($menuid==$idlist[0]?'sel':''); $menus .= ''.$nl; $submenus .= '
'.$nl; addSubMenu($entry['entries'],$key,$entry,'entries'); $submenus .= ''.$nl; } else { $class[$idx] = 'menu'.(getMenuId($key)==$idlist[0]?'sel':''); $menus .= ''.$key.''.$nl; $idx++; } break; } case 'file': { include('data/'.$entry['filename']); $class[$idx] = 'menu'.($menuid==$idlist[0]?'sel':''); $menus .= ''.$key.''.$nl; $submenus .= ''.$nl; if ( is_array($entry['entries']) && $entry['entriesfirst'] ) { addSubMenu($entry['entries'],$key,$entry,'entries'); $idx--; } addSubMenu($data,$key,$entry,'file'); /* if ( is_array($entry['entries']) ) { $idx--; addSubMenu($entry['entries'],$key,$entry,'entries'); } */ if ( is_array($entry['entries']) && !$entry['entriesfirst'] ) { $idx--; addSubMenu($entry['entries'],$key,$entry,'entries'); } $submenus .= ''.$nl; break; } } } $menus .= ' '.$nl; $menus .= ''.$nl.''.$nl; if ( $leftmenu == '' ) $leftmenu = ' '; ?> Atelier Tannenberg
impressum