function dispYearOptions($stored_value)
{
    // Creates the years for drop down boxes
    $thisyear = date("Y");
    $options = "";
    $options = "<OPTION VALUE=' ' " . chk_select($stored_value, " ") . ">" . gettext("{ year }") . "\n";
    for ($i = 1999; $i <= $thisyear; $i++) {
        $options = $options . "<OPTION VALUE='" . $i . "' " . chk_select($stored_value, $i) . ">" . $i . "\n";
    }
    $options = $options . "</SELECT>";
    return $options;
}
Example #2
0
        <OPTION VALUE="12" '.chk_select($time[$i][0],"12").'>'.gettext("December").'
        </SELECT>';*/
    echo '<SELECT NAME="time[' . $i . '][2]">
             <OPTION VALUE=" "  ' . chk_select($time[$i][2], " ") . '>' . gettext("{ month }") . '
             <OPTION VALUE="01" ' . chk_select($time[$i][2], "01") . '>' . gettext("January") . '
             <OPTION VALUE="02" ' . chk_select($time[$i][2], "02") . '>' . gettext("February") . '
             <OPTION VALUE="03" ' . chk_select($time[$i][2], "03") . '>' . gettext("March") . '
             <OPTION VALUE="04" ' . chk_select($time[$i][2], "04") . '>' . gettext("April") . '
             <OPTION VALUE="05" ' . chk_select($time[$i][2], "05") . '>' . gettext("May") . '
             <OPTION VALUE="06" ' . chk_select($time[$i][2], "06") . '>' . gettext("June") . '
             <OPTION VALUE="07" ' . chk_select($time[$i][2], "07") . '>' . gettext("July") . '
             <OPTION VALUE="08" ' . chk_select($time[$i][2], "08") . '>' . gettext("August") . '
             <OPTION VALUE="09" ' . chk_select($time[$i][2], "09") . '>' . gettext("September") . '
             <OPTION VALUE="10" ' . chk_select($time[$i][2], "10") . '>' . gettext("October") . '
             <OPTION VALUE="11" ' . chk_select($time[$i][2], "11") . '>' . gettext("November") . '
             <OPTION VALUE="12" ' . chk_select($time[$i][2], "12") . '>' . gettext("December") . '
            </SELECT>';
    //echo '<INPUT TYPE="text" NAME="time['.$i.'][1]" SIZE=2 VALUE="'.$time[$i][1].'"> &nbsp;'."\n";
    echo '<INPUT TYPE="text" NAME="time[' . $i . '][3]" SIZE=2 VALUE="' . $time[$i][3] . '"> &nbsp;' . "\n";
    /*
    echo '<SELECT NAME="time['.$i.'][2]">'.
    dispYearOptions($time[$i][2])
    .'</SELECT>';
    */
    echo '<SELECT NAME="time[' . $i . '][4]">' . dispYearOptions($time[$i][4]) . '</SELECT>';
    if ($i == 0) {
        echo '&nbsp; -- &nbsp;&nbsp;';
    }
}
echo '<INPUT TYPE="submit" class="button" NAME="submit" VALUE="' . gettext("Profile Event") . '">
        </TD></TR></TABLE>
 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>&nbsp;</TD>";
     require_once 'av_init.php';
     echo "<TD WIDTH=5>&nbsp;</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") . ': &nbsp; <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)") . ': &nbsp; <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)") . ': &nbsp; <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";
 }
Example #4
0
		    <BR>
        <TABLE WIDTH="100%" BORDER="1">
        <TR>
         <TD ALIGN="CENTER" WIDTH="50%"><B>' . gettext("X Axis") . '</B></TD>
         <TD ALIGN="CENTER" WIDTH="50%"><B>' . gettext("Y Axis") . '</B></TD>
        </TR>
        <TR>
         <TD>
           <B>' . gettext("Data Source ID:") . '</B> &nbsp;
           <SELECT NAME="data_source">
           <OPTION VALUE=" " ' . chk_select($data_source, " ") . '>{ data source (AG) }';
