Updated tags file
[moodle.git] / theme / preview.php
blob819151ba64a22dbe4c4258c2d0a452983d38b0c1
1 <?php // $Id$
3 require_once("../config.php");
5 $preview = optional_param('preview','standard',PARAM_FILE); // which theme to show
7 if (!file_exists($preview)) {
8 $preview = 'standard';
11 if (! $site = get_site()) {
12 error("Site doesn't exist!");
15 require_login();
17 if (!isadmin()) {
18 error("You must be an administrator to change themes.");
21 $CFG->theme = $preview;
23 theme_setup($CFG->theme, array('forceconfig='.$CFG->theme));
25 $stradministration = get_string("administration");
26 $strconfiguration = get_string("configuration");
27 $strthemes = get_string("themes");
28 $strpreview = get_string("preview");
29 $strsavechanges = get_string("savechanges");
30 $strtheme = get_string("theme");
31 $strthemesaved = get_string("themesaved");
33 print_header("$site->shortname: $strpreview", $site->fullname, "$strthemes -> $strpreview");
35 print_simple_box_start('center', '80%');
36 print_heading($preview);
37 print_simple_box_end();
39 print_footer();