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'); 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'));