Automatic installer.php lang files by installer_builder (20080412)
[moodle.git] / theme / preview.php
blob2d29504181ce4fd33ec810400b75d9bbeba8d6f0
1 <?php // $Id$
3 require_once("../config.php");
5 $preview = optional_param('preview','standard',PARAM_FILE); // which theme to show
7 if (!file_exists($CFG->themedir .'/'. $preview)) {
8 $preview = 'standard';
11 if (! $site = get_site()) {
12 error("Site doesn't exist!");
15 require_login();
17 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
19 $CFG->theme = $preview;
21 theme_setup($CFG->theme, array('forceconfig='.$CFG->theme));
23 $stradministration = get_string("administration");
24 $strconfiguration = get_string("configuration");
25 $strthemes = get_string("themes");
26 $strpreview = get_string("preview");
27 $strsavechanges = get_string("savechanges");
28 $strtheme = get_string("theme");
29 $strthemesaved = get_string("themesaved");
31 print_header("$site->shortname: $strpreview", $site->fullname, "$strthemes -> $strpreview");
33 print_simple_box_start('center', '80%');
34 print_heading($preview);
35 print_simple_box_end();
37 print_footer();