mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Some fixes in the code.
This commit is contained in:
parent
2754bfeeb0
commit
447c4ccd6d
@ -333,11 +333,14 @@ if (!$id_agente) {
|
||||
else {
|
||||
$url = 'index.php?sec='.$sec.'&sec2=godmode/agentes/configurar_agente&pure='.$pure.'&tab=alert&id_agente=' . $id_agente . '&offset=' . $offset . $form_params;
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
|
||||
if ( defined("METACONSOLE") )
|
||||
$table->class = 'alert_list databox';
|
||||
else
|
||||
$table->class = 'databox filters';
|
||||
|
||||
|
||||
$table->width = '100%';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
|
@ -466,11 +466,14 @@ if (defined("METACONSOLE")) {
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
}
|
||||
}else{
|
||||
ui_pagination ($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
}
|
||||
else {
|
||||
ui_pagination ($countItems,
|
||||
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
html_print_table($table);
|
||||
ui_pagination ($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
|
||||
ui_pagination ($countItems,
|
||||
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
|
||||
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=" . $idReport . "'
|
||||
method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>";
|
||||
if (defined("METACONSOLE"))
|
||||
|
@ -2404,4 +2404,36 @@ function sort_by_column (&$array_ref, $column_parameter) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function array2XML($data, $root = null, $xml = NULL) {
|
||||
if ($xml == null) {
|
||||
$xml = simplexml_load_string(
|
||||
"<?xml version='1.0' encoding='UTF-8'?>\n<" . $root . " />");
|
||||
}
|
||||
|
||||
foreach($data as $key => $value) {
|
||||
if (is_numeric($key)) {
|
||||
$key = "item_" . $key;
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$node = $xml->addChild($key);
|
||||
array2XML($value, $root, $node);
|
||||
}
|
||||
else {
|
||||
$value = htmlentities($value);
|
||||
|
||||
if (!is_numeric($value) && !is_bool($value)) {
|
||||
if (!empty($value)) {
|
||||
$xml->addChild($key, $value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$xml->addChild($key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return html_entity_decode($xml->asXML());
|
||||
}
|
||||
?>
|
||||
|
@ -254,14 +254,6 @@ echo "<br>";
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
// Get Report record (to get id_group)
|
||||
$report = db_get_row ('treport', 'id_report', $id_report);
|
||||
$report["datetime"] = $datetime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// The rowspan of the first row is only 2 in controls table. Why is used the same code here and in the items??
|
||||
|
@ -19,38 +19,6 @@ include_once ('include/functions_groups.php');
|
||||
include_once ('include/functions_netflow.php');
|
||||
enterprise_include_once ('include/functions_metaconsole.php');
|
||||
|
||||
function array2XML($data, $root = null, $xml = NULL) {
|
||||
if ($xml == null) {
|
||||
$xml = simplexml_load_string(
|
||||
"<?xml version='1.0' encoding='UTF-8'?>\n<" . $root . " />");
|
||||
}
|
||||
|
||||
foreach($data as $key => $value) {
|
||||
if (is_numeric($key)) {
|
||||
$key = "item_" . $key;
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$node = $xml->addChild($key);
|
||||
array2XML($value, $root, $node);
|
||||
}
|
||||
else {
|
||||
$value = htmlentities($value);
|
||||
|
||||
if (!is_numeric($value) && !is_bool($value)) {
|
||||
if (!empty($value)) {
|
||||
$xml->addChild($key, $value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$xml->addChild($key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return html_entity_decode($xml->asXML());
|
||||
}
|
||||
|
||||
|
||||
// Login check
|
||||
if (isset ($_GET["direct"])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user