mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-14 17:34:59 +02:00
* operation/extensions.php, godmode/extensions.php, include/functions_extensions.php, extensions/insert_data.php, extensions/snmp_explorer.php, extensions/system_info.php, extensions/net_tools.php, extensions/extension_uploader.php, extensions/pandora_logs.php, extensions/agents_modules.php, extensions/update_manager.php, extensions/ssh_gateway.php, extensions/dbmanager.php, extensions/vnc_view.php, extensions/resource_registration.php, extensions/users_connected.php, extensions/resource_exportation.php, extensions/module_groups.php, extensions/plugin_registration.php: Modified extension to show versions. MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
71 lines
2.2 KiB
PHP
71 lines
2.2 KiB
PHP
<?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.
|
|
|
|
check_login ();
|
|
|
|
if (! check_acl ($config['id_user'], 0, "AR")) {
|
|
db_pandora_audit("ACL Violation",
|
|
"Trying to access extensions list");
|
|
include ("general/noaccess.php");
|
|
exit;
|
|
}
|
|
|
|
// Header
|
|
ui_print_page_header (__('Extensions'). " » ". __('Defined extensions'), "images/extensions.png", false, "", false, "" );
|
|
|
|
if (sizeof ($config['extensions']) == 0) {
|
|
echo '<h3>'.__('There are no extensions defined').'</h3>';
|
|
return;
|
|
}
|
|
|
|
$delete = get_parameter ("delete", "");
|
|
$name = get_parameter ("name", "");
|
|
|
|
if ($delete != ""){
|
|
if (!file_exists($config["homedir"]."/extensions/ext_backup"))
|
|
mkdir($config["homedir"]."/extensions/ext_backup");
|
|
$source = $config["homedir"]."/$delete.php";
|
|
rename ($source, $config["homedir"]."/extensions/ext_backup/$name.php");
|
|
}
|
|
|
|
|
|
$table->width = '60%';
|
|
$table->head = array ();
|
|
$table->head[0] = __('Name');
|
|
$table->head[1] = __('Version');
|
|
$table->head[2] = __('Action');
|
|
$table->style = array();
|
|
$table->style[1] = 'text-align: center;';
|
|
$table->style[2] = 'text-align: center; font-weight: bolder;';
|
|
$table->data = array ();
|
|
|
|
foreach ($config['extensions'] as $extension) {
|
|
if ($extension['main_function'] == '')
|
|
continue;
|
|
if ($extension['operation_menu'] == null)
|
|
continue;
|
|
|
|
$data = array ();
|
|
$data[0] = $extension['operation_menu']['name'];
|
|
$data[1] = $extension['operation_menu']['version'];
|
|
$data[2] = '<a href="index.php?sec=extensions&sec2='.$extension['operation_menu']['sec2'].'" class="mn">' . __('Execute') . '</a>';
|
|
|
|
array_push ($table->data, $data);
|
|
}
|
|
|
|
html_print_table ($table);
|
|
?>
|