mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'ent-8889-Redirecciones-usuarios-en-Carrefour' into 'develop'
Ent 8889 redirecciones usuarios en carrefour See merge request artica/pandorafms!4885
This commit is contained in:
commit
889d80fbdb
@ -193,15 +193,23 @@ switch ($action) {
|
|||||||
|
|
||||||
if ($user->isWaitingDoubleAuth()) {
|
if ($user->isWaitingDoubleAuth()) {
|
||||||
if ($user->validateDoubleAuthCode()) {
|
if ($user->validateDoubleAuthCode()) {
|
||||||
// Logged. Refresh the page
|
$url = ui_get_full_url('');
|
||||||
header('Location: .');
|
$url = str_replace("\n", '', $url);
|
||||||
|
$url = str_replace('?action=logout', '', $url);
|
||||||
|
|
||||||
|
// Logged. Refresh the page.
|
||||||
|
header('Location: '.$url);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$user->showDoubleAuthPage();
|
$user->showDoubleAuthPage();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Logged. Refresh the page
|
$url = ui_get_full_url('');
|
||||||
header('Location: .');
|
$url = str_replace("\n", '', $url);
|
||||||
|
$url = str_replace('?action=logout', '', $url);
|
||||||
|
|
||||||
|
// Logged. Refresh the page.
|
||||||
|
header('Location: '.$url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -294,6 +302,42 @@ switch ($action) {
|
|||||||
$_GET['id'] = $id_map;
|
$_GET['id'] = $id_map;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'External link':
|
||||||
|
$full_url = ui_get_full_url();
|
||||||
|
$section_data = io_safe_output($section_data);
|
||||||
|
|
||||||
|
$host_full = parse_url($full_url, PHP_URL_HOST);
|
||||||
|
$host_section = parse_url($section_data, PHP_URL_HOST);
|
||||||
|
|
||||||
|
if ($host_full !== $host_section) {
|
||||||
|
$has_mobile = strpos($section_data, 'mobile');
|
||||||
|
if ($has_mobile === false) {
|
||||||
|
$pos = strpos($section_data, '/index');
|
||||||
|
if ($pos !== false) {
|
||||||
|
$section_data = substr_replace($section_data, '/mobile', $pos, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<script type="text/javascript">document.location="'.$section_data.'"</script>';
|
||||||
|
} else {
|
||||||
|
if (strpos($full_url, 'event') !== false) {
|
||||||
|
$page = 'events';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($full_url, 'alert') !== false) {
|
||||||
|
$page = 'alerts';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($full_url, 'tactical') !== false) {
|
||||||
|
$page = 'tactical';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($full_url, 'visual_console') !== false) {
|
||||||
|
$page = 'visualmap';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 'Group view':
|
case 'Group view':
|
||||||
default:
|
default:
|
||||||
// No content.
|
// No content.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user