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

$profileplver = "1 Gold - SP 1.3";

sub ModifyProfile {
	if ($INFO{'username'} =~ m~/~){ &amp;fatal_error($txt{'224'}); }
	if ($INFO{'username'} =~ m~\\~){ &amp;fatal_error($txt{'225'}); }
	if($username ne $INFO{'username'} &amp;&amp; $settings[7] ne 'Administrator') { &amp;fatal_error($txt{'80'}); }
	if(!-e ("$memberdir/$INFO{'username'}.dat")){ &amp;fatal_error("$txt{'453'} -- $INFO{'username'}"); }
	if($allowpics) {
		opendir(DIR, "$facesdir") || fatal_error("$txt{'230'} ($facesdir)! $txt{'681'}");
		closedir(DIR);
	}

	fopen(FILE, "$memberdir/$INFO{'username'}.dat");
	@memsettings=&lt;FILE&gt;;
	fclose(FILE);
	foreach (@memsettings) { $_ =~ s~[\n\r]~~g; }
	$dr = $memsettings[14] ? $memsettings[14] : $txt{'470'};
	if ($memsettings[11] eq 'Male') { $GenderMale = ' selected'; }
	if ($memsettings[11] eq 'Female') { $GenderFemale = ' selected'; }
	$signature = $memsettings[5];
	$signature =~ s/\&amp;\&amp;/\n/g;
	$signature =~ s/\&amp;lt;/&lt;/g;
	$signature =~ s/\&amp;gt;/&gt;/g;
	&amp;CalcAge("parse"); # Let's get the birthdate
	$memsettings[9] =~ tr/+/ /;
	$memsettings[10] =~ tr/+/ /;

	if ($memsettings[17] == 6) { $tsl6 = ' selected'; }
	elsif ($memsettings[17] == 5) { $tsl5 = ' selected'; }
	elsif($memsettings[17] == 4) { $tsl4 = ' selected'; }
	elsif ($memsettings[17] == 3) { $tsl3 = ' selected'; }
	elsif ($memsettings[17] == 2) { $tsl2 = ' selected'; }
	elsif ($memsettings[17] == 1) { $tsl1 = ' selected'; }
	elsif ($timeselected == 6) { $tsl6 = ' selected'; }
	elsif ($timeselected == 5) { $tsl5 = ' selected'; }
	elsif ($timeselected == 4) { $tsl4 = ' selected'; }
	elsif ($timeselected == 3) { $tsl3 = ' selected'; }
	elsif ($timeselected == 2) { $tsl2 = ' selected'; }
	else { $tsl1 = ' selected'; }

	$dayormonthm = qq~$txt{'564'}&lt;input type="text" name="bday1" size="2" maxlength="2" value="$umonth"&gt;~; $dayormonthd = qq~$txt{'565'}&lt;input type="text" name="bday2" size="2" maxlength="2" value="$uday"&gt;~;
	if ($tsl2 || $tsl3 || $tsl6) {$dayormonth=$dayormonthd.$dayormonthm;} else {$dayormonth=$dayormonthm.$dayormonthd;}

	$oldformat = $date;
	$oldmonth = substr($oldformat,0,2);
	$oldday = substr($oldformat,3,2);
	$oldyear = ("20".substr($oldformat,6,2)) - 1900;
	$oldhour = substr($oldformat,-8,2);
	$oldminute = substr($oldformat,-5,2);
	$oldsecond = substr($oldformat,-2,2);
	use Time::Local 'timelocal';
	eval { $oldtime = timelocal($oldsecond,$oldminute,$oldhour,$oldday,$oldmonth-1,$oldyear); };
	my ($psec,$pmin,$phour,$dummy,$dummy,$dummy,$dummy,$dummy,$dummy) = localtime($oldtime);
	if ($phour &lt; 10) { $phour = "0$phour" };
	if ($pmin &lt; 10) { $pmin = "0$pmin" };
	if ($psec &lt; 10) { $psec = "0$psec" };
	$proftime = $phour.":".$pmin.":".$psec;
	$ampm = $phour &gt; 11 ? 'pm' : 'am';
	$phour = $phour % 12 || 12;
	$proftime = qq~$phour:$pmin:$psec$ampm~;

	$yymain .= qq~
&lt;form action="$cgi;action=profile2" method="POST" name="creator"&gt;
&lt;table border=0 width=720 cellspacing=1 bgcolor="$color{'bordercolor'}" class="bordercolor" align="center"&gt;
  &lt;tr&gt;
    &lt;td class="titlebg" bgcolor="$color{'titlebg'}" height="30"&gt;
    &amp;nbsp;&lt;img src="$imagesdir/profile.gif" alt="" border="0"&gt;&amp;nbsp;
    &lt;font size=2 class="text1" color="$color{'titletext'}"&gt;&lt;b&gt;$txt{'79'}&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td class="windowbg" bgcolor="$color{'windowbg'}" height="25"&gt;&lt;BR&gt;&lt;font size="1"&gt;$txt{'698'}&lt;/font&gt;&lt;BR&gt;&lt;BR&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td class="catbg" bgcolor="$color{'catbg'}" height="25"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'517'}&lt;/b&gt;&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;table border=0 width="100%" cellpadding="3"&gt;
      &lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'35'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type="hidden" name="username" value="$INFO{'username'}"&gt;$INFO{'username'}&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'81'}: &lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'596'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;input type="password" maxlength="30" name="passwrd1" size="20" value="$memsettings[0]"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'82'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;input type="password" maxlength="30" name="passwrd2" size="20" value="$memsettings[0]"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'68'}: &lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'518'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;input type="text" maxlength="30" name="name" size="30" value="$memsettings[1]"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size="2"&gt;&lt;b&gt;$txt{'69'}: &lt;/b&gt;&lt;/font&gt;&lt;br&gt;
        &lt;font size="1"&gt;$txt{'679'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;input type="text" maxlength="40" name="email" size="30" value="$memsettings[2]"&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;br&gt;
    &lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td class="catbg" bgcolor="$color{'catbg'}" height="25"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'597'}&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td class="windowbg" bgcolor="$color{'windowbg'}"&gt;
    &lt;table border=0 width="100%" cellpadding="3"&gt;
      &lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'231'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;
	&lt;select name="gender" size="1"&gt;
	 &lt;option value=""&gt;&lt;/option&gt;
	 &lt;option value="Male"$GenderMale&gt;$txt{'238'}&lt;/option&gt;
	 &lt;option value="Female"$GenderFemale&gt;$txt{'239'}&lt;/option&gt;
	&lt;/select&gt;
	&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'563'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size="1"&gt;$dayormonth$txt{'566'}&lt;input type="text" name="bday3" size="4" maxlength="4" value="$uyear"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'227'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type="text" maxlength="30" name="location" size="50" value="$memsettings[15]"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td colspan=2&gt;
	&lt;BR&gt;&lt;hr width="100%" size="1" class="hr"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'83'}: &lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'598'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type=text maxlength="30" name=websitetitle size=50 value="$memsettings[3]"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'84'}: &lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'599'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type=text name=websiteurl size=50 value="$memsettings[4]"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td colspan=2&gt;
	&lt;BR&gt;&lt;hr width="100%" size="1" class="hr"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'513'}: &lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'600'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type=text maxlength="10" name=icq size=20 value="$memsettings[8]"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'603'}: &lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'601'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type=text maxlength="30" name=aim size=20 value="$memsettings[9]"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'604'}: &lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'602'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type=text maxlength="30" name=yim size=20 value="$memsettings[10]"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td colspan=2&gt;
	&lt;BR&gt;&lt;hr width="100%" size="1" class="hr"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'228'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type=text name=usertext size=50 value="$memsettings[12]" maxlength="50"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;
