<form method="GET" action="avail.cgi">
[% IF host %]<input type='hidden' name='host' value='[% host %]'>[% END %]
[% IF hostgroup %]<input type='hidden' name='hostgroup' value='[% hostgroup %]'>[% END %]
[% IF service %]<input type='hidden' name='service' value='[% service %]'>[% END %]
[% IF servicegroup %]<input type='hidden' name='servicegroup' value='[% servicegroup %]'>[% END %]
<input type='hidden' name='t1' value='[% start %]'>
<input type='hidden' name='t2' value='[% end %]'>
[% IF show_log_entries %]<input type='hidden' name='show_log_entries' value='[% show_log_entries %]'>[% END %]
[% IF full_log_entries %]<input type='hidden' name='full_log_entries' value='[% full_log_entries %]'>[% END %]
<input type='hidden' name='assumeinitialstates' value='[% assumeinitialstates %]'>
<input type='hidden' name='assumestateretention' value='[% assumestateretention %]'>
<input type='hidden' name='assumestatesduringnotrunning' value='[% assumestatesduringnotrunning %]'>
<input type='hidden' name='includesoftstates' value='[% includesoftstates %]'>
[% IF report_type %]<input type='hidden' name='report_type' value='[% report_type %]'>[% END %]
<table border="0" class='optBox'>
  <tr>
    [% UNLESS service %]
    <td valign="top" align="left" class='optBoxItem'>First assumed host state:</td>
    [% END %]
    <td valign="top" align="left" class='optBoxItem'>First assumed service state</td>
  </tr>
  <tr>
    [% UNLESS service %]
    <td valign="top" align="left" class='optBoxItem'>
      <select name='initialassumedhoststate'>
        <option value="0"[% IF  initialassumedhoststate ==  0 %] selected[% END %]>Unspecified</option>
        <option value="-1"[% IF initialassumedhoststate == -1 %] selected[% END %]>Current State</option>
        <option value="3"[% IF  initialassumedhoststate ==  3 %] selected[% END %]>Host Up</option>
        <option value="4"[% IF  initialassumedhoststate ==  4 %] selected[% END %]>Host Down</option>
        <option value="5"[% IF  initialassumedhoststate ==  5 %] selected[% END %]>Host Unreachable</option>
      </select>
    </td>
    [% END %]
    <td class='optBoxItem'>
      <select name='initialassumedservicestate'>
        <option value="0"[% IF  initialassumedservicestate ==  0 %] selected[% END %]>Unspecified</option>
        <option value="-1"[% IF initialassumedservicestate == -1 %] selected[% END %]>Current State</option>
        <option value="6"[% IF  initialassumedservicestate ==  6 %] selected[% END %]>Service Ok</option>
        <option value="8"[% IF  initialassumedservicestate ==  8 %] selected[% END %]>Service Warning</option>
        <option value="7"[% IF  initialassumedservicestate ==  7 %] selected[% END %]>Service Unknown</option>
        <option value="9"[% IF  initialassumedservicestate ==  9 %] selected[% END %]>Service Critical</option>
      </select>
    </td>
  </tr>
  <tr>
    <td valign="top" align="left" class='optBoxItem'>Report period:</td>
    <td valign="top" align="left" class='optBoxItem'>Backtracked archives:</td>
  </tr>
  <tr>
    <td valign="top" align="left" class='optBoxItem'>
      <select name='timeperiod'>
        <option value="current"[% IF      timeperiod == 'current'      %] selected[% END %]>[ Current time range ]</option>
        <option value="today"[% IF        timeperiod == 'today'        %] selected[% END %]>Today</option>
        <option value="last24hours"[% IF  timeperiod == 'last24hours'  %] selected[% END %]>Last 24 Hours</option>
        <option value="yesterday"[% IF    timeperiod == 'yesterday'    %] selected[% END %]>Yesterday</option>
        <option value="thisweek"[% IF     timeperiod == 'thisweek'     %] selected[% END %]>This Week</option>
        <option value="last7days"[% IF    timeperiod == 'last7days'    %] selected[% END %]>Last 7 Days</option>
        <option value="lastweek"[% IF     timeperiod == 'lastweek'     %] selected[% END %]>Last Week</option>
        <option value="thismonth"[% IF    timeperiod == 'thismonth'    %] selected[% END %]>This Month</option>
        <option value="last31days"[% IF   timeperiod == 'last31days'   %] selected[% END %]>Last 31 Days</option>
        <option value="lastmonth"[% IF    timeperiod == 'lastmonth'    %] selected[% END %]>Last Month</option>
        <option value="last12months"[% IF timeperiod == 'last12months' %] selected[% END %]>Last 12 Months</option>
        <option value="thisyear"[% IF     timeperiod == 'thisyear'     %] selected[% END %]>This Year</option>
        <option value="lastyear"[% IF     timeperiod == 'lastyear'     %] selected[% END %]>Last Year</option>
      </select>
    </td>
    <td valign="top" align="left" class='optBoxItem'>
      <input type='text' size='2' maxlength='2' name='backtrack' value='[% backtrack %]'>
    </td>
  </tr>
  <tr>
    <td valign="top" align="left"></td>
    <td valign="top" align="left" class='optBoxItem'>
      <input type='submit' value='Update'>
    </td>
  </tr>
  <tr>
    <td></td>
    <td align="right" valign="bottom"></td>
  </tr>
</table>
</form>
