<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">###############################################################################
#Post.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            #
###############################################################################

$postplver = "1 Gold - SP 1.3";

sub Post {
	if($username eq 'Guest' &amp;&amp; $enable_guestposting == 0) { &amp;fatal_error($txt{'165'}); }
	if( $currentboard eq '' ) { &amp;fatal_error($txt{'1'}); }
	my( $subtitle, $x, $mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate, $msubject, $mattach, $mip, $mmessage, $mns, $quotestart);
	my $quotemsg = $INFO{'quote'};
	$threadid = $INFO{'num'};

	($mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate) = split(/\|/,$yyThreadLine);
	if( $mstate == 1 ) { &amp;fatal_error($txt{'90'}); }

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

	$notification = ! $enable_notification || $username eq 'Guest' ? '' : &lt;&lt;"~;";
    &lt;tr&gt;
      &lt;td class="windowbg"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'131'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;td class="windowbg"&gt;&lt;input type=checkbox name="notify" value="x"$notify&gt; &lt;font size="1"&gt;$txt{'750'}&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
~;

	$name_field = $realname eq '' ? qq~      &lt;tr&gt;
    &lt;td class="windowbg"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'44'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td class="windowbg"&gt;&lt;input type=text name="name" size=25 value="$FORM{'name'}" maxlength="25" onMouseOver="this.focus()" tabindex="2"&gt;&lt;/td&gt;
      &lt;/tr&gt;~ : qq~~;

	$email_field = $realemail eq '' ? qq~      &lt;tr&gt;
    &lt;td class="windowbg"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'69'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td class="windowbg"&gt;&lt;font size="2"&gt;&lt;input type=text name="email" size=25 value="$FORM{'email'}" maxlength="40" onMouseOver="this.focus()" tabindex="3"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;~ : qq~~;

	$sub = "";
	$settofield="subject";
	if( $threadid ne '' ) {
		fopen(FILE, "$datadir/$threadid.txt") || &amp;fatal_error("201 $txt{'106'}: $txt{'23'} $threadid.txt");
		@messages = &lt;FILE&gt;;
		fclose(FILE);

		if($quotemsg ne '') {
			($msubject, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $mmessage, $mns) = split(/\|/,$messages[$quotemsg]);
			$message=$mmessage;
			$message =~ s~&lt;br&gt;~\n~g;
			$message =~ s~\n{0,1}\[quote([^\]]*)\](.*?)\[/quote\]\n{0,1}~\n~isg;
			$message =~ s~\n*\[/*quote([^\]]*)\]\n*~~ig;

			$mname ||= $musername || $txt{'470'};
			$quotestart = int( $quotemsg / $maxmessagedisplay ) * $maxmessagedisplay;
			$message = qq~[quote author=$mname link=board=$currentboard;num=$threadid;start=$quotestart#$quotemsg date=$mdate\]$message\[/quote\]\n~;
			$msubject =~ s/\bre:\s+//ig;
			if ($mns eq "NS") {$nscheck="checked";}
		}
		else {
			($msubject, $mname, $memail, $mdate, $musername, $micon, $mattache, $mip, $mmessage, $mns) = split(/\|/,$messages[0]);
			$msubject =~ s/\bre:\s+//ig;
		}
		$sub = "Re: $msubject";
		$settofield="message";
	}
	if(!$sub) { $subtitle = "&lt;i&gt;$txt{'33'}&lt;/i&gt;"; }
	else { $subtitle = "&lt;i&gt;$sub&lt;/i&gt;"; }
	$yymain .= qq~
&lt;table  width="90%" align="center" 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;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;
    $INFO{'title'} ( $subtitle )&lt;/B&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
~;
	$submittxt = "$txt{'105'}";
	$destination = "post2";
	$icon = "xx";
	$is_preview = 0;
	$post = "post";
	$preview = "preview";
	$yytitle = "$INFO{'title'}";
	&amp;Postpage;
	&amp;doshowthread;
	&amp;template;
	exit;
}

sub Postpage {
	my $extra;
	if ($is_preview) {$txt{'507'}=$txt{'771'};}
	$message =~ s~&lt;\/~\&amp;lt\;/~isg;
	if($post eq "imsend") {
		if(!$INFO{'to'}) { $INFO{'to'} = $FORM{'to'};}
		if($INFO{'to'}) {$settofield="message";} else {$settofield="to";}
		$extra = qq~
      &lt;tr&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}" width="23%"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'150'}&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}"&gt;
	&lt;input type=text name="to" value="$INFO{'to'}" size="20" maxlength="50" onMouseOver="this.focus()" tabindex="2"&gt;
	&lt;font size="1"&gt;$txt{'748'}&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;
	~;

	}
	else {
	 $extra = qq~
      &lt;tr&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}" width="23%"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'71'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}"&gt;
        &lt;select name="icon" onChange="showimage()"&gt;
         &lt;option value="xx"$ic1&gt;$txt{'281'}
         &lt;option value="thumbup"$ic2&gt;$txt{'282'}
         &lt;option value="thumbdown"$ic3&gt;$txt{'283'}
         &lt;option value="exclamation"$ic4&gt;$txt{'284'}
         &lt;option value="question"$ic5&gt;$txt{'285'}
         &lt;option value="lamp"$ic6&gt;$txt{'286'}
         &lt;option value="smiley"$ic7&gt;$txt{'287'}
         &lt;option value="angry"$ic8&gt;$txt{'288'}
         &lt;option value="cheesy"$ic9&gt;$txt{'289'}
         &lt;option value="laugh"$ic10&gt;$txt{'290'}
         &lt;option value="sad"$ic11&gt;$txt{'291'}
         &lt;option value="wink"$ic12&gt;$txt{'292'}
        &lt;/select&gt;
        &lt;img src="$imagesdir/$icon.gif" name="icons" border=0 hspace=15&gt;&lt;/td&gt;
      &lt;/tr&gt;
	 ~;
	if ($realname eq '' &amp;&amp; $threadid ne '') {$settofield="name";}
	}
	$yymain .= qq~

&lt;table border="0" width="90%" cellspacing="1" cellpadding="0" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center"&gt;
  &lt;tr&gt;
    &lt;td bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
&lt;form action="$cgi;action=$destination" method="post" name="postmodify" onSubmit="return submitproc()"&gt;
&lt;script language="JavaScript1.2" src="$ubbcjspath" type="text/javascript"&gt;&lt;/script&gt;
&lt;script language="JavaScript1.2" type="text/javascript"&gt;
&lt;!--
function showimage() {
   document.images.icons.src="$imagesdir/"+document.postmodify.icon.options[document.postmodify.icon.selectedIndex].value+".gif";
}
//--&gt;
&lt;/script&gt;
    &lt;input type="hidden" name="threadid" value="$threadid"&gt;
    &lt;input type=hidden name="postid" value="$postid"&gt;
    &lt;table class="titlebg" bgcolor="$color{'titlebg'}" width="100%"&gt;
      &lt;tr&gt;
        &lt;td class="titlebg" bgcolor="$color{'titlebg'}"&gt;&lt;font size="2" class="text1" color="$color{'titletext'}"&gt;&lt;b&gt;$yytitle&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
    &lt;table width="100%" cellpadding="3" cellspacing="0" bgcolor="$color{'windowbg'}" class="windowbg"&gt;
      &lt;tr&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}" width="23%"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'70'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}"&gt;&lt;font size=2&gt;&lt;input type=text name="subject" value="$sub" size="40" maxlength="50" onMouseOver="this.focus()" tabindex="1"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;
$name_field
$email_field
$extra
    &lt;/table&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
~;
if($enable_ubbc &amp;&amp; $showyabbcbutt) {
	$yymain .= qq~
  &lt;tr&gt;
    &lt;td bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
    &lt;table width="100%" cellpadding="3" cellspacing="0" bgcolor="$color{'windowbg2'}" class="windowbg2"&gt;
      &lt;tr&gt;
        &lt;td class="windowbg2" bgcolor="$color{'windowbg2'}" width="23%"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'252'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td valign=middle class="windowbg2" bgcolor="$color{'windowbg2'}"&gt;
        &lt;script language="JavaScript1.2" type="text/javascript"&gt;
        &lt;!--
        if((navigator.appName == "Netscape" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "Microsoft Internet Explorer" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "Opera" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "WebTV Plus Receiver" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 3) || (navigator.appName == "Konqueror" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 2)) {
          HAND = "onmouseover=this.style.cursor='hand'";
          document.write("&lt;img src='$imagesdir/bold.gif' onclick='bold();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'253'}' border=0&gt;");
          document.write("&lt;img src='$imagesdir/italicize.gif' onclick='italicize();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'254'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/underline.gif' onclick='underline();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'255'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/strike.gif' onclick='strike();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'441'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/glow.gif' onclick='glow();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'442'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/shadow.gif' onclick='shadow();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'443'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/move.gif' onclick='move();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'439'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/pre.gif' onclick='pre();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'444'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/left.gif' onclick='left();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'445'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/center.gif' onclick='center();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'256'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/right.gif' onclick='right();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'446'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/hr.gif' onclick='hr();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'531'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/size.gif' onclick='size();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'532'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/face.gif' onclick='font();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'533'}' border='0'&gt;");
        }
        else { document.write("&lt;font size='1'&gt;$txt{'215'}&lt;/font&gt;"); }
        //--&gt;
        &lt;/script&gt;
        &lt;noscript&gt;
        &lt;font size="1"&gt;$txt{'215'}&lt;/font&gt;
        &lt;/noscript&gt;
        &lt;select name="color" onChange="showcolor(this.options[this.selectedIndex].value)"&gt;
         &lt;option value="Black" selected&gt;$txt{'262'}&lt;/option&gt;
         &lt;option value="Red"&gt;$txt{'263'}&lt;/option&gt;
         &lt;option value="Yellow"&gt;$txt{'264'}&lt;/option&gt;
         &lt;option value="Pink"&gt;$txt{'265'}&lt;/option&gt;
         &lt;option value="Green"&gt;$txt{'266'}&lt;/option&gt;
         &lt;option value="Orange"&gt;$txt{'267'}&lt;/option&gt;
         &lt;option value="Purple"&gt;$txt{'268'}&lt;/option&gt;
         &lt;option value="Blue"&gt;$txt{'269'}&lt;/option&gt;
         &lt;option value="Beige"&gt;$txt{'270'}&lt;/option&gt;
         &lt;option value="Brown"&gt;$txt{'271'}&lt;/option&gt;
         &lt;option value="Teal"&gt;$txt{'272'}&lt;/option&gt;
         &lt;option value="Navy"&gt;$txt{'273'}&lt;/option&gt;
         &lt;option value="Maroon"&gt;$txt{'274'}&lt;/option&gt;
         &lt;option value="LimeGreen"&gt;$txt{'275'}&lt;/option&gt;
        &lt;/select&gt;
        &lt;br&gt;
        &lt;script language="JavaScript1.2" type="text/javascript"&gt;
        &lt;!--
        if((navigator.appName == "Netscape" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "Microsoft Internet Explorer" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "Opera" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "WebTV Plus Receiver" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 3) || (navigator.appName == "Konqueror" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 2)) {
          document.write("&lt;img src='$imagesdir/flash.gif' onclick='flash();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'433'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/url.gif' onclick='hyperlink();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'257'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/ftp.gif' onclick='ftp();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'434'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/img.gif' onclick='image();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'435'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/email2.gif' onclick='emai1();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'258'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/table.gif' onclick='table();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'436'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/tr.gif' onclick='trow();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'437'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/td.gif' onclick='tcol();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'449'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/sup.gif' onclick='superscript();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'447'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/sub.gif' onclick='subscript();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'448'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/tele.gif' onclick='teletype();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'440'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/code.gif' onclick='showcode();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'259'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/quote2.gif' onclick='quote();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'260'}' border='0'&gt;");
          document.write("&lt;img src='$imagesdir/list.gif' onclick='list();' "+HAND+" align=bottom width=23 height=22 alt='$txt{'261'}' border='0'&gt;");
        }
        else { document.write("&lt;font size='1'&gt;$txt{'215'}&lt;/font&gt;"); }
        //--&gt;
        &lt;/script&gt;
        &lt;noscript&gt;
        &lt;font size="1"&gt;$txt{'215'}&lt;/font&gt;
        &lt;/noscript&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
~;
}
else {
	$yymain .= qq~
      &lt;tr&gt;
        &lt;td bgcolor="$color{'bordercolor'}" colspan="2" class="bordercolor"&gt;
        &lt;table width="100%" cellpadding="3" cellspacing="0" bgcolor="$color{'windowbg'}" class="windowbg"&gt;
~;
}
	$yymain .= qq~
      &lt;tr&gt;
        &lt;td class="windowbg2" bgcolor="$color{'windowbg2'}" width="23%"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'297'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td valign=middle class="windowbg2" bgcolor="$color{'windowbg2'}"&gt;
        &lt;script language="JavaScript1.2" type="text/javascript"&gt;
        &lt;!--
        if((navigator.appName == "Netscape" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "Microsoft Internet Explorer" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "Opera" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 4) || (navigator.appName == "Konqueror" &amp;&amp; navigator.appVersion.charAt(0) &gt;= 2)) {
          document.write("&lt;img src='$imagesdir/smiley.gif' onclick='smiley();' "+HAND+" align=bottom alt='$txt{'287'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/wink.gif' onclick='wink();' "+HAND+" align=bottom alt='$txt{'292'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/cheesy.gif' onclick='cheesy();' "+HAND+" align=bottom alt='$txt{'289'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/grin.gif' onclick='grin();' "+HAND+" align=bottom alt='$txt{'293'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/angry.gif' onclick='angry();' "+HAND+" align=bottom alt='$txt{'288'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/sad.gif' onclick='sad();' "+HAND+" align=bottom alt='$txt{'291'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/shocked.gif' onclick='shocked();' "+HAND+" align=bottom alt='$txt{'294'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/cool.gif' onclick='cool();' "+HAND+" align=bottom alt='$txt{'295'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/huh.gif' onclick='huh();' "+HAND+" align=bottom alt='$txt{'296'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/rolleyes.gif' onclick='rolleyes();' "+HAND+" align=bottom alt='$txt{'450'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/tongue.gif' onclick='tongue();' "+HAND+" align=bottom alt='$txt{'451'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/embarassed.gif' onclick='embarassed();' "+HAND+" align=bottom alt='$txt{'526'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/lipsrsealed.gif' onclick='lipsrsealed();' "+HAND+" align=bottom alt='$txt{'527'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/undecided.gif' onclick='undecided();' "+HAND+" align=bottom alt='$txt{'528'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/kiss.gif' onclick='kiss();' "+HAND+" align=bottom alt='$txt{'529'}' border='0'&gt; ");
          document.write("&lt;img src='$imagesdir/cry.gif' onclick='cry();' "+HAND+" align=bottom alt='$txt{'530'}' border='0'&gt; ");
        }
        else { document.write("&lt;font size='1'&gt;$txt{'215'}&lt;/font&gt;"); }
        //--&gt;
        &lt;/script&gt;
        &lt;noscript&gt;
        &lt;font size="1"&gt;$txt{'215'}&lt;/font&gt;
        &lt;/noscript&gt;
        &lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td valign=top class="windowbg2" bgcolor="$color{'windowbg2'}" width="23%"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'72'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td class="windowbg2" bgcolor="$color{'windowbg2'}"&gt;&lt;font size="2"&gt;
        &lt;textarea name="message" rows="12" cols="60" wrap="soft" ONCLICK="javascript:storeCaret(this);" ONKEYUP="javascript:storeCaret(this);" ONCHANGE="javascript:storeCaret(this);" onMouseOver="this.focus()" tabindex="4"&gt;$message&lt;/textarea&gt;
        &lt;/font&gt;&lt;BR&gt;&lt;BR&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
    &lt;table width="100%" cellpadding="3" cellspacing="0" bgcolor="$color{'windowbg'}" class="windowbg"&gt;
$notification
$lastmod
      &lt;tr&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}" width="23%"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'276'}:&lt;/b&gt;&lt;/font&gt;&lt;BR&gt;&lt;BR&gt;&lt;/td&gt;
        &lt;td class="windowbg" bgcolor="$color{'windowbg'}"&gt;&lt;input type=checkbox name="ns" value="NS"$nscheck&gt; &lt;font size="1"&gt; $txt{'277'}&lt;/font&gt;&lt;BR&gt;&lt;BR&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
    &lt;table class="titlebg" bgcolor="$color{'titlebg'}" align="center" width="100%"&gt;
      &lt;tr&gt;
        &lt;td align="center" class="titlebg" bgcolor="$color{'titlebg'}"&gt;
        &lt;font size="1" class="text1" color="$color{'titletext'}"&gt;$txt{'329'}&lt;/font&gt;&lt;br&gt;
		&lt;input type="submit" name="$post" value="$submittxt" accesskey="s" tabindex="5"&gt;
		&lt;input type="submit" name="$preview" value="$txt{'507'}" accesskey="p"&gt;
~;
unless ($is_preview){$yymain .= qq~       &lt;input type="reset" value="$txt{'278'}" accesskey="r"&gt;~;}

$yymain.=qq~
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
&lt;script language="JavaScript"&gt; &lt;!--
   document.postmodify.$settofield.focus();
//--&gt; &lt;/script&gt;
~;
}

sub Preview {
	$name = $FORM{'name'};
	$email = $FORM{'email'};
	$sub = $FORM{'subject'};
	$FORM{'message'} =~ s~\r~~g;
	$mess = $FORM{'message'};
	$message = $FORM{'message'};
 	$icon = $FORM{'icon'};
	$ns = $FORM{'ns'};
	$threadid = $FORM{'threadid'};
	$notify = $FORM{'notify'};
	$postid = $FORM{'postid'};
	if (length($sub) &gt; 50) { $sub = substr($sub,0,50); }
	$message =~ s/\cM//g;
	$message =~ s~\[([^\]]{0,30})\n([^\]]{0,30})\]~\[$1$2\]~g;
	$message =~ s~\[/([^\]]{0,30})\n([^\]]{0,30})\]~\[/$1$2\]~g;
	$message =~ s~(\w+://[^&lt;&gt;\s\n\"\]\[]+)\n([^&lt;&gt;\s\n\"\]\[]+)~$1$2~g;
	&amp;ToHTML($message);
	$message =~ s/\t/ \&amp;nbsp; \&amp;nbsp; \&amp;nbsp;/g;
	$message =~ s/\n/&lt;br&gt;/g;
	&amp;CheckIcon;

	if($icon eq "xx") { $ic1 = " selected"; }
	elsif($icon eq "thumbup") { $ic2 = " selected"; }
	elsif($icon eq "thumbdown") { $ic3 = " selected"; }
	elsif($icon eq "exclamation") { $ic4 = " selected"; }
	elsif($icon eq "question") { $ic5 = " selected"; }
	elsif($icon eq "lamp") { $ic6 = " selected"; }
	elsif($icon eq "smiley") { $ic7 = " selected"; }
	elsif($icon eq "angry") { $ic8 = " selected"; }
	elsif($icon eq "cheesy") { $ic9 = " selected"; }
	elsif($icon eq "laugh") { $ic10 = " selected"; }
	elsif($icon eq "sad") { $ic11 = " selected"; }
	elsif($icon eq "wink") { $ic12 = " selected"; }

	$name_field = $realname eq '' ? qq~      &lt;tr&gt;
    &lt;td class="windowbg"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'44'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td class="windowbg"&gt;&lt;input type=text name="name" size=25 value="$FORM{'name'}" maxlength="25" tabindex="2"&gt;&lt;/td&gt;
      &lt;/tr&gt;~ : qq~~;

	$email_field = $realemail eq '' ? qq~      &lt;tr&gt;
    &lt;td class="windowbg"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'69'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td class="windowbg"&gt;&lt;input type=text name="email" size=25 value="$FORM{'email'}" maxlength="40" tabindex="3"&gt;&lt;/td&gt;
      &lt;/tr&gt;~ : qq~~;
	if ($FORM{'notify'} eq "x") {$notify = " checked";}
	if ($FORM{'ns'} eq 'NS') {$nscheck = " checked";}

	if ($username eq 'Guest') {
		fopen(FILE, "$memberdir/memberlist.txt") || &amp;fatal_error("202 $txt{'106'}: $txt{'23'} memberlist.txt");
		@memberlist = &lt;FILE&gt;;
		fclose(FILE);
		$testname = lc $name;
		for ($a = 0; $a &lt; @memberlist; $a++) {
			chomp $memberlist[$a];
			$membername = lc $memberlist[$a];
			if( fopen(FILE2, "$memberdir/$memberlist[$a].dat") ) {
				$tmpa = &lt;FILE2&gt;;
				$realname = &lt;FILE2&gt;;
				fclose(FILE2);
				chomp $realname;
				$realname = lc $realname;
				if ($realname eq $testname || $membername eq $testname) { &amp;fatal_error($txt{'100'}); }
			}
			elsif( $testname eq $membername ) { &amp;fatal_error($txt{'100'}); }
		}
		fopen(FILE, "$vardir/reserve.txt") || &amp;fatal_error("203 $txt{'106'}: $txt{'23'} reserve.txt");
		@reserve = &lt;FILE&gt;;
		fclose(FILE);
		fopen(FILE, "$vardir/reservecfg.txt") || &amp;fatal_error("204 $txt{'106'}: $txt{'23'} reservecfg.txt");
		@reservecfg = &lt;FILE&gt;;
		fclose(FILE);
		for( $a = 0; $a &lt; @reservecfg; $a++ ) {
			chomp $reservecfg[$a];
		}
		$matchword = $reservecfg[0] eq 'checked';
		$matchcase = $reservecfg[1] eq 'checked';
		$matchuser = $reservecfg[2] eq 'checked';
		$matchname = $reservecfg[3] eq 'checked';
		$namecheck = $matchcase eq 'checked' ? $name : lc $name;
		foreach $reserved (@reserve) {
			chomp $reserved;
			$reservecheck = $matchcase ? $reserved : lc $reserved;
			if ($matchname) {
				if ($matchword) {
					if ($namecheck eq $reservecheck) { &amp;fatal_error("$txt{'244'} $reserved"); }
				}
				else {
					if ($namecheck =~ $reservecheck) { &amp;fatal_error("$txt{'244'} $reserved"); }
				}
			}
		}
	}
	&amp;wrap;
	$displayname = $settings[1];
	if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &amp;DoUBBC; }
	&amp;wrap2;
	if( $FORM{'previewmodify'} ) {
		$submittxt = "$txt{'10'}";
		$is_preview = 1;
		$post = "postmodify";
		$preview = "previewmodify";
		$destination = 'modify2';
		$submittxt = $txt{'10'};
	}
	elsif( $FORM{'previewim'} ) {
		$submittxt = "$txt{'148'}";
		$destination = "imsend2";
		$is_preview = 1;
		$post = "imsend";
		$preview = "previewim";
		$submittxt = $txt{'148'};
	}
	else {
		$notification = ! $enable_notification || $username eq 'Guest' ? '' : &lt;&lt;"~;";
    &lt;tr&gt;
      &lt;td class="windowbg"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'131'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;td class="windowbg"&gt;&lt;input type=checkbox name="notify" value="x"$notify&gt; &lt;font size="1"&gt;$txt{'750'}&lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
~;
		$destination = 'post2';
		$submittxt = $txt{'105'};
		$is_preview = 1;
		$post = "post";
		$preview = "preview";
	}

	$csubject = $sub;
	&amp;LoadCensorList;	# Load Censor List
	$csubject =~ s/\Q$tmpa\E/$tmpb/gi;
	$message =~ s/\Q$tmpa\E/$tmpb/gi;

	$yymain .= qq~
&lt;script language="JavaScript1.2" type="text/javascript" src="$ubbcjspath"&gt;&lt;/script&gt;
&lt;script language="JavaScript1.2" type="text/javascript"&gt;
&lt;!--
function showimage() {
   document.images.icons.src="$imagesdir/"+document.postmodify.icon.options[document.postmodify.icon.selectedIndex].value+".gif";
}
//--&gt;
&lt;/script&gt;
&lt;table border=0 width="90%" cellspacing=1 cellpadding="3" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center"&gt;
  &lt;tr&gt;
    &lt;td class="titlebg" bgcolor="$color{'titlebg'}"&gt;&lt;font size=2 class="text1" color="$color{'titletext'}"&gt;
    &lt;img src="$imagesdir/$icon.gif" name="icons" border=0&gt; $csubject&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td class="windowbg" bgcolor="$color{'windowbg'}"&gt;&lt;font size=2&gt;&lt;BR&gt;$message&lt;BR&gt;&lt;BR&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;BR&gt;
~;
	$message = $mess; 
	$yytitle = "$txt{'507'} - $csubject";
	$settofield="message";
	&amp;Postpage;
	&amp;template;
	exit;
}

sub Post2 {
	if($username eq 'Guest' &amp;&amp; $enable_guestposting == 0) {	&amp;fatal_error($txt{'165'}); }
	my( $email, $subject, $ns, $threadid, $notify, @memberlist, $a, $realname, $membername, $testname, @reserve, @reservecfg, $matchword, $matchcase, $matchuser, $matchname, $namecheck, $reserved, $reservecheck, $newthreadid, @messages, $mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate, $start, $pageindex, $tempname );

	# If poster is a Guest then evaluate the legality of name and email
	if(!$settings[2]) {
		$FORM{'name'} =~ s/\A\s+//;
		$FORM{'name'} =~ s/\s+\Z//;
		&amp;fatal_error($txt{'75'}) unless ($FORM{'name'} ne '' &amp;&amp; $FORM{'name'} ne '_' &amp;&amp; $FORM{'name'} ne ' ');
		&amp;fatal_error($txt{'568'}) if(length($FORM{'name'}) &gt; 25);
		&amp;fatal_error("$txt{'76'}") if($FORM{'email'} eq '');
		&amp;fatal_error("$txt{'240'} $txt{'69'} $txt{'241'}") if($FORM{'email'} !~ /[\w\-\.\+]+\@[\w\-\.\+]+\.(\w{2,4}$)/);
		&amp;fatal_error("$txt{'500'}") if(($FORM{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/) || ($FORM{'email'} !~ /^.+@\[?(\w|[-.])+\.[a-zA-Z]{2,4}|[0-9]{1,4}\]?$/));
	}

	# Get the form values
	$name = $FORM{'name'};
	$email = $FORM{'email'};
	$subject = $FORM{'subject'};
	$message = $FORM{'message'};
 	$icon = $FORM{'icon'};
	$ns = $FORM{'ns'};
	$threadid = $FORM{'threadid'};
	if( $threadid =~ /\D/ ) { &amp;fatal_error($txt{'337'}); }
	$notify = $FORM{'notify'};

	if($name &amp;&amp; $email) {
		&amp;ToHTML($name);
		$email =~ s/\|//g;
		&amp;ToHTML($email);
		$tempname = $name;	# hold it temporarily so we can put the _'s back later
		$name =~ s/\_/ /g;
	}

	&amp;fatal_error($txt{'75'}) unless($username || $name);
	&amp;fatal_error($txt{'76'}) unless($settings[2] || $email);
	&amp;fatal_error($txt{'77'}) unless($subject &amp;&amp; $subject !~ m~\A[\s_.,]+\Z~);
	&amp;fatal_error($txt{'78'}) unless($message);
	if (length($message)&gt;$MaxMessLen) { &amp;fatal_error($txt{'499'}); }

	if( $FORM{'preview'} ) { &amp;Preview; }
	&amp;spam_protection;

	if (length($subject) &gt; 50) { $subject = substr($subject,0,50); }
	$message =~ s/\cM//g;
	$message =~ s~\[([^\]]{0,30})\n([^\]]{0,30})\]~\[$1$2\]~g;
	$message =~ s~\[/([^\]]{0,30})\n([^\]]{0,30})\]~\[/$1$2\]~g;
	$message =~ s~(\w+://[^&lt;&gt;\s\n\"\]\[]+)\n([^&lt;&gt;\s\n\"\]\[]+)~$1\n$2~g;
	&amp;ToHTML($message);
	$message =~ s~\t~ \&amp;nbsp; \&amp;nbsp; \&amp;nbsp;~g;
	$message =~ s~\n~&lt;br&gt;~g;
	&amp;CheckIcon;

	if(-e("$datadir/.txt")) { unlink("$datadir/.txt"); }

	if ($username ne 'Guest') {
		# If not guest, get name and email.
		$name = $settings[1];
		$email = $settings[2];
	} else {
		# If user is Guest, then make sure the chosen name
		# is not reserved or used by a member.
		fopen(FILE, "$memberdir/memberlist.txt") || &amp;fatal_error("206 $txt{'106'}: $txt{'23'} $memberlist.txt");

		@memberlist = &lt;FILE&gt;;
		fclose(FILE);
		$testname = lc $name;
		for ($a = 0; $a &lt; @memberlist; $a++) {
			chomp $memberlist[$a];
			$membername = lc $memberlist[$a];
			if( fopen(FILE2, "$memberdir/$memberlist[$a].dat") ) {
				$tmpa = &lt;FILE2&gt;;
				$realname = &lt;FILE2&gt;;
				fclose(FILE2);
				chomp $realname;
				$realname = lc $realname;
				if ($realname eq $testname || $membername eq $testname) { &amp;fatal_error($txt{'473'}); }
			}
			elsif( $testname eq $membername ) { &amp;fatal_error($txt{'473'}); }
		}

		fopen(FILE, "$vardir/reserve.txt") || &amp;fatal_error("207 $txt{'106'}: $txt{'23'} reserve.txt");
		@reserve = &lt;FILE&gt;;
		fclose(FILE);
		fopen(FILE, "$vardir/reservecfg.txt") || &amp;fatal_error("208 $txt{'106'}: $txt{'23'} reservecfg.txt");
		@reservecfg = &lt;FILE&gt;;
		fclose(FILE);
		for( $a = 0; $a &lt; @reservecfg; $a++ ) { chomp $reservecfg[$a]; }
		$matchword = $reservecfg[0] eq 'checked';
		$matchcase = $reservecfg[1] eq 'checked';
		$matchuser = $reservecfg[2] eq 'checked';
		$matchname = $reservecfg[3] eq 'checked';
		$namecheck = $matchcase eq 'checked' ? $name : lc $name;

		foreach $reserved (@reserve) {
			chomp $reserved;
			$reservecheck = $matchcase ? $reserved : lc $reserved;
			if ($matchname) {
				if ($matchword) {
					if ($namecheck eq $reservecheck) { &amp;fatal_error("$txt{'244'} $reserved"); }
				}
				else {
					if ($namecheck =~ $reservecheck) { &amp;fatal_error("$txt{'244'} $reserved"); }
				}
			}
		}
		$name = $tempname; # put the name back (with any _'s) now that we've checked it
	}


	# If no thread specified, this is a new thread.
	# Find a valid random ID for it.
	if($threadid eq '') {
		$newthreadid = time;
		$i=0;
		if (-e "$datadir/$newthreadid.txt") {
			while (-e "$datadir/$newthreadid$i.txt") { ++$i; }
			$newthreadid="$newthreadid$i";
		}
	}
	else { $newthreadid = ''; }

	if($newthreadid) {
		# This is a new thread. Save it.
		fopen(FILE, "+&lt;$boardsdir/$currentboard.txt", 1) || &amp;fatal_error("210 $txt{'106'}: $txt{'23'} $currentboard.txt");
			seek FILE, 0, 0;
			my @buffer = &lt;FILE&gt;;
			truncate FILE, 0;
			seek FILE, 0, 0;
			print FILE qq~$newthreadid|$subject|$name|$email|$date|0|$username|$icon|0\n~;
			print FILE @buffer;
		fclose(FILE);
		fopen(FILE, "&gt;$datadir/$newthreadid.txt") || &amp;fatal_error("$txt{'23'} $newthreadid.txt");
		print FILE qq~$subject|$name|$email|$date|$username|$icon|0|$user_ip|$message|$ns|\n~;
		fclose(FILE);
		$mreplies = 0;
	} else {
		# This is an old thread. Save it.
		($mnum, $msub, $mname, $memail, $mdate, $mreplies, $musername, $micon, $mstate) = split(/\|/,$yyThreadLine);
		if( $mstate == 1 ) { &amp;fatal_error($txt{'90'}); }
		++$mreplies;
		fopen(FILE, "+&lt;$boardsdir/$currentboard.txt", 1) || &amp;fatal_error("211 $txt{'106'}: $txt{'23'} $currentboard.txt");
			seek FILE, 0, 0;
			my @buffer = &lt;FILE&gt;;
			truncate FILE, 0;
			for ($a = 0; $a &lt; @buffer; $a++) {
				if ( $buffer[$a] =~ m~\A$mnum\|~o ) { $buffer[$a] = ""; last; }
			}
			seek FILE, 0, 0;
			print FILE qq~$mnum|$msub|$mname|$memail|$date|$mreplies|$musername|$micon|$mstate\n~;
			print FILE @buffer;
		fclose(FILE);
		fopen(FILE, "&gt;&gt;$datadir/$threadid.txt") || &amp;fatal_error("212 $txt{'106'}: $txt{'23'} $threadid.txt");
		print FILE qq~$subject|$name|$email|$date|$username|$icon|0|$user_ip|$message|$ns|\n~;
		fclose(FILE);
	}

	if($username ne 'Guest') {
		# Increment post count for the member.
		$settings[6] =~ s/[\n\r]//g;
		++$settings[6];
		fopen(FILE, "&gt;$memberdir/$username.dat") || &amp;fatal_error("213 $txt{'106'}: $txt{'23'} $username.dat");
		foreach (@settings) {
			print FILE qq~$_\n~;
		}
		fclose(FILE);
	}

	# The thread ID, regardless of whether it's a new thread or not.
	$thread = $newthreadid || $threadid;

	# Update totals for this board.
	&amp;doaddition;

	# Mark thread as read for the member.
	&amp;dumplog($currentboard,$date);

	# Let's figure out what page number to show
	$start = 0;
	$pageindex = int($mreplies / $maxmessagedisplay);
	$start = $pageindex * $maxmessagedisplay;

	# Notify any members who have notification turned on for this thread.
	if(-e("$datadir/$thread.mail")) { &amp;NotifyUsers; }

	if($notify) {
		$INFO{'thread'} = $thread;
		$INFO{'start'} = $start;
		require "$sourcedir/Notify.pl";
		&amp;Notify2;
	}
	$yySetLocation = qq~$cgi;action=display;num=$thread;start=$start#$mreplies~;
	&amp;redirectexit;
}

sub NotifyUsers {
	$subject = $FORM{'subject'};

	fopen(FILE, "$datadir/$thread.mail") || return 0;
	@mails = &lt;FILE&gt;;
	fclose(FILE);
	foreach $curmail (@mails) {
		chomp $curmail;
		if ($curmail ne $settings[2]) {
			&amp;sendmail($curmail,"$txt{'127'}\:  $subject","$txt{'128'}, $subject, $txt{'129'} $cgi;action=display;num=$thread\n\n$txt{'130'}");
		}
	}
	return 1;
}

sub doshowthread {
	my( $line, $trash, $tempname, $tempdate, $temppost );

	&amp;LoadCensorList;	# Load Censor List

	if (@messages) {
		$yymain .= qq~
	&lt;BR&gt;&lt;BR&gt;
	&lt;table cellspacing=1 cellpadding=0 width="90%" align="center" bgcolor="$color{'bordercolor'}" class="bordercolor"&gt;
	&lt;tr&gt;&lt;td&gt;
	&lt;table class="windowbg" cellspacing="1" cellpadding="2" width="100%" align=center bgcolor="$color{'windowbg'}"&gt;
	&lt;tr&gt;&lt;td class="titlebg" bgcolor="$color{'titlebg'}" colspan="2"&gt;&lt;font size="2" class="text1" color="$color{'titletext'}"&gt;
	&lt;b&gt;$txt{'468'}&lt;/b&gt;
	&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;~;
		foreach $line (@messages) { #start for each

			($trash, $tempname, $trash, $tempdate, $trash, $trash, $trash, $trash, $message, $ns) = split(/\|/,$line);
			$tempdate = &amp;timeformat($tempdate);
			foreach (@censored) {
				($tmpa,$tmpb) = @{$_};
				$message =~ s~\Q$tmpa\E~$tmpb~gi;
			}
			my @words = split(/\s/,$message);
			&amp;wrap;
			$displayname = $tempname;
			if($enable_ubbc) { if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &amp;DoUBBC; }
			&amp;wrap2;
			$yymain .= qq~

&lt;tr&gt;&lt;td align=left class="catbg"&gt;
&lt;font size="1"&gt;$txt{'279'}: $tempname&lt;/font&gt;&lt;/td&gt;
&lt;td class="catbg" align=right&gt;
&lt;font size="1"&gt;$txt{'280'}: $tempdate&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td class="windowbg2" colspan=2 bgcolor="$color{'windowbg2'}"&gt;
&lt;font size="1"&gt;$message&lt;/font&gt;
&lt;/td&gt;&lt;/tr&gt;~;
		}
		$yymain .= "&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;\n";
	}
	else { $yymain .= "&lt;!--no summary--&gt;"; }
}

sub doaddition {
	fopen(FILE2, "$datadir/$thread.data");
	$tempinfo = &lt;FILE2&gt;;
	fclose(FILE2);

	($views, $lastposter) = split(/\|/,$tempinfo);

	my( $threadcount, $messagecount, $lastposttime, $lastposter ) = &amp;BoardCountGet($currentboard);
	++$messagecount;
	unless( $FORM{'threadid'} ) {
		++$threadcount;
	}
	$myname = $username eq 'Guest' ? qq~Guest-$name~ : $username;
	&amp;BoardCountSet( $currentboard, $threadcount, $messagecount, $date, $myname );

	fopen(FILE2, "+&gt;$datadir/$thread.data");
	print FILE2 "$views|$myname";
	fclose(FILE2);
}

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