2010-02-22 Sancho Lerena <slerena@artica.es>
* include/functions_menu.php: Add calls for new enterprise ACL system. * include/config_process.php include/functions_config.php: Added new setup token for ACL enterprise. * index.php: Implemented new Enterprise ACL on page load. * extras/pandora_diag.php: Added new header style. * general/noaccess.php: Ending <div> was breaking layout. Fixed. * godmode/db/db_main.php: Added new header style. * godmode/menu.php: Added new Setup option for Enterprise ACL system. * godmode/snmpconsole/snmp_alert.php, godmode/setup/news.php godmode/users/configure_user.php godmode/reporting/map_builder.php: Added new header style. * godmode/setup/setup.php: Added new Setup option for Enterprise ACL system. * godmode/setup/setup_visuals.php: Added new header style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2400 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
126d96f5b9
commit
5f136b3033
|
@ -1,3 +1,29 @@
|
|||
2010-02-22 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* include/functions_menu.php: Add calls for new enterprise ACL system.
|
||||
|
||||
* include/config_process.php
|
||||
include/functions_config.php: Added new setup token for ACL enterprise.
|
||||
|
||||
* index.php: Implemented new Enterprise ACL on page load.
|
||||
|
||||
* extras/pandora_diag.php: Added new header style.
|
||||
|
||||
* general/noaccess.php: Ending <div> was breaking layout. Fixed.
|
||||
|
||||
* godmode/db/db_main.php: Added new header style.
|
||||
|
||||
* godmode/menu.php: Added new Setup option for Enterprise ACL system.
|
||||
|
||||
* godmode/snmpconsole/snmp_alert.php,
|
||||
godmode/setup/news.php
|
||||
godmode/users/configure_user.php
|
||||
godmode/reporting/map_builder.php: Added new header style.
|
||||
|
||||
* godmode/setup/setup.php: Added new Setup option for Enterprise ACL system.
|
||||
|
||||
* godmode/setup/setup_visuals.php: Added new header style.
|
||||
|
||||
2010-02-22 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/gis_maps/ajax.php: fix bug that pass wrong var to search
|
||||
|
|
|
@ -79,7 +79,9 @@ full path to Pandora FMS 'config.php' file.
|
|||
exit;
|
||||
}
|
||||
|
||||
echo "<h3>Pandora FMS Diagnostic tool v$pandora_version </h3>";
|
||||
// Header
|
||||
print_page_header (__('Pandora FMS Diagnostic tool'), "", false, "", true);
|
||||
|
||||
echo "<table with=600 cellpadding=4 cellspacing=4>";
|
||||
echo "<tr><th align=left>".__("Item")."</th>";
|
||||
echo "<th>".__("Data value")."</th></tr>";
|
||||
|
|
|
@ -12,21 +12,17 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
print_page_header (__('You don\'t have access to this page'), "", false, "", true);
|
||||
|
||||
?>
|
||||
|
||||
<div id="noaccess">
|
||||
<div align='center'>
|
||||
<h2><?php echo __('You don\'t have access to this page') ?></h2>
|
||||
<div> </div>
|
||||
<img src='images/noaccess.png' alt='No access'>
|
||||
<div> </div>
|
||||
<div class="msg"><?php echo __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br><br>Please know that all attempts to access this page are recorded in security logs of Pandora System Database');?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?PHP
|
||||
include "general/footer.php";
|
||||
?>
|
||||
|
||||
<!-- Container div. ENDS HERE -->
|
||||
|
|
|
@ -46,7 +46,7 @@ $stat_noninit = get_db_sql ("SELECT COUNT(*) FROM tagente_estado WHERE utimestam
|
|||
$max_access = 1000000;
|
||||
$max_data = 12000000;
|
||||
|
||||
echo '<h2>'.__('Database maintenance').' » '.__('Current database maintenance setup').'</h2>';
|
||||
print_page_header (__('Current database maintenance setup'), "", false, "", true);
|
||||
|
||||
echo '<table class=databox width="550" cellspacing="4" cellpadding="4" border="0">';
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ if (give_acl ($config['id_user'], 0, "PM")) {
|
|||
$sub["godmode/setup/links"]["text"] = __('Links');
|
||||
$sub["godmode/setup/news"]["text"] = __('Site news');
|
||||
enterprise_hook ('historydb_submenu');
|
||||
|
||||
enterprise_hook ('enterprise_acl_submenu');
|
||||
|
||||
$sub["extras/pandora_diag"]["text"] = __('Diagnostic info');
|
||||
$menu["gsetup"]["sub"] = $sub;
|
||||
|
|
|
@ -68,6 +68,9 @@ $width = 0;
|
|||
$height = 0;
|
||||
$background = '';
|
||||
|
||||
// Header
|
||||
print_page_header (__('Map builder'), "images/god9.png", false, "map_builder", true);
|
||||
|
||||
if ($create_layout) {
|
||||
$name = (string) get_parameter ('name');
|
||||
$id_group = (int) get_parameter ('id_group');
|
||||
|
@ -300,10 +303,6 @@ if ($id_layout) {
|
|||
$height = $layout['height'];
|
||||
}
|
||||
|
||||
echo "<h2>".__('Maps')." » ".__('Map builder');
|
||||
print_help_icon ("map_builder");
|
||||
echo "</h2>";
|
||||
|
||||
if (! $edit_layout && ! $id_layout) {
|
||||
$table->width = '500px';
|
||||
$table->data = array ();
|
||||
|
|
|
@ -24,6 +24,11 @@ if (! give_acl ($config['id_user'], 0, "PM")) {
|
|||
exit;
|
||||
}
|
||||
|
||||
// Header
|
||||
print_page_header (__('Site news management'), "", false, "", true);
|
||||
|
||||
|
||||
|
||||
if (isset ($_POST["create"])) { // If create
|
||||
$subject = get_parameter ("subject");
|
||||
$text = get_parameter ("text");
|
||||
|
@ -84,8 +89,7 @@ if ((isset ($_GET["form_add"])) || (isset ($_GET["form_edit"]))) {
|
|||
}
|
||||
|
||||
// Create news
|
||||
echo "<h2>".__('Pandora Setup')." » ";
|
||||
echo __('Site news management')."</h2>";
|
||||
|
||||
echo '<table class="databox" cellpadding="4" cellspacing="4" width="500">';
|
||||
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/news">';
|
||||
if ($creation_mode == 1)
|
||||
|
@ -112,10 +116,11 @@ if ((isset ($_GET["form_add"])) || (isset ($_GET["form_edit"]))) {
|
|||
echo "<tr><td align='right'>
|
||||
<input name='crtbutton' type='submit' class='sub upd' value='".__('Update')."'>";
|
||||
echo '</form></td></tr></table>';
|
||||
} else { // Main list view for Links editor
|
||||
echo "<h2>".__('Pandora Setup')." » ";
|
||||
echo __('Site news management')."</h3>";
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox' width=600>";
|
||||
}
|
||||
else {
|
||||
|
||||
// Main list view for Links editor
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox' width=90%>";
|
||||
echo "<th>".__('Subject')."</th>";
|
||||
echo "<th>".__('Author')."</th>";
|
||||
echo "<th>".__('Timestamp')."</th>";
|
||||
|
@ -140,7 +145,7 @@ if ((isset ($_GET["form_add"])) || (isset ($_GET["form_edit"]))) {
|
|||
echo '<td class="'.$tdcolor.'" align="center"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row["id_news"].'&borrar='.$row["id_news"].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;"><img border=0 src="images/cross.png"></a></td></tr>';
|
||||
}
|
||||
echo "</table>";
|
||||
echo "<table width='600'>";
|
||||
echo "<table width='90%'>";
|
||||
echo "<tr><td align='right'>";
|
||||
echo "<form method='post' action='index.php?sec=gsetup&sec2=godmode/setup/news&form_add=1'>";
|
||||
echo "<input type='submit' class='sub next' name='form_add' value='".__('Add')."'>";
|
||||
|
|
|
@ -48,8 +48,9 @@ enterprise_include ('godmode/setup/setup.php');
|
|||
to add it there.
|
||||
*/
|
||||
|
||||
echo "<h2>".__('Pandora Setup')." » ";
|
||||
echo __('General configuration')."</h2>";
|
||||
// Header
|
||||
print_page_header (__('General configuration'), "", false, "", true);
|
||||
|
||||
|
||||
$table->width = '90%';
|
||||
$table->data = array ();
|
||||
|
|
|
@ -38,8 +38,10 @@ enterprise_include ('godmode/setup/setup_visuals.php');
|
|||
|
||||
require_once ('include/functions_themes.php');
|
||||
|
||||
echo "<h2>".__('Pandora Setup')." » ";
|
||||
echo __('Visual configuration')."</h2>";
|
||||
// Header
|
||||
print_page_header (__('Visual configuration'), "", false, "", true);
|
||||
|
||||
|
||||
|
||||
$table->width = '90%';
|
||||
$table->data = array ();
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
|
||||
// Load global vars
|
||||
require ("include/config.php");
|
||||
|
||||
if (! give_acl ($config['id_user'], 0, "LW")) {
|
||||
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation",
|
||||
|
@ -40,6 +39,9 @@ if (isset ($_GET["delete_alert"])) { // Delete alert
|
|||
// Form submitted
|
||||
// =============
|
||||
if (isset ($_GET["submit"])) {
|
||||
|
||||
print_page_header (__('SNMP Console')." » ".__('Update alert'), "images/computer_error.png", false, "", true);
|
||||
|
||||
$id_as = (int) get_parameter_get ("submit", -1);
|
||||
$source_ip = (string) get_parameter_post ("source_ip");
|
||||
$alert_type = (int) get_parameter_post ("alert_type"); //Event, e-mail
|
||||
|
@ -90,7 +92,9 @@ if (isset ($_GET["submit"])) {
|
|||
echo '<h3 class="suc">'.__('Successfully updated').'</h3>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
|
||||
print_page_header (__('SNMP Console')." » ".__('Create alert'), "images/computer_error.png", false, "", true);
|
||||
|
||||
// From variable init
|
||||
// ==================
|
||||
|
@ -127,14 +131,13 @@ if ((isset ($_GET["update_alert"])) && ($_GET["update_alert"] != -1)) {
|
|||
$priority = 0;
|
||||
}
|
||||
|
||||
// Header
|
||||
|
||||
|
||||
|
||||
// Alert form
|
||||
if (isset ($_GET["update_alert"])) {
|
||||
//the update_alert means the form should be displayed. If update_alert > 1 then an existing alert is updated
|
||||
if ($id_as) {
|
||||
echo "<h2>".__('SNMP Console')." » ".__('Update alert')."</h2>";
|
||||
} else {
|
||||
echo "<h2>".__('SNMP Console')." » ".__('Create alert')."</h2>";
|
||||
}
|
||||
echo '<form name="agente" method="post" action="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert&submit='.$id_as.'">';
|
||||
echo '<table cellpadding="4" cellspacing="4" width="650" class="databox_color">';
|
||||
|
||||
|
|
|
@ -31,6 +31,10 @@ if (! give_acl ($config['id_user'], 0, "UM")) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Header
|
||||
print_page_header (__('User detail editor'), "images/god3.png", false, "", true);
|
||||
|
||||
|
||||
if ($config['user_can_update_info']) {
|
||||
$view_mode = false;
|
||||
} else {
|
||||
|
@ -172,8 +176,6 @@ if ($delete_profile) {
|
|||
__('Could not be deleted'));
|
||||
}
|
||||
|
||||
echo "<h2>".__('Pandora users')." » ".__('User detail editor')."</h2>";
|
||||
|
||||
$table->width = '80%';
|
||||
$table->data = array ();
|
||||
$table->colspan = array ();
|
||||
|
|
|
@ -113,10 +113,12 @@ $config['extensions'] = get_extensions ();
|
|||
// NOTICE: This variable (config[enterprise_installed] is used in several
|
||||
// sections. Faking or forcing to 1 will make pandora fails.
|
||||
|
||||
if (file_exists ($config["homedir"].'/'.ENTERPRISE_DIR.'/index.php'))
|
||||
if (file_exists ($config["homedir"].'/'.ENTERPRISE_DIR.'/index.php')) {
|
||||
$config['enterprise_installed'] = 1;
|
||||
else
|
||||
enterprise_include ('include/functions_enterprise.php');
|
||||
} else {
|
||||
$config['enterprise_installed'] = 0;
|
||||
}
|
||||
|
||||
// Connect to the history DB
|
||||
if (isset($config['history_db_enabled'])) {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* @subpackage Generic_Functions
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Include the html and ui functions.
|
||||
*/
|
||||
|
|
|
@ -176,6 +176,9 @@ function update_config () {
|
|||
update_config_value ('trap_purge', get_parameter ('trap_purge', $config['trap_purge']));
|
||||
update_config_value ('string_purge', get_parameter ('string_purge', $config['string_purge']));
|
||||
update_config_value ('audit_purge', get_parameter ('audit_purge', $config['audit_purge']));
|
||||
update_config_value ('acl_enterprise', get_parameter ('acl_enterprise', $config['acl_enterprise']));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -295,6 +298,9 @@ function process_config () {
|
|||
update_config_value ('audit_purge', 30);
|
||||
}
|
||||
|
||||
if (!isset ($config["acl_enterprise"])){
|
||||
update_config_value ('acl_enterprise', 0);
|
||||
}
|
||||
|
||||
/*
|
||||
*Parse the ACL IP list for access API that it's save in chunks as
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
* @param array Menu structure to print.
|
||||
*/
|
||||
function print_menu (&$menu) {
|
||||
global $config;
|
||||
static $idcounter = 0;
|
||||
|
||||
echo '<div class="menu">';
|
||||
|
@ -82,6 +83,13 @@ function print_menu (&$menu) {
|
|||
$visible = false;
|
||||
|
||||
foreach ($main["sub"] as $subsec2 => $sub) {
|
||||
|
||||
// Choose valid suboptions (sec2)
|
||||
if (enterprise_hook ('acl_enterprise', array ($config['id_user'], $mainsec, $subsec2)) == false){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//Set class
|
||||
if (($sec2 == $subsec2 && isset ($sub[$subsec2]["options"]))
|
||||
&& (get_parameter_get ($sub[$subsec2]["options"]["name"]) == $sub[$subsec2]["options"]["value"])) {
|
||||
|
@ -150,6 +158,12 @@ function print_menu (&$menu) {
|
|||
}
|
||||
}
|
||||
|
||||
// Choose valid section (sec)
|
||||
|
||||
if (enterprise_hook ('acl_enterprise', array ($config['id_user'], $mainsec, $main["sec2"])) == false){
|
||||
continue;
|
||||
}
|
||||
|
||||
//Print out the first level
|
||||
$output .= '<li class="'.implode (" ", $classes).'" id="icon_'.$id.'">';
|
||||
$output .= '<a href="index.php?sec='.$mainsec.'&sec2='.$main["sec2"].($main["refr"] ? '&refr='.$main["refr"] : '').'">'.$main["text"].'</a><img class="toggle" src="include/styles/images/toggle.png" alt="toggle" />';
|
||||
|
|
|
@ -100,11 +100,11 @@ echo '<head>';
|
|||
//This starts the page head. In the call back function, things from $page['head'] array will be processed into the head
|
||||
ob_start ('process_page_head');
|
||||
|
||||
|
||||
|
||||
// Enterprise main
|
||||
enterprise_include ('index.php');
|
||||
|
||||
//This tag is included in the buffer passed to process_page_head so technically it can be stripped
|
||||
// This tag is included in the buffer passed to process_page_head so
|
||||
// technically it can be stripped
|
||||
echo '</head>'."\n";
|
||||
|
||||
ob_start ('process_page_body');
|
||||
|
@ -234,13 +234,17 @@ if (!is_writable ("attachment")){
|
|||
if ($searchPage) {
|
||||
require ('operation/search_results.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($page != "") {
|
||||
$page .= '.php';
|
||||
if (file_exists ($page)) {
|
||||
if (! is_extension ($page))
|
||||
// Enterprise ACL check
|
||||
if (enterprise_hook ('acl_enterprise', array ($config['id_user'], $sec, $sec2)) == false){
|
||||
require ("general/noaccess.php");
|
||||
}
|
||||
elseif (file_exists ($page)) {
|
||||
if (! is_extension ($page)){
|
||||
require ($page);
|
||||
}
|
||||
else {
|
||||
if ($sec[0] == 'g')
|
||||
extension_call_godmode_function (basename ($page));
|
||||
|
@ -274,4 +278,4 @@ echo '</html>';
|
|||
|
||||
$run_time = format_numeric (microtime (true) - $config['start_time'], 3);
|
||||
echo "\n<!-- Page generated in $run_time seconds -->\n";
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue