index.php 1.38 KB
Newer Older
1
2
<?php
/**
3
 * This program is part of Mahara
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 *
 * @package    mahara
20
21
 * @subpackage core
 * @author     Penny Leach <penny@catalyst.net.nz>
22
23
24
25
26
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL
 * @copyright  (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
 *
 */

27
28
29
30
define('INTERNAL', 1);
define('PUBLIC', 1);
define('MENUITEM', 'home');

31
32
require('init.php');

33
34
// check to see if we're installed...
if (!get_config('version')) {
35
    redirect(get_config('wwwroot') . 'admin/index.php');
36
37
}

38
$smarty = smarty();
39
40
41
42
43
44

if (!$SESSION->is_logged_in()) {
    require_once('form.php');
    $smarty->assign('login_form', form(auth_get_login_form()));
}

45
$smarty->display('index.tpl');
46

47
?>