2012-02-27 Miguel de Dios <miguel.dedios@artica.es>

* operation/integria_incidents/incident.php: added error message when
	Pandora have a bad conf for the Integria API. And cleaned source code style.
	
	* general/footer.php, general/logon_ok.php, general/noaccess.php,
	general/shortcut_bar.php, general/ui/agents_list.php,
	godmode/alerts/alert_templates.php,
	godmode/alerts/configure_alert_action.php,
	godmode/reporting/map_builder.php, godmode/tag/edit_tag.php: cleaned source
	code style.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5660 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-02-28 11:48:45 +00:00
parent 692e49c57b
commit 435503360f
11 changed files with 64 additions and 36 deletions

View File

@ -1,3 +1,15 @@
2012-02-27 Miguel de Dios <miguel.dedios@artica.es>
* operation/integria_incidents/incident.php: added error message when
Pandora have a bad conf for the Integria API. And cleaned source code style.
* general/footer.php, general/logon_ok.php, general/noaccess.php,
general/shortcut_bar.php, general/ui/agents_list.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/reporting/map_builder.php, godmode/tag/edit_tag.php: cleaned source
code style.
2012-02-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/agentes/estado_ultimopaquete.php: Fixed bug in this view

View File

@ -16,7 +16,8 @@
if (isset($_SERVER['REQUEST_TIME'])) {
$time = $_SERVER['REQUEST_TIME'];
} else {
}
else {
$time = get_system_time ();
}

View File

