<!DOCTYPE html >
<%~set search_widget = 1%>
<html lang="en">
<head>
  <title><%cat_full_name%>: Ban</title>
<%include include_common_head.html%>
</head>

<body class="page-<%page_id%>">
  <div class="container-b">
    <%include include_header.html%>

    <div class="main">
      <div class="contentwrapper clearfix">
        <div class="sidebar">
            <%include include_sidebar.html%>
        </div>

        <%~set content_header_title = 'Ban '%>
        <%~if in.ban_type eq ban_ip%><%set content_header_title .= 'IP Address'%><%else%><%set content_header_title .= 'User'%><%endif%>
        <%~init array breadcrumbs%><%init hash breadcrumbs.0%><%init hash breadcrumbs.1%>
        <%~set breadcrumbs.0.name = $forum_name%>
        <%~set breadcrumbs.0.url  = GForum::SEO::url(params => "forum=$forum_id")%>
        <%~set breadcrumbs.1.name = $content_header_title%>

        <%include include_breadcrumb.html%>

        <div class="content"><%-- start content--%>
          <%include include_content_header.html%>

          <p>
            You have chosen to ban
            <%~if ban_type eq ban_ip%> the IP address '<%ban_value%>'
            <%~else%> the user <%include include_username.html%>
            <%~endif%>
            from <%cat_full_name%>: <%forum_name%>.
          </p>
          <p>
            If desired, you may set a timeout (in days) for the ban, and a
            short reason for the ban, viewable only by administrators and
            any other moderators of the forum.
          </p>

          <form action="<%GForum::SEO::url()%>" method="post" class="settings">
            <%hidden_form%>
            <input type="hidden" name="do" value="forum_ban" />
            <input type="hidden" name="ban_type" value="<%ban_type%>" />
            <input type="hidden" name="ban_value" value="<%ban_value%>" />
            <input type="hidden" name="forum" value="<%forum_id%>" />

            <div class="dtable form">
              <div class="drow">
                <div class="dcell name">Ban Type</div>
                <div class="dcell divider"></div>
                <div class="dcell value">
                  <%if ban_type eq ban_ip%>IP ban<%else%>User ban<%endif%>
                </div>
              </div>
              <div class="drow">
                <div class="dcell name"><%if ban_type eq ban_ip%>IP Address<%else%>User<%endif%></div>
                <div class="dcell divider"></div>
                <div class="dcell value">
                  <%if ban_type eq ban_ip%><%ban_value%><%else%><%include include_username.html%><%endif%>
                </div>
              </div>
              <div class="drow">
                <div class="dcell name">Ban Expiry</div>
                <div class="dcell divider"></div>
                <div class="dcell value">
                  <input type="text" id="ban_expiry" name="ban_expiry" class="txt shotext" title="Leave blank to specify no expiry" /> days
                </div>
              </div>
              <div class="drow">
                <div class="dcell name">Ban Reason</div>
                <div class="dcell divider"></div>
                <div class="dcell value">
                  <input type="text" id="ban_reason" name="ban_reason" class="txt midtext" />
                </div>
              </div>

              <div class="drow actions">
                <div class="dcell name"></div>
                <div class="dcell divider"></div>
                <div class="dcell value"><input type="submit" value="Ban <%if ban_type eq ban_ip%>IP<%else%>User<%endif%>" class="btn default" /></div>
              </div>
            </div>
          </form>

        </div><%-- end content --%>
      </div>
    </div>
    <%include include_footer.html%>
  </div>
</body>
<%~include include_global_js.html%>
</html>
