2010-08-10 Miguel de Dios <miguel.dedios@artica.es>

* ajax.php: cleaned source code.
	
	* godmode/agentes/massive_operations.php: cleaned source code, and added
	hook to enterprise massive operations tab.
	


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3123 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-08-10 13:54:05 +00:00
parent 33bb4ae164
commit e58d4e4fbf
3 changed files with 49 additions and 26 deletions

View File

@ -1,3 +1,9 @@
2010-08-10 Miguel de Dios <miguel.dedios@artica.es>
* ajax.php: cleaned source code.
* godmode/agentes/massive_operations.php: cleaned source code, and added
hook to enterprise massive operations tab.
2010-08-10 Sergio Martin <sergio.martin@artica.es> 2010-08-10 Sergio Martin <sergio.martin@artica.es>
* pandoradb.sql * pandoradb.sql

View File

@ -40,7 +40,8 @@ $config["id_user"] = $_SESSION["id_usuario"];
session_write_close (); session_write_close ();
if (file_exists ($page)) { if (file_exists ($page)) {
require_once ($page); require_once ($page);
} else { }
else {
echo '<br /><b class="error">Sorry! I can\'t find the page '.$page.'!</b>'; echo '<br /><b class="error">Sorry! I can\'t find the page '.$page.'!</b>';
} }
?> ?>

View File

@ -27,6 +27,8 @@ require_once ('include/functions_agents.php');
require_once ('include/functions_alerts.php'); require_once ('include/functions_alerts.php');
require_once ('include/functions_modules.php'); require_once ('include/functions_modules.php');
enterprise_include ('godmode/agentes/massive_operations.php');
$tab = (string) get_parameter ('tab', 'copy_modules'); $tab = (string) get_parameter ('tab', 'copy_modules');
/* Copy modules */ /* Copy modules */
@ -101,36 +103,50 @@ if($tab == 'delete_alerts')
else else
$deletealerttab['active'] = false; $deletealerttab['active'] = false;
/* Collection */
$policiesTab = enterprise_hook('massive_policies_tab');
$onheader = array('copy_modules' => $copymoduletab, 'edit_modules' => $editmoduletab, 'delete_modules' => $deletemoduletab, 'delete_agents' => $deleteagenttab, 'add_action_alerts' => $addactionalerttab, 'delete_action_alerts' => $deleteactionalerttab, 'add_alerts' => $addalerttab, 'delete_alerts' => $deletealerttab); if ($policiesTab == -1)
$policiesTab = "";
$onheader = array('copy_modules' => $copymoduletab, 'edit_modules' => $editmoduletab,
'delete_modules' => $deletemoduletab, 'delete_agents' => $deleteagenttab,
'add_action_alerts' => $addactionalerttab, 'delete_action_alerts' => $deleteactionalerttab,
'add_alerts' => $addalerttab, 'delete_alerts' => $deletealerttab, 'policies' => $policiesTab);
print_page_header (__('Agent configuration'). ' &raquo; '. __('Massive operations'), "images/god1.png", false, "", true, $onheader); print_page_header (__('Agent configuration'). ' &raquo; '. __('Massive operations'), "images/god1.png", false, "", true, $onheader);
switch ($tab) { switch ($tab) {
case 'delete_alerts': case 'delete_alerts':
require_once ('godmode/agentes/massive_delete_alerts.php'); require_once ('godmode/agentes/massive_delete_alerts.php');
break; break;
case 'add_alerts': case 'add_alerts':
require_once ('godmode/agentes/massive_add_alerts.php'); require_once ('godmode/agentes/massive_add_alerts.php');
break; break;
case 'delete_action_alerts': case 'delete_action_alerts':
require_once ('godmode/agentes/massive_delete_action_alerts.php'); require_once ('godmode/agentes/massive_delete_action_alerts.php');
break; break;
case 'add_action_alerts': case 'add_action_alerts':
require_once ('godmode/agentes/massive_add_action_alerts.php'); require_once ('godmode/agentes/massive_add_action_alerts.php');
break; break;
case 'delete_agents': case 'delete_agents':
require_once ('godmode/agentes/massive_delete_agents.php'); require_once ('godmode/agentes/massive_delete_agents.php');
break; break;
case 'delete_modules': case 'delete_modules':
require_once ('godmode/agentes/massive_delete_modules.php'); require_once ('godmode/agentes/massive_delete_modules.php');
break; break;
case 'edit_modules': case 'edit_modules':
require_once ('godmode/agentes/massive_edit_modules.php'); require_once ('godmode/agentes/massive_edit_modules.php');
break; break;
case 'copy_modules': case 'copy_modules':
default:
require_once ('godmode/agentes/massive_config.php'); require_once ('godmode/agentes/massive_config.php');
break;
default:
if (!enterprise_hook('massive_operations', array($tab))) {
require_once ('godmode/agentes/massive_config.php');
}
break;
} }
?> ?>