0 && $depth > $maxdepth) { return; } if (! $this->menuItems[$section]['show_in_menu']) { return; } if (strlen($this->menuItems[$section]['url']) < 1) { echo "
  • ".$this->menuItems[$section]['title']."
  • "; return; } echo "
  • menuItems[$section]['url']; echo "\""; if (array_key_exists('target', $this->menuItems[$section])) { echo ' rel="external"'; } $class = array(); if ($this->menuItems[$section]['selected']) { $class[] = 'selected'; } if (isset($this->menuItems[$section]['firstmodule'])) { $class[] = 'first_module'; } else if (isset($this->menuItems[$section]['module'])) { $class[] = 'module'; } if (count($class) > 0) { echo ' class="'; for($i=0;$i 0) { echo " "; } echo $class[$i]; } echo '"'; } echo ">"; echo $this->menuItems[$section]['title']; echo ""; if ($this->HasDisplayableChildren($section)) { echo ""; } echo "
  • "; return; } function DisplayTopMenu() { echo '

    '.lang('adminpaneltitle').' - '. get_site_preference('sitename') .'    '.lang('welcome_user').': '.$this->cms->variables['username'].'

    '; echo "
    \n\t\n"; //ICON VIEW SITE echo "\n\t
    \n"; //END ICONS echo "\t
    \n"; echo "
    \n"; echo ''; echo '
     
    '; } function DisplayFooter() { global $CMS_VERSION; global $CMS_VERSION_NAME; echo ''; } function StartRighthandColumn() { echo ''."\n"; } function DisplayDocType() { # echo ''."\n"; echo ''."\n"; } function DisplayHTMLStartTag() { $tag = 'cms->nls['direction']) && $this->cms->nls['direction'] == 'rtl') { $tag .= ' dir="rtl"'; } $tag .= ">\n\n"; echo $tag; } function DisplayDashboardCallout($file, $message = '') { if ($message == '') $message = lang('installdirwarning'); if (file_exists($file)) { echo "
    \n"; echo "

    ".$message."

    "; echo "
    \n"; } } function DisplayDashboardPageItem($item="module", $title='', $content = '') { switch ($item) { case "start" : { echo "\n
    \n"; break;; } case "end" : { echo "
    \n"; break; } case "core" : { echo "
    \n"; echo "
    \n"; echo $title; echo "
    \n"; echo "
    \n"; echo $content; echo "
    \n"; echo "
    \n"; break; } case "module" : { echo "
    \n"; echo "
    \n"; echo $title; echo "
    \n"; echo "
    \n"; echo $content; echo "
    \n"; echo "
    \n"; break; } } } function DisplayAllSectionPages() { foreach ($this->menuItems as $thisSection=>$menuItem) { if ($menuItem['parent'] != -1) { continue; } if (! $menuItem['show_in_menu']) { continue; } if ($menuItem['url'] == 'index.php' || strlen($menuItem['url']) < 1) { continue; } echo "
    "; echo '
    '; echo '

    '; $iconSpec = $thisSection; if ($menuItem['url'] == $this->_viewsite_url) { $iconSpec = 'viewsite'; } echo ''; echo $this->DisplayImage('icons/topfiles/'.$iconSpec.'.gif', $iconSpec, '', '', 'itemicon'); echo ''; echo '

    '; echo '

    '; echo "".$menuItem['title']."
    \n"; if (isset($menuItem['description']) && strlen($menuItem['description']) > 0) { echo $menuItem['description']."
    "; } $this->ListSectionPages($thisSection); echo '

    '; echo "
    "; echo '
    '; } } function DisplaySectionPages($section) { $gCms = cmsms(); if (count($this->menuItems) < 1) { // menu should be initialized before this gets called. // TODO: try to do initialization. // Problem: current page selection, url, etc? return -1; } $firstmodule = true; foreach ($this->menuItems[$section]['children'] as $thisChild) { $thisItem = $this->menuItems[$thisChild]; if (! $thisItem['show_in_menu'] || strlen($thisItem['url']) < 1) { continue; } // separate system modules from the rest. if( preg_match( '/module=([^&]+)/', $thisItem['url'], $tmp) ) { if( !ModuleOperations::get_instance()->IsSystemModule($tmp[1]) && $firstmodule == true ) { echo "
    "; $firstmodule = false; } } echo "
    \n"; echo '
    '; echo '

    '; $moduleIcon = false; $iconSpec = $thisChild; // handle module icons if (preg_match( '/module=([^&]+)/', $thisItem['url'], $tmp)) { if ($tmp[1] == 'News') { $iconSpec = 'newsmodule'; } else if ($tmp[1] == 'TinyMCE' || $tmp[1] == 'HTMLArea') { $iconSpec = 'wysiwyg'; } else { $imageSpec = dirname($this->cms->config['root_path'] . '/modules/' . $tmp[1] . '/images/icon.gif') .'/icon.gif'; if (file_exists($imageSpec)) { echo ''.$thisItem['title'].''; $moduleIcon = true; } else { $iconSpec=$this->TopParent($thisChild); } } } if (! $moduleIcon) { if ($thisItem['url'] == $this->_viewsite_url) { $iconSpec = 'viewsite'; } echo ''; echo $this->DisplayImage('icons/topfiles/'.$iconSpec.'.gif', ''.$thisItem['title'].'', '', '', 'itemicon'); echo ''; } echo '

    '; echo '

    '; echo "".$thisItem['title']."
    \n"; if (isset($thisItem['description']) && strlen($thisItem['description']) > 0) { echo $thisItem['description']."
    "; } echo '

    '; echo "
    "; echo '
    '; } } function ListSectionPages($section) { if (! isset($this->menuItems[$section]['children']) || count($this->menuItems[$section]['children']) < 1) { return; } if ($this->HasDisplayableChildren($section)) { echo " ".lang('subitems').": "; $count = 0; foreach($this->menuItems[$section]['children'] as $thisChild) { $thisItem = $this->menuItems[$thisChild]; if (! $thisItem['show_in_menu'] || strlen($thisItem['url']) < 1) { continue; } if ($count++ > 0) { echo ", "; } echo "".$thisItem['title'].""; } } } /* Functions that we want dont want the standard output from */ function OutputFooterJavascript() {} } ?>