~;
	if($allowpics) {
		opendir(DIR, "$facesdir") || fatal_error("$txt{'230'} ($facesdir)!&lt;BR&gt;$txt{'681'}");
		@contents = readdir(DIR);
		closedir(DIR);
		$images = "";
		foreach $line (sort @contents){
			($name, $extension) = split (/\./, $line);
			$checked = "";
			if ($line eq $memsettings[13]) { $checked = ' selected'; }
			if ($memsettings[13] =~ m~\Ahttp://~ &amp;&amp; $line eq 'blank.gif') { $checked = ' selected'; }
			if ($extension =~ /gif/i || $extension =~ /jpg/i || $extension =~ /jpeg/i || $extension =~ /png/i ){
				if ($line eq 'blank.gif') { $name = $txt{'422'}; }
				$images .= qq~&lt;option value="$line"$checked&gt;$name\n~;
			}
		}
		if ($memsettings[13] =~ m~\Ahttp://~) {
			$pic = 'blank.gif';
			$checked = ' checked';
			$tmp = $memsettings[13];
		}
		else {
			$pic = $memsettings[13];
			$tmp = 'http://';
		}

		$yymain .= qq~
      &lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size="2"&gt;&lt;b&gt;$txt{'229'}:&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
	&lt;font size="1"&gt;$txt{'474'} $userpic_limits&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;
        &lt;script language="JavaScript1.2" type="text/javascript"&gt;
        function showimage()
        {
           if (!document.images) return;
           document.images.icons.src="$facesurl/"+document.creator.userpic.options[document.creator.userpic.selectedIndex].value;
        }
        &lt;/script&gt;
        &lt;select name="userpic" size=6 onChange="showimage()"&gt;$images&lt;/select&gt;
        &amp;nbsp;&amp;nbsp;&lt;img src="$facesurl/$pic" name="icons" border=0 hspace=15&gt;
	&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size="2"&gt;&lt;B&gt;$txt{'475'}&lt;/B&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;input type="checkbox" name="userpicpersonalcheck"$checked&gt;
	&lt;input type="text" name="userpicpersonal" size="45" value="$tmp"&gt;&lt;/td&gt;
      &lt;/tr&gt;
~;
	}
	$yymain .= qq~
    &lt;/table&gt;&lt;BR&gt;
    &lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td class="catbg" bgcolor="$color{'catbg'}" height="25"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'605'}&lt;/b&gt;&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;table border=0 cellpadding="3" width="100%" cellspacing="0"&gt;
~;
	if ($allow_hide_email) {
		$yymain .= qq~
    &lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'721'}&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;input type="checkbox" name="hideemail" value="checked" $memsettings[19]&gt;&lt;/td&gt;
    &lt;/tr&gt;
~;
	}
	$yymain .= qq~
      &lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'486'}:&lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'479'}&lt;/font&gt;&lt;/td&gt;
	&lt;td width="50"&gt;
	&lt;select name="usertimeselect" size=1&gt;
	 &lt;option value="1"$tsl1&gt;$txt{'480'}
	 &lt;option value="5"$tsl5&gt;$txt{'484'}
	 &lt;option value="4"$tsl4&gt;$txt{'483'}
	 &lt;option value="2"$tsl2&gt;$txt{'481'}
	 &lt;option value="3"$tsl3&gt;$txt{'482'}
	 &lt;option value="6"$tsl6&gt;$txt{'485'}
	&lt;/select&gt;
	&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'371'}:&lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'519'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size="1"&gt;
	&lt;input name="usertimeoffset" size="5" maxlength="5" value="$memsettings[18]"&gt;
	&lt;BR&gt;$txt{'741'}: &lt;i&gt;$proftime&lt;/i&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
		&lt;td colspan=2&gt;&lt;br&gt;&lt;hr width="100%" size="1" class="hr"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'85'}:&lt;/b&gt;&lt;/font&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'606'}&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;textarea name="signature" rows="4" cols="50" wrap="virtual"&gt;$signature&lt;/textarea&gt;&lt;BR&gt;
	&lt;font size="1"&gt;$txt{'664'} &lt;input value="$MaxSigLen" size="3" name="msgCL" disabled&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
	&lt;script language="JavaScript"&gt;
	&lt;!--
	var supportsKeys = false
	function tick() {
	  calcCharLeft(document.forms[0])
	  if (!supportsKeys) timerID = setTimeout("tick()",$MaxSigLen)
	}

	function calcCharLeft(sig) {
	  clipped = false
	  maxLength = $MaxSigLen
	  if (document.creator.signature.value.length &gt; maxLength) {
		document.creator.signature.value = document.creator.signature.value.substring(0,maxLength)
		charleft = 0
		clipped = true
	  } else {
		charleft = maxLength - document.creator.signature.value.length
	  }
	  document.creator.msgCL.value = charleft
	  return clipped
	}

	tick();
	//--&gt;
	&lt;/script&gt;
