Readded the extension admin page. TICKET: #3149
This commit is contained in:
parent
74a4c11f4b
commit
703b27027f
|
@ -142,27 +142,19 @@ $table->width = '98%';
|
|||
$table->head = array();
|
||||
$table->head[] = __('File');
|
||||
$table->head[] = __('Version');
|
||||
$table->head[] = "<span title='" . __("Enterprise") . "'>" . __('E.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Godmode Function") . "'>" . __('G.F.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Godmode Menu") . "'>" . __('G.M.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Operation Menu") . "'>" . __('O.M.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Operation Function") . "'>" . __('O.F.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Login Function") . "'>" . __('L.F.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Agent operation tab") . "'>" . __('A.O.T.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Agent godmode tab") . "'>" . __('A.G.T.') . "</span>";
|
||||
$table->head[] = "<span title='" . __("Operation") . "'>" . __('O.') . "</span>";
|
||||
$table->head[] = __("Enterprise");
|
||||
$table->head[] = __("Godmode Function");
|
||||
$table->head[] = __("Godmode Menu");
|
||||
$table->head[] = __("Operation Menu");
|
||||
$table->head[] = __("Operation Function");
|
||||
$table->head[] = __("Login Function");
|
||||
$table->head[] = __("Agent operation tab");
|
||||
$table->head[] = __("Agent godmode tab");
|
||||
$table->head[] = __("Operation");
|
||||
|
||||
$table->width = array();
|
||||
$table->width[] = '30%';
|
||||
$table->width[] = '30%';
|
||||
$table->width[] = '22px';
|
||||
$table->width[] = '44px';
|
||||
$table->width[] = '44px';
|
||||
$table->width[] = '44px';
|
||||
$table->width[] = '44px';
|
||||
$table->width[] = '66px';
|
||||
$table->width[] = '66px';
|
||||
$table->width[] = '44px';
|
||||
|
||||
$table->align = array();
|
||||
$table->align[] = 'left';
|
||||
|
|
|
@ -279,7 +279,11 @@ if (check_acl ($config['id_user'], 0, "PM")) {
|
|||
$sub["godmode/setup/links"]["id"] = 'Links';
|
||||
$sub["godmode/update_manager/update_manager"]["text"] = __('Update manager');
|
||||
$sub["godmode/update_manager/update_manager"]["id"] = 'Update manager';
|
||||
$sub["gextmaneger"]["sub2"] = $sub2;
|
||||
|
||||
|
||||
$sub["godmode/extensions"]["sub2"] = $sub2;
|
||||
|
||||
|
||||
if (check_acl ($config['id_user'], 0, "DM")) {
|
||||
$sub["gdbman"]["text"] = __('DB maintenance');
|
||||
$sub["gdbman"]["id"] = 'DB maintenance';
|
||||
|
@ -308,10 +312,10 @@ if (check_acl ($config['id_user'], 0, "PM")) {
|
|||
if (is_array ($config['extensions'])) {
|
||||
|
||||
$sub = array ();
|
||||
$sub["gextmaneger"]["text"] = __('Extension manager');
|
||||
$sub["gextmaneger"]["id"] = 'Extension manager';
|
||||
$sub["gextmaneger"]["type"] = "direct";
|
||||
$sub["gextmaneger"]["subtype"] = "nolink";
|
||||
$sub["godmode/extensions"]["text"] = __('Extension manager');
|
||||
$sub["godmode/extensions"]["id"] = 'Extension manager';
|
||||
|
||||
|
||||
$sub2 = array ();
|
||||
|
||||
foreach ($config['extensions'] as $extension) {
|
||||
|
@ -379,7 +383,12 @@ if (check_acl ($config['id_user'], 0, "PM")) {
|
|||
}
|
||||
}
|
||||
}
|
||||
$sub["gextmaneger"]["sub2"] = $sub2;
|
||||
|
||||
|
||||
|
||||
$sub["godmode/extensions"]["sub2"] = $sub2;
|
||||
|
||||
|
||||
$submenu = array_merge($menu_godmode["gextensions"]["sub"],$sub);
|
||||
$menu_godmode["gextensions"]["sub"] = $submenu;
|
||||
}
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
<?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);
|
||||
?>
|
Loading…
Reference in New Issue