<!--#set global $topmenu="config"#-->
<!--#set global $statpath="../.."#-->
<!--#set global $helpsubject="Configure+Servers-0-7"#-->
<!--#include $webdir + "/inc_top.tmpl"#-->

<!--#set global $submenu="servers"#-->
<!--#include $webdir + "/inc_cmenu.tmpl"#-->

<h2>$T('configServer')</h2>
<div class="EntryBlock">
  <form action="addServer" method="post" autocomplete="off">
    <fieldset class="EntryFieldSet">
      <legend>$T('addServer')</legend>
      $T('srv-host'):<br><input type="text" size="25" name="host"><br>
      $T('srv-port'):<br><input type="text" size="25" name="port"><br>
      $T('srv-username'):<br><input type="text" size="25" name="username"><br>
      $T('srv-password'):<br><input type="password" size="25" name="password"><br>
      $T('srv-timeout'):<br><input type="text" size="25" name="timeout" value="120"><br>
      $T('srv-connections'):<br><input type="text" size="25" name="connections"><br>
      $T('srv-retention') ($T('days')):<br><input type="text" size="25" name="retention"><br>
      <!--#if int($have_ssl) == 0#-->
        $T('srv-ssl') $T('opt-notInstalled')
      <!--#else#-->
        <input type="checkbox" name="ssl" value="1" <!--#if int($have_ssl) == 0 then "disabled" else ""#-->>&nbsp;$T('srv-ssl')<br/>
      <!--#end if#-->
      <input type="checkbox" name="fillserver" value="1">&nbsp;$T('srv-fillserver')<br>
      <input type="checkbox" name="optional" value="1">&nbsp;$T('srv-optional')<br>
      <input type="checkbox" name="enable" value="1" checked="1">&nbsp;$T('srv-enable')<br>
      <input type="hidden" name="session" value="$session">
      <p><input type="submit" value="$T('button-addServer')"></p>
    </fieldset>
  </form>
<!--#set $slist = $servers.keys()#-->
<!--#$slist.sort()#-->
<!--#for $server in $slist#-->
  <form action="saveServer" method="post" autocomplete="off">
    <fieldset class="EntryFieldSet">
      <legend>$server</legend>
      $T('srv-host'):<br><input type="text" size="25" name="host" value="$servers[$server]['host']"><br>
      $T('srv-port'):<br><input type="text" size="25" name="port" value="$servers[$server]['port']"><br>
      $T('srv-username'):<br><input type="text" size="25" name="username" value="$servers[$server]['username']"><br>
      $T('srv-password'):<br><input type="password" size="25" name="password" value="$servers[$server]['password']"><br>
      $T('srv-timeout'):<br><input type="text" size="25" name="timeout" value="$servers[$server]['timeout']"><br>
      $T('srv-connections'):<br><input type="text" size="25" name="connections" value="$servers[$server]['connections']"><br>
      $T('srv-retention'):<br><input type="text" size="25" name="retention" value="$servers[$server]['retention']"><br>
      <!--#if int($have_ssl) == 0#-->
        $T('srv-ssl') $T('opt-notInstalled')
      <!--#else#-->
        <input type="checkbox" name="ssl" value="1" <!--#if int($servers[$server]['ssl']) != 0 then "checked=1" else ""#-->/>&nbsp;$T('srv-ssl')<br/>
      <!--#end if#-->
      <input type="checkbox" name="fillserver" value="1" <!--#if int($servers[$server]['fillserver']) != 0 then "checked=1" else ""#--> />&nbsp;$T('srv-fillserver')<br/>
      <input type="checkbox" name="optional" value="1" <!--#if int($servers[$server]['optional']) != 0 then "checked=1" else ""#--> />&nbsp;$T('srv-optional')<br/>
      <input type="checkbox" name="enable" value="1" <!--#if int($servers[$server]['enable']) != 0 then "checked=1" else ""#--> />&nbsp;$T('srv-enable')<br/>
      <input type="hidden" name="server" value="$server">
      <input type="hidden" name="session" value="$session">
      <p><input type="submit" value="$T('button-saveChanges')"></p>
      <p><input type="submit" onclick="this.form.action='delServer'; this.form.submit(); return false;" value="$T('button-delServer')"></p>
      <!--#if 'amounts' in $servers[$server]#-->
      <table border="1">
        <tr><td>$T('total')</td><td>$servers[$server]['amounts'][0]</td>
          <td>$T('thisMonth')</td><td>$servers[$server]['amounts'][1]</td></tr>
        <tr><td>$T('today')</td><td>$servers[$server]['amounts'][3]</td>
          <td>$T('thisWeek')</td><td>$servers[$server]['amounts'][2]</td></tr>
      </table>
      <!--#end if#-->
    </fieldset>
  </form>
<!--#end for#-->
</div>

<!--#include $webdir + "/inc_bottom.tmpl"#-->