$temp_sql = "SELECT ag_id, ag_name FROM acid_ag";
$tmp_result = $db->baseExecute($temp_sql);
if ($tmp_result) {
    while ($myrow = $tmp_result->baseFetchRow()) {
        echo '<OPTION VALUE="' . $myrow[0] . '" ' . chk_select($data_source, $myrow[0]) . '>' . '[' . $myrow[0] . '] ' . $myrow[1];
    }
    $tmp_result->baseFreeRows();
}
echo '</SELECT><BR>' . '<B>' . gettext("Minimum Threshold Value") . ':</B>
                 <INPUT TYPE="text" NAME="min_size" SIZE="5" VALUE=' . $min_size . '>
                 &nbsp;&nbsp;
                 <BR>
                 <INPUT TYPE="checkbox" NAME="rotate_xaxis_lbl" VALUE="1" ' . chk_check($rotate_xaxis_lbl, "1") . '>
                 &nbsp;
                 <B>' . gettext("Rotate Axis Labels (90 degrees)") . '</B><BR>
                 <INPUT TYPE="checkbox" NAME="xaxis_grid" VALUE="1"  ' . chk_check($xaxis_grid, "1") . '>
                  &nbsp;
                 <B>' . gettext("Show X-axis grid-lines") . '</B><BR>
                 <!--
                 Disabled because it unexpectedly prevents displaying
 function PrintForm()
 {
     if ($this->db->baseGetDBVersion() >= 103) {
         echo '<SELECT NAME="ossim_type[1]">
             <OPTION VALUE="" ' . chk_select($this->criteria[1], " ") . '>{ any }</OPTION>
             <OPTION VALUE="2" ' . chk_select($this->criteria[1], "2") . '>Alarm</OPTION>';
         echo '</SELECT>&nbsp;&nbsp';
     }
 }
Example #6
0
 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>&nbsp;</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";
 }
Example #7
0
 		 <OPTION VALUE="08" ' . chk_select($chart_end_day, "08") . '>8
 		 <OPTION VALUE="09" ' . chk_select($chart_end_day, "09") . '>9';
for ($i = 10; $i <= 31; $i++) {
    echo "<OPTION VALUE={$i} " . chk_select($chart_end_day, $i) . ">{$i}\n";
}
echo '</SELECT>
        <SELECT NAME="chart_end_month">
         <OPTION VALUE=" "  ' . chk_select($chart_end_month, " ") . '>{month}
         <OPTION VALUE="01" ' . chk_select($chart_end_month, "01") . '>January
         <OPTION VALUE="02" ' . chk_select($chart_end_month, "02") . '>February
         <OPTION VALUE="03" ' . chk_select($chart_end_month, "03") . '>March
         <OPTION VALUE="04" ' . chk_select($chart_end_month, "04") . '>April
         <OPTION VALUE="05" ' . chk_select($chart_end_month, "05") . '>May
         <OPTION VALUE="06" ' . chk_select($chart_end_month, "06") . '>June
         <OPTION VALUE="07" ' . chk_select($chart_end_month, "07") . '>July
         <OPTION VALUE="08" ' . chk_select($chart_end_month, "08") . '>August
         <OPTION VALUE="09" ' . chk_select($chart_end_month, "09") . '>September
         <OPTION VALUE="10" ' . chk_select($chart_end_month, "10") . '>October
         <OPTION VALUE="11" ' . chk_select($chart_end_month, "11") . '>November
         <OPTION VALUE="12" ' . chk_select($chart_end_month, "12") . '>December
        </SELECT>
        <SELECT NAME="chart_end_year">
        <OPTION VALUE=" " ' . chk_select($chart_end_year, " ") . '>{year}
        <OPTION VALUE="2010" ' . chk_select($chart_end_year, "2010") . '>2010
       
        </SELECT>';
echo '<INPUT TYPE="submit" NAME="submit" VALUE="Graph Alerts"><BR>
        &nbsp;&nbsp; <BR>
        </TD></TR>';
echo '</TABLE>';
echo '</FORM><P><HR>';