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
|
|
|
|
|
2021-11-04 16:28:15 +01:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
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
|
|
|
// ==================================================
|
2020-11-27 13:52:35 +01:00
|
|
|
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
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
|
|
|
// 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;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
check_login();
|
|
|
|
// The ajax is in
|
2022-03-30 14:41:47 +02:00
|
|
|
// include/ajax/update_manager.php
|
2019-01-30 16:18:44 +01:00
|
|
|
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
|
2022-02-01 13:39:18 +01:00
|
|
|
db_pandora_audit(
|
|
|
|
AUDIT_LOG_ACL_VIOLATION,
|
|
|
|
'Trying to access Setup Management'
|
|
|
|
);
|
2019-01-30 16:18:44 +01:00
|
|
|
include 'general/noaccess.php';
|
|
|
|
return;
|
2016-04-13 13:51:01 +02:00
|
|
|
}
|
|
|
|
|
2022-03-28 12:20:36 +02:00
|
|
|
require_once $config['homedir'].'/vendor/autoload.php';
|
2021-06-14 13:56:42 +02:00
|
|
|
|
2018-11-14 18:15:48 +01:00
|
|
|
$php_version = phpversion();
|
|
|
|
$php_version_array = explode('.', $php_version);
|
2019-01-30 16:18:44 +01:00
|
|
|
if ($php_version_array[0] < 7) {
|
|
|
|
include_once 'general/php7_message.php';
|
2018-11-14 18:15:48 +01:00
|
|
|
}
|
|
|
|
|
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
|
|
|
$tab = get_parameter('tab', 'online');
|
|
|
|
|
2019-08-08 09:23:23 +02:00
|
|
|
$buttons['setup'] = [
|
|
|
|
'active' => ($tab == 'setup') ? true : false,
|
2022-03-30 14:41:47 +02:00
|
|
|
'text' => '<a href="'.ui_get_full_url(
|
|
|
|
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup'
|
|
|
|
).'">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options'), 'class' => 'invert_filter']).'</a>',
|
|
|
|
];
|
|
|
|
|
|
|
|
$buttons['history'] = [
|
|
|
|
'active' => ($tab == 'history') ? true : false,
|
|
|
|
'text' => '<a href="'.ui_get_full_url(
|
|
|
|
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=histo'
|
|
|
|
).'ry">'.html_print_image('images/gm_db.png', true, ['title' => __('Journal'), 'class' => 'invert_filter']).'</a>',
|
2019-08-08 09:23:23 +02:00
|
|
|
];
|
|
|
|
|
2021-08-11 11:27:07 +02:00
|
|
|
$buttons['offline'] = [
|
|
|
|
'active' => ($tab == 'offline') ? true : false,
|
2022-03-30 14:41:47 +02:00
|
|
|
'text' => '<a href="'.ui_get_full_url(
|
|
|
|
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offli'
|
|
|
|
).'ne">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager'), 'class' => 'invert_filter']).'</a>',
|
2021-08-11 11:27:07 +02:00
|
|
|
];
|
2019-08-08 09:23:23 +02:00
|
|
|
|
|
|
|
$buttons['online'] = [
|
|
|
|
'active' => ($tab == 'online') ? true : false,
|
2022-03-30 14:41:47 +02:00
|
|
|
'text' => '<a href="'.ui_get_full_url(
|
|
|
|
'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=onlin'
|
|
|
|
).'e">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager'), 'class' => 'invert_filter']).'</a>',
|
2019-01-30 16:18:44 +01:00
|
|
|
];
|
|
|
|
|
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
|
|
|
switch ($tab) {
|
2019-01-30 16:18:44 +01:00
|
|
|
case 'setup':
|
|
|
|
$title = __('Update manager » Setup');
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'offline':
|
|
|
|
$title = __('Update manager » Offline');
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'online':
|
2021-08-11 11:27:07 +02:00
|
|
|
default:
|
2019-01-30 16:18:44 +01:00
|
|
|
$title = __('Update manager » Online');
|
|
|
|
break;
|
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
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
ui_print_page_header(
|
|
|
|
$title,
|
|
|
|
'images/gm_setup.png',
|
|
|
|
false,
|
2020-05-29 11:37:06 +02:00
|
|
|
'',
|
2019-01-30 16:18:44 +01:00
|
|
|
true,
|
|
|
|
$buttons
|
|
|
|
);
|
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
|
|
|
|
|
|
|
switch ($tab) {
|
2022-03-30 14:41:47 +02:00
|
|
|
case 'history':
|
|
|
|
include $config['homedir'].'/godmode/update_manager/update_manager.history.php';
|
|
|
|
break;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
case 'setup':
|
|
|
|
include $config['homedir'].'/godmode/update_manager/update_manager.setup.php';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'offline':
|
2021-06-14 13:56:42 +02:00
|
|
|
$mode = \UpdateManager\UI\Manager::MODE_OFFLINE;
|
|
|
|
include $config['homedir'].'/godmode/um_client/index.php';
|
2019-01-30 16:18:44 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'online':
|
|
|
|
default:
|
2021-06-14 13:56:42 +02:00
|
|
|
$mode = \UpdateManager\UI\Manager::MODE_ONLINE;
|
|
|
|
include $config['homedir'].'/godmode/um_client/index.php';
|
2019-01-30 16:18:44 +01:00
|
|
|
break;
|
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
|
|
|
}
|