1: 2: /* -------------------------------------------------------------
3: This file is part of FreeDESK
4:
5: FreeDESK is (C) Copyright 2012 David Cutting
6:
7: FreeDESK is free software: you can redistribute it and/or modify
8: it under the terms of the GNU General Public License as published by
9: the Free Software Foundation, either version 3 of the License, or
10: (at your option) any later version.
11:
12: FreeDESK is distributed in the hope that it will be useful,
13: but WITHOUT ANY WARRANTY; without even the implied warranty of
14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: GNU General Public License for more details.
16:
17: You should have received a copy of the GNU General Public License
18: along with FreeDESK. If not, see www.gnu.org/licenses
19:
20: For more information see www.purplepixie.org/freedesk/
21: -------------------------------------------------------------- */
22: if (isset($_REQUEST['username']))
23: {
24: ob_start();
25: require("../core/FreeDESK.php");
26: $DESK = new FreeDESK("../");
27: $DESK->Start();
28: ob_end_clean();
29: if($DESK->ContextManager->Open(ContextType::Customer, "",
30: $_REQUEST['username'], $_REQUEST['password']))
31: {
32: $sid=$DESK->ContextManager->Session->sid;
33: header("Location: ./?sid=".$sid);
34: exit();
35: }
36: else
37: {
38: header("Location: ./login.php?e=failed");
39: exit();
40: }
41: }
42: ?>
43:
44:
45:
46:
47: FreeDESK Customer Interface 48:
49:
50:
51: Login to FreeDESK Customer Interface
52:
53:
54: 55:
56: 57: if (isset($_REQUEST['e']))
58: {
59: if ($_REQUEST['e'] == "expired")
60: echo "Session Expired, Please Relogin";
61: else if ($_REQUEST['e'] == "failed")
62: echo "Login Failed, Incorrect Username or Password";
63: echo "