2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2011 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; 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;
|
|
|
|
|
2016-04-13 13:51:01 +02:00
|
|
|
check_login ();
|
|
|
|
|
|
|
|
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
|
|
|
|
db_pandora_audit("ACL Violation", "Trying to access Setup Management");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-06-16 13:27:19 +02:00
|
|
|
$identification_reminder = get_parameter('identification_reminder', 1);
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
$action_update_url_update_manager = (bool)get_parameter(
|
|
|
|
'action_update_url_update_manager', 0);
|
|
|
|
|
2016-06-14 16:31:27 +02:00
|
|
|
if(!$action_update_url_update_manager){
|
|
|
|
$url_update_manager = get_parameter('url_update_manager',$config['url_update_manager']);
|
|
|
|
$update_manager_proxy_server = get_parameter('update_manager_proxy_server',$config['update_manager_proxy_server']);
|
|
|
|
$update_manager_proxy_port = get_parameter('update_manager_proxy_port',$config['update_manager_proxy_port']);
|
|
|
|
$update_manager_proxy_user = get_parameter('update_manager_proxy_user',$config['update_manager_proxy_user']);
|
|
|
|
$update_manager_proxy_password = get_parameter('update_manager_proxy_password',$config['update_manager_proxy_password']);
|
|
|
|
|
|
|
|
|
|
|
|
if ($action_update_url_update_manager) {
|
|
|
|
$result = config_update_value('url_update_manager',
|
|
|
|
$url_update_manager);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_server',
|
|
|
|
$update_manager_proxy_server);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_port',
|
|
|
|
$update_manager_proxy_port);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_user',
|
|
|
|
$update_manager_proxy_user);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_password',
|
|
|
|
$update_manager_proxy_password);
|
2016-06-16 13:27:19 +02:00
|
|
|
if ($result && license_free())
|
|
|
|
$result = config_update_value('identification_reminder',$identification_reminder);
|
2016-06-14 16:31:27 +02:00
|
|
|
|
|
|
|
ui_print_result_message($result,
|
|
|
|
__('Succesful Update the url config vars.'),
|
|
|
|
__('Unsuccesful Update the url config vars.'));
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$url_update_manager = get_parameter('url_update_manager','');
|
|
|
|
$update_manager_proxy_server = get_parameter('update_manager_proxy_server','');
|
|
|
|
$update_manager_proxy_port = get_parameter('update_manager_proxy_port','');
|
|
|
|
$update_manager_proxy_user = get_parameter('update_manager_proxy_user','');
|
|
|
|
$update_manager_proxy_password = get_parameter('update_manager_proxy_password','');
|
|
|
|
|
|
|
|
|
|
|
|
if ($action_update_url_update_manager) {
|
|
|
|
$result = config_update_value('url_update_manager',
|
|
|
|
$url_update_manager);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_server',
|
|
|
|
$update_manager_proxy_server);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_port',
|
|
|
|
$update_manager_proxy_port);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_user',
|
|
|
|
$update_manager_proxy_user);
|
|
|
|
if ($result)
|
|
|
|
$result = config_update_value('update_manager_proxy_password',
|
|
|
|
$update_manager_proxy_password);
|
2016-06-16 13:27:19 +02:00
|
|
|
if ($result && license_free())
|
|
|
|
$result = config_update_value('identification_reminder',$identification_reminder);
|
2016-06-14 16:31:27 +02:00
|
|
|
ui_print_result_message($result,
|
|
|
|
__('Succesful Update the url config vars.'),
|
|
|
|
__('Unsuccesful Update the url config vars.'));
|
|
|
|
}
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
}
|
|
|
|
|
2014-06-16 15:04:58 +02:00
|
|
|
echo '<form method="post" action="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">';
|
2015-06-25 10:07:53 +02:00
|
|
|
|
|
|
|
$table = new stdClass();
|
2015-06-16 16:09:50 +02:00
|
|
|
$table->width = '100%';
|
|
|
|
$table->class = 'databox filters';
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
|
2016-09-19 16:20:18 +02:00
|
|
|
$table->style[0] = 'font-weight: bolder;width:250px';
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
|
|
|
|
$table->data[0][0] = __('URL update manager:');
|
|
|
|
$table->data[0][1] = html_print_input_text('url_update_manager',
|
2016-09-19 16:20:18 +02:00
|
|
|
$url_update_manager, __('URL update manager'), 80, 60, true);
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
|
2015-02-10 16:40:44 +01:00
|
|
|
$table->data[1][0] = __('Proxy server:');
|
|
|
|
$table->data[1][1] = html_print_input_text('update_manager_proxy_server',
|
2016-09-19 16:20:18 +02:00
|
|
|
$update_manager_proxy_server, __('Proxy server'), 80, 60, true);
|
2015-02-10 16:40:44 +01:00
|
|
|
|
|
|
|
$table->data[2][0] = __('Proxy port:');
|
|
|
|
$table->data[2][1] = html_print_input_text('update_manager_proxy_port',
|
2016-09-19 16:20:18 +02:00
|
|
|
$update_manager_proxy_port, __('Proxy port'), 80, 60, true);
|
2015-02-10 16:40:44 +01:00
|
|
|
|
|
|
|
$table->data[3][0] = __('Proxy user:');
|
|
|
|
$table->data[3][1] = html_print_input_text('update_manager_proxy_user',
|
2016-09-19 16:20:18 +02:00
|
|
|
$update_manager_proxy_user, __('Proxy user'), 80, 60, true);
|
2015-02-10 16:40:44 +01:00
|
|
|
|
|
|
|
$table->data[4][0] = __('Proxy password:');
|
2016-05-19 10:58:52 +02:00
|
|
|
$table->data[4][1] = html_print_input_password('update_manager_proxy_password',
|
2016-09-19 16:20:18 +02:00
|
|
|
$update_manager_proxy_password, __('Proxy password'), 80, 60, true);
|
2015-02-10 16:40:44 +01:00
|
|
|
|
2016-06-16 13:27:19 +02:00
|
|
|
if (license_free()) {
|
|
|
|
$config["identification_reminder"] = isset($config["identification_reminder"]) ? $config["identification_reminder"] : 1;
|
|
|
|
$table->data[6][0] = __('Pandora FMS community reminder') .
|
|
|
|
ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this Pandora instance'), true);
|
|
|
|
$table->data[6][1] = __('Yes').' '.html_print_radio_button ('identification_reminder', 1, '', $config["identification_reminder"], true).' ';
|
|
|
|
$table->data[6][1] .= __('No').' '.html_print_radio_button ('identification_reminder', 0, '', $config["identification_reminder"], true);
|
|
|
|
}
|
|
|
|
|
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_config.php, general/login_page.php: improved
the source code style.
* godmode/setup/os.builder.php: fixed the form.
* godmode/update_manager_xxx/*, godmode/menu.php,
include/functions_update_manager.php,
include/ajax/update_manager.ajax.php,
include/graphs/functions_gd.php, include/graphs/functions_flot.php,
include/config_process.php, include/javascript/update_manager.js,
include/javascript/jquery.knob.js,
include/javascript/jquery.iframe-transport.js,
include/javascript/jquery.fileupload.js, images/check-cross.png:
first version of new update manager.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10144 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-06-09 15:33:55 +02:00
|
|
|
html_print_input_hidden('action_update_url_update_manager', 1);
|
|
|
|
html_print_table($table);
|
|
|
|
|
|
|
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
|
|
|
html_print_submit_button (__('Update'), 'update_button', false,
|
|
|
|
'class="sub upd"');
|
|
|
|
echo '</div>';
|
|
|
|
echo '</form>';
|
|
|
|
?>
|