@ -51,7 +51,8 @@ if ($news !== false) {
echo '<table cellpadding="4" cellspacing="4" class="databox">';
if ($config["prominent_time"] == "timestamp") {
$comparation_suffix = "";
} else {
}
else {
$comparation_suffix = __('ago');
}
foreach ($news as $article) {
@ -62,7 +63,8 @@ if ($news !== false) {
echo '</td></tr>';
}
echo '</table>';
} else {
}
else {
echo '<div>'.__('No news articles at this moment').'</div>';
}
echo '</div>';

View File

@ -14,21 +14,21 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
if (file_exists("images/noaccess.png")){
if (file_exists("images/noaccess.png")) {
ui_print_page_header (__('You don\'t have access to this page'), "", false, "", true);
} else {
}
else {
echo "<br><br><center><h3>".__('You don\'t have access to this page')."</h3></center>";
}
?>
<div id="noaccess">
<div align='center'>
<?php
if (file_exists("images/noaccess.png")){
echo html_print_image('images/noaccess.png', true, array("alt" => __('No access')));
}
?>
<?php
if (file_exists("images/noaccess.png")) {
echo html_print_image('images/noaccess.png', true, array("alt" => __('No access')));
}
?>
<div>&nbsp;</div>
<div class="msg" style='width: 400px'><?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>

View File

@ -92,14 +92,16 @@
if ($shortcut_state == 2){
echo "<div id='shortcut_button' style='position: fixed; overflow: hidden; bottom: 0px; left: 0px; width: 185px; height: 40px; background-color: #FFFFFF; border: 1px solid #808080; border-top-left-radius: 10px; border-top-right-radius: 10px;'>";
}else{
}
else{
echo "<div id='shortcut_button' style='position: fixed; overflow: hidden; bottom: 0px; left: 0px; width: 185px; height: 0px; background-color: #FFFFFF; border: 1px solid #808080; border-top-left-radius: 10px; border-top-right-radius: 10px;'>";
}
html_print_image("images/pandora_textlogo.png", false, array("title" => __("Press here to activate shortcut bar")));
echo "</div>";
if ($shortcut_state == 2){
echo "<div id='shotcut_bar' style='position: fixed; overflow:hidden; bottom: 0px; left: 0px; width:100%; height: 20px; background-color:#DCDCDC; border: 1px solid #808080;'>";
} else {
}
else {
echo "<div id='shotcut_bar' style='position: fixed; overflow:hidden; bottom: 0px; left: 0px; width:100%; height: 0px; background-color:#DCDCDC; border: 1px solid #808080;'>";
}
@ -214,7 +216,8 @@
// This will show and hide the shortcut value in Javascript code
if (isset($_POST['nick']) and $shortcut_state != 2){
html_print_input_hidden("login_console", 1);
} else {
}
else {
html_print_input_hidden("login_console", 0);
}
@ -230,11 +233,13 @@
$('#shortcut_button').css({height: 22}).animate({ height: '40' }, 900);
$('#shotcut_bar').css({height: 20}).animate({ height: '0' }, 900);
$('#shortcut_button').css({height:40}).animate({ height: '22' }, 900);
} else {
}
else {
if ($('#shotcut_bar').css('height') == '0px'){
$('#shotcut_bar').css('height', '0px');
$('#shortcut_button').css('height', '22px');
}else{
}
else{
$('#shotcut_bar').css('height', '20px');
$('#shortcut_button').css('height', '40px');
}
@ -252,7 +257,8 @@
function (data) {
}
);
} else {
}
else {
$('#shotcut_bar').css({height: 20}).animate({ height: '0' }, 900);
$('#shortcut_button').css({height: 40}).animate({ height: '22' }, 900);
jQuery.post ("ajax.php",

View File

@ -140,7 +140,8 @@ if ($agents !== false) {
foreach ($table_renders as $name => $values) {
if (! is_numeric ($name)) {
array_push ($data, renders_agent_field ($agent, $name, $values, true));
} else {
}
else {
array_push ($data, renders_agent_field ($agent, $values, false, true));
}
}

View File

@ -64,11 +64,13 @@ if ($copy_action) {
"Trying to access Alert Management");
require ("general/noaccess.php");
exit;
}else
}
else {
// Header
ui_print_page_header (__('Alerts').' &raquo; '.__('Alert actions'), "images/god2.png", false, "", true);
// If user tries to copy an action of others groups
}else{
}
} // If user tries to copy an action of others groups
else {
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
@ -79,7 +81,7 @@ if ($copy_action) {
if ($is_in_group)
// Header
ui_print_page_header (__('Alerts').' &raquo; '.__('Alert actions'), "images/god2.png", false, "", true);
else{
else {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");

View File

@ -146,11 +146,13 @@ if ($delete_template) {
"Trying to access Alert Management");
require ("general/noaccess.php");
exit;
}else
}
else
// Header
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/god2.png", false, "", true);
// If user tries to delete a template of others groups
}else{
} // If user tries to delete a template of others groups
else {
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$own_groups = array_keys(users_get_groups($config['id_user'], "LM"));
@ -161,14 +163,14 @@ if ($delete_template) {
if ($is_in_group)
// Header
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/god2.png", false, "", true);
else{
else {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
exit;
}
}
}else
} else
// Header
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/god2.png", false, "", true);

View File

@ -29,7 +29,8 @@ if ($delete_layout) {
if ($result) {
echo '<h3 class="suc">'.__('Successfully deleted').'</h3>';
db_clean_cache();
} else {
}
else {
echo '<h3 class="error">'.__('Not deleted. Error deleting data').'</h3>';
}
$id_layout = 0;
@ -149,7 +150,8 @@ else
if (!$maps) {
echo '<div class="nf">'.('No maps defined').'</div>';
} else {
}
else {
foreach ($maps as $map) {
if (check_acl ($config['id_user'], $map['id_group'], "IW")) {
$data = array ();

View File

@ -106,9 +106,8 @@ if ($action == "update" && $id_tag != 0){
$name_tag = $result_tag["name"];
$description_tag = $result_tag["description"];
$url_tag = $result_tag["url"];
// If current action is create (new) or somethig goes wrong fields are filled with void value
}else{
} // If current action is create (new) or somethig goes wrong fields are filled with void value
else {
$name_tag = "";
$description_tag = "";
$url_tag = "";

View File

@ -153,7 +153,7 @@ $delete_file = get_parameter('delete_file', 0);
if($delete_file != 0) {
$url = $integria_api."&op=delete_file&params=".$delete_file;
// Call the integria API
$result = incidents_call_api($url);
}
@ -162,7 +162,7 @@ $delete_incident = get_parameter('delete_incident', 0);
if($delete_incident != 0) {
$url = $integria_api."&op=delete_incident&params=".$delete_incident;
// Call the integria API
$result = incidents_call_api($url);
}
@ -259,7 +259,6 @@ if(xml_parse(xml_parser_create(), $xml)) {
$result_sources = incidents_xml_to_array(incidents_call_api($url_sources));
$result_groups = incidents_xml_to_array(incidents_call_api($url_groups));
$result_users = incidents_xml_to_array(incidents_call_api($url_users));
require_once('incident.incident.php');
break;
case 'workunits':
@ -273,7 +272,9 @@ if(xml_parse(xml_parser_create(), $xml)) {
break;
}
}
else {
ui_print_error_message(__("There is a error in the message from your Integria or there is not connection."));
}
echo '<div style="clear:both">&nbsp;</div>';
?>