3 * This file is the login page for the system
4 * It provides a login form and will automatically
5 * forward any users who have cookies set to ctrlpnl.php
6 * @author Nick Korbel <lqqkout13@users.sourceforge.net>
8 * @package phpScheduleIt
10 * Copyright (C) 2003 - 2005 phpScheduleIt
11 * License: GPL, see LICENSE
14 * Include Template class
16 include_once('lib/Template.class.php');
18 // Auth included in Template.php
23 $resume = (isset($_POST['resume'])) ?
$_POST['resume'] : '';
26 if (isset($_GET['logout'])) {
29 else if (isset($_POST['login'])) {
30 $msg = $auth->doLogin($_POST['email'], $_POST['password'], (isset($_POST['setCookie']) ?
'y' : null), false, $resume, $_POST['language'], isset($_POST['domain'])?
$_POST['domain'] : '');
32 else if (isset($_COOKIE['ID'])) {
33 $msg = $auth->doLogin('', '', 'y', $_COOKIE['ID'], $resume); // Check if user has cookies set up. If so, log them in automatically
36 $t->printHTMLHeader();
38 // Print out logoImage if it exists
39 echo (!empty($conf['ui']['logoImage']))
40 ?
'<div align="left"><img src="' . $conf['ui']['logoImage'] . '" alt="logo" vspace="5"/></div>'
45 if (isset($_GET['auth'])) {
46 $auth->printLoginForm(translate('You are not logged in!'), $_GET['resume']);
49 $auth->printLoginForm($msg);
54 $t->printHTMLFooter();