diff --git a/message/index.php b/message/index.php index 807b8994daa..1cdf8ed3c89 100644 --- a/message/index.php +++ b/message/index.php @@ -56,18 +56,23 @@ echo ''; echo ''; -/// Print out all tabs with labels and colours - $tabs = array('contacts','search','settings'); - foreach ($tabs as $thistab) { - $classname = ($tab == $thistab) ? 'generaltabselected' : 'generaltab'; - echo ''; - } +/// Print out the tabs + echo ''; + + echo ''; /// Print out contents of the tab - echo '
'; - echo get_string($thistab,'message'); - echo ''; + $tabrow = array(); + $tabrow[] = new tabobject('contacts', $CFG->wwwroot.'/message/index.php?tab=contacts', 'contacts'); + $tabrow[] = new tabobject('search', $CFG->wwwroot.'/message/index.php?tab=search', 'search'); + $tabrow[] = new tabobject('settings', $CFG->wwwroot.'/message/index.php?tab=settings', 'settings'); + $tabrows = array($tabrow); + + print_tabs($tabrows, $tab); + + echo '
'; + echo ''; /// a print function is associated with each tab $tabprintfunction = 'message_print_'.$tab;