2001-11-22 06:23:56 +00:00
|
|
|
<?PHP // $Id$
|
2002-08-11 15:41:54 +00:00
|
|
|
// Display list of all courses
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
require("../config.php");
|
|
|
|
require("lib.php");
|
|
|
|
|
2002-09-09 11:48:11 +00:00
|
|
|
optional_variable($category, 0);
|
|
|
|
|
|
|
|
$strcourses = get_string("courses");
|
|
|
|
|
|
|
|
if (!$categories = get_all_categories()) {
|
|
|
|
error("Could not find any course categories!");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($categories[$category])) {
|
|
|
|
$thiscatname = $categories[$category]->name;
|
|
|
|
$navigation = "<A HREF=\"index.php\">$strcourses</A> -> $thiscatname";
|
|
|
|
} else {
|
|
|
|
$navigation = $strcourses;
|
|
|
|
}
|
|
|
|
print_header($strcourses, $strcourses, $navigation);
|
|
|
|
|
|
|
|
$showcategories = (count($categories) > 1);
|
|
|
|
if ($showcategories) {
|
|
|
|
echo "<TABLE WIDTH=\"100%\" CELLPADDING=10 BORDER=0>";
|
|
|
|
echo "<TR><TD WIDTH=180 VALIGN=TOP>";
|
|
|
|
print_simple_box(get_string("categories"), "CENTER", 180, $THEME->cellheading);
|
|
|
|
print_course_categories($categories, $category, 180);
|
|
|
|
echo "</TD><TD WIDTH=\"100%\" VALIGN=TOP>";
|
|
|
|
} else {
|
|
|
|
echo "<TABLE WIDTH=80% ALIGN=CENTER><TR><TD VALIGN=top>";
|
|
|
|
$category="all";
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($category) {
|
|
|
|
if ($category != "all") {
|
|
|
|
print_simple_box($categories[$category]->name, "CENTER", "100%", $THEME->cellheading);
|
|
|
|
echo "<BR>";
|
|
|
|
}
|
|
|
|
print_all_courses($category);
|
|
|
|
}
|
2002-06-10 05:19:03 +00:00
|
|
|
|
2002-06-10 11:16:07 +00:00
|
|
|
echo "</TD></TR></TABLE>";
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
print_footer();
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|