diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index 141105a29f..c74332b1eb 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -14,7 +14,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -function dbmanager_query ($sql, &$error) { +function dbmanager_query ($sql, &$error, $dbconnection) { global $config; switch ($config["dbtype"]) { @@ -25,22 +25,49 @@ function dbmanager_query ($sql, &$error) { return false; $sql = html_entity_decode($sql, ENT_QUOTES); - - $result = mysql_query ($sql); - if ($result === false) { - $backtrace = debug_backtrace (); - $error = mysql_error (); - return false; + if ($config["mysqli"]) { + $result = mysqli_query ($dbconnection, $sql); + if ($result === false) { + $backtrace = debug_backtrace (); + $error = mysqli_error ($dbconnection); + return false; + } + } + else{ + $result = mysql_query ($sql, $dbconnection); + if ($result === false) { + $backtrace = debug_backtrace (); + $error = mysql_error (); + return false; + } } if ($result === true) { - return mysql_affected_rows (); + if($config["mysqli"]){ + return mysqli_affected_rows ($dbconnection); + } + else{ + return mysql_affected_rows (); + } } - while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { - array_push ($retval, $row); + if($config["mysqli"]){ + while ($row = mysqli_fetch_array ($result, MYSQL_ASSOC)) { + array_push ($retval, $row); + } + } + else{ + while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { + array_push ($retval, $row); + } + } + + if($config["mysqli"]){ + mysqli_free_result ($result); + } + else{ + mysql_free_result ($result); } - mysql_free_result ($result); if (! empty ($retval)) return $retval; @@ -131,8 +158,10 @@ function dbmgr_extension_main () { echo "
"; echo "
"; + $dbconnection = $config['dbconnection']; $error = ''; - $result = dbmanager_query ($sql, $error); + + $result = dbmanager_query ($sql, $error, $dbconnection); if ($result === false) { echo 'An error has occured when querying the database.
'; @@ -152,6 +181,7 @@ function dbmgr_extension_main () { } echo "
"; + $table = new stdClass(); $table->width = '100%'; $table->class = 'databox data'; $table->head = array_keys ($result[0]); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 97e3d0858e..e4506b3879 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -365,7 +365,7 @@ switch ($action) { } // Page header for normal console else - ui_print_page_header (__('Reporting').' » '.__('Custom reporting'), "images/op_reporting.png", false, "", false, $buttons); + ui_print_page_header (__('Reporting').' » '.__('Custom reporting'), "images/op_reporting.png", false, "", false, $buttons,false,'',80); if ($action == 'delete_report') { @@ -1908,7 +1908,7 @@ switch ($action) { } // Page header for normal console else - ui_print_page_header (__('Reporting') . $subsection, "images/op_reporting.png", false, "", false, $buttons); + ui_print_page_header (__('Reporting') . $subsection, "images/op_reporting.png", false, "", false, $buttons,false,'',80); reporting_enterprise_select_main_tab($action); @@ -1980,7 +1980,7 @@ if ($enterpriseEnable and defined('METACONSOLE')) { else { ui_print_page_header(__('Reporting') . $textReportName, "images/op_reporting.png", false, - "reporting_" . $activeTab . "_tab", false, $buttons); + "reporting_" . $activeTab . "_tab", false, $buttons,false,'',80); } if ($resultOperationDB !== null) { diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.php b/pandora_console/godmode/reporting/visual_console_builder.editor.php index 1152f4741e..82a886aab0 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.php +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.php @@ -77,7 +77,7 @@ if (!defined('METACONSOLE')) { else { echo '
'; } -echo '
'; echo "