index.php 2.26 KB
Newer Older
SNA's avatar
SNA committed
1
<?php
Giovannoni Laurent's avatar
Giovannoni Laurent committed
2
/*
lgi's avatar
lgi committed
3
*   Copyright 2012-2017 Maarch
Giovannoni Laurent's avatar
Giovannoni Laurent committed
4
*
Giovannoni Laurent's avatar
Giovannoni Laurent committed
5
*   This file is part of Maarch Framework.
Giovannoni Laurent's avatar
Giovannoni Laurent committed
6 7 8 9 10 11 12 13 14 15
*
*   Maarch Framework 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 3 of the License, or
*   (at your option) any later version.
*
*   Maarch Framework 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.
16
*
Giovannoni Laurent's avatar
Giovannoni Laurent committed
17 18 19 20
*   You should have received a copy of the GNU General Public License
*   along with Maarch Framework.  If not, see <http://www.gnu.org/licenses/>.
*/

21 22 23 24 25 26 27 28
/****************************************************************************/
/*                                                                          */
/*                                                                          */
/*               THIS PAGE CAN NOT BE OVERWRITTEN IN A CUSTOM         	    */
/*                                                                          */
/*                                                                          */
/* **************************************************************************/

Giovannoni Laurent's avatar
Giovannoni Laurent committed
29 30
/**
* @brief Maarch root file
31
*
Giovannoni Laurent's avatar
Giovannoni Laurent committed
32 33 34 35 36
* @file
* @author Laurent Giovannoni <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup core
37
*/
SNA's avatar
SNA committed
38

39 40 41
require_once('core/class/class_functions.php');
include_once('core/init.php');
require_once('core/class/class_core_tools.php');
42
$func = new functions();
SNA's avatar
SNA committed
43 44
$core = new core_tools();
$_SESSION['custom_override_id'] = $core->get_custom_id();
45 46
/**** retrieve HTTP_REQUEST FROM SSO ****/
$_SESSION['HTTP_REQUEST'] = $_REQUEST;
47
if (!file_exists('installed.lck') && is_dir('install')) {
48 49 50
    header('location: install/index.php');
    exit;
}
51
if (isset($_GET['origin']) && $_GET['origin'] == 'scan') {
52
    header('location: apps/'.$_SESSION['businessapps'][0]['appid'].'/reopen.php');
53
} else {
Giovannoni Laurent's avatar
Giovannoni Laurent committed
54
    $_SESSION['config']['app_id'] = $_SESSION['businessapps'][0]['appid'];
55
    header('location: '.$_SESSION['config']['coreurl'].'apps/'.$_SESSION['config']['app_id']
Giovannoni Laurent's avatar
Giovannoni Laurent committed
56
        . '/index.php?display=true&page=login');
57
}