function PrintActionButtonsOld() { global $BASE_urlpath, $show_rows; $conf = $GLOBALS["CONF"]; $server_logger_if_priority = $conf->get_conf("server_logger_if_priority", FALSE); $backup_events = $conf->get_conf("backup_events", FALSE); $backup_day = $conf->get_conf("backup_day", FALSE); if ($this->valid_action_list == NULL || $this->valid_action_op_list == NULL || $this->num_result_rows <= 0) { return; } echo "\n\n<!-- Alert Action Buttons -->\n" . "<br>\n" . " <TABLE class='transparent' BORDER=0 cellpadding=6 cellspacing=0>\n" . " <TR>\n" . " <TD ALIGN=CENTER class='box' style='padding-bottom:10px;padding-top:10px;'>"; //echo gettext("ACTION") . "<BR><br>\n<SELECT NAME=\"action\">\n" . ' <OPTION VALUE=" " ' . chk_select($this->action, " ") . '>' . gettext("{ action }") . "\n"; echo "<SELECT style='display:none' NAME=\"action\">"; reset($this->valid_action_list); while ($current_action = each($this->valid_action_list)) { echo ' <OPTION VALUE="' . $current_action["value"] . '" ' . chk_select($this->action, $current_action["value"]) . '>' . GetActionDesc($current_action["value"]) . "\n"; } echo " </SELECT>\n"; if ($this->action_arg != "") { echo " <INPUT TYPE=\"text\" NAME=\"action_arg\" VALUE=\"" . $this->action_arg . "\">\n"; } reset($this->valid_action_op_list); $bt = 1; while ($current_op = each($this->valid_action_op_list)) { $confirm_msg = _("You are about to delete __EVENTS__ events. Are you sure you want to continue?"); if ($current_op["value"] == gettext("Delete ALL on Screen")) { $confirm_msg = sprintf(_("You are about to delete %s events. Are you sure you want to continue?"), $show_rows); } elseif ($current_op["value"] == gettext("Delete Selected")) { $confirm_msg = _("You are about to delete selected events. Are you sure you want to continue?"); } if ($current_op["value"] == gettext("Insert into DS Group")) { // Exceptional case: execute a javascript function, do not submit echo " <INPUT TYPE=\"button\" class=\"action_button av_b_secondary\" onclick=\"dsgroup_for_selected()\" VALUE=\"" . $current_op["value"] . "\">\n"; } elseif ($current_op["value"] == gettext("Delete ALL on Screen")) { echo " <input type=\"submit\" style=\"display:none\" id=\"eqbtn" . $bt . "\" NAME=\"submit\" VALUE=\"" . $current_op["value"] . "\"/><INPUT TYPE=\"button\" class=\"action_button av_b_secondary\" onclick=\"if (confirm('" . Util::js_entities($confirm_msg) . "')) click_all('" . $bt . "')\" VALUE=\"" . $current_op["value"] . "\">\n"; } else { echo " <input type=\"submit\" style=\"display:none\" id=\"eqbtn" . $bt . "\" NAME=\"submit\" VALUE=\"" . $current_op["value"] . "\"/><INPUT TYPE=\"button\" class=\"action_button av_b_secondary\" onclick=\"var str='" . Util::js_entities($confirm_msg) . "';if (confirm(str.replace('__EVENTS__',\$('#eventselected').html()))) \$('#eqbtn" . $bt . "').click()\" VALUE=\"" . $current_op["value"] . "\">\n"; } $bt++; } //echo " </TD>\n" . " </TR>\n" . " </TABLE>\n" . "</CENTER>\n\n"; echo " </TD><TD WIDTH=5> </TD>"; require_once 'av_init.php'; echo "<TD WIDTH=5> </TD>\n"; echo '<td align="right" class="box" style="font-size:11px;padding-bottom:10px;vertical-align:bottom"> <table class="transparent" cellspacing="0" cellpadding="0"> <tr> <td style="font-size:11px;color:gray;line-height:13px" align="right">' . _("Priority threshold") . ': <a href="#" style="text-decoration:none" class="scriptinf" txt="' . _("Logs with priority lower than threshold will be archived but not processed as security event as they are not considered to provide security information") . '" onclick="GB_show(\'Configuration\',\'/' . Menu::get_menu_url('/conf/index.php?section=metrics', 'configuration', 'administration', 'main') . '\' ,480,\'80%\');return false">' . $server_logger_if_priority . '</a><br/>' . _("Active Event Window (days)") . ': <a href="#" style="text-decoration:none" class="scriptinf" txt="' . _("Security events older than number of days will be erased from SQL database") . '" onclick="GB_show(\'Configuration\',\'' . Menu::get_menu_url('/conf/index.php?section=siem', 'configuration', 'administration', 'main') . '\' ,480,\'80%\');return false">' . $backup_day . '</a><br/>' . _("Active Event Window (events)") . ': <a href="#" style="text-decoration:none" class="scriptinf" txt="' . _("Older security events will be erased when total number of events in database reaches this number") . '" onclick="GB_show(\'Configuration\', \'' . Menu::get_menu_url('/conf/index.php?section=siem', 'configuration', 'administration', 'main') . '\' ,480,\'80%\');return false">' . format_cash($backup_events) . '</a><br/> </td> </tr> </table> </td>'; echo " </TR>\n" . " </TABLE>\n" . "\n\n"; }
function PrintAlertActionButtons() { global $BASE_urlpath; if ($this->valid_action_list == NULL) { return; } echo "\n\n<!-- Alert Action Buttons -->\n" . "<br><CENTER>\n" . " <TABLE BORDER=0 cellpadding=6 cellspacing=0>\n" . " <TR>\n" . " <TD ALIGN=CENTER style='background:url(\"../pixmaps/fondo_hdr2.png\") repeat-x;font-size:12px;font-weight:bold;padding-bottom:10px;padding-top:10px; border:1px solid #CACACA;'>"; //echo gettext("ACTION") . "<BR><br>\n<SELECT NAME=\"action\">\n" . ' <OPTION VALUE=" " ' . chk_select($this->action, " ") . '>' . gettext("{ action }") . "\n"; echo "<SELECT style='display:none' NAME=\"action\">"; reset($this->valid_action_list); while ($current_action = each($this->valid_action_list)) { echo ' <OPTION VALUE="' . $current_action["value"] . '" ' . chk_select($this->action, $current_action["value"]) . '>' . GetActionDesc($current_action["value"]) . "\n"; } echo " </SELECT>\n"; if ($this->action_arg != "") { echo " <INPUT TYPE=\"text\" NAME=\"action_arg\" VALUE=\"" . $this->action_arg . "\">\n"; } reset($this->valid_action_op_list); $bt = 1; while ($current_op = each($this->valid_action_op_list)) { echo " <input type=\"submit\" style=\"display:none\" id=\"eqbtn" . $bt . "\" NAME=\"submit\" VALUE=\"" . $current_op["value"] . "\"/><INPUT TYPE=\"button\" class=\"button\" onclick=\"if (confirm('" . _("Are you sure?") . "')) \$('#eqbtn" . $bt . "').click()\" VALUE=\"" . $current_op["value"] . "\">\n"; //echo " <input type=\"submit\" class=\"button\" NAME=\"submit\" VALUE=\"" . $current_op["value"] . "\"/>\n"; $bt++; } //echo " </TD>\n" . " </TR>\n" . " </TABLE>\n" . "</CENTER>\n\n"; echo " </TD><TD WIDTH=10> </TD><TD ALIGN=CENTER style='border:1px solid #CACACA;background:url(\"../pixmaps/fondo_hdr2.png\") repeat-x;font-size:12px;font-weight:bold;padding-bottom:10px;vertical-align:bottom'><a href='" . $BASE_urlpath . "/base_main.php' style='color:black;font-size:12px;font-weight:bold'>" . gettext("Statistical Overview") . "</a> | <a href='" . $BASE_urlpath . "/base_maintenance.php' style='color:black;font-size:12px;font-weight:bold'>" . gettext("Administration") . "</a> | <a href='" . $BASE_urlpath . "/base_stat_time.php' style='color:black;font-size:12px;font-weight:bold'>" . gettext("Time Profile") . "</a></TD>\n" . " </TR>\n" . " </TABLE>\n" . "</CENTER>\n\n"; }