~;
	fopen(FILE, "$vardir/membergroups.txt");
	@lines = &lt;FILE&gt;;
	fclose(FILE);
	if($settings[7] eq 'Administrator') {
		$position='';
		foreach $curl (@lines) {
			if($curl ne $lines[1] &amp;&amp; $curl ne $lines[2] &amp;&amp; $curl ne $lines[3] &amp;&amp; $curl ne $lines[4] &amp;&amp; $curl ne $lines[5] &amp;&amp; $curl ne $lines[6]) {
				if($curl ne $lines[0]) { $position= qq~$position&lt;option&gt;$curl~; }
				else { $position= qq~$position&lt;option value="Administrator"&gt;$curl~; }
			}
		}
		if($memsettings[7] eq 'Administrator') { $tt = $lines[0]; }
		else { $tt = $memsettings[7]; }
		$yymain .= qq~
      &lt;tr&gt;
	&lt;td colspan=2&gt;&lt;hr width="100%" size="1" class="hr"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'86'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;input type=text name=settings6 size=4 value="$memsettings[6]"&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td width="320"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'87'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;select name="settings7"&gt;
	 &lt;option value="$memsettings[7]"&gt;$tt
	 &lt;option value="$memsettings[7]"&gt;---------------
	 &lt;option value=""&gt;
	 $position
	&lt;/select&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td width="320"&gt;&lt;font size="2"&gt;&lt;b&gt;$txt{'233'}:&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
        &lt;font size="1"&gt;$txt{'421'}&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="dr" size="20" value="$dr"&gt;&lt;br&gt;&lt;br&gt;&lt;/td&gt;
      &lt;/tr&gt;~;
	}
	if($settings[7] eq 'Administrator') { $confdel_text = "$txt{'775'} $txt{'777'} $INFO{'username'} $txt{'778'}"; }
	else { $confdel_text = "$txt{'775'} $txt{'776'} $txt{'778'}"; }
	$yymain .= qq~
    &lt;/table&gt;
    &lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td class="catbg" bgcolor="$color{'catbg'}" height="25" align="center"&gt;&lt;font size=2&gt;&lt;BR&gt;
    &lt;input type=submit name=moda value="$txt{'88'}"&gt;
    &lt;input type=submit name=moda value="$txt{'89'}" onClick="return confirm('$confdel_text')"&gt;&lt;BR&gt;&lt;BR&gt;
    &lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
~;
	$yytitle = $txt{'79'};
	&amp;template;
	exit;
}

