wwwroot/$CFG->admin/\">".get_string("admin")."...";
}
diff --git a/lib/weblib.php b/lib/weblib.php
index 2bd4e480d9c..6e4ef37ddea 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -1073,6 +1073,114 @@ function print_table($table) {
return true;
}
+function make_table($table) {
+// Creates a nicely formatted table and returns it
+// $table is an object with several properties.
+// $table->head is an array of heading names.
+// $table->align is an array of column alignments
+// $table->size is an array of column sizes
+// $table->wrap is an array of "nowrap"s or nothing
+// $table->data[] is an array of arrays containing the data.
+// $table->width is an percentage of the page
+// $table->class is a class
+// $table->fontsize is the size of all the text
+// $table->tablealign align the whole table
+// $table->cellpadding padding on each cell
+// $table->cellspacing spacing between cells
+
+ if (isset($table->align)) {
+ foreach ($table->align as $key => $aa) {
+ if ($aa) {
+ $align[$key] = " align=\"$aa\"";
+ } else {
+ $align[$key] = "";
+ }
+ }
+ }
+ if (isset($table->size)) {
+ foreach ($table->size as $key => $ss) {
+ if ($ss) {
+ $size[$key] = " width=\"$ss\"";
+ } else {
+ $size[$key] = "";
+ }
+ }
+ }
+ if (isset($table->wrap)) {
+ foreach ($table->wrap as $key => $ww) {
+ if ($ww) {
+ $wrap[$key] = " nowrap ";
+ } else {
+ $wrap[$key] = "";
+ }
+ }
+ }
+
+ if (empty($table->width)) {
+ $table->width = "80%";
+ }
+
+ if (empty($table->tablealign)) {
+ $table->tablealign = "center";
+ }
+
+ if (empty($table->cellpadding)) {
+ $table->cellpadding = "5";
+ }
+
+ if (empty($table->cellspacing)) {
+ $table->cellspacing = "1";
+ }
+
+ if (empty($table->class)) {
+ $table->class = "generaltable";
+ }
+
+ if (empty($table->fontsize)) {
+ $fontsize = "";
+ } else {
+ $fontsize = "fontsize\">";
+ }
+
+ $output = "width\" valign=top align=\"$table->tablealign\" ";
+ $output .= " cellpadding=\"$table->cellpadding\" cellspacing=\"$table->cellspacing\" class=\"$table->class\">\n";
+
+ if (!empty($table->head)) {
+ $output .= "
\n";
+
+ return $output;
+}
+
+
function print_editing_switch($courseid) {
global $CFG, $USER;
diff --git a/theme/index.php b/theme/index.php
index 82d5d1c8098..6cf54d4d0a6 100644
--- a/theme/index.php
+++ b/theme/index.php
@@ -31,6 +31,7 @@
}
$stradministration = get_string("administration");
+ $strconfiguration = get_string("configuration");
$strthemes = get_string("themes");
$strpreview = get_string("preview");
$strsavechanges = get_string("savechanges");
@@ -38,7 +39,8 @@
$strthemesaved = get_string("themesaved");
print_header("$site->shortname: $strthemes", $site->fullname,
- "wwwroot/$CFG->admin/index.php\">$stradministration -> $strthemes");
+ "wwwroot/admin/index.php\">$stradministration -> ".
+ "wwwroot/admin/configure.php\">$strconfiguration -> $strthemes");
if ($choose) {
if (set_config("theme", $choose)) {
";
+ foreach ($table->head as $key => $heading) {
+ if (!isset($size[$key])) {
+ $size[$key] = "";
+ }
+ if (!isset($align[$key])) {
+ $align[$key] = "";
+ }
+ $output .= " \n";
+ }
+
+ foreach ($table->data as $row) {
+ $output .= "class}header\">$fontsize$heading ";
+ }
+ $output .= "";
+ foreach ($row as $key => $item) {
+ if (!isset($size[$key])) {
+ $size[$key] = "";
+ }
+ if (!isset($align[$key])) {
+ $align[$key] = "";
+ }
+ if (!isset($wrap[$key])) {
+ $wrap[$key] = "";
+ }
+ $output .= " \n";
+ }
+ $output .= "class}cell\">$fontsize$item ";
+ }
+ $output .= "