# UBB CONTROL PANEL - EDIT PROFILE PAGE

# standard top of HTML page
print $Header if ($Header);

my $more;

unless ($in{bypass}) {
	$more = qq~<br /> <br /><small>Note: Only the user's most recent 200 posts are displayed.~ if $total > 200;

	$more .= qq~
	<a href="$vars_config{CGIURL}/cp.cgi?ubb=user_posts&u=$in{u}&bypass=true">Display all $total posts by this user</a> (NOT ADVISED!).</small>~
	    if (($total > 200) && ($total < 1500));    #no option if you have a LOT of posts
}
else {
	$more = "<br /> <br /><small>All $total user posts are displayed.</small>";
}

print <<INCOMPLETE;
<center><table width="95%"><tr><td bgcolor="white">
<font face="Verdana, Arial" color="black" size="2">Note: If
you believe that this list is incomplete or inaccurate, you
should <a href="$vars_config{CGIURL}/cp.cgi?ubb=post_history">Update
Member Post Histories</a>.$more
</font></td></tr></table>
INCOMPLETE

&TBT;

print <<recent_posts_by_user;

<tr bgcolor="#5d7790">
<td>
&nbsp;
</td>
<td>
<FONT color="#ffffff" size="1" FACE="Verdana, Arial">
<B>$vars_wordlets{topic_header}</B>
</FONT>
</td>
<td>
<FONT color="#ffffff" size="1" FACE="Verdana, Arial">
<B>$vars_wordlets{forum_column}</B>
</font>
</td>

<td>
<FONT color="#ffffff" size="1" FACE="Verdana, Arial">
<B>$vars_wordlets{date_column}</B>
</font>
</td>

</tr>

recent_posts_by_user

foreach (@rev_posts) {
	$counter++;

	if (($counter > 200) && (!$in{bypass})) { last; }

	# split line
	my @inarray = split (/\|/, $_);
	$r = 0;
	my $d = shift @inarray;    #first item is the new date field, not used here
	($f, $t, $r) = @inarray;

	$d =~ m/^(\d\d\d\d)(\d\d)(\d\d)/;
	$d = "$2-$3-$1";

	# get forum info
	@this_forum = &GetForumRecord($f);

	if ($ExactPath{$f}) {
		$exact_path = $ExactPath{$f};
	} else {
		$exact_path = "Forum$f";
		if ($this_forum[6] eq 'private') {
			$exact_path .= "/private-$this_forum[7]";
		}
		$ExactPath{$f} = $exact_path;
	}

	#make sure topic exists
	if (-e "$vars_config{NonCGIPath}/$exact_path/$t.cgi") {

		#0 	A, 		X/N, 		Username, 	Topic
		#4	icon,	 	replies, 	first date, 	first time
		#8	firstjulian,	pubname, 	usernumber, 	lastname
		#12	lastdate,	lasttime, 	lastjulian, 	lastpubname
		#16	lastnumber

		@stat_line = &GetThreadData($f, $t);
		unless (@stat_line) { $counter--; next; }

		# topic subject-> $stat_line[3]
		my $subj = &GoodNiceTruncate($stat_line[3], 30);

		# forum name: $this_forum[1]

		print <<this_post;
<tr>
<td valign="top" bgcolor="#ffffff">
<FONT size="1" FACE="Verdana, Arial">
<B>$counter</B>
</font>
</td>

<td valign="top" bgcolor="#ffffff">
<FONT size="1" FACE="Verdana, Arial">
<B><A HREF="$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_topic&f=$f&t=$t">$subj</A></B> ($vars_wordlets{post} \#$r)
</FONT>
</td>
<td valign="top" bgcolor="#ffffff">
<FONT size="1" FACE="Verdana, Arial">
<B>$this_forum[1]</B>
</font>
</td>

<td valign="top" bgcolor="#ffffff">
<FONT size="1" FACE="Verdana, Arial">
<B>$d</B>
</font>
</td>

</tr>
this_post
	}    # unless post exists
}    # end posts loop



&TBB;


# standard bootom of HTML page
print "</center>" . $Footer if ($Footer);

# Nothing below this line should be changed.. and there is no more code!

# This entire program is copyright Infopop Corporation.
# For more info on the Ultimate Bulletin Board and other Infopop
# Products/Services, visit: http://www.infopop.com

# You may not distribute this program in any manner, modified or otherwise.

#You make modifications, but only for your own use and within the confines of the UBB License Agreement.

# DANGER: Do not remove the following line!
1;
