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:
23: /**
24: * Main index (web interface) file
25: **/
26:
27: // First check for the existance of setup.php and go there if it exists
28: if (file_exists("setup.php"))
29: {
30: header("Location: setup.php");
31: exit();
32: }
33:
34: // Output buffer on and start FreeDESK then discard startup whitespace-spam
35: ob_start();
36: include("core/FreeDESK.php");
37: $DESK = new FreeDESK("./");
38: $DESK->Start();
39: ob_end_clean();
40:
41:
42: if (!isset($_REQUEST['sid']))
43: {
44: if (!isset($_REQUEST['mobileoverride']))
45: {
46: if (BrowserDetect::isMobile())
47: {
48: header("Location: mobile/");
49: exit();
50: }
51: }
52: $data=array("title"=>$DESK->Lang->Get("welcome"));
53: $DESK->Skin->IncludeFile("header.php",$data);
54:
55: echo "\n 56: echo "
Sorry you must have Javascript enabled to use FreeDESK analyst portal