2005-01-30 19:27:46 +00:00
|
|
|
<?php // $Id$
|
|
|
|
|
|
|
|
require_once("../config.php");
|
|
|
|
|
|
|
|
$preview = optional_param('preview','standard',PARAM_FILE); // which theme to show
|
|
|
|
|
2006-10-09 10:12:41 +00:00
|
|
|
if (!file_exists($CFG->themedir .'/'. $preview)) {
|
2005-01-30 19:27:46 +00:00
|
|
|
$preview = 'standard';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (! $site = get_site()) {
|
2008-06-15 10:13:30 +00:00
|
|
|
print_error('siteisnotdefined', 'debug');
|
2005-01-30 19:27:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
require_login();
|
|
|
|
|
2008-05-02 04:37:02 +00:00
|
|
|
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
|
2005-01-30 19:27:46 +00:00
|
|
|
|
2005-01-31 05:58:03 +00:00
|
|
|
$CFG->theme = $preview;
|
|
|
|
|
2005-02-13 08:34:10 +00:00
|
|
|
theme_setup($CFG->theme, array('forceconfig='.$CFG->theme));
|
2005-01-30 19:27:46 +00:00
|
|
|
|
|
|
|
$stradministration = get_string("administration");
|
|
|
|
$strconfiguration = get_string("configuration");
|
|
|
|
$strthemes = get_string("themes");
|
|
|
|
$strpreview = get_string("preview");
|
|
|
|
$strsavechanges = get_string("savechanges");
|
|
|
|
$strtheme = get_string("theme");
|
|
|
|
$strthemesaved = get_string("themesaved");
|
|
|
|
|
2007-08-17 19:09:11 +00:00
|
|
|
$navlinks = array();
|
|
|
|
$navlinks[] = array('name' => $strthemes, 'link' => null, 'type' => 'misc');
|
|
|
|
$navlinks[] = array('name' => $strpreview, 'link' => null, 'type' => 'misc');
|
|
|
|
$navigation = build_navigation($navlinks);
|
|
|
|
print_header("$site->shortname: $strpreview", $site->fullname, $navigation);
|
2005-01-30 19:27:46 +00:00
|
|
|
|
|
|
|
print_simple_box_start('center', '80%');
|
|
|
|
print_heading($preview);
|
|
|
|
print_simple_box_end();
|
|
|
|
|
|
|
|
print_footer();
|
|
|
|
|
|
|
|
?>
|