dirroot .'/admin/mnet/tabs.php'); $themes = get_list_of_plugins("theme"); $sesskey = !empty($USER->id) ? $USER->sesskey : ''; echo ""; if (count($report)) { echo ''; echo ''; echo ''; } if (!$USER->screenreader) { echo ""; echo ""; } echo ""; echo ''; if ($mnet_peer->theme == '') { echo ''; echo ""; foreach ($themes as $theme) { unset($THEME); if (!file_exists($CFG->themedir.'/'.$theme.'/config.php')) { // bad folder continue; } include($CFG->themedir.'/'.$theme.'/config.php'); $readme = ''; $screenshot = ''; $screenshotpath = ''; if (file_exists($CFG->themedir.'/'.$theme.'/README.html')) { $readme = '
  • '. link_to_popup_window($CFG->themewww .'/'. $theme .'/README.html', $theme, $strinfo, 400, 500, '', 'none', true).'
  • '; } else if (file_exists($CFG->themedir.'/'.$theme.'/README.txt')) { $readme = '
  • '. link_to_popup_window($CFG->themewww .'/'. $theme .'/README.txt', $theme, $strinfo, 400, 500, '', 'none', true).'
  • '; } if (file_exists("$theme/screenshot.png")) { $screenshotpath = "$theme/screenshot.png"; } else if (file_exists("$theme/screenshot.jpg")) { $screenshotpath = "$theme/screenshot.jpg"; } echo ""; // no point showing this if user is using screen reader if (!$USER->screenreader) { echo ""; } else { echo ''.$theme.''; } } if ($mnet_peer->theme == $theme) { echo ''; echo ""; } echo "
    '; echo ''.$report[0].''; echo '
    $strtheme$strinfo
    Choose this option to use your site\'s default theme: '.$CFG->theme.'.'; } else { echo ''; } echo '

    Site Theme

    '; $options = null; $options['choose'] = $unlikely_name;// Something unlikely to ever be a theme name... initially $unlikely_name = 'ZoqZoqZ'; $options['sesskey'] = $sesskey; $options['hostid'] = $mnet_peer->id; print_single_button('mnet_themes.php', $options, $strchoose); echo '
    "; if ($screenshotpath) { $screenshot = '
  • '.$strscreenshot.'
  • '; echo "$theme
    '; } else { echo ''; } if (isset($THEME->sheets)) { echo '

    '.$theme.'

    '; } else { echo '

    '.$theme.' (Moodle 1.4)

    '; } if ($screenshot or $readme) { echo '
      '; if (!$USER->screenreader) { echo '
    • '.$strpreview.'
    • '; } echo $screenshot.$readme; echo '
    '; } $options = null; $options['choose'] = $theme; $options['sesskey'] = $sesskey; $options['hostid'] = $mnet_peer->id; print_single_button('mnet_themes.php', $options, $strchoose); echo '
    "; $THEME = $original_theme; admin_externalpage_print_footer(); ?>