<!DOCTYPE html >
<html lang="en">
<head>
  <title><%cat_full_name%>: IP summary: <%ip%></title>
<%include include_common_head.html%>
  <script type="text/javascript">
    $(document).ready(function () {
      GForum.init_post_only();
    })
  </script>
</head>

<%~set content_header_title = 'IP Summary'%>

<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>

        <%~init array breadcrumbs%><%init hash breadcrumbs.0%>
        <%~set breadcrumbs.0.name = $content_header_title%>

        <%include include_breadcrumb.html%>

        <div class="content"><%-- start content--%>
          <%include include_content_header.html%>
          <%~if not ips.length%>
          <p>No one has posted to <%cat_full_name%> using the IP addresses <%ip%>.</p>
          <%~else%>
          <p>The following <%ip%> IP addresses have posted to <%cat_full_name%>.</p>

          <%~unless current.user_status == $ADMINISTRATOR%>
          <p>Note that information is only shown for forums which you moderate.</p>
          <%~endunless%>

          <p><a href="<%GForum::SEO::url(params => "do=ip_posts;ip=${in.ip}")%>" title="Extended post details">Click here to view extended post details.</a></p>

          <div class="dtable">
            <div class="dhead">
              <div class="drow">
                <div class="dcell ip">IP Address</div>
                <div class="dcell posts">Posts</div>
                <div class="dcell">Posters</div>
                <div class="dcell date">Latest Post</div>
              </div>
            </div>
            <div class="dbody">
              <%~loop ips%>
              <div class="drow">
                <div class="dcell ip">
                  <%ip%>
                  <%~if country_lookups%>
                  <span class="country-name">(<%if ip_country%><span><%ip_country%></span><%else%><span class="unknown">Unknown</span><%endif%>)</span>
                  <%~endif%>
                </div>
                <div class="dcell posts">
                  <a href="<%GForum::SEO::url(params => "do=ip_posts;ip=$ip")%>" title="Show all posts made from <%ip%>"><%post_count%> posts</a>
                </div>
                <div class="dcell">
                <%loop ip_posters~%>
                <span class="poster">
                  <%include include_username.html%>
                  <span class="poster-data">(<%~%>
                    <%~set url_username = escape_url unescape_html $user_username%>
                    <a href="<%GForum::SEO::url(params => "do=ip_posts;ip=$ip;username=$url_username")%>"><%post_count%> posts</a>
                    <span class="sep">|</span>
                    <a href="<%GForum::SEO::url(params => "do=user_ips;username=$url_username")%>" title="View user's IP addresses">IPs</a>
                    <%~if current.user_status == $ADMINISTRATOR and user_status != $ADMINISTRATOR%>
                    <span class="sep">|</span>
                    <%~if user_enabled%><%set url_param_user_enabled ="dis"%><%else%><%set url_param_user_enabled ="en"%><%endif%>
                    <a href="<%GForum::SEO::url(params => "do=${url_param_user_enabled}able_user;user_id=$user_id;redo=$this_do;ip=$search_ip")%>"<%if not user_enabled%> title="User account is disabled"<%endif%> rel="post-only"><%if user_enabled%>Dis<%else%>En<%endif%>able User</a>
                    <%~endif~%>
                    )</span><%~%>
                </span>
                <%~unless last%>, <%endunless%>
                <%~endloop%>
                </div>
                <div class="dcell date"><%GForum::date($latest_post)%></div>
              </div>
              <%~endloop%>
            </div>
          </div>
          <%~endif%>

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