<?php
//
// Created on: 15 Mar 2001
// Usage     : alarmfilter.php?language="eng|gb"&bssid=3
//
// Function  : Display the filter options 
//
//
?>
<?php
include("nocache.inc");
include("alarmfilter.inc");
if (!isset($language))
    $language="eng";
$parameter="${language}namearray";
$curr_time = date("Y-m-d H:i:s",time());
?>
<HTML>
<?include("header.inc");?>
<HEAD>
<SCRIPT language="JavaScript" type="text/javascript">
<!--
    function alarmfind()
    {
        var perbssid=document.alarmfilterform.perbssid.value;

        url="alarmevent.php?language=<?=$language?>";
        if ((perbssid < 12) && (perbssid >= 0) && ( document.alarmfilterform.perbssid.value != '' ))
            url += "&perBssid=" + document.alarmfilterform.perbssid.value;
        else
            document.alarmfilterform.perbssid.value='';
        if ( document.alarmfilterform.perobjectid.value != '' )
            url += "&perObjectid=" + document.alarmfilterform.perobjectid.value;
        if ( document.alarmfilterform.perseverity.value != '' )
            url += "&perSeverity=" + document.alarmfilterform.perseverity.value;
        if (( document.alarmfilterform.perstartperiod.value != '<?=$curr_time?>' ) ||
            ( document.alarmfilterform.perendperiod.value != '<?=$curr_time?>' ))
        {
            url += "&perStartPeriod=" + document.alarmfilterform.perstartperiod.value;
            url += "&perEndPeriod=" + document.alarmfilterform.perendperiod.value;
        }
        parent.bottom.location.href=url;
    }
//-->
</SCRIPT>
</HEAD>
<TABLE border=1 cellpadding=0 cellspacing=0
bordercolor=#000000 bordercolordark=#FFFFFF bordercolorlight=#000000 width=100%>
  <FORM name=alarmfilterform>
  <TR>
  <TD> <?=${$parameter}[bssid]?><br>
    <INPUT type=text name=perbssid size=2>
  </TD>
  <TD> <?=${$parameter}[objectid]?>(e.g Bts.*.0)<br>
    <INPUT type=text name=perobjectid size=12>
  </TD>
  <TD> <?=${$parameter}[severity]?><br>
    <SELECT name=perseverity>
    <OPTION selected></OPTION>
    <OPTION value='=1'> <?=${$parameter}[critical]?> </OPTION>
    <OPTION value='=2'> <?=${$parameter}[major]?> </OPTION>
    <!--OPTION value='=3'> <?=${$parameter}[minor]?> </OPTION-->
    <OPTION value='=0'> <?=${$parameter}[clear]?> </OPTION>
    <OPTION value='>0'> <?=${$parameter}[unclear]?> </OPTION>
    <OPTION value='>=0'> <?=${$parameter}[all]?> </OPTION>
    </SELECT>
  </TD>
  <TD> <?=${$parameter}[startperiod]?><br>
    <!--INPUT type=text name=perstartperiod size=19 value='2001-01-01 00:00:00'-->
    <INPUT type=text name=perstartperiod size=19 value='<?=$curr_time?>'>
  </TD>
  <TD> <?=${$parameter}[endperiod]?><br>
    <INPUT type=text name=perendperiod size=19 value='<?=$curr_time?>'>
  </TD>
  <TD><BR>
<?php
echo "<INPUT type=button value='{${$parameter}[find]}' " .
    "onClick='javascript:alarmfind()'>";
if (isset($bssid))
    echo "<INPUT type=button value='{${$parameter}[back]}' " .
        "onClick='javascript:parent.location.href=" .
        "\"modifyBssParam.php?language=$language&bssid=$bssid\"'>";
else
    echo "<INPUT type=button value='{${$parameter}[back]}' " .
        "onClick='javascript:parent.location.href=" .
        "\"GUI/PACS OMC_files/sys_status_index_files/sys_status_down.html\"'>";
?>
  </TD>
  </TR>
  </FORM>
</TABLE>
</HTML>
