<!DOCTYPE html >
<html lang="en">
<head>
  <title><%cat_full_name%>: IP details: <%ip%>: Posts</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 = "Posts From "%>
        <%set content_header_title .= $ip%>
        <%~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 ip_posts.length%>
          <p>
            No posts have been made
            <%if search_user%>by <%include include_username.html%><%endif%>
            from the <%ip%><%if ip ends '.*'%> IP addresses<%endif%>.
          </p>
        <%~else%>
          <p>
            The following posts were made
            <%if search_user%>by <%include include_username.html%><%endif%>
            from the <%ip%><%if ip ends '.*'%> IP addresses<%endif%>.
          </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_summary;ip=$search_ip")%>" title="IP summary">Click here to view an IP summary</a>.
          </p>

          <div class="dtable">
            <div class="dhead">
              <div class="drow">
                <%~if show_ip_column%>
                <div class="dcell ip">IP Address</div>
                <%~endif%>
                <div class="dcell author">Poster</div>
                <div class="dcell subject">Post</div>
                <div class="dcell forum">Forum</div>
                <div class="dcell date">Date</div>
              </div>
            </div>

            <div class="dbody">
              <%~loop ip_posts%>
              <div class="drow">
                <%~if show_ip_column%>
                <div class="dcell ip">
                  <a href="<%GForum::SEO::url(params => "do=ip_summary;ip=$post_ip")%>" title="View post summary"><%post_ip%></a>
                </div>
                <%~endif%>
                <div class="dcell author">
                  <%include include_username.html%>
                  <%~if user_id%>
                  <span class="poster-data">(<%~%>
                    <%~set url_param_username = escape_url unescape_html $user_username%>
                    <a href="<%GForum::SEO::url(params => "do=user_ips;username=$url_param_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%>><%if user_enabled%>Dis<%else%>En<%endif%>able User</a>
                    <%~endif~%>
                    )</span>
                  <%~endif%>
                </div>
                <div class="dcell subject">
                  <%if post_moved%>Moved: <%endif~%>
                  <a href="<%GForum::SEO::url(type => "post", id => $post_id, anchor => "p$post_id")%>"><%post_subject%></a>
                  <div class="post-mob">
                    by <a href="<%GForum::SEO::url(params => "user=$user_id")%>" class="postedby"><%post_username%></a> <span> | <%post_date%></span><br />
                    <%GForum::Category::full_name_linked($cat_id, ': ')%>: <a href="<%GForum::SEO::url(type => "forum", id => $forum_id)%>"><%forum_name%></a>
                  </div>
                </div>
                <div class="dcell forum">
                  <%GForum::Category::full_name_linked($cat_id, ': ')%>:
                  <a href="<%GForum::SEO::url(type => "forum", id => $forum_id)%>"><%forum_name%></a>
                </div>
                <div class="dcell date">
                  <%post_date%>
                </div>
              </div>
              <%~endloop%>
            </div>
          </div>
          <%~endif%>

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

</body>
<%~include include_global_js.html%>
</html>
