[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/theme/ -> preview.php (source)

   1  <?php // $Id: preview.php,v 1.6.2.1 2008/05/02 04:07:33 dongsheng Exp $
   2  
   3      require_once("../config.php");
   4  
   5      $preview = optional_param('preview','standard',PARAM_FILE); // which theme to show
   6  
   7      if (!file_exists($CFG->themedir .'/'. $preview)) {
   8          $preview = 'standard';
   9      }
  10  
  11      if (! $site = get_site()) {
  12          error("Site doesn't exist!");
  13      }
  14  
  15      require_login();
  16  
  17      require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
  18  
  19      $CFG->theme = $preview;
  20  
  21      theme_setup($CFG->theme, array('forceconfig='.$CFG->theme));
  22  
  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");
  30  
  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);
  36  
  37      print_simple_box_start('center', '80%');
  38      print_heading($preview);
  39      print_simple_box_end();
  40  
  41      print_footer();
  42  
  43  ?>


Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7