From 0d399dc585427b1e3388e43f99d0c6146e6b34a3 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 27 Sep 2002 14:19:59 +0000 Subject: [PATCH] Aaaahhh I remember now why this was in here, because in future there might be course-level themes and user-level themes. Putting it back as before ... :-) --- theme/index.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 theme/index.php diff --git a/theme/index.php b/theme/index.php new file mode 100644 index 0000000000..bdcd17bb0c --- /dev/null +++ b/theme/index.php @@ -0,0 +1,77 @@ +theme = $preview; + $CFG->stylesheet = "$CFG->wwwroot/theme/$CFG->theme/styles.css"; + $CFG->header = "$CFG->dirroot/theme/$CFG->theme/header.html"; + $CFG->footer = "$CFG->dirroot/theme/$CFG->theme/footer.html"; + include ("$CFG->theme/config.php"); + } + + + if (! $site = get_site()) { + error("Site doesn't exist!"); + } + + require_login(); + + if (!isadmin()) { + error("You must be an administrator to change themes."); + } + + + $stradministration = get_string("administration"); + $strchoosetheme = get_string("choosetheme"); + $strpreview = get_string("preview"); + $strsavechanges = get_string("savechanges"); + $strtheme = get_string("theme"); + $strthemesaved = get_string("themesaved"); + + print_header("$site->shortname: $strchoosetheme", $site->fullname, + "wwwroot/admin\">$stradministration -> $strchoosetheme"); + + if ($choose) { + if (set_config("theme", $choose)) { + print_heading(get_string("themesaved")); + print_continue("$CFG->wwwroot"); + print_footer(); + exit; + } else { + error("Could not set the theme!"); + } + } + + print_heading(get_string("previeworchoose")); + + $themes = get_list_of_plugins("theme"); + + echo ""; + echo ""; + foreach ($themes as $theme) { + include ("$theme/config.php"); + echo ""; + if ($CFG->theme == $theme) { + echo ""; + echo ""; + } else { + echo ""; + echo ""; + } + echo ""; + } + echo "
$strtheme 
body\">$theme$strsavechangesbody\">"; + echo "$theme"; + echo " 
"; + + print_footer(); + +?> -- 2.39.5