WIP: Backup upload
This commit is contained in:
parent
4040d1a0e3
commit
40958ae69d
|
@ -12,6 +12,13 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
// TESTING
|
||||
/*
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL); */
|
||||
$cipotes = false;
|
||||
// END
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
@ -25,12 +32,8 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
|
|||
return;
|
||||
}
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once $config['homedir'].'/include/class/ManageBlock.class.php';
|
||||
// $ajaxPage = ENTERPRISE_DIR.'/godmode/agentes/ManageBlock';
|
||||
$ajaxPage = ENTERPRISE_DIR.'/godmode/agentes/ManageBlock';
|
||||
// Control call flow.
|
||||
try {
|
||||
// User access and validation is being processed on class constructor.
|
||||
|
@ -66,6 +69,18 @@ if (is_ajax()) {
|
|||
// Stop any execution.
|
||||
exit;
|
||||
} else {
|
||||
// Get all parameters
|
||||
$id_np = get_parameter('id_np', '');
|
||||
// Run.
|
||||
$manageBlock->run();
|
||||
|
||||
// List all Module Block
|
||||
// Show the id_np selected
|
||||
// Create new id_np
|
||||
if ($id_np == 0) {
|
||||
$manageBlock->moduleTemplateForm();
|
||||
echo 'hola';
|
||||
} else {
|
||||
$manageBlock->moduleBlockList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* Module Block feature.
|
||||
*
|
||||
* @category Class
|
||||
* @package Pandora FMS
|
||||
* @subpackage SNMP
|
||||
* @version 0.0.1
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2020 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2020 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
|
||||
require_once $config['homedir'].'/include/class/HTML.class.php';
|
||||
|
@ -140,8 +155,7 @@ class ManageBlock extends HTML
|
|||
|
||||
ui_pagination($this->countNetworkTemplates, false, $this->offset);
|
||||
|
||||
echo $this->moduleBlockList();
|
||||
|
||||
// echo $this->moduleBlockList();
|
||||
// $this->printForm(
|
||||
// [
|
||||
// 'form' => $form,
|
||||
|
@ -154,7 +168,7 @@ class ManageBlock extends HTML
|
|||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
* Create
|
||||
*
|
||||
* @return html Formed table
|
||||
*/
|
||||
|
@ -189,14 +203,11 @@ class ManageBlock extends HTML
|
|||
|
||||
$table->data = [];
|
||||
|
||||
hd($this->resultModuleBlocksTable);
|
||||
|
||||
foreach ($this->resultModuleBlocksTable as $row) {
|
||||
$data = [];
|
||||
$data[0] = $row['id_np'];
|
||||
$data[1] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
|
||||
$data[2] = 'description';
|
||||
// $data[2] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[…]');
|
||||
$data[0] = html_print_checkbox_extended('delete_multiple[]', $row['id_np'], false, false, '', 'class="check_delete"', true);
|
||||
$data[1] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_block_templates&id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
|
||||
$data[2] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[…]');
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$data[3] = html_print_input_image(
|
||||
'delete_profile',
|
||||
|
@ -214,16 +225,38 @@ class ManageBlock extends HTML
|
|||
true,
|
||||
['title' => 'Export to CSV']
|
||||
);
|
||||
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>';
|
||||
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_block_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_block_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
$output = '<div style="margin-top: 40px; text-align: center;"><span style="font-size: 1.9em; font-family: "lato-bolder", "Open Sans", sans-serif !important;">'.__('Summary').'</span></div>';
|
||||
$output .= html_print_table($table, true).'</div>';
|
||||
echo html_print_table($table, true);
|
||||
|
||||
return $output;
|
||||
echo '<div style="float:right;" class="">';
|
||||
|
||||
$this->printForm(
|
||||
[
|
||||
'form' => [
|
||||
'method' => 'POST',
|
||||
'action' => 'index.php?sec=gmodules&sec2=godmode/modules/manage_block_templates',
|
||||
],
|
||||
'inputs' => [
|
||||
[
|
||||
'class' => 'w100p',
|
||||
'arguments' => [
|
||||
'name' => 'crt',
|
||||
'label' => __('Create'),
|
||||
'type' => 'submit',
|
||||
'attributes' => 'class="sub next"',
|
||||
'return' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue