<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">###############################################################################
# Display.pl                                                                  #
###############################################################################
# YaBB: Yet another Bulletin Board                                            #
# Open-Source Community Software for Webmasters                               #
# Version:        YaBB 1 Gold - SP 1.3                                        #
# Released:       December 2001; Updated April 6, 2003                        #
# Distributed by: http://www.yabbforum.com                                    #
# =========================================================================== #
# Copyright (c) 2000-2003 YaBB (www.yabbforum.com) - All Rights Reserved.     #
# Software by: The YaBB Development Team                                      #
#              with assistance from the YaBB community.                       #
# Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com            #
###############################################################################

$displayplver = "1 Gold - SP 1.3";

sub Display {
	my $viewnum = $INFO{'num'};
	if( $viewnum =~ /\D/ ) { &amp;fatal_error($txt{'337'}); }
	if( $currentboard eq '' ) { &amp;fatal_error($txt{'1'}); }
	$maxmessagedisplay ||= 10;
	my($buffer,$views,$lastposter,$moderators,$counter,$counterwords,$pageindex,$msubthread,$mnum,$mstate,$mdate,$msub,$mname,$memail,$mreplies,$musername,$micon,$noposting,$threadclass,$notify,$max,$start,$bgcolornum,$windowbg,$mattach,$mip,$mlm,$mlmb,$lastmodified,$postinfo,$star,$sendm,$topicdate);
	my(@userprofile,@messages,@bgcolors);

	# Determine what category we are in.
	fopen(FILE, "$boardsdir/$currentboard.ctb") || &amp;fatal_error("300 $txt{'106'}: $txt{'23'} $currentboard.ctb");
	$curcat = &lt;FILE&gt;;
	fclose(FILE);
	#$curcat = $cat;
	fopen(FILE, "$boardsdir/$curcat.cat") || &amp;fatal_error("300 $txt{'106'}: $txt{'23'} $cat.cat");
	$cat = &lt;FILE&gt;;
	fclose(FILE);

	# Load the membergroups list.
	fopen(FILE, "$vardir/membergroups.txt") || &amp;fatal_error("100 $txt{'106'}: $txt{'23'} membergroups.txt");
	@membergroups = &lt;FILE&gt;;
	fclose(FILE);

	# Mark current thread as read.
	($mnum,$tmpa,$tmpa,$tmpa,$mdate) = split(/\|/,$yyThreadLine);
	&amp;dumplog($mnum,$date);

	# Add 1 to the number of views of this thread.
	if(fopen(FILE, "$datadir/$viewnum.data")) {
		$tmpa = &lt;FILE&gt;;
		fclose(FILE);
	}
	elsif( -e "$datadir/$viewnum.data" ) { &amp;fatal_error("102 $txt{'106'}: $txt{'23'} $viewnum.data"); }
	else { $tmpa = '0'; }
	($tmpa, $tmpb) = split( /\|/, $tmpa );
	$tmpa++;
	fopen(FILE, "+&gt;$datadir/$viewnum.data") || &amp;fatal_error("103 $txt{'106'}: $txt{'23'} $viewnum.data");
	print FILE qq~$tmpa|$tmpb~;
	fclose(FILE);
	$views = $tmpa - 1;

	# Check to make sure this thread isn't locked.
	($mnum,$msubthread,$mname,$memail,$mdate,$mreplies,$musername,$micon,$mstate) = split( /\|/, $yyThreadLine );
	$noposting = $viewnum eq $mnum &amp;&amp; $mstate == 1 ? 1 : 0;

	# Get the class of this thread, based on lock status and number of replies.
	$replybutton = qq~&lt;a href="$cgi;action=post;num=$viewnum;title=$txt{'116'};start=$start"&gt;$img{'reply'}&lt;/a&gt;~;
	$threadclass = 'thread';
	if( $mstate == 1 ) {
		$threadclass = 'locked';
		$replybutton = "";
	}
	elsif( $mreplies &gt; 24 ) { $threadclass = 'veryhotthread'; }
	elsif( $mreplies &gt; 14 ) { $threadclass = 'hotthread'; }
	elsif( $mstate == 0 ) { $threadclass = 'thread'; }
	fopen(FILE, "$boardsdir/sticky.stk") || &amp;fatal_error("300 $txt{'106'}: $txt{'23'} sticky.stk");
	@stickys = &lt;FILE&gt;;
	fclose(FILE);
	foreach $curnum (@stickys) {
		if ($mnum == $curnum) {
			if($threadclass eq 'locked') { $threadclass = 'stickylock'; }
			else { $threadclass = 'sticky'; }
		}
	}

	&amp;LoadCensorList;	# Load Censor List

	# Build a list of this board's moderators.
	if( scalar keys %moderators &gt; 0 ) {
		if( scalar keys %moderators == 1 ) { $showmods = qq~($txt{'298'}: ~; }
		else { $showmods = qq~($txt{'299'}: ~; }
		while( $_ = each(%moderators) ) {
			&amp;FormatUserName($_);
			$showmods .= qq~&lt;a href="$scripturl?action=viewprofile;username=$useraccount{$_}" class="nav"&gt;$moderators{$_}&lt;/a&gt;, ~;
		}
		$showmods =~ s/, \Z/)/;
	}

	if($enable_notification) {
		my $startnum = $start || '0';
		$notify = qq~$menusep&lt;a href="$cgi;action=notify;thread=$viewnum;start=$startnum"&gt;$img{'notify'}&lt;/a&gt;~;
	}
	&amp;jumpto;	# create the jumpto list

	# Build the page links list.
	$postdisplaynum = 3;	# max number of pages to display
	$max = $mreplies + 1;
	$start = $INFO{'start'} || 0;
	$start = $start &gt; $mreplies ? $mreplies : $start;
	$start = ( int( $start / $maxmessagedisplay ) ) * $maxmessagedisplay;
	$tmpa = 1;
	$tmpx = int( $max / $maxmessagedisplay );
	if ($start &gt;= (($postdisplaynum-1) * $maxmessagedisplay)) { $startpage = $start - (($postdisplaynum-1) * $maxmessagedisplay); $tmpa = int( $startpage / $maxmessagedisplay ) + 1; }
	if ($max &gt;= $start + ($postdisplaynum * $maxmessagedisplay)) { $endpage = $start + ($postdisplaynum * $maxmessagedisplay); } else { $endpage = $max }
	if ($startpage &gt; 0) { $pageindex = qq~&lt;a href="$cgi;action=display;num=$viewnum;start=0"&gt;1&lt;/a&gt;&amp;nbsp;...&amp;nbsp;~; }
	if ($startpage == $maxmessagedisplay) { $pageindex = qq~&lt;a href="$cgi;action=display;num=$viewnum;start=0"&gt;1&lt;/a&gt;&amp;nbsp;~;}
	for( $counter = $startpage; $counter &lt; $endpage; $counter += $maxmessagedisplay ) {
		$pageindex .= $start == $counter ? qq~&lt;b&gt;$tmpa&lt;/b&gt;&amp;nbsp;~ : qq~&lt;a href="$cgi;action=display;num=$viewnum;start=$counter"&gt;$tmpa&lt;/a&gt;&amp;nbsp;~;
		$tmpa++;
	}
	$tmpx = $max - $maxmessagedisplay;
	$outerpn = int($tmpx / $maxmessagedisplay) + 0;
	$lastpn = int($mreplies / $maxmessagedisplay) + 1;
	$lastptn = ($lastpn - 1) * $maxmessagedisplay;
	if ($endpage &lt; $max - ($maxmessagedisplay) ) {$pageindexadd = qq~&amp;nbsp;...&amp;nbsp;~;}
	if ($endpage != $max) {$pageindexadd .= qq~&amp;nbsp;&lt;a href="$cgi;action=display;num=$viewnum;start=$lastptn"&gt;$lastpn&lt;/a&gt;~;}
	$pageindex .= $pageindexadd;

	foreach (@censored) {
		($tmpa,$tmpb) = @{$_};
		$msubthread =~ s~\Q$tmpa\E~$tmpb~gi;
	}
	$curthreadurl = $curposlinks ? qq~&lt;a href="$cgi;action=display;num=$viewnum" class="nav"&gt;$msubthread&lt;/a&gt;~ : $msubthread;

	# Create next/prev links
	fopen(LISTS, "$boardsdir/$INFO{'board'}.txt");
	@boardtopics = &lt;LISTS&gt;;
	seek LISTS, 0, 0;
	my $found;
	my $name = $INFO{'num'};
	my $bcount = 0;
	$CurrentPosition = -1;
	while($ThreadNum = &lt;LISTS&gt;) {
		++$CurrentPosition;
		$boardtopics[$bcount] = $ThreadNum;
		$bcount++;
		if ($ThreadNum =~ m/\A$name/o) { $found = 1; last; }
	}
	fclose(LISTS);
	$previous = $boardtopics[$CurrentPosition-1];
	$next = $boardtopics[$CurrentPosition+1];
	@prevthread = split(/\|/, $previous);
	$goprevious = $prevthread[0];
	@nextthread = split(/\|/, $next);
	$gonext = $nextthread[0];
	@getlastthread = @boardtopics;
	$lastthread = pop(@getlastthread);
	@lasttopic = split(/\|/, $lastthread);
	$endthread2 = $lasttopic[0];
	if($found) {
		$prevtopic = "$cgi;action=display;num=$goprevious";
		$nexttopic = "$cgi;action=display;num=$gonext";
		$endthread = "$cgi;action=display;num=$endthread2";
	}
	if( $endthread eq $prevtopic &amp;&amp; $gonext eq "") { $nav = qq~&amp;#171; $txt{'766'} | $txt{'766'} &amp;#187;~; }
	if($endthread eq $prevtopic &amp;&amp; $gonext ne "") { $nav = qq~&amp;#171; $txt{'766'} | &lt;a href="$nexttopic"&gt;$txt{'767'}&lt;/a&gt; &amp;#187;~; }
	if ( $endthread ne $prevtopic &amp;&amp; $gonext eq "") { $nav = qq~&amp;#171; &lt;a href="$prevtopic"&gt;$txt{'768'}&lt;/a&gt; | $txt{'766'} &amp;#187;~; }
	if ($endthread ne $prevtopic &amp;&amp; $gonext ne "") { $nav = qq~&amp;#171; &lt;a href="$prevtopic"&gt;$txt{'768'}&lt;/a&gt; | &lt;a href="$nexttopic"&gt;$txt{'767'}&lt;/a&gt; &amp;#187;~; 	}
	$yymain .= qq~
&lt;script language="JavaScript1.2" src="$ubbcjspath" type="text/javascript"&gt;&lt;/script&gt;
&lt;table width="100%" cellpadding="0" cellspacing="0"&gt;
  &lt;tr&gt;
    &lt;td valign=bottom colspan="2"&gt;&lt;font size="2" class="nav"&gt;&lt;B&gt;
    &lt;img src="$imagesdir/open.gif" border="0" alt=""&gt;&amp;nbsp;&amp;nbsp;
    &lt;a href="$scripturl" class="nav"&gt;$mbname&lt;/a&gt;&lt;br&gt;
    &lt;img src="$imagesdir/tline.gif" border="0" alt=""&gt;&lt;IMG SRC="$imagesdir/open.gif" border="0" alt=""&gt;&amp;nbsp;&amp;nbsp;
    &lt;a href="$scripturl#$curcat" class="nav"&gt;$cat&lt;/a&gt;&lt;br&gt;
    &lt;img src="$imagesdir/tline2.gif" border="0" alt=""&gt;&lt;IMG SRC="$imagesdir/open.gif" border="0" alt=""&gt;&amp;nbsp;&amp;nbsp;
    &lt;a href="$cgi" class="nav"&gt;$boardname&lt;/a&gt; &lt;/b&gt;&lt;font size="1"&gt;$showmods&lt;/font&gt;&lt;b&gt;&lt;br&gt;
    &lt;img SRC="$imagesdir/tline3.gif" border="0" alt=""&gt;&lt;IMG SRC="$imagesdir/open.gif" border="0" alt=""&gt;&amp;nbsp;&amp;nbsp;
    $curthreadurl&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td valign="bottom" align="right"&gt;&lt;font size="1"&gt;$nav&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
  &lt;tr&gt;
    &lt;td&gt;
    &lt;table cellpadding="4" cellspacing="1" border="0" width="100%"&gt;
      &lt;tr&gt;
        &lt;td align="left" class="catbg" bgcolor="$color{'catbg'}" width="100%"&gt;
        &lt;table cellpadding="3" cellspacing="0" width="100%"&gt;
          &lt;tr&gt;
            &lt;td&gt;&lt;font size="2"&gt;&lt;b&gt;$txt{'139'}:&lt;/b&gt; $pageindex&lt;/font&gt;&lt;/td&gt;
            &lt;td class="catbg" bgcolor="$color{'catbg'}" align="right"&gt;&lt;font size="2"&gt;
            $replybutton$notify$menusep
            &lt;a href="$cgi;action=sendtopic;topic=$viewnum"&gt;$img{'sendtopic'}&lt;/a&gt;$menusep
            &lt;a href="$cgi;action=print;num=$viewnum" target="_blank"&gt;$img{'print'}&lt;/a&gt;
            &lt;/font&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center"&gt;
  &lt;tr&gt;
    &lt;td&gt;
    &lt;table cellpadding="3" cellspacing="1" border="0" width="100%"&gt;
      &lt;tr&gt;
        &lt;td valign="middle" align="left" width="20%" bgcolor="$color{'titlebg'}" class="titlebg"&gt;
        &lt;font size=2 class="text1" color="$color{'titletext'}"&gt;&amp;nbsp;&lt;img src="$imagesdir/$threadclass.gif" alt=""&gt;
        &amp;nbsp;&lt;b&gt;$txt{'29'}&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td valign="middle" align="left" bgcolor="$color{'titlebg'}" class="titlebg" width="80%"&gt;
        &lt;font size=2 class="text1" color="$color{'titletext'}"&gt;&lt;b&gt;&amp;nbsp;$txt{'118'}: $msubthread&lt;/b&gt; &amp;nbsp;($txt{'641'} $views $txt{'642'})&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
~;

	# Load background color list.
	@bgcolors = ( $color{windowbg}, $color{windowbg2} );
	$bgcolornum = scalar @bgcolors;
	@cssvalues = ( "windowbg","windowbg2" );
	$cssnum = scalar @bgcolors;

	if(!$MenuType) { $sm = 1; }
	$counter = 0;

	fopen(FILE,"$datadir/$viewnum.txt") || &amp;fatal_error("104 $txt{'106'}: $txt{'23'} $viewnum.txt");

	# Skip past the posts in this thread until we reach $start.
	while($counter &lt; $start &amp;&amp; ($buffer = &lt;FILE&gt;)) { $counter++; }

	$#messages = $maxmessagedisplay - 1;
	for($counter = 0; $counter &lt; $maxmessagedisplay &amp;&amp; ($buffer = &lt;FILE&gt;); $counter++) {
		$messages[$counter] = $buffer;
	}
	fclose(FILE);
	$#messages = $counter - 1;
	$counter = $start;

	# For each post in this thread:
	foreach (@messages) {
		$windowbg = $bgcolors[($counter % $bgcolornum)];
		$css = $cssvalues[($counter % $cssnum)];
		chomp;
		($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $postmessage, $ns, $mlm, $mlmb) = split(/[\|]/, $_);
		# Should we show "last modified by?"
		if( $mlm &amp;&amp; $showmodify &amp;&amp; $mlm ne "" &amp;&amp; $mlmb ne "") {
			$mlm = &amp;timeformat($mlm);
			&amp;LoadUser($mlmb);
			$mlmb = $userprofile{$mlmb}-&gt;[1] || $mlmb || $txt{'470'};
			$lastmodified = qq~&amp;#171; &lt;i&gt;$txt{'211'}: $mlm $txt{'525'} $mlmb&lt;/i&gt; &amp;#187;~;
		}
		else {
			$mlm = '-';
			$lastmodified = '';
		}
		$msub ||= $txt{'24'};
		$messdate = &amp;timeformat($mdate);
		$mip = $settings[7] eq 'Administrator' ? $mip : "$txt{'511'}";
		$sendm = '';

		# If the user isn't a guest, load his/her info.
		if($musername ne 'Guest' &amp;&amp; ! $yyUDLoaded{$musername} &amp;&amp; -e("$memberdir/$musername.dat") ) {
			&amp;LoadUserDisplay($musername);	# If user is not in memory, s/he must be loaded.
		}
		if($yyUDLoaded{$musername}) {
			@userprofile = @{$userprofile{$musername}};
			$displayname = $userprofile[1];
			$star = $memberstar{$musername};
			$memberinfo = $memberinfo{$musername};
			$memberinfo =~ s~\n~~g;
			$icqad = $icqad{$musername};
			$yimon = $yimon{$musername};
			if($username ne 'Guest') {
				# Allow instant message sending if current user is a member.
				$sendm = qq~$menusep&lt;a href="$cgi;action=imsend;to=$useraccount{$musername}"&gt;$img{'message_sm'}&lt;/a&gt;~;
			}
			$usernamelink = qq~&lt;a href="$scripturl?board=$currentboard;action=viewprofile;username=$useraccount{$musername}"&gt;&lt;font size="2"&gt;&lt;b&gt;$userprofile[1]&lt;/b&gt;&lt;/font&gt;&lt;/a&gt;~;
			$postinfo = qq~$txt{'26'}: $userprofile[6]&lt;br&gt;~;
			$memail = $userprofile[2];
		}
		else {
			$musername = "Guest";
			$star = '';
			$memberinfo = "$txt{'28'}";
			$icqad = '';
			$yimon = '';
			$usernamelink = qq~&lt;font size="2"&gt;&lt;b&gt;$mname&lt;/b&gt;&lt;/font&gt;~;
			$postinfo = '';
			@userprofile = ();
			$displayname = $mname;
		}
		# Censor the subject and message.
		foreach (@censored) {
			($tmpa,$tmpb) = @{$_};
			$postmessage =~ s~\Q$tmpa\E~$tmpb~gi;
			$msub =~ s~\Q$tmpa\E~$tmpb~gi;
		}
		# Run UBBC interpreter on the message.
		$message = $postmessage; # put the message back into the proper variable to do ubbc on it
		&amp;wrap;
		if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &amp;DoUBBC; }
		&amp;wrap2;
		$profbutton = $profilebutton &amp;&amp; $musername ne 'Guest' ? qq~&lt;a href="$scripturl?action=viewprofile;username=$useraccount{$musername}"&gt;$img{'viewprofile_sm'}&lt;/a&gt;$menusep~ : '';
		if($counter != 0) { $counterwords = "$txt{'146'} #$counter"; }
		else { $counterwords = ""; }
		# Print the post and user info for the poster.
		$yymain .= qq~
&lt;table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center"&gt;
  &lt;tr&gt;
    &lt;td&gt;
    &lt;table cellpadding="3" cellspacing="1" border="0" width="100%"&gt;
      &lt;tr&gt;
        &lt;td bgcolor="$windowbg" class="$css"&gt;
        &lt;a name="$counter"&gt;&lt;/a&gt;
        &lt;table width="100%" cellpadding="4" cellspacing="0" class="$css" bgcolor="$windowbg"&gt;
          &lt;tr&gt;
            &lt;td class="$css" bgcolor="$windowbg" valign="top" width="20%" rowspan="2"&gt;&lt;font size="1"&gt;
            $usernamelink&lt;br&gt;
            $memberinfo&lt;br&gt;~;
	if($musername ne "Guest") {
		$yymain .= qq~
            $star&lt;BR&gt;&lt;BR&gt;
            $userprofile[13]$userprofile[12]
            &lt;BR&gt;$userprofile[8] $icqad &amp;nbsp; $userprofile[10] $yimon &amp;nbsp; $userprofile[9]&lt;BR&gt;
~;
	}
	if($musername eq "Guest") {
		$yymain .= qq~
            &lt;BR&gt;&lt;a href="mailto:$memail"&gt;$img{'email_sm'}&lt;/a&gt;&lt;BR&gt;&lt;BR&gt;
~;
	}
	elsif ($userprofile[19] ne "checked" || $settings[7] eq "Administrator" || $allow_hide_email ne 1) {
		$yymain .= qq~
            $profbutton$userprofile[4] &lt;a href="mailto:$memail"&gt;$img{'email_sm'}&lt;/a&gt;$sendm&lt;BR&gt;&lt;BR&gt;
~;
	} else {
		$yymain .= qq~
    $profbutton$userprofile[4]$sendm&lt;BR&gt;&lt;BR&gt;
~;
	}
	$yymain .= qq~
            $userprofile[11]
            $postinfo
            &lt;/font&gt;&lt;/td&gt;
            &lt;td class="$css" bgcolor="$windowbg" valign="top" width="80%" height="100%"&gt;
            &lt;table width="100%" border="0"&gt;
              &lt;tr&gt;
                &lt;td align="left" valign="middle"&gt;&lt;img src="$imagesdir/$micon.gif" alt=""&gt;&lt;/td&gt;
                &lt;td align="left" valign="middle"&gt;
                &lt;font size="2"&gt;&lt;B&gt;$msub&lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
                &lt;font size="1"&gt;&amp;#171; &lt;B&gt;$counterwords $txt{'30'}:&lt;/B&gt; $messdate &amp;#187;&lt;/font&gt;&lt;/td&gt;
                &lt;td align="right" valign="bottom" nowrap height="20"&gt;
                &lt;font size=-1&gt;
~;
if ($mstate != 1)
{
$yymain .= qq~
                &lt;a href="$cgi;action=post;num=$viewnum;quote=$counter;title=$txt{'116'};start=$start"&gt;$img{'replyquote'}&lt;/a&gt;$menusep&lt;a href="$cgi;action=modify;message=$counter;thread=$viewnum"&gt;$img{'modify'}&lt;/a&gt;
~;
	if(exists $moderators{$username} || $settings[7] eq 'Administrator' || $username eq $musername) {
		$yymain .= qq~  $menusep&lt;a href="$cgi;action=modify2;thread=$viewnum;id=$counter;d=1" onclick="return confirm('$txt{'739'}')"&gt;$img{'delete'}&lt;/a&gt;~;
	}
}
	$yymain .= qq~
                &lt;/font&gt;&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;
            &lt;hr width="100%" size="1" class="hr"&gt;
            &lt;font size="2"&gt;
            $message
            &lt;/font&gt;
            &lt;/td&gt;
          &lt;/tr&gt;&lt;tr&gt;
            &lt;td class="$css" bgcolor="$windowbg" valign="bottom"&gt;
            &lt;table width="100%" border="0"&gt;
              &lt;tr&gt;
                &lt;td align="left"&gt;&lt;font size="1"&gt;$lastmodified&lt;/font&gt;&lt;/td&gt;
                &lt;td align="right"&gt;&lt;font size="1"&gt;&lt;img src="$imagesdir/ip.gif" alt="" border="0"&gt; $mip&lt;/font&gt;&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;
            &lt;font size="1"&gt;
            $userprofile[5]
            &lt;/font&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;~;
		$counter++;
	}
	$yymain .= qq~
&lt;table border=0 width="100%" cellspacing="0" cellpadding="0" bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
  &lt;tr&gt;
    &lt;td&gt;
    &lt;table cellpadding="4" cellspacing="1" border="0" width="100%"&gt;
      &lt;tr&gt;
        &lt;td align="left" class="catbg" bgcolor="$color{'catbg'}" width="100%"&gt;
        &lt;table cellpadding="3" cellspacing="0" width="100%"&gt;
          &lt;tr&gt;
            &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'139'}:&lt;/b&gt; $pageindex&lt;/font&gt;&lt;/td&gt;
            &lt;td class="catbg" bgcolor="$color{'catbg'}" align=right&gt;&lt;font size=2&gt;
            $replybutton$notify$menusep
            &lt;a href="$cgi;action=sendtopic;topic=$viewnum"&gt;$img{'sendtopic'}&lt;/a&gt;$menusep
            &lt;a href="$cgi;action=print;num=$viewnum" target="_blank"&gt;$img{'print'}&lt;/a&gt;
            &lt;/font&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;br&gt;
&lt;table border="0" width="100%" cellpadding="0" cellspacing="0"&gt;~;
	  $yymain .= qq~
  &lt;tr&gt;
    &lt;td align="left" valign="top" colspan="2"&gt;~;
	if(exists $moderators{$username} || $settings[7] eq 'Administrator') {
		$yymain .= qq~&lt;font size="1"&gt;&lt;b&gt;$img{'admin_func'}&lt;/b&gt;
        &amp;nbsp;&lt;a href="$cgi;action=movethread;thread=$viewnum"&gt;$img{'admin_move'}&lt;/a&gt;$menusep
        &lt;a href="$cgi;action=removethread;thread=$viewnum" onclick="return confirm('$txt{'162'}')"&gt;$img{'admin_rem'}&lt;/a&gt;$menusep
        &lt;a href="$cgi;action=lock;thread=$viewnum"&gt;$img{'admin_lock'}&lt;/a&gt;$menusep
        &lt;a href="$cgi;action=sticky;thread=$viewnum"&gt;$img{'admin_sticky'}&lt;/a&gt;
&lt;/font&gt;~;
	}
	$yymain .= qq~
    &lt;/td&gt;
    &lt;td valign="top" height="18" align="right"&gt;&lt;font size="1"&gt;$selecthtml&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td colspan="3" valign="top" align="right"&gt;&lt;font size="1"&gt;$nav&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
~;
	$yytitle = $msubthread;
	&amp;template;
	exit;
}

1;</pre></body></html>