MDL-11517 reserved word MOD used in table alias in questions backup code
[moodle-pu.git] / theme / preview.php
blob196b9454a35a5024ad2d3637b43cf6bf4d62f2aa
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 $navlinks = array();
32 $navlinks[] = array('name' => $strthemes, 'link' => null, 'type' => 'misc');
33 $navlinks[] = array('name' => $strpreview, 'link' => null, 'type' => 'misc');
34 $navigation = build_navigation($navlinks);
35 print_header("$site->shortname: $strpreview", $site->fullname, $navigation);
37 print_simple_box_start('center', '80%');
38 print_heading($preview);
39 print_simple_box_end();
41 print_footer();