From 2b392dd7495bb30474a0f2025bb903caef69200f Mon Sep 17 00:00:00 2001 From: raulmateos Date: Tue, 14 Nov 2006 00:26:29 +0000 Subject: [PATCH] 2006-11-14 Raul Mateos * include/styles/pandora.css: Change some styles. * operation/agentes/estado_agente.php, operation/agentes/estado_alertas.php, operation/incidents/incident.php: Clear code, change styles. * operation/events/event.php: New selection for event type. EXPERIMENTAL. TO DO: Add selection for groups. * ChangeLog: Add forgotten change. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@259 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 18 +++++ pandora_console/include/styles/pandora.css | 7 +- .../operation/agentes/estado_agente.php | 6 +- .../operation/agentes/estado_alertas.php | 2 +- pandora_console/operation/events/events.php | 74 ++++++++++--------- .../operation/incidents/incident.php | 29 +------- 6 files changed, 69 insertions(+), 67 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4f99564c4b..3ce7f8a6c5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,7 +1,25 @@ +2006-11-14 Raul Mateos + + * include/styles/pandora.css: Change some styles. + + * operation/agentes/estado_agente.php, + operation/agentes/estado_alertas.php, + operation/incidents/incident.php: Clear code, change styles. + + * operation/events/event.php: New selection for event type. EXPERIMENTAL. + TO DO: Add selection for groups. + 2006-11-13 Raul Mateos * include/config.php: Change build date to correct order. +2006-11-06 Raul Mateos + + * index.php: Added FMS to title + + * include/languages/language_es_es.php, language_en.php, + language_es_la.php, language_it.php: Remove "distributed" from title + 2006-10-31 Raul Mateos * operation/menu.php: Add highlighting when creating note in incidents diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index ed8beb2dd9..ef5a6bad6c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -73,10 +73,11 @@ td.datos_jus, td.datos2_jus {text-align: justify;} .bg , .bgt {background-color: #4a6629;} .bg {position:relative; height: 20px; width: 100%;} .f10, .w155f10, #ip {font-size: 10px; text-align: center;} -.f9, .f9i, .f9b, td.f9, td.f9i, td.datosf9, td.datos2f9, td.datosf9i, td.datos2f9i .f9l20, .f9l30 {font-size: 9px;} +.f9, .f9i, .f9b, td.f9, td.f9i, td.datosf9, td.datos2f9, td.datosf9i, td.datos2f9i {font-size: 9px;} .f9i {font-style: italic;} .f9l20 {padding-left: 20px;} -.f9l30, .f9130t {padding-left: 30px;} +.f9l30, .f9l30t, .f9l30w17t {padding-left: 30px;} +.f9l30w17t {line-height: 17px;} .jus {text-align: justify;} .tit {padding-top: 3px;} .tit, .titb {font-weight: bold; color: white; text-align: center;} @@ -104,7 +105,7 @@ td.datos_jus, td.datos2_jus {text-align: justify;} .w135, .w135datos, .w35datos2 {width: 135px;} .w140 {width: 140px;} .w155, .w155f10 {width: 155px;} -.top, .bgt, .f9130t, td.datost, td.datos2t {vertical-align: top;} +.top, .bgt, .f9l30t, td.datost, td.datos2t {vertical-align: top;} .bot, .titb, td.datosb {vertical-align: bottom;} .w180 {width: 180px;} .w200 {width: 200px;} diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 3c4a8fe31b..7200da4ea5 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -73,9 +73,9 @@ if (comprueba_login() == 0) { // Show only selected groups if ($ag_group > 1) - $sql='SELECT * FROM tagente WHERE id_grupo='.$ag_group.' and disabled = 0 order by nombre'; + $sql='SELECT * FROM tagente WHERE id_grupo='.$ag_group.' AND disabled = 0 ORDER BY nombre'; else - $sql='SELECT * FROM tagente WHERE disabled = 0 ORDER BY id_grupo, nombre'; + $sql='SELECT * FROM tagente WHERE disabled = 0 ORDER BY id_grupo, nombre'; $result=mysql_query($sql); if (mysql_num_rows($result)){ @@ -89,7 +89,7 @@ if (comprueba_login() == 0) { echo ""; echo " - ".$lang_label["fired"]; echo "  "; - echo ""; + echo ""; echo " - ".$lang_label["not_fired"]; echo ""; echo "
"; diff --git a/pandora_console/operation/agentes/estado_alertas.php b/pandora_console/operation/agentes/estado_alertas.php index d5d883af8d..b3a0fbfed0 100644 --- a/pandora_console/operation/agentes/estado_alertas.php +++ b/pandora_console/operation/agentes/estado_alertas.php @@ -158,7 +158,7 @@ if (comprueba_login() == 0) { echo ""; echo " - ".$lang_label["fired"]; echo "  "; - echo ""; + echo ""; echo " - ".$lang_label["not_fired"]; echo ""; echo "
"; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 181fe99331..abf8737b02 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -112,7 +112,7 @@ if (comprueba_login() == 0) { $id_evento = $_POST["eventid".$count]; $id_group = gime_idgroup_from_idevent($id_evento); if (give_acl($id_usuario, $id_group, "IW") ==1){ - $sql2="UPDATE tevento SET estado=1, id_usuario = '".$id_usuario."' WHERE estado = 0 and id_evento = ".$id_evento; + $sql2="UPDATE tevento SET estado=1, id_usuario = '".$id_usuario."' WHERE estado = 0 AND id_evento = ".$id_evento; $result2=mysql_query($sql2); } else { audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to checkout event ID".$id_evento); @@ -124,10 +124,28 @@ if (comprueba_login() == 0) { echo "

".$lang_label["events"]."

"; echo "

".$lang_label["event_main_view"]." ".$lang_label["help"]."

"; + echo ""; + echo "
"; + echo "
"; + echo ""; - echo ""; - echo ""; echo "
"; + $sql='SELECT DISTINCT evento FROM tevento'; + $result=mysql_query($sql); + while ($row=mysql_fetch_array($result)){ + echo ""; + echo ""; echo " - ".$lang_label["validated_event"]; echo "
"; echo " - ".$lang_label["not_validated_event"]; echo "
"; + echo ""; echo " - ".$lang_label["validate_event"]; echo "
"; - echo " - ".$lang_label["delete_event"]; + echo " - ".$lang_label["delete_event"]; echo "
"; echo "
"; @@ -159,30 +183,6 @@ if (comprueba_login() == 0) { //pagination $total_eventos = count($event_list); pagination($total_eventos, "index.php?sec=eventos&sec2=operation/events/events", $offset); - /* - if ($total_eventos > $block_size){ - // If existes more registers tha$row["id_usuario"]n i can put in a page, calculate index markers - $index_counter = ceil($total_eventos/$block_size); - for ($i = 1; $i <= $index_counter; $i++) { - $inicio_bloque = ($i * $block_size - $block_size); - $final_bloque = $i * $block_size; - if ($total_eventos < $final_bloque) - $final_bloque = $total_eventos; - echo ''; - $inicio_bloque_fake = $inicio_bloque + 1; - if ($inicio_bloque == $offset) - echo '[ '.$inicio_bloque_fake.' - '.$final_bloque.' ]'; - else - echo '[ '.$inicio_bloque_fake.' - '.$final_bloque.' ]'; - echo ' '; - } - echo "

"; - // if exists more registers than i can put in a page (defined by $block_size config parameter) - // get offset for index calculation - } - - echo ""; - */ if (isset($_GET["offset"])){ $offset=entrada_limpia($_GET["offset"]); @@ -215,7 +215,16 @@ if (comprueba_login() == 0) { if (isset($event_list[$a])) { $id_evento = $event_list[$a]; if ($id_evento != ""){ - $sql="SELECT * FROM tevento WHERE id_evento = $id_evento"; + if (isset($_POST["event"])){ + $event = entrada_limpia($_POST["event"]); + if ($event=="All") { + $sql="SELECT * FROM tevento WHERE id_evento = $id_evento"; + } else { + $sql="SELECT * FROM tevento WHERE evento= '$event' AND id_evento = $id_evento"; + } + } else { + $sql="SELECT * FROM tevento WHERE id_evento = $id_evento"; + } $result=mysql_query($sql); $row=mysql_fetch_array($result); $id_group = $row["id_grupo"]; @@ -267,7 +276,6 @@ if (comprueba_login() == 0) { echo ""; } echo "
"; - } else {echo "".$lang_label["no_event"]."";} } diff --git a/pandora_console/operation/incidents/incident.php b/pandora_console/operation/incidents/incident.php index 9025cebc88..b6c1a239ab 100644 --- a/pandora_console/operation/incidents/incident.php +++ b/pandora_console/operation/incidents/incident.php @@ -44,31 +44,6 @@ if ((give_acl($id_user, 0, "IR")==1) OR (give_acl($id_user, 0, "IM")==1) or (dam } } - /* Pending to delete code - // Delete incidents (Actions) - if (isset($_POST["accion"])){ - $id_inc = $_POST["id_inc"]; - if ($_POST["accion"] == $lang_label["in_delinc"]){ // Delete Incident - $id_author_inc = give_incident_author($id_inc); - if (($_SESSION["id_usuario"] == $id_author_inc) OR dame_admin($_SESSION["id_usuario"])) { - borrar_incidencia($id_inc); - } else { - audit_db($id_author_inc,$REMOTE_ADDR,"ACL Forbidden","User ".$_SESSION["id_usuario"]." try to update incident"); - echo "

".$lang_label["del_incid_no"]."

"; - no_permission(); - } - } - } - */ - - /* EXPLANATION FOR THiS PAGE: - - Due to this form get data from other forms, variables are mixed in GET and POST inputs. Combo data originally comes - from POST inputs. All data from posts are translated below to GET INPUT, all posterior data process are using GET - because filter data are dynamically written to links to pass filter data between pages - - */ - // Search $busqueda=""; if (isset($_POST["texto"]) OR (isset($_GET["texto"]))){ @@ -182,7 +157,7 @@ if (isset($_POST['operacion'])){ - +

-
-
@@ -190,7 +165,7 @@ if (isset($_POST['operacion'])){ -
- - +

-
-