Skip to content
Snippets Groups Projects
Verified Commit c1058050 authored by Damien's avatar Damien
Browse files

FIX OZWILLO

parent 3f4037a7
No related branches found
No related tags found
No related merge requests found
...@@ -18,14 +18,7 @@ if (isset($_REQUEST['dir']) && !empty($_REQUEST['dir'])) { ...@@ -18,14 +18,7 @@ if (isset($_REQUEST['dir']) && !empty($_REQUEST['dir'])) {
$_REQUEST['dir'] = str_replace("..", "", $_REQUEST['dir']); $_REQUEST['dir'] = str_replace("..", "", $_REQUEST['dir']);
} }
//Ozwillo
if (!empty($_REQUEST['code']) && !empty($_REQUEST['state'])) {
$_SESSION['ozwillo']['code'] = $_REQUEST['code'];
$_SESSION['ozwillo']['state'] = $_REQUEST['state'];
}
//reset orders in previous basket list //reset orders in previous basket list
if (empty($_SESSION['current_basket'])) { if (empty($_SESSION['current_basket'])) {
$_SESSION['save_list']['start'] = 0; $_SESSION['save_list']['start'] = 0;
$_SESSION['save_list']['lines'] = ""; $_SESSION['save_list']['lines'] = "";
...@@ -59,40 +52,30 @@ if (isset($_SESSION['user']['UserId']) ...@@ -59,40 +52,30 @@ if (isset($_SESSION['user']['UserId'])
/** /**
* [Includes] * [Includes]
*/ */
if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) { include_once '../../core/class/class_functions.php';
//V1 include_once '../../core/class/class_db_pdo.php';
include_once '../../core/class/class_functions.php'; include_once '../../core/init.php';
include_once '../../core/class/class_db_pdo.php'; include 'apps/maarch_entreprise/tools/maarchIVS/MaarchIVS.php';
include_once '../../core/init.php';
include 'apps/maarch_entreprise/tools/maarchIVS/MaarchIVS.php';
if ($_SESSION['config']['usePHPIDS'] == 'true') { //Ozwillo
include 'apps/maarch_entreprise/phpids_control.php'; if (!empty($_REQUEST['code']) && !empty($_REQUEST['state'])) {
} $_SESSION['ozwillo']['code'] = $_REQUEST['code'];
$_SESSION['ozwillo']['state'] = $_REQUEST['state'];
}
//SET custom path if ($_SESSION['config']['usePHPIDS'] == 'true') {
if (isset($_SESSION['config']['corepath'])) { include 'apps/maarch_entreprise/phpids_control.php';
require_once 'core/class/class_db.php'; }
require_once 'core/class/class_core_tools.php';
$core = new core_tools(); //SET custom path
if (! isset($_SESSION['custom_override_id']) if (isset($_SESSION['config']['corepath'])) {
|| empty($_SESSION['custom_override_id']) require_once 'core/class/class_db.php';
) { require_once 'core/class/class_core_tools.php';
$_SESSION['custom_override_id'] = $core->get_custom_id(); $core = new core_tools();
if (! empty($_SESSION['custom_override_id'])) { if (! isset($_SESSION['custom_override_id'])
$path = $_SESSION['config']['corepath'] . 'custom/' || empty($_SESSION['custom_override_id'])
. $_SESSION['custom_override_id'] . '/'; ) {
set_include_path(
$path . '/' . $_SESSION['config']['corepath']
);
}
}
} else {
require_once '../../core/class/class_db.php';
require_once '../../core/class/class_core_tools.php';
$core = new core_tools();
$_SESSION['custom_override_id'] = $core->get_custom_id(); $_SESSION['custom_override_id'] = $core->get_custom_id();
chdir('../..');
if (! empty($_SESSION['custom_override_id'])) { if (! empty($_SESSION['custom_override_id'])) {
$path = $_SESSION['config']['corepath'] . 'custom/' $path = $_SESSION['config']['corepath'] . 'custom/'
. $_SESSION['custom_override_id'] . '/'; . $_SESSION['custom_override_id'] . '/';
...@@ -102,8 +85,32 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) { ...@@ -102,8 +85,32 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) {
} }
} }
} else { } else {
//V2 require_once '../../core/class/class_db.php';
require_once '../../vendor/autoload.php'; require_once '../../core/class/class_core_tools.php';
$core = new core_tools();
$_SESSION['custom_override_id'] = $core->get_custom_id();
chdir('../..');
if (! empty($_SESSION['custom_override_id'])) {
$path = $_SESSION['config']['corepath'] . 'custom/'
. $_SESSION['custom_override_id'] . '/';
set_include_path(
$path . '/' . $_SESSION['config']['corepath']
);
}
}
if (!isset($_SESSION['user']['UserId'])
&& $_REQUEST['page'] <> 'login'
&& $_REQUEST['page'] <> 'log'
&& $_REQUEST['page'] <> 'logout'
) {
$_SESSION['HTTP_REFERER'] = Url::requestUri();
if (trim($_SERVER['argv'][0]) <> '') {
header('location: reopen.php?' . $_SERVER['argv'][0]);
} else {
header('location: reopen.php');
}
exit();
} }
if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) { if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) {
...@@ -328,7 +335,6 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) { ...@@ -328,7 +335,6 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) {
header('location: index.php?display=true&page=logout&logout=true'); header('location: index.php?display=true&page=logout&logout=true');
exit(); exit();
} }
chdir('../..');
$user = \User\models\UserModel::getByLogin(['login' => $cookie['userId'], 'select' => ['password_modification_date', 'change_password', 'status']]); $user = \User\models\UserModel::getByLogin(['login' => $cookie['userId'], 'select' => ['password_modification_date', 'change_password', 'status']]);
//HTML CONTENT OF ANGULAR //HTML CONTENT OF ANGULAR
...@@ -353,7 +359,6 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) { ...@@ -353,7 +359,6 @@ if ($_REQUEST['page'] && empty($_REQUEST['triggerAngular'])) {
} }
} }
include_once 'core/init.php';
if (isset($_SESSION['HTTP_REFERER'])) { if (isset($_SESSION['HTTP_REFERER'])) {
$url = $_SESSION['HTTP_REFERER']; $url = $_SESSION['HTTP_REFERER'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment