Updated to accomodate new "social" format
[moodle.git] / index.php
CommitLineData
f9903ed0 1<? // $Id$
2 // index.php - the front page.
3
4 require("config.php");
5
6 if (! $site = get_record("course", "category", 0)) {
7 redirect("$CFG->wwwroot/admin/");
8 }
9
c8138d90 10 print_header("$site->fullname", "$site->fullname", "", "",
9284942d 11 "<META NAME=\"Description\" CONTENT=\"".stripslashes(strip_tags($site->summary))."\">");
f9903ed0 12
3054741a 13
f9903ed0 14?>
15
3054741a 16
f9903ed0 17<TABLE WIDTH="100%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
18 <TR>
19 <TD WIDTH="15%" VALIGN="TOP" NOWRAP>
20 <? print_simple_box("Main Menu", $align="CENTER", $width="100%", $color="$THEME->cellheading"); ?>
21
22 <LI>Home</LI>
3054741a 23 <LI><A TITLE="Available courses on this server" HREF="course/"><B>Courses</B></A><BR></LI>
24 <LI><A TITLE="Site-level Forums" HREF="mod/discuss/index.php?id=<?=$site->id?>">Forums</A></LI>
f9903ed0 25
26 <? include("mod/reading/lib.php");
27 list_all_readings();
a166f060 28 ?>
29
30 <BR><BR>
31
32 <?
33 if (isadmin()) {
34 print_simple_box("Admin", $align="CENTER", $width="100%", $color="$THEME->cellheading");
35 echo "<LI><A HREF=\"$CFG->wwwroot/admin/\">Admin Page</A></LI>";
36 echo "<LI>";
37 print_editing_switch($site->id);
38 }
f9903ed0 39 ?>
40
41 </TD>
42
43 <TD WIDTH="55%" VALIGN="TOP">
44 <? print_simple_box("Site News", $align="CENTER", $width="100%", $color="$THEME->cellheading"); ?>
45
46 <BR>
47
48 <? include("mod/discuss/lib.php");
49 forum_latest_topics();
50 ?>
51
52 </TD>
53 <TD WIDTH="30%" VALIGN="TOP">
54 <? print_simple_box($site->summary, $align="", $width="100%", $color="$THEME->cellheading"); ?>
55 </TD>
56 </TR>
57</TABLE>
58
3054741a 59<? include("$CFG->dirroot/theme/$CFG->theme/footer.html"); ?>
f9903ed0 60
61<P ALIGN=center>
62<A WIDTH=85 HEIGHT=25 HREF="http://moodle.com/"><IMG SRC="pix/madewithmoodle.gif" BORDER=0></A>
63</P>
64