From 2b72053992307f9477b26e0ba966461b166f69ce Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Fri, 5 May 2017 12:14:17 +0200 Subject: [PATCH 1/6] Revert "Fixed license failure" This reverts commit 14e7d4b448580c860986163f10e70c6b76275673. --- pandora_console/index.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 05ac148870..78997fbe56 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -101,6 +101,11 @@ if ($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { header ("Location: " . $config['homeurl'] . "enterprise/meta"); } +/* Enterprise support */ +if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { + include_once (ENTERPRISE_DIR . "/load_enterprise.php"); +} + if (file_exists (ENTERPRISE_DIR . "/include/functions_login.php")) { include_once (ENTERPRISE_DIR . "/include/functions_login.php"); } @@ -582,12 +587,6 @@ else { } } } - -/* Enterprise support */ -if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { - include_once (ENTERPRISE_DIR . "/load_enterprise.php"); -} - // Log off if (isset ($_GET["bye"])) { include ("general/logoff.php"); From 830ad6fc90b31d33491ad0a5b779a3233975b2a8 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Fri, 5 May 2017 12:17:25 +0200 Subject: [PATCH 2/6] Revert "Revert "Fixed license failure"" This reverts commit 2b72053992307f9477b26e0ba966461b166f69ce. --- pandora_console/index.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 78997fbe56..05ac148870 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -101,11 +101,6 @@ if ($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { header ("Location: " . $config['homeurl'] . "enterprise/meta"); } -/* Enterprise support */ -if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { - include_once (ENTERPRISE_DIR . "/load_enterprise.php"); -} - if (file_exists (ENTERPRISE_DIR . "/include/functions_login.php")) { include_once (ENTERPRISE_DIR . "/include/functions_login.php"); } @@ -587,6 +582,12 @@ else { } } } + +/* Enterprise support */ +if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { + include_once (ENTERPRISE_DIR . "/load_enterprise.php"); +} + // Log off if (isset ($_GET["bye"])) { include ("general/logoff.php"); From 55196854b045e8b4f47a5ed45b27c5540981d81a Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Fri, 5 May 2017 12:21:58 +0200 Subject: [PATCH 3/6] Revert "Fixed license failure" This reverts commit 14e7d4b448580c860986163f10e70c6b76275673. --- pandora_console/index.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 05ac148870..78997fbe56 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -101,6 +101,11 @@ if ($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { header ("Location: " . $config['homeurl'] . "enterprise/meta"); } +/* Enterprise support */ +if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { + include_once (ENTERPRISE_DIR . "/load_enterprise.php"); +} + if (file_exists (ENTERPRISE_DIR . "/include/functions_login.php")) { include_once (ENTERPRISE_DIR . "/include/functions_login.php"); } @@ -582,12 +587,6 @@ else { } } } - -/* Enterprise support */ -if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { - include_once (ENTERPRISE_DIR . "/load_enterprise.php"); -} - // Log off if (isset ($_GET["bye"])) { include ("general/logoff.php"); From dba263632b188c1a5ec6a929aea547dc11370c39 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Fri, 5 May 2017 12:26:34 +0200 Subject: [PATCH 4/6] Revert "Revert "Fixed license failure"" This reverts commit 55196854b045e8b4f47a5ed45b27c5540981d81a. --- pandora_console/index.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 78997fbe56..05ac148870 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -101,11 +101,6 @@ if ($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { header ("Location: " . $config['homeurl'] . "enterprise/meta"); } -/* Enterprise support */ -if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { - include_once (ENTERPRISE_DIR . "/load_enterprise.php"); -} - if (file_exists (ENTERPRISE_DIR . "/include/functions_login.php")) { include_once (ENTERPRISE_DIR . "/include/functions_login.php"); } @@ -587,6 +582,12 @@ else { } } } + +/* Enterprise support */ +if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { + include_once (ENTERPRISE_DIR . "/load_enterprise.php"); +} + // Log off if (isset ($_GET["bye"])) { include ("general/logoff.php"); From 658ff78efb2cd61aac258c914d25bb267ec9b575 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 8 May 2017 11:49:54 +0200 Subject: [PATCH 5/6] Added homedir lost reference to functions_html --- pandora_console/include/functions_graph.php | 3 +-- pandora_console/include/graphs/fgraph.php | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 8582655e82..261ea7ae4b 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2304,10 +2304,9 @@ function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value require_once("include_graph_dependencies.php"); include_graphs_dependencies($config['homedir'].'/'); - $src = ui_get_full_url( "/include/graphs/fgraph.php?homeurl=../../&graph_type=progressbar" . - "&width=".$width."&height=".$height."&progress=".$progress. + "&width=".$width."&homedir=".$config['homedir']."&height=".$height."&progress=".$progress. "&mode=" . $mode . "&out_of_lim_str=".$out_of_lim_str . "&title=".$title."&font=".$config['fontpath']."&value_text=". $value_text . "&colorRGB=". $colorRGB, false, false, false diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index d9443e6105..7e8b6074c2 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -40,6 +40,11 @@ else $graph_type = ''; ob_start (); if (!empty($graph_type)) { + $homedir = $_GET['homedir']; + if ($homedir != null) { + $config['homedir'] = $homedir; + } + include_once($homeurl . 'include/functions.php'); include_once($homeurl . 'include/functions_html.php'); From 634db708129742463bfe616968edd2478ba085b6 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 8 May 2017 12:11:51 +0200 Subject: [PATCH 6/6] Added second condirmation to user session --- pandora_console/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/index.php b/pandora_console/index.php index 05ac148870..41939787b6 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -453,7 +453,7 @@ if (! isset ($config['id_user'])) { db_logon ($nick_in_db, $_SERVER['REMOTE_ADDR']); $_SESSION['id_usuario'] = $nick_in_db; $config['id_user'] = $nick_in_db; - + config_prepare_session(); if (is_user_admin($config['id_user'])) { // PHP configuration values $PHPupload_max_filesize = config_return_in_bytes(ini_get('upload_max_filesize'));