sub ModifyProfile2 {
	my( %member, $key, $value, $newpassemail, @memberlist, $a, @check_settings, @reserve, $matchword, $matchcase, $matchuser, $matchname, $namecheck, $reserved, $reservecheck, @dirdata, $filename, @entries, $entry, $umail, @members, $tempname );
	$FORM{'signature'} =~ s~\n~\&amp;\&amp;~g;
	while( ($key,$value) = each(%FORM) ) {
		$value =~ s~\A\s+~~;
		$value =~ s~\s+\Z~~;
		$value =~ s~[\n\r]~~g;
		$member{$key} = $value;
	}

	# make sure this person has access to this profile
	if($username ne $member{'username'} &amp;&amp; $settings[7] ne 'Administrator') { &amp;fatal_error($txt{'80'}); }
	if( $settings[7] ne 'Administrator' ) {
		$member{'username'} = $username;
		$member{'settings6'} = $settings[6];
		$member{'settings7'} = $settings[7];
	}
	if($member{'settings6'} !~ /\A[0-9]+\Z/) { &amp;fatal_error("$txt{'749'}"); }
	if ($member{'username'} =~ /\//){ &amp;fatal_error($txt{'224'}); }
	if ($member{'username'} =~ /\\/){ &amp;fatal_error($txt{'225'}); }
	$INFO{'username'} = $member{'username'};
	if(length($member{'usertext'}) &gt; 51) { &amp;fatal_error("$txt{'757'}"); }
	if( $member{'userpicpersonalcheck'} &amp;&amp; ( $member{'userpicpersonal'} =~ m/\.gif\Z/i || $member{'userpicpersonal'} =~ m/\.jpg\Z/i || $member{'userpicpersonal'} =~ m/\.jpeg\Z/i || $member{'userpicpersonal'} =~ m/\.png\Z/i ) ) {
		$member{'userpic'} = $member{'userpicpersonal'};
	}
	if($member{'userpic'} eq "") { $member{'userpic'} = "blank.gif"; }
	&amp;fatal_error("$txt{'592'}") if($member{'userpic'} !~ m^\A[0-9a-zA-Z_\.\#\%\-\:\+\?\$\&amp;\~\.\,\@/]+\Z^);
	if(!$allowpics) { $member{'userpic'} = "blank.gif"; }
	if( $emailnewpass &amp;&amp; lc $member{'email'} ne lc $settings[2] &amp;&amp; $settings[7] ne 'Administrator') {
		srand();
		$member{'passwrd1'} = int( rand(100) );
		$member{'passwrd1'} =~ tr/0123456789/ymifxupbck/;
		$_ = int( rand(77) );
		$_ =~ tr/0123456789/q8dv7w4jm3/;
		$member{'passwrd1'} .= $_;
		$_ = int( rand(89) );
		$_ =~ tr/0123456789/y6uivpkcxw/;
		$member{'passwrd1'} .= $_;
		$_ = int( rand(188) );
		$_ =~ tr/0123456789/poiuytrewq/;
		$member{'passwrd1'} .= $_;
		$_ = int( rand(65) );
		$_ =~ tr/0123456789/lkjhgfdaut/;
		$member{'passwrd1'} .= $_;
		$newpassemail = 1;
	} else {
		&amp;fatal_error("($member{'username'}) $txt{'213'}") if($member{'passwrd1'} ne $member{'passwrd2'});
		&amp;fatal_error("($member{'username'}) $txt{'91'}") if($member{'passwrd1'} eq '');
		&amp;fatal_error("$txt{'240'} $txt{'36'} $txt{'241'}") if($member{'passwrd1'} !~ /\A[\s0-9A-Za-z!@#$%\^&amp;*\(\)_\+|`~\-=\\:;'",\.\/?\[\]\{\}]+\Z/);
	}
	&amp;fatal_error("$txt{'75'}") if($member{'name'} eq '');
	&amp;fatal_error("$txt{'240'} $txt{'68'} $txt{'241'}") if($member{'name'} !~ /^[\s0-9A-Za-zöäüÖÄÜßñ\[\]#%+,-|\.:=?@^_]+$/);
	&amp;fatal_error("$txt{'75'}") if($member{'name'} eq '|');
	&amp;fatal_error("$txt{'568'}") if(length($member{'name'}) &gt; 30);
	&amp;fatal_error("$txt{'76'}") if($member{'email'} eq '');
	&amp;fatal_error("$txt{'240'} $txt{'69'} $txt{'241'}") if($member{'email'} !~ /[\w\-\.\+]+\@[\w\-\.\+]+\.(\w{2,4}$)/);
	&amp;fatal_error("$txt{'500'}") if(($member{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/) || ($member{'email'} !~ /^.+@\[?(\w|[-.])+\.[a-zA-Z]{2,4}|[0-9]{1,4}\]?$/));
	if( $member{'bday1'} ne "" || $member{'bday2'} ne "" || $member{'bday3'} ne "" ) {
		&amp;fatal_error("$txt{'567'}") if( $member{'bday1'} !~ /^[0-9]+$/ || $member{'bday2'} !~ /^[0-9]+$/ || $member{'bday3'} !~ /^[0-9]+$/ || length($member{'bday3'}) &lt; 4 );
		&amp;fatal_error("$txt{'567'}") if( $member{'bday1'} &lt; 1 || $member{'bday1'} &gt; 12 || $member{'bday2'} &lt; 1 || $member{'bday2'} &gt; 31 || $member{'bday3'} &lt; 1901 || $member{'bday3'} &gt; $year-5 );
	}
	&amp;fatal_error("$txt{'680'}") if ($member{'username'} eq "admin" &amp;&amp; $member{'settings7'} ne "Administrator");

	if($member{'moda'} eq $txt{'88'}) {
		if (length($member{'signature'}) &gt; $MaxSigLen) { $member{'signature'} = substr($member{'signature'},0,$MaxSigLen); }
	        $member{'icq'} =~ s/[^0-9]//g;
		$member{'bday1'} =~ s/[^0-9]//g;
	        $member{'bday2'} =~ s/[^0-9]//g;
		$member{'bday3'} =~ s/[^0-9]//g;
		if($member{'bday1'}) { $member{'bday'} = "$member{'bday1'}/$member{'bday2'}/$member{'bday3'}"; }
		else { $member{'bday'} = ''; }
		$member{'signature'} =~ s/&lt;/&amp;lt;/g;
	        $member{'signature'} =~ s/&lt;/&amp;gt;/g;
	        $member{'aim'} =~ s/ /\+/g;
	        $member{'yim'} =~ s/ /\+/g;
		if($settings[7] ne "Administrator") { $member{'dr'} = $settings[14]; }
		# store the name temorarily so we can restore any _'s later
		$tempname = $member{'name'};
		$member{'name'} =~ s/\_/ /g;

		&amp;ToHTML($member{'location'});
		&amp;ToHTML($member{'aim'});
		&amp;ToHTML($member{'yim'});
		&amp;ToHTML($member{'gender'});
		&amp;ToHTML($member{'usertext'});
		&amp;ToHTML($member{'websiteurl'});
		&amp;ToHTML($member{'websitetitle'});
		&amp;ToHTML($member{'email'});
		&amp;ToHTML($FORM{'hideemail'});
		&amp;ToHTML($member{'name'});

		&amp;FromHTML($member{'usertext'});
		$member{'usertext'} =~ s~(\S{15})(?=\S)~$1 ~g;
		&amp;ToHTML($member{'usertext'});

		if ( length $member{'signature'} &gt; 1000 ) { $member{'signature'} = substr( $member{'signature'}, 0, 1000 ); }
		$member{'usertimeoffset'} =~ tr/,/./;
		$member{'usertimeoffset'} =~ s/[^\d*|\.|\-|w*]//g;
		if (( $member{'usertimeoffset'} &lt; -23.5) || ( $member{'usertimeoffset'} &gt; 23.5)) { &amp;fatal_error($txt{'487'}); }

		fopen(FILE, "$memberdir/memberlist.txt");
		@memberlist = &lt;FILE&gt;;
		fclose(FILE);
		$testname = lc $member{'name'};
		for ($a = 0; $a &lt; @memberlist; $a++) {
			chomp $memberlist[$a];
			$membername = lc $memberlist[$a];
			if( fopen(FILE2, "$memberdir/$memberlist[$a].dat") ) {
				# Load users and check email (removed !$yyUDLoaded{$memberlist[$a]} &amp;&amp; )
				if( -e("$memberdir/$memberlist[$a].dat") &amp;&amp; lc $memberlist[$a] ne lc $member{'username'}) {
					# If user is not in memory, s/he must be loaded.
					&amp;LoadUser($memberlist[$a]);
					if(lc $userprofile{$memberlist[$a]}-&gt;[2] eq lc $member{'email'}) { &amp;fatal_error("$txt{'730'} ($member{'email'}) $txt{'731'}"); }
				}
				$tmpa = &lt;FILE2&gt;;
				$realnametemp = &lt;FILE2&gt;;
				fclose(FILE2);
				chomp $realnametemp;
				$realnametemp = lc $realnametemp;
				if ($realnametemp eq $testname &amp;&amp; lc $memberlist[$a] ne lc $member{'username'} &amp;&amp; $settings[7] ne 'Administrator') { &amp;fatal_error("($member{'name'}) $txt{'473'}"); }
			}
		}

		fopen(FILE, "$vardir/reserve.txt") || &amp;fatal_error("$txt{'23'} reserve.txt");
		@reserve = &lt;FILE&gt;;
		fclose(FILE);
		fopen(FILE, "$vardir/reservecfg.txt") || &amp;fatal_error("$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' ? $member{'name'} : lc $member{'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"); }
				}
			}
		}

		# let's restore the name now
		&amp;ToHTML($tempname);
		$member{'name'} = $tempname;

		fopen(MEMBERFILEREAD,"$memberdir/$member{'username'}.dat");
		my @memset = &lt;MEMBERFILEREAD&gt;;
		fclose(MEMBERFILEREAD);
		chomp @memset;
		require "$sourcedir/Notify.pl";
		replace_notifications($memset[2],$member{'email'});

		fopen( FILE, "&gt;$memberdir/$member{'username'}.dat", 1);
		print FILE "$member{'passwrd1'}\n";
		print FILE "$member{'name'}\n";
		print FILE "$member{'email'}\n";
		print FILE "$member{'websitetitle'}\n";
		print FILE "$member{'websiteurl'}\n";
		print FILE "$member{'signature'}\n";
		print FILE "$member{'settings6'}\n";
		print FILE "$member{'settings7'}\n";
		print FILE "$member{'icq'}\n";
		print FILE "$member{'aim'}\n";
		print FILE "$member{'yim'}\n";
		print FILE "$member{'gender'}\n";
		print FILE "$member{'usertext'}\n";
		print FILE "$member{'userpic'}\n";
		print FILE "$member{'dr'}\n";
		print FILE "$member{'location'}\n";
		print FILE "$member{'bday'}\n";
		print FILE "$member{'usertimeselect'}\n";
		print FILE "$member{'usertimeoffset'}\n";
		if ($FORM{'hideemail'} ne "checked") { $FORM{'hideemail'} = ""; }
		print FILE "$FORM{'hideemail'}\n";
		fclose(FILE);

	if($newpassemail) {

	# Write log
	fopen(LOG, "$vardir/log.txt");
	@entries = &lt;LOG&gt;;
	fclose(LOG);
	fopen(LOG, "&gt;$vardir/log.txt", 1);
	$field="$username";
	foreach $curentry (@entries) {
	        $curentry =~ s/\n//g;
     		($name, $value) = split(/\|/, $curentry);
	        if($name ne "$field") {
	                print LOG "$curentry\n";
	        }
	}
	fclose(LOG);

	$yySetCookies1 = cookie(-name    =&gt;   "$cookieusername",
				-value   =&gt;   "",
				-path    =&gt;   "/",
				-expires =&gt;   "Thursday, 01-Jan-1970 00:00:00 GMT");
	$yySetCookies2 = cookie(-name    =&gt;   "$cookiepassword",
				-value   =&gt;   "",
				-path    =&gt;   "/",
				-expires =&gt;   "Thursday, 01-Jan-1970 00:00:00 GMT");
	$username = 'Guest';
	$password = '';
	@settings = ();
	$realname = '';
	$realemail = '';
	$ENV{'HTTP_COOKIE'} = '';
	&amp;FormatUserName($member{'username'});
	&amp;sendmail($member{'email'},qq~$txt{'700'} $mbname~, "$txt{'733'} $member{'passwrd1'} $txt{'734'} $member{'username'}.\n\n$txt{'701'} $scripturl?action=profile;username=$useraccount{$member{'username'}}\n\n$txt{'130'}");
	$yymain .= qq~&lt;br&gt;&lt;table border="0" width="100%" cellspacing="1" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center"&gt;~;

	require "$sourcedir/LogInOut.pl";
	$sharedLogin_title="$txt{'34'}";
	$sharedLogin_text="$txt{'638'}";
	&amp;sharedLogin;

	$yymain .= qq~&lt;/table&gt;~;
	$yytitle="$txt{'245'}";
	&amp;template;
	exit;
	}
	else {
		if ($member{'username'} eq $username) {
			$password = crypt("$member{'passwrd1'}",$pwseed);
			$yySetCookies1 = cookie(-name    =&gt;   "$cookieusername",
						-value   =&gt;   "$username",
						-path    =&gt;   "/",
						-expires =&gt;   "Sunday, 17-Jan-2038 00:00:00 GMT");
			$yySetCookies2 = cookie(-name    =&gt;   "$cookiepassword",
						-value   =&gt;   "$password",
						-path    =&gt;   "/",
						-expires =&gt;   "Sunday, 17-Jan-2038 00:00:00 GMT");
			&amp;LoadUserSettings;
			&amp;WriteLog;
		}
		&amp;ViewProfile;
	}
	} else {
	if($member{'username'} ne "admin") {
		require "$sourcedir/Notify.pl";
		remove_notifications($member{'email'});

	# For security, remove username from mod position
	fopen(FILE, "$vardir/cat.txt"); @categories = &lt;FILE&gt;; fclose(FILE);

	foreach $curcat (@categories) {
		$curcat =~ s/[\n\r]//g;
		fopen(CAT, "$boardsdir/$curcat.cat"); @catinfo = &lt;CAT&gt;; fclose(CAT);

		foreach $curboard (@catinfo) {
				$curboard =~ s/[\n\r]//g; chomp $curboard;

				fopen(BOARD, "$boardsdir/$curboard.dat"); @boardinfo = &lt;BOARD&gt;; fclose(BOARD);

				$boardinfo[2] =~ s/[\n\r]//g; $boardinfo[2] =~ /^\|(.*?)\|$/;
				$mods = $1 or $mods = $boardinfo[2];
                                $mods =~ s/(\s*)//g;              # remove all whitespaces
				$mods =~ s/(^(\|)+)?((\|)+$)?//;  # remove unnecessary front and back separator
				$mods =~ s/(\|)+/\|/g;            # replace multiple separators with one separator

				my @mod_ary = split(/\|/, $mods);
				my @new_mod_ary;
				my $mods_changed = 0;
				foreach my $mod( @mod_ary) {
					if( $settings[7] eq 'Administrator') {
						if( $member{'username'} ne $mod) {
							push( @new_mod_ary, $mod);
						} else {
							$mods_changed = 1;
						}
					} elsif( $member{'username'} eq $username) {
						if( $username ne $mod) {
							push( @new_mod_ary, $mod);
						} else {
							$mods_changed = 1;
						}
					}
				}				
				$mods = join( "|", @new_mod_ary);

				if ($mods_changed == 1)
				{
					$boardinfo[2] = $mods;
					fopen(BOARD, "&gt;$boardsdir/$curboard.dat", 1);
					print BOARD @boardinfo;
					fclose(BOARD);
				}
		}
	}
		if($settings[7] eq 'Administrator') {
			unlink("$memberdir/$member{'username'}.dat");
			unlink("$memberdir/$member{'username'}.msg");
			unlink("$memberdir/$member{'username'}.log");
	                unlink("$memberdir/$member{'username'}.outbox");
	                unlink("$memberdir/$member{'username'}.imconfig");
		}
		elsif( $member{'username'} eq $username ) {
			unlink("$memberdir/$username.dat");
			unlink("$memberdir/$username.msg");
			unlink("$memberdir/$username.log");
	                unlink("$memberdir/$username.outbox");
	                unlink("$memberdir/$username.imconfig");
		}

		opendir (DIRECTORY,"$datadir");
		@dirdata = readdir(DIRECTORY);
		closedir (DIRECTORY);

		if($settings[7] eq 'Administrator') {
			$umail=$member{'email'};
		} else {
			$umail=$settings[2];
		}
		foreach $filename (@dirdata) {
			unless( $filename =~ m~mail\A~ ) { next; }
			fopen(FILE, "$datadir/$filename");
			@entries = &lt;FILE&gt;;
			fclose(FILE);

			fopen(FILE, "&gt;$datadir/$filename");
			foreach $entry (@entries) {
				$entry =~ s/[\n\r]//g;
				if ($entry ne $umail) {
					print FILE "$entry\n";
				}
			}
			fclose(FILE);

		}

		fopen(FILE, "$memberdir/memberlist.txt");
		@members = &lt;FILE&gt;;
		fclose(FILE);
		fopen(FILE, "&gt;$memberdir/memberlist.txt", 1);
		my $memberfound = 0;
		my $lastvalidmember = '';
		foreach $curmem (@members) {
			chomp $curmem;
			if($curmem ne $member{'username'}) { print FILE "$curmem\n"; $lastvalidmember = $curmem; }
			else { ++$memberfound; }
		}
		fclose(FILE);
		my $membershiptotal = @members - $memberfound;
		fopen(FILE, "+&gt;$memberdir/members.ttl");
		print FILE qq~$membershiptotal|$lastvalidmember~;
		fclose(FILE);
		if($settings[7] ne 'Administrator') {
			require "$sourcedir/LogInOut.pl"; &amp;Logout;
		}
		$yySetLocation = qq~$scripturl~;
		&amp;redirectexit;
	}
	else { &amp;fatal_error("$txt{'751'}"); }
	}
	exit;
}

sub ViewProfile {
	if($username eq "Guest") { &amp;fatal_error("$txt{'223'}"); }
	if ($INFO{'username'} =~ /\//){ &amp;fatal_error("$txt{'224'}" ); }
	if ($INFO{'username'} =~ /\\/){ &amp;fatal_error("$txt{'225'}" ); }
	if(!-e ("$memberdir/$INFO{'username'}.dat")){ &amp;fatal_error("$txt{'453'} -- $INFO{'username'}"); }

	my($memberinfo, $modify, $email, $gender, $pic);

	# get the member's info
	fopen(FILE, "$memberdir/$INFO{'username'}.dat");
	@memsettings=&lt;FILE&gt;;
	fclose(FILE);
	chomp @memsettings;
	$icq = $memsettings[8];
	if($memsettings[4] !~ m~\Ahttp://~) { $memsettings[4] = "http://$memsettings[4]"; }
	$memsettingsd[9] = $memsettings[9]; $memsettingsd[9] =~ tr/+/ /;
	$memsettingsd[10] = $memsettings[10]; $memsettingsd[10] =~ tr/+/ /;
	$dr = "";
	if ($memsettings[14] eq "") { $dr = "$txt{'470'}"; }
	else { $dr = "$memsettings[14]"; $dr = &amp;timeformat($dr); }
	&amp;CalcAge("calc"); # How old is he/she?
	&amp;CalcAge("isbday"); # is it the bday?
	if($isbday) { $isbday = "&lt;img src=\"$imagesdir/bdaycake.gif\" width=40&gt;"; }

	fopen(FILE, "$vardir/membergroups.txt");
	@membergroups = &lt;FILE&gt;;
	fclose(FILE);
	if($memsettings[6] &gt; $GodPostNum) { $memberinfo = "$membergroups[6]"; }
	elsif($memsettings[6] &gt; $SrPostNum) { $memberinfo = "$membergroups[5]"; }
	elsif($memsettings[6] &gt; $FullPostNum) { $memberinfo = "$membergroups[4]"; }
	elsif($memsettings[6] &gt; $JrPostNum) { $memberinfo = "$membergroups[3]"; }
	else { $memberinfo = "$membergroups[2]"; }
	if($memsettings[7] ne "") { $memberinfo = "$memsettings[7]"; }
	if($memsettings[7] eq "Administrator") { $memberinfo = "$membergroups[0]"; }

	&amp;FormatUserName($INFO{'username'});
	if ($username eq $INFO{'username'} || $settings[7] eq "Administrator") {
		$modify = qq~&amp;#171; &lt;a href="$cgi;action=profile;username=$useraccount{$INFO{'username'}}"&gt;&lt;font size=2 class="text1" color="$color{'titletext'}"&gt;$txt{'17'}&lt;/font&gt;&lt;/a&gt; &amp;#187;~;
	}
	if ($memsettings[19] ne "checked" || $settings[7] eq "Administrator" || !$allow_hide_email) {
		$email = qq~&lt;a href="mailto:$memsettings[2]"&gt;$memsettings[2]&lt;/a&gt;~;
	}
	else { $email = qq~&lt;i&gt;$txt{'722'}&lt;/i&gt;~; }
	$gender = "";
	if ($memsettings[11] eq "Male") { $gender = qq~$txt{'238'}~; }
	if ($memsettings[11] eq "Female") { $gender = qq~$txt{'239'}~; }
	if($allowpics) {
	if ($memsettings[13] =~ /^\http:\/\// ) {
		if ($userpic_width ne 0) { $tmp_width = "width=$userpic_width"; } else { $tmp_width=""; }
		if ($userpic_height ne 0) { $tmp_height = "height=$userpic_height"; } else { $tmp_height=""; }
		$pic = qq~&lt;a href="$memsettings[13]" target="_blank" onClick="window.open('$memsettings[13]', 'ppic$INFO{username}', 'resizable,width=200,height=200'); return false;"&gt;~;
                $pic .= qq~&lt;img src="$memsettings[13]" $tmp_width $tmp_height border="0" alt=""&gt;&lt;/a&gt;~;
	}
	else {
		$pic = qq~&lt;a href="$facesurl/$memsettings[13]" target="_blank" onClick="window.open('$facesurl/$memsettings[13]', 'ppic$INFO{username}', 'resizable,width=200,height=200'); return false;"&gt;~;
                $pic .= qq~&lt;img src="$facesurl/$memsettings[13]" border="0" alt=""&gt;&lt;/a&gt;~;
	}
	}

	$online = "$txt{'113'} ?";
	fopen(FILE, "$vardir/log.txt");
	@entries = &lt;FILE&gt;;
	fclose(FILE);
	foreach $curentry (@entries) {
		chomp $curentry;
		($name, $value) = split(/\|/, $curentry);
		if($name) {
			&amp;LoadUser($name);
			if(lc $name eq lc $INFO{'username'}) {
				$online =~ s~\?~&lt;i&gt;$txt{'686'}&lt;/i&gt;.~;
			}
		}
	}
	$online =~ s~\?~&lt;i&gt;$txt{'687'}&lt;/i&gt;.~;
	if($memsettings[6] &gt; 100000) { $memsettings[6] = "$txt{'683'}"; }

	$yymain .= qq~
&lt;table border="0" cellpadding="4" cellspacing="1" bgcolor="$color{'bordercolor'}" class="bordercolor" align="center" width="75%"&gt;
  &lt;tr&gt;
    &lt;td class="titlebg" colspan="2" bgcolor="$color{'titlebg'}"&gt;
    &lt;table border="0" cellspacing="0" cellpadding="0" width="100%"&gt;
      &lt;tr height="30"&gt;
	&lt;td width="50%"&gt;
        &lt;img src="$imagesdir/profile.gif" alt="" border="0"&gt;&amp;nbsp;
        &lt;font size=2 class="text1" color="$color{'titletext'}"&gt;&lt;B&gt;$txt{'35'}: $INFO{'username'}&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td align="center" width="20%"&gt;
        &lt;font size=2 class="text1" color="$color{'titletext'}"&gt;$modify&lt;/font&gt;&lt;/td&gt;
	&lt;td align="center" width="30%"&gt;
        &lt;font size=2 class="text1" color="$color{'titletext'}"&gt;$txt{'232'}&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{'windowbg'}" class="windowbg" width="70%"&gt;
    &lt;table border=0 cellspacing="0" cellpadding="2" width="100%"&gt;
      &lt;tr&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'68'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;$memsettings[1]&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'86'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;$memsettings[6]&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'87'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;$memberinfo&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'233'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;$dr&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td colspan="2"&gt;&lt;hr size="1" width="100%" class="hr"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'513'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;~;
        if( $memsettings[8] ne "" &amp;&amp; $memsettings[8] !~ m~\D~ ) {$yymain .= qq~ &lt;img src="http://web.icq.com/whitepages/online?icq=$memsettings[8]&amp;img=5" alt="$memsettings[8]" border="0"&gt; &lt;a href="$cgi;action=icqpager;UIN=$icq" target=_blank&gt;$memsettings[8]&lt;/a&gt;~;}
	$yymain .= qq~
        &lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'603'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;a href="aim:goim?screenname=$memsettings[9]&amp;message=Hi,+are+you+there?"&gt;$memsettingsd[9]&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'604'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;~;
        if( $memsettings[10] ne "") {$yymain .= qq~ &lt;img src="http://opi.yahoo.com/online?u=$memsettings[10]&amp;m=g&amp;t=0" NOSAVE BORDER=0 alt="$memsettings[10]"&gt; &lt;a href="http://edit.yahoo.com/config/send_webmesg?.target=$memsettings[10]"&gt;$memsettingsd[10]&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;~;}
        else {$yymain .= qq~ &lt;/font&gt;&lt;/td&gt;~;}
	$yymain .= qq~
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'69'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;$email&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'96'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;a href="$memsettings[4]" target=_blank&gt;$memsettings[3]&lt;/a&gt;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td colspan="2"&gt;&lt;hr size="1" width="100%" class="hr"&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
	&lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'231'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
	&lt;td&gt;&lt;font size=2&gt;$gender&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'420'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;$age&lt;/font&gt; &amp;nbsp; $isbday&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
        &lt;td&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'227'}: &lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
        &lt;td&gt;&lt;font size=2&gt;$memsettings[15]&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
    &lt;td bgcolor="$color{'windowbg'}" class="windowbg" valign="middle" align="center" width="30%"&gt;
    $pic&lt;BR&gt;&lt;BR&gt;
    &lt;font size=1&gt;$memsettings[12]&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr height="25"&gt;
    &lt;td class="titlebg" bgcolor="$color{'titlebg'}" colspan="2"&gt;
    &amp;nbsp;&lt;font size=2 class="text1" color="$color{'titletext'}"&gt;&lt;b&gt;$txt{'459'}:&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td colspan="2" bgcolor="$color{'windowbg2'}" class="windowbg2" valign="middle" width="100%"&gt;
    &lt;form action="$cgi;action=usersrecentposts;username=$useraccount{$INFO{'username'}}" method="POST"&gt;
    &lt;font size=2&gt;
    $online&lt;BR&gt;&lt;BR&gt;
    &lt;a href="$cgi;action=imsend;to=$useraccount{$INFO{'username'}}"&gt;$txt{'688'}&lt;/a&gt;.&lt;BR&gt;&lt;BR&gt;
    $txt{'460'} &lt;select name="viewscount" size="1"&gt;
     &lt;option value="5"&gt;5&lt;/option&gt;
     &lt;option value="10" selected&gt;10&lt;/option&gt;
     &lt;option value="50"&gt;50&lt;/option&gt;
     &lt;option value="0"&gt;$txt{'190'}&lt;/option&gt;
    &lt;/select&gt; $txt{'461'}. &lt;input type="submit" value="$txt{'462'}"&gt;
    &lt;/font&gt;&lt;/form&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
~;
	$yytitle = "$txt{'92'} $INFO{'username'}";
	&amp;template;
	exit;
}

sub usersrecentposts {
	my $curuser = $INFO{'username'};
	&amp;FormatUserName($curuser);
	if ($curuser =~ m~/~){ &amp;fatal_error($txt{'224'}); }
	if ($curuser =~ m~\\~){ &amp;fatal_error($txt{'225'}); }
	my $display = $FORM{'viewscount'};
	if( $display =~ /\D/ ) { &amp;fatal_error($txt{'337'}); }
	$display ||= 999999999;
	my( @memset, @categories, %data, %cat, $numfound, $oldestfound, $curcat, %catname, %cataccess, %catboards, $openmemgr, @membergroups, $tmpa, %openmemgr, $curboard, @threads, @boardinfo, $i, $c, @messages, $tnum, $tsub, $tname, $temail, $tdate, $treplies, $tusername, $ticon, $tstate, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $mns, $mtime, $counter, $board, $notify );

	fopen(FILE, "$memberdir/$curuser.dat") || &amp;fatal_error("$txt{'23'} $curuser.txt");
	@memset = &lt;FILE&gt;;
	fclose(FILE);

	@categories = ();
	fopen(FILE, "$vardir/cat.txt");
	@categories = &lt;FILE&gt;;
	fclose(FILE);

	&amp;LoadCensorList;	# Load Censor List

	$oldestfound = stringtotime("01/10/37 $txt{'107'} 00:00:00");

	foreach $curcat (@categories) {
		chomp $curcat;
		fopen(FILE, "$boardsdir/$curcat.cat");
		$catname{$curcat} = &lt;FILE&gt;;
		chomp $catname{$curcat};
		$cataccess{$curcat} = &lt;FILE&gt;;
		chomp $cataccess{$curcat};
		@{$catboards{$curcat}} = &lt;FILE&gt;;
		fclose(FILE);
		$openmemgr{$curcat} = 0;
		@membergroups = split( /,/, $cataccess{$curcat} );
		foreach $tmpa (@membergroups) {
			if( $tmpa eq $settings[7]) { $openmemgr{$curcat} = 1; last; }
		}
		if( ! $cataccess{$curcat} || $settings[7] eq 'Administrator' ) {
			$openmemgr{$curcat} = 1;
		}
		unless( $openmemgr{$curcat} ) { next; }
		boardcheck: foreach $curboard (@{$catboards{$curcat}}) {
			chomp $curboard;
			fopen(FILE, "$boardsdir/$curboard.txt");
			@threads = &lt;FILE&gt;;
			fclose(FILE);

			fopen(FILE, "$boardsdir/$curboard.dat");
			@boardinfo = &lt;FILE&gt;;
			fclose(FILE);
			foreach (@boardinfo) {
				chomp;
			}
			@{$boardinfo{$curboard}} = @boardinfo;
			$cat{$curboard} = $curcat;

			threadcheck: for ($i = 0; $i &lt; @threads; $i++) {
				chomp $threads[$i];
				($tnum, $tsub, $tname, $temail, $tdate, $treplies, $tusername, $ticon, $tstate) = split( /\|/, $threads[$i] );
				fopen(FILE, "$datadir/$tnum.txt") || next;
				@messages = &lt;FILE&gt;;
				fclose(FILE);

				for ($c = 0; $c &lt; @messages; $c++) {
					chomp $messages[$c];
					($msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = split(/\|/,$messages[$c]);
					if ($curuser eq $musername) {
						$mtime = stringtotime($mdate);
						if( $numfound &gt;= $display &amp;&amp; $mtime &lt;= $oldestfound ) {
							next boardcheck;
						}
						else {
							$data{$mtime} = [$curboard, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns];
							if( $mtime &lt; $oldestfound ) { $oldestfound = $mtime; }
							++$numfound;
						}
					}
				}
			}
		}
	}

	$yymain .= qq~
&lt;p align=left&gt;&lt;a href="$cgi;action=viewprofile;username=$useraccount{$curuser}"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'92'} $memset[1]&lt;/b&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
~;
	@messages = sort {$b &lt;=&gt; $a } keys %data;
	if( @messages &gt; $display ) { $#messages = $display - 1; }
	$counter = 1;
	for( $i = 0; $i &lt; @messages; $i++ ) {
		($board, $tnum, $c, $msub, $mname, $memail, $mdate, $musername, $micon, $mattach, $mip, $message, $mns) = @{ $data{$messages[$i]} };
		foreach (@censored) {
			($tmpa,$tmpb) = @{$_};
			$message =~ s~\Q$tmpa\E~$tmpb~gi;
			$msub =~ s~\Q$tmpa\E~$tmpb~gi;
		}
		&amp;wrap;
		$displayname = $mname;
		if($enable_ubbc) { $ns = $mns; if(!$yyYaBBCloaded) { require "$sourcedir/YaBBC.pl"; } &amp;DoUBBC; }
		&amp;wrap2;
		if($enable_notification) { $notify = qq~$menusep&lt;a href="$scripturl?board=$board;action=notify;thread=$tnum;start=$c"&gt;$img{'notify'}&lt;/a&gt;~; }
		$mdate = timeformat($mdate);
		$yymain .= qq~
&lt;table border="0" width="100%" cellspacing="1" $color{'bordercolor'}&gt;
  &lt;tr&gt;
    &lt;td align="left" bgcolor="$color{'titlebg'}" class="titlebg"&gt;&lt;font class="text1" color="$color{'titletext'}" size="2"&gt;&amp;nbsp;$counter&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
    &lt;td width="75%" bgcolor="$color{'titlebg'}" class="titlebg"&gt;&lt;font class="text1" color="$color{'titletext'}" size="2"&gt;&lt;b&gt;&amp;nbsp;$catname{$cat{$board}} / $boardinfo{$board}-&gt;[0] / &lt;a href="$scripturl?board=$board;action=display;num=$tnum;start=$c#$c"&gt;&lt;font class="text1" color="$color{'titletext'}" size=2&gt;&lt;u&gt;$msub&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;
    &lt;td align="right" bgcolor="$color{'titlebg'}" class="titlebg" nowrap&gt;&amp;nbsp;&lt;font class="text1" color="$color{'titletext'}" size=2&gt;$mdate&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr height=80&gt;
    &lt;td colspan="3" bgcolor="$color{'windowbg2'}"  class="windowbg2" valign="top"&gt;&lt;font size="2"&gt;$message&lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;
    &lt;td colspan="3" bgcolor="$color{'catbg'}" class="catbg"&gt;&lt;font size="2"&gt;
    &amp;nbsp;&lt;a href="$scripturl?board=$board;action=post;num=$tnum;start=$c;title=Post+reply"&gt;$img{'reply'}&lt;/a&gt;$menusep&lt;a href="$scripturl?board=$board;action=post;num=$tnum;quote=$c;title=Post+reply"&gt;$img{'replyquote2'}&lt;/a&gt;$notify
    &lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;br&gt;
~;
		++$counter;
	}
if($counter &lt;= 1) { $yymain .= "&lt;font size=2&gt;&lt;B&gt;$txt{'755'}&lt;/B&gt;&lt;/font&gt;"; }
else { $yymain .= qq~
&lt;p align=left&gt;&lt;a href="$cgi;action=viewprofile;username=$useraccount{$curuser}"&gt;&lt;font size=2&gt;&lt;b&gt;$txt{'92'} $memset[1]&lt;/b&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;/font&gt;
~; }
	$yytitle = "$txt{'458'} $memset[1]";
	&amp;template;
	exit;
}

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