// $Id$ // index.php - the front page. require("config.php"); include("course/lib.php"); include("mod/reading/lib.php"); include("mod/forum/lib.php"); if (! $site = get_site()) { redirect("$CFG->wwwroot/admin/"); } if (isset($USER->id)) { $headerbutton = update_course_icon($site->id); } else { $headerbutton = "".get_string("login").""; } print_header("$site->fullname", "$site->fullname", "", "", "summary))."\">", true, $headerbutton); ?>
$readings = list_all_readings();
if ($site->newsitems > 0 or $readings or $USER->editing) {
print_simple_box(get_string("mainmenu"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
if ($site->newsitems > 0 ) {
echo " wwwroot/course/mod.php?id=$site->id§ion=0&add=reading\">". get_string("addreading", "reading")."... "; } else { echo ""; } } if (isadmin()) { print_simple_box(get_string("admin"), $align="CENTER", $width="100%", $color="$THEME->cellheading"); echo " |
if ($site->newsitems == 0 ) {
print_simple_box(get_string("availablecourses"), "CENTER", "100%", "$THEME->cellheading");
echo " "; print_all_courses(); } else { if (! $newsforum = get_course_news_forum($site->id)) { error("Could not find or create a main forum for the site"); } if (isset($USER->id)) { $SESSION->fromdiscuss = "$CFG->wwwroot"; if (is_subscribed($USER->id, $newsforum->id)) { $subtext = get_string("unsubscribe", "forum"); } else { $subtext = get_string("subscribe", "forum"); } $headertext = "
"; print_forum_latest_topics($newsforum->id, $site->newsitems); } ?> |
if ($USER->editing) {
$site->summary .= " |