D:\my docs\My Received Files\Yabb\Yabb\YaBB_2.5_AEB\cgi-bin\yabb2_old\Sources\Profile.pl D:\WEBSITES\testbed\cgi-bin\yabb252\Sources\Profile.pl
############################################################################### ###############################################################################
# Profile.pl                                                                  # # Profile.pl                                                                  #
############################################################################### ###############################################################################
# YaBB: Yet another Bulletin Board                                            # # YaBB: Yet another Bulletin Board                                            #
# Open-Source Community Software for Webmasters                               # # Open-Source Community Software for Webmasters                               #
# Version:        YaBB 2.5 Anniversary Edition                                # # Version:        YaBB 2.5.2                                                  #
# Packaged:       July 04, 2010                                               # # Packaged:       September 30, 2012                                          #
# Distributed by: http://www.yabbforum.com                                    # # Distributed by: http://www.yabbforum.com                                    #
# =========================================================================== # # =========================================================================== #
# Copyright (c) 2000-2010 YaBB (www.yabbforum.com) - All Rights Reserved.     # # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved.     #
# Software by:  The YaBB Development Team                                     # # Software by:  The YaBB Development Team                                     #
#               with assistance from the YaBB community.                      # #               with assistance from the YaBB community.                      #
# Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com            #    
#               Your source for web hosting, web design, and domains.         #    
############################################################################### ###############################################################################
   
$profileplver = 'YaBB 2.5 AE $Revision: 1.112 $'; $profileplver = 'YaBB 2.5.2 $Revision: 1.2 $';
if ($action eq 'detailedversion') { return 1; } if ($action eq 'detailedversion') { return 1; }
   
&LoadLanguage('Profile'); &LoadLanguage('Profile');
   
if ($iamgmod && -e "$vardir/gmodsettings.txt") { require "$vardir/gmodsettings.txt"; } if ($iamgmod && -e "$vardir/gmodsettings.txt") { require "$vardir/gmodsettings.txt"; }
   
# make sure this person has access to this profile # make sure this person has access to this profile
sub PrepareProfile { sub PrepareProfile {
   if ($iamguest) { &fatal_error('no_access'); }    if ($iamguest) { &fatal_error('no_access'); }
   
   # If someone registers with a '+' in their name It causes problems.    # If someone registers with a '+' in their name It causes problems.
   # Get's turned into a <space> in the query string Change it back here.    # Get's turned into a <space> in the query string Change it back here.
   # Users who register with spaces get them replaced with _    # Users who register with spaces get them replaced with _
   # So no problem there.    # So no problem there.
   $INFO{'username'} =~ tr/ /+/;    $INFO{'username'} =~ tr/ /+/;
   
   $user = $INFO{'username'};    $user = $INFO{'username'};
   if ($do_scramble_id) { &decloak($user); }    if ($do_scramble_id) { &decloak($user); }
   if ($user =~ m~/~)  { &fatal_error('no_user_slash'); }    if ($user =~ m~/~)  { &fatal_error('no_user_slash'); }
   if ($user =~ m~\\~) { &fatal_error('no_user_backslash'); }    if ($user =~ m~\\~) { &fatal_error('no_user_backslash'); }
   
   unless (&LoadUser($user)) { &fatal_error('no_profile_exists'); }    unless (&LoadUser($user)) { &fatal_error('no_profile_exists'); }
   
   if (($user ne $username && !$iamadmin && (!$iamgmod || !$allow_gmod_profile)) ||    if (($user ne $username && !$iamadmin && (!$iamgmod || !$allow_gmod_profile)) ||
       ($user eq 'admin' && $username ne 'admin') ||        ($user eq 'admin' && $username ne 'admin') ||
       ($iamgmod && ${$uid.$user}{'position'} eq 'Administrator')) { &fatal_error('not_allowed_profile_change'); }        ($iamgmod && ${$uid.$user}{'position'} eq 'Administrator')) { &fatal_error('not_allowed_profile_change'); }
   
   @menucolors = qw(catbg catbg catbg catbg catbg catbg);    @menucolors = qw(catbg catbg catbg catbg catbg catbg);
} }
   
# Check that profile-editing session is still valid # Check that profile-editing session is still valid
sub SidCheck { sub SidCheck {
   my $cur_sid = &decloak($INFO{'sid'});    my $cur_sid = &decloak($INFO{'sid'});
   my $sid_check = substr($date, 5, 5);    my $sid_check = substr($date, 5, 5);
   if ($sid_check <= 600 && $cur_sid >= 99400) { $sid_check += 100000; }    if ($sid_check <= 600 && $cur_sid >= 99400) { $sid_check += 100000; }
   
   $sid_expires = $cur_sid + 600 - $sid_check;    $sid_expires = $cur_sid + 600 - $sid_check;
   
   &ProfileCheck($_[0]) if $sid_expires < 0 || $cur_sid > $sid_check;    &ProfileCheck($_[0]) if $sid_expires < 0 || $cur_sid > $sid_check;
} }
   
sub ProfileCheck { sub ProfileCheck {
   &PrepareProfile;    &PrepareProfile;
   
   my $sid_descript = $mycenter_profile_txt{siddescript};    my $sid_descript = $mycenter_profile_txt{siddescript};
   if ($_[0]) {    if ($_[0]) {
       $sid_descript = $mycenter_profile_txt{timeoutdescript};        $sid_descript = $mycenter_profile_txt{timeoutdescript};
       $redirsid = $_[0];        $redirsid = $_[0];
       $yyjavascript .= qq~\nalert("$profile_txt{'897'}");~ if $redirsid =~ s/2$//;        $yyjavascript .= qq~\nalert("$profile_txt{'897'}");~ if $redirsid =~ s/2$//;
   } else {    } else {
       $redirsid = $INFO{'page'} || 'profile';        $redirsid = $INFO{'page'} || 'profile';
   }    }
   
   $yymain .= qq~    $yymain .= qq~
<div class="bordercolor" style="width: 500px; margin-bottom: 8px; margin-left: auto; margin-right: auto;"> <div class="bordercolor" style="width: 500px; margin-bottom: 8px; margin-left: auto; margin-right: auto;">
<table cellpadding="4" cellspacing="1" border="0" width="100%" align="center"> <table cellpadding="4" cellspacing="1" border="0" width="100%" align="center">
   <tr><td class="titlebg" colspan="2"><b>$profile_txt{'901'}</b></td></tr>    <tr><td class="titlebg" colspan="2"><b>$profile_txt{'901'}</b></td></tr>
   <tr>    <tr>
       <td class="windowbg2" align="center">        <td class="windowbg2" align="center">
           <label for="passwrd"><span class="small"><br />$sid_descript<br /><br /></span></label>            <label for="passwrd"><span class="small"><br />$sid_descript<br /><br /></span></label>
       </td>        </td>
   </tr>    </tr>
   <tr>    <tr>
       <td class="windowbg2" align="center" valign="middle">        <td class="windowbg2" align="center" valign="middle">
           <form action="$scripturl?action=profileCheck2;username=$useraccount{$user}" method="post" name="confirmform">            <form action="$scripturl?action=profileCheck2;username=$useraccount{$user}" method="post" name="confirmform">
           <input type="hidden" name="redir" value="$redirsid" />            <input type="hidden" name="redir" value="$redirsid" />
           <div style="padding-top: 4px;">            <div style="padding-top: 4px;">
               <div><input type="password" name="passwrd" id="passwrd" size="15" style="width: 150px;" onkeypress="capsLock(event,'cappasswrd')" /></div>                <div><input type="password" name="passwrd" id="passwrd" size="15" style="width: 150px;" onkeypress="capsLock(event,'cappasswrd')" /></div>
               <div style="color: red; font-weight: bold; display: none" id="cappasswrd">$profile_txt{'capslock'}</div>                <div style="color: red; font-weight: bold; display: none" id="cappasswrd">$profile_txt{'capslock'}</div>
               <div style="color: red; font-weight: bold; display: none" id="cappasswrd_char">$profile_txt{'wrong_char'}: <span id="cappasswrd_character">&nbsp;</span></div>                <div style="color: red; font-weight: bold; display: none" id="cappasswrd_char">$profile_txt{'wrong_char'}: <span id="cappasswrd_character">&nbsp;</span></div>
           </div>            </div>
           <div style="padding-top: 8px;">            <div style="padding-top: 8px;">
               <input type="submit" value="$profile_txt{'900'}" class="button" />                <input type="submit" value="$profile_txt{'900'}" class="button" />
           </div>            </div>
           </form>            </form>
       </td>        </td>
   </tr>    </tr>
</table> </table>
</div> </div>
<script type="text/javascript" language="JavaScript"> <script type="text/javascript" language="JavaScript">
<!-- <!--
   document.confirmform.passwrd.focus();    document.confirmform.passwrd.focus();
// --> // -->
</script> </script>
~; ~;
   
   $yynavigation = qq~&rsaquo; $profile_txt{'900'}~;    $yynavigation = qq~&rsaquo; $profile_txt{'900'}~;
   $yytitle = $profile_txt{'900'};    $yytitle = $profile_txt{'900'};
   &template;    &template;
} }
   
sub ProfileCheck2 { sub ProfileCheck2 {
   &PrepareProfile;    &PrepareProfile;
   
   my $password = &encode_password($FORM{'passwrd'} || $INFO{'passwrd'});    my $password = &encode_password($FORM{'passwrd'} || $INFO{'passwrd'});
   if ($user eq $username && $password ne ${$uid.$username}{'password'}) {    if ($user eq $username && $password ne ${$uid.$username}{'password'}) {
       &fatal_error('current_password_wrong');        &fatal_error('current_password_wrong');
   }    }
   if (($iamadmin || ($iamgmod && $allow_gmod_profile)) && $password ne ${$uid.$username}{'password'}) {    if (($iamadmin || ($iamgmod && $allow_gmod_profile)) && $password ne ${$uid.$username}{'password'}) {
       &fatal_error('no_admin_password');        &fatal_error('no_admin_password');
   }    }
   # Update the sessionID too    # Update the sessionID too
   ${$uid.$username}{'session'} = &encode_password($user_ip);    ${$uid.$username}{'session'} = &encode_password($user_ip);
   &UserAccount($username, "update");    &UserAccount($username, "update");
   
   # update only this cookie since we don't know when the others will expire    # update only this cookie since we don't know when the others will expire
   $yySetCookies3 = &write_cookie(    $yySetCookies3 = &write_cookie(
           -name    => "$cookiesession_name",            -name    => "$cookiesession_name",
           -value   => "${$uid.$username}{'session'}",            -value   => "${$uid.$username}{'session'}",
           -path    => "/",            -path    => "/",
           -expires => "Sunday, 17-Jan-2038 00:00:00 GMT");            -expires => "Sunday, 17-Jan-2038 00:00:00 GMT");
   
   # Get a semi-secure SID - only for profile changes    # Get a semi-secure SID - only for profile changes
   # cloak the sid -> no point giving anyone the means.    # cloak the sid -> no point giving anyone the means.
   $yySetLocation = "$scripturl?action=" . ($FORM{'redir'} || $INFO{'redir'} || 'profile') . ";username=$useraccount{$user};sid=" . &cloak(reverse(substr($date, 5, 5))) . ($INFO{'newpassword'} ? ";newpassword=1" : "");    $yySetLocation = "$scripturl?action=" . ($FORM{'redir'} || $INFO{'redir'} || 'profile') . ";username=$useraccount{$user};sid=" . &cloak(reverse(substr($date, 5, 5))) . ($INFO{'newpassword'} ? ";newpassword=1" : "");
   &redirectexit;    &redirectexit;
} }
   
sub ProfileMenu { sub ProfileMenu {
   return if $view;    return if $view;
   
   $yymain .= qq~    $yymain .= qq~
<table cellspacing="1" cellpadding="4" width="100%" border="0" class="bordercolor"> <table cellspacing="1" cellpadding="4" width="100%" border="0" class="bordercolor">
   <tr>    <tr>
       <td class="$menucolors[0]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profile;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{79}</a></b></span></td>        <td class="$menucolors[0]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profile;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{79}</a></b></span></td>
       <td class="$menucolors[1]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileContacts;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{819}</a></b></span></td>        <td class="$menucolors[1]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileContacts;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{819}</a></b></span></td>
       <td class="$menucolors[2]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileOptions;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{818}</a></b></span></td>~;        <td class="$menucolors[2]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileOptions;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{818}</a></b></span></td>~;
   
   if ($buddyListEnabled){    if ($buddyListEnabled){
       $yymain .= qq~        $yymain .= qq~
       <td class="$menucolors[3]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileBuddy;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_buddy_list{'buddylist'}</a></b></span></td>~;        <td class="$menucolors[3]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileBuddy;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_buddy_list{'buddylist'}</a></b></span></td>~;
   }    }
   
   if ($PM_level == 1 || ($PM_level == 2 && ($iamadmin || $iamgmod || $iammod)) || ($PM_level == 3 && ($iamadmin || $iamgmod))) {    if ($PM_level == 1 || ($PM_level == 2 && ($iamadmin || $iamgmod || $iammod)) || ($PM_level == 3 && ($iamadmin || $iamgmod))) {
       $yymain .= qq~        $yymain .= qq~
       <td class="$menucolors[4]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileIM;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_imtxt{56} $profile_txt{323}</a></b></span></td>~;        <td class="$menucolors[4]" valign="bottom" align="center" width="16%"><span class="small"><b><a href="$scripturl?action=profileIM;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_imtxt{56} $profile_txt{323}</a></b></span></td>~;
   }    }
   
   if ($iamadmin || ($iamgmod && $allow_gmod_profile && $gmod_access2{'profileAdmin'} eq 'on')) {    if ($iamadmin || ($iamgmod && $allow_gmod_profile && $gmod_access2{'profileAdmin'} eq 'on')) {
       $yymain .= qq~        $yymain .= qq~
       <td class="$menucolors[5]" valign="bottom" width="16%" align="center"><span class="small"><b><a href="$scripturl?action=profileAdmin;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{820}</a></b></span></td>~;        <td class="$menucolors[5]" valign="bottom" width="16%" align="center"><span class="small"><b><a href="$scripturl?action=profileAdmin;username=$useraccount{$user};sid=$INFO{'sid'}">$profile_txt{820}</a></b></span></td>~;
   }    }
   $yymain .= qq~    $yymain .= qq~
   </tr>    </tr>
</table> </table>
<br /> <br />
~; ~;
} }
   
sub ModifyProfile { sub ModifyProfile {
   &SidCheck($action);    &SidCheck($action);
   &PrepareProfile;    &PrepareProfile;
   
   $menucolors[0] = "titlebg";    $menucolors[0] = "titlebg";
   &ProfileMenu;    &ProfileMenu;
   
   if ($iamadmin) {    if ($iamadmin) {
       $confdel_text = qq~$profile_txt{'775'} $profile_txt{'777'} $user $profile_txt{'778'}~;        $confdel_text = qq~$profile_txt{'775'} $profile_txt{'777'} $user $profile_txt{'778'}~;
       if ($user eq $username) {        if ($user eq $username) {
           $passtext = $profile_txt{'821'};            $passtext = $profile_txt{'821'};
       } else {        } else {
           $passtext = qq~$profile_txt{'2'} $profile_txt{'36'}~;            $passtext = qq~$profile_txt{'2'} $profile_txt{'36'}~;
       }        }
   } else {    } else {
       $confdel_text = qq~$profile_txt{'775'} $profile_txt{'776'} $profile_txt{'778'}~;        $confdel_text = qq~$profile_txt{'775'} $profile_txt{'776'} $profile_txt{'778'}~;
       $passtext = $profile_txt{'821'};        $passtext = $profile_txt{'821'};
   }    }
   
   $passtext .= qq~<br /><span class="small" style="font-weight: normal;">$profile_txt{'895'}</span>~;    $passtext .= qq~<br /><span class="small" style="font-weight: normal;">$profile_txt{'895'}</span>~;
   
   my $scriptAction = qq~profile2~;    my $scriptAction = qq~profile2~;
   if ($view) {    if ($view) {
       $scriptAction = qq~myprofile2~;        $scriptAction = qq~myprofile2~;
       $yytitle = $profile_txt{'editmyprofile'};        $yytitle = $profile_txt{'editmyprofile'};
       $profiletitle = qq~$profile_txt{'editmyprofile'} ($user)~;        $profiletitle = qq~$profile_txt{'editmyprofile'} ($user)~;
       $yynavigation = qq~&rsaquo; <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> &rsaquo; $profiletitle~;        $yynavigation = qq~&rsaquo; <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> &rsaquo; $profiletitle~;
   } else {      } else {  
       $yytitle = $profile_txt{'79'};        $yytitle = $profile_txt{'79'};
       $profiletitle = qq~$profile_txt{'79'} ($user)~;        $profiletitle = qq~$profile_txt{'79'} ($user)~;
       $yynavigation = qq~&rsaquo; $profiletitle~;        $yynavigation = qq~&rsaquo; $profiletitle~;
   }    }
   
   if (${$uid.$user}{'gender'} eq 'Male')   { $GenderMale   = ' selected="selected" '; }    if (${$uid.$user}{'gender'} eq 'Male')   { $GenderMale   = ' selected="selected" '; }
   if (${$uid.$user}{'gender'} eq 'Female') { $GenderFemale = ' selected="selected" '; }    if (${$uid.$user}{'gender'} eq 'Female') { $GenderFemale = ' selected="selected" '; }
   
   my $timeorder;    my $timeorder;
   if(${$uid.$user}{'timeselect'}) {    if(${$uid.$user}{'timeselect'}) {
       if    (${$uid.$user}{'timeselect'} == 6) { $timeorder = 1; }        if    (${$uid.$user}{'timeselect'} == 6) { $timeorder = 1; }
       elsif (${$uid.$user}{'timeselect'} == 3) { $timeorder = 1; }        elsif (${$uid.$user}{'timeselect'} == 3) { $timeorder = 1; }
       elsif (${$uid.$user}{'timeselect'} == 2) { $timeorder = 1; }        elsif (${$uid.$user}{'timeselect'} == 2) { $timeorder = 1; }
   }    }
   else {    else {
       if ($timeselected == 6) { $timeorder = 1; }        if ($timeselected == 6) { $timeorder = 1; }
       elsif ($timeselected == 3) { $timeorder = 1; }        elsif ($timeselected == 3) { $timeorder = 1; }
       elsif ($timeselected == 2) { $timeorder = 1; }        elsif ($timeselected == 2) { $timeorder = 1; }
   }    }
   
   &CalcAge($user, "parse");    &CalcAge($user, "parse");
   $dayormonthm = qq~<label for="bday1">$profile_txt{'564'}</label><input type="text" name="bday1" id="bday1" size="2" maxlength="2" value="$umonth" /> ~;      $dayormonthm = qq~<label for="bday1">$profile_txt{'564'}</label><input type="text" name="bday1" id="bday1" size="2" maxlength="2" value="$umonth" /> ~;  
   $dayormonthd = qq~<label for="bday2">$profile_txt{'565'}</label><input type="text" name="bday2" id="bday2" size="2" maxlength="2" value="$uday" /> ~;      $dayormonthd = qq~<label for="bday2">$profile_txt{'565'}</label><input type="text" name="bday2" id="bday2" size="2" maxlength="2" value="$uday" /> ~;  
   if ($timeorder) { $dayormonth = $dayormonthd . $dayormonthm; }      if ($timeorder) { $dayormonth = $dayormonthd . $dayormonthm; }  
   else { $dayormonth = $dayormonthm . $dayormonthd; }      else { $dayormonth = $dayormonthm . $dayormonthd; }  
   $dayormonth =~ s/for="bday\d"/for="birthday"/o;      $dayormonth =~ s/for="bday\d"/for="birthday"/o;  
   $dayormonth =~ s/id="bday\d"/id="birthday"/o;    $dayormonth =~ s/id="bday\d"/id="birthday"/o;
   
   &LoadLanguage('Register');    &LoadLanguage('Register');
   $showProfile   .= qq~    $showProfile   .= qq~
<form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator"> <form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator">
<table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0"> <table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0">
   <tr>    <tr>
       <td class="catbg" colspan="2"><img src="$imagesdir/profile.gif" alt="" border="0" /> <b>$profiletitle</b><br /><span class="small">$profile_txt{'698'}</span>~ . ($INFO{'newpassword'} ? $profile_txt{'80'} : "") . qq~</td>        <td class="catbg" colspan="2"><img src="$imagesdir/profile.gif" alt="" border="0" /> <b>$profiletitle</b><br /><span class="small">$profile_txt{'698'}</span>~ . ($INFO{'newpassword'} ? $profile_txt{'80'} : "") . qq~</td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="220" align="left"><label for="passwrd1"><b>$profile_txt{81}: </b><br />        <td width="220" align="left"><label for="passwrd1"><b>$profile_txt{81}: </b><br />
           <span class="small">$profile_txt{'896'}</span></label>            <span class="small">$profile_txt{'896'}</span></label>
       </td>        </td>
       <td align="left">        <td align="left">
           <div style="float:left;"><input type="password" maxlength="30" name="passwrd1" id="passwrd1" size="20" onkeyup="runPassword(this.value);" onkeypress="capsLock(event,'cappasswrd1')" /> &nbsp; </div>            <div style="float:left;"><input autocomplete="off" type="password" maxlength="30" name="passwrd1" id="passwrd1" size="20" onkeyup="runPassword(this.value);" onkeypress="capsLock(event,'cappasswrd1')" /> &nbsp; </div>
           <div style="float:left; width: 150px; height: 20px;">            <div style="float:left; width: 150px; height: 20px;">
           <div id="password-strength-meter" style="background: transparent url($imagesdir/empty_bar.gif) repeat-x center left; height: 4px"></div>            <div id="password-strength-meter" style="background: transparent url($imagesdir/empty_bar.gif) repeat-x center left; height: 4px"></div>
           <div class="pstrength-bar" id="passwrd1_bar" style="border: 1px solid #FFFFFF; height: 4px"></div>            <div class="pstrength-bar" id="passwrd1_bar" style="border: 1px solid #FFFFFF; height: 4px"></div>
           <div class="pstrength-info" id="passwrd1_text">&nbsp;</div>            <div class="pstrength-info" id="passwrd1_text">&nbsp;</div>
           </div>            </div>
           <div style="clear:left; color: red; font-weight: bold; display: none" id="cappasswrd1">$profile_txt{'capslock'}</div>            <div style="clear:left; color: red; font-weight: bold; display: none" id="cappasswrd1">$profile_txt{'capslock'}</div>
           <div style="clear:left; color: red; font-weight: bold; display: none" id="cappasswrd1_char">$profile_txt{'wrong_char'}: <span id="cappasswrd1_character">&nbsp;</span></div>            <div style="clear:left; color: red; font-weight: bold; display: none" id="cappasswrd1_char">$profile_txt{'wrong_char'}: <span id="cappasswrd1_character">&nbsp;</span></div>
       </td>        </td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="220" align="left"><label for="passwrd2"><b>$profile_txt{82}: </b><br />        <td width="220" align="left"><label for="passwrd2"><b>$profile_txt{82}: </b><br />
           <span class="small">$profile_txt{'896'}</span></label>            <span class="small">$profile_txt{'896'}</span></label>
       </td>        </td>
       <td align="left">        <td align="left">
           <input type="password" maxlength="30" name="passwrd2" id="passwrd2" size="20" onkeypress="capsLock(event,'cappasswrd2')" />            <input type="password" maxlength="30" name="passwrd2" id="passwrd2" size="20" onkeypress="capsLock(event,'cappasswrd2')" />
           <div style="color: red; font-weight: bold; display: none" id="cappasswrd2">$profile_txt{'capslock'}</div>            <div style="color: red; font-weight: bold; display: none" id="cappasswrd2">$profile_txt{'capslock'}</div>
           <div style="color: red; font-weight: bold; display: none" id="cappasswrd2_char">$profile_txt{'wrong_char'}: <span id="cappasswrd2_character">&nbsp;</span></div>            <div style="color: red; font-weight: bold; display: none" id="cappasswrd2_char">$profile_txt{'wrong_char'}: <span id="cappasswrd2_character">&nbsp;</span></div>
       </td>        </td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="220" align="left"><label for="name"><b>$profile_txt{68}: </b><br />~;        <td width="220" align="left"><label for="name"><b>$profile_txt{68}: </b><br />~;
   if ($name_cannot_be_userid) {    if ($name_cannot_be_userid) {
       $showProfile .= qq~        $showProfile .= qq~
           <span class="small">$profile_txt{'8'}</span></label>~;            <span class="small">$profile_txt{'8'}</span></label>~;
   }    }
   $showProfile .= qq~    $showProfile .= qq~
       </td>        </td>
       <td align="left"><input type="text" maxlength="30" onchange="checkAvail('$scripturl',this.value,'display')" name="name" id="name" size="30" value="${$uid.$user}{'realname'}" /><div id="displayavailability"></div></td>        <td align="left"><input type="text" maxlength="30" onchange="checkAvail('$scripturl',this.value,'display')" name="name" id="name" size="30" value="${$uid.$user}{'realname'}" /><div id="displayavailability"></div></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="220" align="left"><label for="gender"><b>$profile_txt{231}: </b></label></td>        <td width="220" align="left"><label for="gender"><b>$profile_txt{231}: </b></label></td>
       <td align="left"><select name="gender" id="gender" size="1"><option value=""></option><option value="Male"$GenderMale>$profile_txt{'238'}</option><option value="Female"$GenderFemale>$profile_txt{'239'}</option></select></td>        <td align="left"><select name="gender" id="gender" size="1"><option value=""></option><option value="Male"$GenderMale>$profile_txt{'238'}</option><option value="Female"$GenderFemale>$profile_txt{'239'}</option></select></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="220" align="left"><label for="birthday"><b>$profile_txt{'563'}: </b></label></td>        <td width="220" align="left"><label for="birthday"><b>$profile_txt{'563'}: </b></label></td>
       <td align="left"><span class="small">$dayormonth<label for="bday3">$profile_txt{'566'}</label><input type="text" name="bday3" id="bday3" size="4" maxlength="4" value="$uyear" /></span></td>        <td align="left"><span class="small">$dayormonth<label for="bday3">$profile_txt{'566'}</label><input type="text" name="bday3" id="bday3" size="4" maxlength="4" value="$uyear" /></span></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="220" align="left"><label for="location"><b>$profile_txt{'227'}: </b></label></td>        <td width="220" align="left"><label for="location"><b>$profile_txt{'227'}: </b></label></td>
       <td align="left"><input type="text" maxlength="30" name="location" id="location" size="30" value="${$uid.$user}{'location'}" /></td>        <td align="left"><input type="text" maxlength="30" name="location" id="location" size="30" value="${$uid.$user}{'location'}" /></td>
   </tr>~;    </tr>~;
   
   if ($extendedprofiles) {    if ($extendedprofiles) {
       require "$sourcedir/ExtendedProfiles.pl";        require "$sourcedir/ExtendedProfiles.pl";
       $showProfile .= &ext_editprofile($user, "edit");        $showProfile .= &ext_editprofile($user, "edit");
   }    }
   
   if ($sessions == 1 && $sessionvalid == 1 && ($iamadmin || $iamgmod || $iammod) && $username eq $user) {    if ($sessions == 1 && $sessionvalid == 1 && ($iamadmin || $iamgmod || $iammod) && $username eq $user) {
       &LoadLanguage('Sessions');        &LoadLanguage('Sessions');
       require "$sourcedir/Decoder.pl";        require "$sourcedir/Decoder.pl";
       my $decanswer = &descramble(${$uid.$user}{'sesanswer'}, $user);        my $decanswer = &descramble(${$uid.$user}{'sesanswer'}, $user);
       $questsel = qq~<select name="sesquest" id="sesquest" size="1">\n~;        $questsel = qq~<select name="sesquest" id="sesquest" size="1">\n~;
       while (($key, $val) = each %sesquest_txt) {        while (($key, $val) = each %sesquest_txt) {
           if (${$uid.$user}{'sesquest'} eq $key && ${$uid.$user}{'sesquest'} ne "") {            if (${$uid.$user}{'sesquest'} eq $key && ${$uid.$user}{'sesquest'} ne "") {
               $sessel = qq~ selected="selected"~;                $sessel = qq~ selected="selected"~;
           } elsif ($key eq "password" && ${$uid.$user}{'sesquest'} eq "") {            } elsif ($key eq "password" && ${$uid.$user}{'sesquest'} eq "") {
               $sessel = qq~ selected="selected"~;                $sessel = qq~ selected="selected"~;
           } else {            } else {
               $sessel = "";                $sessel = "";
           }            }
           $questsel .= qq~<option value="$key"$sessel>$val</option>\n~;            $questsel .= qq~<option value="$key"$sessel>$val</option>\n~;
       }        }
       $questsel .= qq~</select>\n~;        $questsel .= qq~</select>\n~;
       $showProfile   .= qq~        $showProfile   .= qq~
   <tr>    <tr>
       <td class="catbg" colspan="2"><img src="$imagesdir/session.gif" alt="" border="0" /> <label for="sesquest"><b>$img_txt{'34a'}</b><br /><span class="small">$session_txt{'9'}<br />$session_txt{'9a'}</span></label></td>        <td class="catbg" colspan="2"><img src="$imagesdir/session.gif" alt="" border="0" /> <label for="sesquest"><b>$img_txt{'34a'}</b><br /><span class="small">$session_txt{'9'}<br />$session_txt{'9a'}</span></label></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="220" align="left">$questsel</td>        <td width="220" align="left">$questsel</td>
       <td align="left"><input type="text" maxlength="30" name="sesanswer" size="20" value="$decanswer" /></td>        <td align="left"><input type="text" maxlength="30" name="sesanswer" size="20" value="$decanswer" /></td>
   </tr>~;    </tr>~;
   }    }
   $showProfile .= qq~    $showProfile .= qq~
   <tr class="catbg">    <tr class="catbg">
       <td height="50" valign="middle" align="center" colspan="2"><input type="submit" name="moda" value="$profile_txt{'88'}" class="button" />~;        <td height="50" valign="middle" align="center" colspan="2"><input type="submit" name="moda" value="$profile_txt{'88'}" class="button" />~;
   if (($iamadmin && ($username ne $user)) || ($username ne "admin")) {      if ($self_del_user == 1) {      
       $showProfile .= qq~ &nbsp; &nbsp; &nbsp; <input type="submit" name="moda" value="$profile_txt{'89'}" onclick="return confirm('$confdel_text')" class="button" />~;         if ( ( $iamadmin && ( $username ne $user ) ) || ( $username ne 'admin' ) ) { 
   }         $showProfile .= 
  qq~ &nbsp; &nbsp; &nbsp; <input type="submit" name="moda" value="$profile_txt{'89'}" onclick="return confirm('$confdel_text')" class="button" />~;  
         }  
     }  
     else  {      
         if ( $iamadmin &&  $username ne $user ) {  
         $showProfile .=  
  qq~ &nbsp; &nbsp; &nbsp; <input type="submit" name="moda" value="$profile_txt{'89'}" onclick="return confirm('$confdel_text')" class="button" />~;  
         }  
     }  
   $showProfile .= qq~<br /><span class="small">$profile_txt{'sid_expires_1'} $sid_expires $profile_txt{'sid_expires_2'}</span>    $showProfile .= qq~<br /><span class="small">$profile_txt{'sid_expires_1'} $sid_expires $profile_txt{'sid_expires_2'}</span>
       </td>        </td>
   </tr>    </tr>
</table> </table>
</form> </form>
   
<script language="JavaScript1.2" type="text/javascript"> <script language="JavaScript1.2" type="text/javascript">
<!-- <!--
   // Password_strength_meter start    // Password_strength_meter start
   var verdects = new Array("$pwstrengthmeter_txt{'1'}","$pwstrengthmeter_txt{'2'}","$pwstrengthmeter_txt{'3'}","$pwstrengthmeter_txt{'4'}","$pwstrengthmeter_txt{'5'}","$pwstrengthmeter_txt{'6'}","$pwstrengthmeter_txt{'7'}","$pwstrengthmeter_txt{'8'}");    var verdects = new Array("$pwstrengthmeter_txt{'1'}","$pwstrengthmeter_txt{'2'}","$pwstrengthmeter_txt{'3'}","$pwstrengthmeter_txt{'4'}","$pwstrengthmeter_txt{'5'}","$pwstrengthmeter_txt{'6'}","$pwstrengthmeter_txt{'7'}","$pwstrengthmeter_txt{'8'}");
   var colors = new Array("#8F8F8F","#BF0000","#FF0000","#00A0FF","#33EE00","#339900");    var colors = new Array("#8F8F8F","#BF0000","#FF0000","#00A0FF","#33EE00","#339900");
   var scores = new Array($pwstrengthmeter_scores);    var scores = new Array($pwstrengthmeter_scores);
   var common = new Array($pwstrengthmeter_common);    var common = new Array($pwstrengthmeter_common);
   var minchar = $pwstrengthmeter_minchar;    var minchar = $pwstrengthmeter_minchar;
   
   function runPassword(D) {    function runPassword(D) {
       var nPerc = checkPassword(D);        var nPerc = checkPassword(D);
       if (nPerc > -199 && nPerc < 0) {        if (nPerc > -199 && nPerc < 0) {
           strColor = colors[0];            strColor = colors[0];
           strText = verdects[1];            strText = verdects[1];
           strWidth = "5%";            strWidth = "5%";
       } else if (nPerc == -200) {        } else if (nPerc == -200) {
           strColor = colors[1];            strColor = colors[1];
           strText = verdects[0];            strText = verdects[0];
           strWidth = "0%";            strWidth = "0%";
       } else if (scores[0] == -1 && scores[1] == -1 && scores[2] == -1 && scores[3] == -1) {        } else if (scores[0] == -1 && scores[1] == -1 && scores[2] == -1 && scores[3] == -1) {
           strColor = colors[4];            strColor = colors[4];
           strText = verdects[7];            strText = verdects[7];
           strWidth = "100%";            strWidth = "100%";
       } else if (nPerc <= scores[0]) {        } else if (nPerc <= scores[0]) {
           strColor = colors[1];            strColor = colors[1];
           strText = verdects[2];            strText = verdects[2];
           strWidth = "10%";            strWidth = "10%";
       } else if (nPerc > scores[0] && nPerc <= scores[1]) {        } else if (nPerc > scores[0] && nPerc <= scores[1]) {
           strColor = colors[2];            strColor = colors[2];
           strText = verdects[3];            strText = verdects[3];
           strWidth = "25%";            strWidth = "25%";
       } else if (nPerc > scores[1] && nPerc <= scores[2]) {        } else if (nPerc > scores[1] && nPerc <= scores[2]) {
           strColor = colors[3];            strColor = colors[3];
           strText = verdects[4];            strText = verdects[4];
           strWidth = "50%";            strWidth = "50%";
       } else if (nPerc > scores[2] && nPerc <= scores[3]) {        } else if (nPerc > scores[2] && nPerc <= scores[3]) {
           strColor = colors[4];            strColor = colors[4];
           strText = verdects[5];            strText = verdects[5];
           strWidth = "75%";            strWidth = "75%";
       } else {        } else {
           strColor = colors[5];            strColor = colors[5];
           strText = verdects[6];            strText = verdects[6];
           strWidth = "100%";            strWidth = "100%";
       }        }
       document.getElementById("passwrd1_bar").style.width = strWidth;        document.getElementById("passwrd1_bar").style.width = strWidth;
       document.getElementById("passwrd1_bar").style.backgroundColor = strColor;        document.getElementById("passwrd1_bar").style.backgroundColor = strColor;
       document.getElementById("passwrd1_text").style.color = strColor;        document.getElementById("passwrd1_text").style.color = strColor;
       document.getElementById("passwrd1_text").childNodes[0].nodeValue = strText;        document.getElementById("passwrd1_text").childNodes[0].nodeValue = strText;
   }    }
   
   function checkPassword(C) {    function checkPassword(C) {
       if (C.length == 0 || C.length < minchar) return -100;        if (C.length == 0 || C.length < minchar) return -100;
   
       for (var D = 0; D < common.length; D++) {        for (var D = 0; D < common.length; D++) {
           if (C.toLowerCase() == common[D]) return -200;            if (C.toLowerCase() == common[D]) return -200;
       }        }
   
       var F = 0;        var F = 0;
       if (C.length >= minchar && C.length <= (minchar+2)) {        if (C.length >= minchar && C.length <= (minchar+2)) {
           F = (F + 6)            F = (F + 6)
       } else if (C.length >= (minchar + 3) && C.length <= (minchar + 4)) {        } else if (C.length >= (minchar + 3) && C.length <= (minchar + 4)) {
           F = (F + 12)            F = (F + 12)
       } else if (C.length >= (minchar + 5)) {        } else if (C.length >= (minchar + 5)) {
           F = (F + 18)            F = (F + 18)
       }        }
   
       if (C.match(/[a-z]/)) {        if (C.match(/[a-z]/)) {
           F = (F + 1)            F = (F + 1)
       }        }
       if (C.match(/[A-Z]/)) {        if (C.match(/[A-Z]/)) {
           F = (F + 5)            F = (F + 5)
       }        }
       if (C.match(/d+/)) {        if (C.match(/d+/)) {
           F = (F + 5)            F = (F + 5)
       }        }
       if (C.match(/(.*[0-9].*[0-9].*[0-9])/)) {        if (C.match(/(.*[0-9].*[0-9].*[0-9])/)) {
           F = (F + 7)            F = (F + 7)
       }        }
       if (C.match(/.[!,\@,#,\$,\%,^,&,*,?,_,\~]/)) {        if (C.match(/.[!,\@,#,\$,\%,^,&,*,?,_,\~]/)) {
           F = (F + 5)            F = (F + 5)
       }        }
       if (C.match(/(.*[!,\@,#,\$,\%,^,&,*,?,_,\~].*[!,\@,#,\$,\%,^,&,*,?,_,\~])/)) {        if (C.match(/(.*[!,\@,#,\$,\%,^,&,*,?,_,\~].*[!,\@,#,\$,\%,^,&,*,?,_,\~])/)) {
           F = (F + 7)            F = (F + 7)
       }        }
       if (C.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){        if (C.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){
           F = (F + 2)            F = (F + 2)
       }        }
       if (C.match(/([a-zA-Z])/) && C.match(/([0-9])/)) {        if (C.match(/([a-zA-Z])/) && C.match(/([0-9])/)) {
           F = (F + 3)            F = (F + 3)
       }        }
       if (C.match(/([a-zA-Z0-9].*[!,\@,#,\$,\%,^,&,*,?,_,\~])|([!,\@,#,\$,\%,^,&,*,?,_,\~].*[a-zA-Z0-9])/)) {        if (C.match(/([a-zA-Z0-9].*[!,\@,#,\$,\%,^,&,*,?,_,\~])|([!,\@,#,\$,\%,^,&,*,?,_,\~].*[a-zA-Z0-9])/)) {
           F = (F + 3)            F = (F + 3)
       }        }
       return F;        return F;
   }    }
   // Password_strength_meter end    // Password_strength_meter end
// --> // -->
</script> </script>
~; ~;
   
   if (!$view) {    if (!$view) {
       $yymain .= $showProfile;        $yymain .= $showProfile;
       &template;        &template;
   }    }
} }
   
sub ModifyProfileContacts { sub ModifyProfileContacts {
   &SidCheck($action);    &SidCheck($action);
   &PrepareProfile;    &PrepareProfile;
   
   $menucolors[1] = "titlebg";    $menucolors[1] = "titlebg";
   &ProfileMenu;    &ProfileMenu;
   
   my $scriptAction = qq~profileContacts2~;    my $scriptAction = qq~profileContacts2~;
   if ($view) {      if ($view) {  
       $scriptAction = qq~myprofileContacts2~;        $scriptAction = qq~myprofileContacts2~;
       $yytitle = qq~$profile_txt{'editmyprofile'} &rsaquo; $profile_txt{'819'}~;        $yytitle = qq~$profile_txt{'editmyprofile'} &rsaquo; $profile_txt{'819'}~;
       $profiletitle = qq~$profile_txt{'editmyprofile'} ($user) &rsaquo; $profile_txt{'819'}~;        $profiletitle = qq~$profile_txt{'editmyprofile'} ($user) &rsaquo; $profile_txt{'819'}~;
       $yynavigation = qq~&rsaquo; <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> &rsaquo; $profiletitle~;        $yynavigation = qq~&rsaquo; <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> &rsaquo; $profiletitle~;
   } else {    } else {
       $yytitle = qq~$profile_txt{'79'} &rsaquo; $profile_txt{'819'}~;        $yytitle = qq~$profile_txt{'79'} &rsaquo; $profile_txt{'819'}~;
       $profiletitle = qq~$profile_txt{'79'} ($user) &rsaquo; $profile_txt{'819'}~;        $profiletitle = qq~$profile_txt{'79'} ($user) &rsaquo; $profile_txt{'819'}~;
       $yynavigation = qq~&rsaquo; $profiletitle~;        $yynavigation = qq~&rsaquo; $profiletitle~;
   }    }
   
   ${$uid.$user}{'aim'} =~ tr/+/ /;    ${$uid.$user}{'aim'} =~ tr/+/ /;
   ${$uid.$user}{'yim'} =~ tr/+/ /;    ${$uid.$user}{'yim'} =~ tr/+/ /;
   
   $showProfile .= qq~    $showProfile .= qq~
<form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator"> <form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator">
<table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0"> <table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0">
   <tr>    <tr>
       <td colspan="2" class="catbg"><img src="$imagesdir/profile.gif" alt="" border="0" /> <b>$profiletitle</b></td>        <td colspan="2" class="catbg"><img src="$imagesdir/profile.gif" alt="" border="0" /> <b>$profiletitle</b></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="email"><b>$profile_txt{'69'}: </b><br /><span class="small">$profile_txt{'679'} </span></label></td>        <td width="320" align="left"><label for="email"><b>$profile_txt{'69'}: </b><br /><span class="small">$profile_txt{'679'} </span></label></td>
       <td align="left"><input type="text" maxlength="100" onchange="checkAvail('$scripturl',this.value,'email')" name="email" id="email" size="40" value="${$uid.$user}{'email'}" /><div id="emailavailability"></div></td>        <td align="left"><input type="text" maxlength="100" onchange="checkAvail('$scripturl',this.value,'email')" name="email" id="email" size="40" value="${$uid.$user}{'email'}" /><div id="emailavailability"></div></td>
   </tr>~;    </tr>~;
   if ($allow_hide_email) {    if ($allow_hide_email) {
       my $checked = '';        my $checked = '';
       if (${$uid.$user}{'hidemail'}) { $checked = ' checked="checked"'; }        if (${$uid.$user}{'hidemail'}) { $checked = ' checked="checked"'; }
       $showProfile .= qq~        $showProfile .= qq~
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="hideemail"><b>$profile_txt{'721'}</b></label></td>        <td width="320" align="left"><label for="hideemail"><b>$profile_txt{'721'}</b></label></td>
       <td align="left"><input type="checkbox" name="hideemail" id="hideemail" value="1"$checked /></td>        <td align="left"><input type="checkbox" name="hideemail" id="hideemail" value="1"$checked /></td>
   </tr>~;    </tr>~;
   }    }
   $showProfile .= qq~    $showProfile .= qq~
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="icq"><b>$profile_txt{'513'}: </b><br /><span class="small">$profile_txt{'600'}</span></label></td>        <td width="320" align="left"><label for="icq"><b>$profile_txt{'513'}: </b><br /><span class="small">$profile_txt{'600'}</span></label></td>
       <td align="left"><input type="text" maxlength="10" name="icq" id="icq" size="40" value="${$uid.$user}{'icq'}" /></td>        <td align="left"><input type="text" maxlength="10" name="icq" id="icq" size="40" value="${$uid.$user}{'icq'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="aim"><b>$profile_txt{'603'}: </b><br /><span class="small">$profile_txt{'601'}</span></label></td>        <td width="320" align="left"><label for="aim"><b>$profile_txt{'603'}: </b><br /><span class="small">$profile_txt{'601'}</span></label></td>
       <td align="left"><input type="text" maxlength="30" name="aim" id="aim" size="40" value="${$uid.$user}{'aim'}" /></td>        <td align="left"><input type="text" maxlength="30" name="aim" id="aim" size="40" value="${$uid.$user}{'aim'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="yim"><b>$profile_txt{'604'}: </b><br /><span class="small">$profile_txt{'602'}</span></label></td>        <td width="320" align="left"><label for="yim"><b>$profile_txt{'604'}: </b><br /><span class="small">$profile_txt{'602'}</span></label></td>
       <td align="left"><input type="text" maxlength="30" name="yim" id="yim" size="40" value="${$uid.$user}{'yim'}" /></td>        <td align="left"><input type="text" maxlength="30" name="yim" id="yim" size="40" value="${$uid.$user}{'yim'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="msn"><b>$profile_txt{'823'}: </b><br /><span class="small">$profile_txt{'824'}</span></label></td>        <td width="320" align="left"><label for="msn"><b>$profile_txt{'823'}: </b><br /><span class="small">$profile_txt{'824'}</span></label></td>
       <td align="left"><input type="text" maxlength="50" name="msn" id="msn" size="40" value="${$uid.$user}{'msn'}" /></td>        <td align="left"><input type="text" maxlength="50" name="msn" id="msn" size="40" value="${$uid.$user}{'msn'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="gtalk"><b>$profile_txt{'825'}: </b><br /><span class="small">$profile_txt{'826'}</span></label></td>        <td width="320" align="left"><label for="gtalk"><b>$profile_txt{'825'}: </b><br /><span class="small">$profile_txt{'826'}</span></label></td>
       <td align="left"><input type="text" maxlength="50" name="gtalk" id="gtalk" size="40" value="${$uid.$user}{'gtalk'}" /></td>        <td align="left"><input type="text" maxlength="50" name="gtalk" id="gtalk" size="40" value="${$uid.$user}{'gtalk'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="skype"><b>$profile_txt{'827'}: </b><br /><span class="small">$profile_txt{'828'}</span></label></td>        <td width="320" align="left"><label for="skype"><b>$profile_txt{'827'}: </b><br /><span class="small">$profile_txt{'828'}</span></label></td>
       <td align="left"><input type="text" maxlength="50" name="skype" id="skype" size="40" value="${$uid.$user}{'skype'}" /></td>        <td align="left"><input type="text" maxlength="50" name="skype" id="skype" size="40" value="${$uid.$user}{'skype'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320"><label for="myspace"><b>$profile_txt{'570'}:</b><br /><span class="small">$profile_txt{'571'}</span></label></td>        <td width="320"><label for="myspace"><b>$profile_txt{'570'}:</b><br /><span class="small">$profile_txt{'571'}</span></label></td>
       <td align="left"><label for="myspace"><span class="small">$profile_txt{'572'}</span></label><br /><input type="text" maxlength="50" name="myspace" id="myspace" size="40" value="${$uid.$user}{'myspace'}" /></td>        <td align="left"><label for="myspace"><span class="small">$profile_txt{'572'}</span></label><br /><input type="text" maxlength="50" name="myspace" id="myspace" size="40" value="${$uid.$user}{'myspace'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320"><label for="facebook"><b>$profile_txt{'573'}:</b><br /><span class="small">$profile_txt{'574'}</span></label></td>        <td width="320"><label for="facebook"><b>$profile_txt{'573'}:</b><br /><span class="small">$profile_txt{'574'}</span></label></td>
       <td align="left"><label for="facebook"><span class="small">$profile_txt{'575'}</span></label><br /><input type="text" maxlength="50" name="facebook" id="facebook" size="40" value="${$uid.$user}{'facebook'}" /></td>        <td align="left"><label for="facebook"><span class="small">$profile_txt{'575'}</span></label><br /><input type="text" maxlength="50" name="facebook" id="facebook" size="40" value="${$uid.$user}{'facebook'}" /></td>
   </tr>     </tr>~; 
     if (!$minlinkweb) { $minlinkweb = 0; }  
     if (${$uid.$user}{'postcount'} >= $minlinkweb || ${$uid.$user}{'position'} eq 'Administrator' || ${$uid.$user}{'position'} eq 'Global Moderator') {  
         $showProfile .= qq~  
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="webtitle"><b>$profile_txt{'83'}: </b><br /><span class="small">$profile_txt{'598'}</span></label></td>        <td width="320" align="left"><label for="webtitle"><b>$profile_txt{'83'}: </b><br /><span class="small">$profile_txt{'598'}</span></label></td>
       <td align="left"><input type="text" maxlength="30" name="webtitle" id="webtitle" size="40" value="${$uid.$user}{'webtitle'}" /></td>        <td align="left"><input type="text" maxlength="30" name="webtitle" id="webtitle" size="40" value="${$uid.$user}{'webtitle'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="weburl"><b>$profile_txt{'84'}: </b><br /><span class="small">$profile_txt{'599'}</span></label></td>        <td width="320" align="left"><label for="weburl"><b>$profile_txt{'84'}: </b><br /><span class="small">$profile_txt{'599'}</span></label></td>
       <td align="left"><input type="text" name="weburl" id="weburl" size="40" value="${$uid.$user}{'weburl'}" /></td>        <td align="left"><input type="text" name="weburl" id="weburl" size="40" value="${$uid.$user}{'weburl'}" /></td>
   </tr>~;    </tr>~;
     }  
   
   if (($PM_level == 1 || ($PM_level == 2 && ($iamadmin || $iamgmod || $iammod)) || ($PM_level == 3 && ($iamadmin || $iamgmod))) && ($enable_MCaway > 2 || ($enable_MCaway && (${$uid.$user}{'position'} eq 'Administrator' || ${$uid.$user}{'position'} eq 'Global Moderator' || &is_moderator($user))))) {    if (($PM_level == 1 || ($PM_level == 2 && ($iamadmin || $iamgmod || $iammod)) || ($PM_level == 3 && ($iamadmin || $iamgmod))) && ($enable_MCaway > 2 || ($enable_MCaway && (${$uid.$user}{'position'} eq 'Administrator' || ${$uid.$user}{'position'} eq 'Global Moderator' || &is_moderator($user))))) {
       my $offChecked = qq~ selected="selected"~;        my $offChecked = qq~ selected="selected"~;
       my $awayChecked = '';        my $awayChecked = '';
   
       if (${$uid.$user}{'offlinestatus'} eq 'away') {        if (${$uid.$user}{'offlinestatus'} eq 'away') {
           $offChecked = '';            $offChecked = '';
           $awayChecked = qq~ selected="selected"~;            $awayChecked = qq~ selected="selected"~;
       }        }
   
       my $awayreply = ${$uid.$user}{'awayreply'};        my $awayreply = ${$uid.$user}{'awayreply'};
       $awayreply =~ s~<br />~\n~g;        $awayreply =~ s~<br />~\n~g;
       $showProfile .= qq~        $showProfile .= qq~
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="offlinestatus"><b>$profile_txt{'showstatus'}: </b><br /><span class="small">$profile_txt{'statusexplain'}<br />$profile_txt{'awaydescription'}</span></label></td>        <td width="320" align="left"><label for="offlinestatus"><b>$profile_txt{'showstatus'}: </b><br /><span class="small">$profile_txt{'statusexplain'}<br />$profile_txt{'awaydescription'}</span></label></td>
       <td align="left">        <td align="left">
           <select name="offlinestatus" id="offlinestatus">            <select name="offlinestatus" id="offlinestatus">
           <option value="offline"$offChecked>$maintxt{'61'}</option>            <option value="offline"$offChecked>$maintxt{'61'}</option>
           <option value="away"$awayChecked>$maintxt{'away'}</option>            <option value="away"$awayChecked>$maintxt{'away'}</option>
           </select><br /><br />            </select><br /><br />
           <label for="awaysubj"><span class="small">$profile_txt{'asubj'}</span></label><br />            <label for="awaysubj"><span class="small">$profile_txt{'asubj'}</span></label><br />
           <input type="text" name="awaysubj" id="awaysubj" size="50" maxlength="50" value="${$uid.$user}{'awaysubj'}" /><br /><br />            <input type="text" name="awaysubj" id="awaysubj" size="50" maxlength="50" value="${$uid.$user}{'awaysubj'}" /><br /><br />
           <label for="awayreply"><span class="small">$profile_txt{'amess'}</span></label><br />            <label for="awayreply"><span class="small">$profile_txt{'amess'}</span></label><br />
           <textarea name="awayreply" id="awayreply" rows="4" cols="50">$awayreply</textarea><br />            <textarea name="awayreply" id="awayreply" rows="4" cols="50">$awayreply</textarea><br />
   
           <span class="small">$profile_txt{'664a'} <input value="$MaxAwayLen" size="3" name="msgCL" class="windowbg" style="border: 0px; width: 40px; padding: 1px; font-size: 11px;" readonly="readonly" /></span><br />            <span class="small">$profile_txt{'664a'} <input value="$MaxAwayLen" size="3" name="msgCL" class="windowbg" style="border: 0px; width: 40px; padding: 1px; font-size: 11px;" readonly="readonly" /></span><br />
           <script type="text/javascript" language="JavaScript">            <script type="text/javascript" language="JavaScript">
           <!--            <!--
               var supportsKeys = false;                var supportsKeys = false;
               function tick() {                function tick() {
                   calcCharLeft(document.forms[0]);                    calcCharLeft(document.forms[0]);
                   if (!supportsKeys) { timerID = setTimeout("tick()",200); }                    if (!supportsKeys) { timerID = setTimeout("tick()",200); }
               }                }
               function calcCharLeft(sig) {                function calcCharLeft(sig) {
                   clipped = false;                    clipped = false;
                   maxLength = $MaxAwayLen;                    maxLength = $MaxAwayLen;
                   if (document.creator.awayreply.value.length > maxLength) {                    if (document.creator.awayreply.value.length > maxLength) {
                       document.creator.awayreply.value = document.creator.awayreply.value.substring(0,maxLength);                        document.creator.awayreply.value = document.creator.awayreply.value.substring(0,maxLength);
                       charleft = 0;                        charleft = 0;
                       clipped = true;                        clipped = true;
                   } else {                    } else {
                       charleft = maxLength - document.creator.awayreply.value.length;                        charleft = maxLength - document.creator.awayreply.value.length;
                   }                    }
                   document.creator.msgCL.value = charleft;                    document.creator.msgCL.value = charleft;
                   return clipped;                    return clipped;
               }                }
               tick();                tick();
           // -->            // -->
           </script>            </script>
       </td>        </td>
   </tr>~;    </tr>~;
   }    }
   
   if ((${$uid.$user}{'position'} eq 'Administrator' || ${$uid.$user}{'position'} eq 'Global Moderator') && $enable_MCstatusStealth) {    if ((${$uid.$user}{'position'} eq 'Administrator' || ${$uid.$user}{'position'} eq 'Global Moderator') && $enable_MCstatusStealth) {
       my $stealthChecked = '';        my $stealthChecked = '';
       if (${$uid.$user}{'stealth'}) { $stealthChecked = ' checked="checked"'; }        if (${$uid.$user}{'stealth'}) { $stealthChecked = ' checked="checked"'; }
       $showProfile .= qq~        $showProfile .= qq~
   <tr class="windowbg">    <tr class="windowbg">
       <td width="320" align="left"><label for="stealth"><b>$profile_txt{'stealth'}: </b><br /><span class="small">$profile_txt{'stealthexplain'}</span></label></td>        <td width="320" align="left"><label for="stealth"><b>$profile_txt{'stealth'}: </b><br /><span class="small">$profile_txt{'stealthexplain'}</span></label></td>
       <td align="left"><input type="checkbox" name="stealth" id="stealth" value="1"$stealthChecked /></td>        <td align="left"><input type="checkbox" name="stealth" id="stealth" value="1"$stealthChecked /></td>
   </tr>~;    </tr>~;
   }    }
   
   if ($extendedprofiles) {    if ($extendedprofiles) {
       require "$sourcedir/ExtendedProfiles.pl";        require "$sourcedir/ExtendedProfiles.pl";
       $showProfile .= &ext_editprofile($user,"contact");        $showProfile .= &ext_editprofile($user,"contact");
   }    }
   
   $showProfile .= qq~    $showProfile .= qq~
   <tr class="catbg">    <tr class="catbg">
       <td height="50" valign="middle" align="center" colspan="2"><input type="submit" name="moda" value="$profile_txt{'88'}" class="button" /><br /><span class="small">$profile_txt{'sid_expires_1'} $sid_expires $profile_txt{'sid_expires_2'}</span></td>        <td height="50" valign="middle" align="center" colspan="2"><input type="submit" name="moda" value="$profile_txt{'88'}" class="button" /><br /><span class="small">$profile_txt{'sid_expires_1'} $sid_expires $profile_txt{'sid_expires_2'}</span></td>
   </tr>    </tr>
</table> </table>
</form>~; </form>~;
   
   if (!$view) {      if (!$view) {  
       $yymain .= $showProfile;        $yymain .= $showProfile;
       &template;        &template;
   }    }
} }
   
sub ModifyProfileOptions { sub ModifyProfileOptions {
   &SidCheck($action);    &SidCheck($action);
   &PrepareProfile;    &PrepareProfile;
   
   $menucolors[2] = "titlebg";    $menucolors[2] = "titlebg";
   &ProfileMenu;    &ProfileMenu;
   
   my $scriptAction = qq~profileOptions2~;    my $scriptAction = qq~profileOptions2~;
   if ($view) {      if ($view) {  
       $scriptAction = qq~myprofileOptions2~;        $scriptAction = qq~myprofileOptions2~;
       $yytitle = qq~$profile_txt{'editmyprofile'} &rsaquo; $profile_txt{'818'}~;        $yytitle = qq~$profile_txt{'editmyprofile'} &rsaquo; $profile_txt{'818'}~;
       $profiletitle = qq~$profile_txt{'editmyprofile'} ($user) &rsaquo; $profile_txt{'818'}~;        $profiletitle = qq~$profile_txt{'editmyprofile'} ($user) &rsaquo; $profile_txt{'818'}~;
       $yynavigation = qq~&rsaquo; <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> &rsaquo; $profiletitle~;        $yynavigation = qq~&rsaquo; <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> &rsaquo; $profiletitle~;
   } else {    } else {
       $yytitle = qq~$profile_txt{'79'} &rsaquo; $profile_txt{'818'}~;        $yytitle = qq~$profile_txt{'79'} &rsaquo; $profile_txt{'818'}~;
       $profiletitle = qq~$profile_txt{'79'} ($user) &rsaquo; $profile_txt{'818'}~;        $profiletitle = qq~$profile_txt{'79'} ($user) &rsaquo; $profile_txt{'818'}~;
       $yynavigation = qq~&rsaquo; $profiletitle~;        $yynavigation = qq~&rsaquo; $profiletitle~;
   }    }
   
   if ($allowpics && $upload_useravatar && $upload_avatargroup) {    if ($allowpics && $upload_useravatar && $upload_avatargroup) {
       $upload_useravatar = 0;        $upload_useravatar = 0;
       foreach my $av_gr (split(/, /, $upload_avatargroup)) {        foreach my $av_gr (split(/, /, $upload_avatargroup)) {
           if ($av_gr eq ${$uid.$user}{'position'}) { $upload_useravatar = 1; last; }            if ($av_gr eq ${$uid.$user}{'position'}) { $upload_useravatar = 1; last; }
           foreach (split(/,/, ${$uid.$user}{'addgroups'})) {            foreach (split(/,/, ${$uid.$user}{'addgroups'})) {
               if ($av_gr eq $_) { $upload_useravatar = 1; last; }                if ($av_gr eq $_) { $upload_useravatar = 1; last; }
           }            }
       }        }
   }    }
   
   $showProfile .= qq~    $showProfile .= qq~
<form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator"~ . (($allowpics && $upload_useravatar) ? qq~ enctype="multipart/form-data"~ : "") . qq~> <form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator"~ . (($allowpics && $upload_useravatar) ? qq~ enctype="multipart/form-data"~ : "") . qq~>
<table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0"> <table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0">
   <tr>    <tr>
       <td colspan="2" class="catbg"><img src="$imagesdir/profile.gif" alt="" border="0" /> <b>$profiletitle</b></td>        <td colspan="2" class="catbg"><img src="$imagesdir/profile.gif" alt="" border="0" /> <b>$profiletitle</b></td>
   </tr>    </tr>
   <tr class="windowbg">~;    <tr class="windowbg">~;
   
   if ($allowpics) {    if ($allowpics) {
       opendir(DIR, "$facesdir") || fatal_error("cannot_open_dir","($facesdir)!<br />$profile_txt{'681'}", 1);        opendir(DIR, "$facesdir") || fatal_error("cannot_open_dir","($facesdir)!<br />$profile_txt{'681'}", 1);
       @contents = readdir(DIR);        @contents = readdir(DIR);
       closedir(DIR);        closedir(DIR);
       $images = '';        $images = '';
       foreach $line (sort @contents) {        foreach $line (sort @contents) {
           ($name, $extension) = split(/\./, $line);            ($name, $extension) = split(/\./, $line);
           $checked = '';            $checked = '';
           if ($line eq ${$uid.$user}{'userpic'}) { $checked = ' selected="selected"'; }            if ($line eq ${$uid.$user}{'userpic'}) { $checked = ' selected="selected"'; }
           if (${$uid.$user}{'userpic'} =~ m~\Ahttps?://~ && $line eq 'blank.gif') { $checked = ' selected="selected" '; }            if (${$uid.$user}{'userpic'} =~ m~\Ahttps?://~ && $line eq 'blank.gif') { $checked = ' selected="selected" '; }
           if ($extension =~ /gif/i || $extension =~ /jpg/i || $extension =~ /jpeg/i || $extension =~ /png/i) {            if ($extension =~ /gif/i || $extension =~ /jpg/i || $extension =~ /jpeg/i || $extension =~ /png/i) {
               if ($line eq 'blank.gif') {                if ($line eq 'blank.gif') {
                   $images = qq~            <option value="$line"$checked>$profile_txt{'422'}</option>\n$images~;                    $images = qq~            <option value="$line"$checked>$profile_txt{'422'}</option>\n$images~;
               } else {                } else {
                   $images .= qq~            <option value="$line"$checked>$name</option>\n~;                    $images .= qq~            <option value="$line"$checked>$name</option>\n~;
               }                }
           }            }
       }        }
       my ($pic,$tmp,$s,$alt);        my ($pic,$tmp,$s,$alt);
       $tmp = $facesurl;        $tmp = $facesurl;
       $tmp =~ /^(http(s?):\/\/)/;        $tmp =~ /^(http(s?):\/\/)/;
       ($tmp,$s) = ($1,$2);        ($tmp,$s) = ($1,$2);
       if (${$uid.$user}{'userpic'} =~ m~\Ahttps?://~) {        if (${$uid.$user}{'userpic'} =~ m~\Ahttps?://~) {
           $pic = ${$uid.$user}{'userpic'};            $pic = ${$uid.$user}{'userpic'};
           $checked = ' checked="checked" ';            $checked = ' checked="checked" ';
           $tmp = ${$uid.$user}{'userpic'};            $tmp = ${$uid.$user}{'userpic'};
           $alt = $profile_txt{'473'} if $upload_useravatar;            $alt = $profile_txt{'473'} if $upload_useravatar;
       } else {        } else {
           $pic = "$facesurl/${$uid.$user}{'userpic'}";            $pic = "$facesurl/${$uid.$user}{'userpic'}";
       }        }
   
       $showProfile .= qq~        $showProfile .= qq~
       <td align="left"><label for="userpic"><b>$profile_txt{'229'}:</b></label><br /><span class="small"><label for="userpic">$profile_txt{'474'}</label><label for="userpicpersonalcheck">$profile_txt{'475'}</label>~ . ($upload_useravatar ? qq~<br />        <td align="left"><label for="userpic"><b>$profile_txt{'229'}:</b></label><br /><span class="small"><label for="userpic">$profile_txt{'474'}</label><label for="userpicpersonalcheck">$profile_txt{'475'}</label>~ . ($upload_useravatar ? qq~<br />
           $profile_txt{'476'} $avatar_limit KB~ : "") . qq~<br />            $profile_txt{'476'} $avatar_limit KB~ : "") . qq~<br />
           $profile_txt{'477'}</span></td>            $profile_txt{'477'}</span></td>
       <td align="left">        <td align="left">
           <script language="JavaScript1.2" type="text/javascript">            <script language="JavaScript1.2" type="text/javascript">
           <!--            <!--
               function showimage(x) {                function showimage(x) {
                   if (!document.images) return;                    if (!document.images) return;
                   var source;                    var source;
                   if (x == 1 && document.getElementsByName('userpicpersonalcheck')[0].checked == true) {                    if (x == 1 && document.getElementsByName('userpicpersonalcheck')[0].checked == true) {
                       UserPicUrl = document.getElementsByName('userpicpersonal')[0].value;                        UserPicUrl = document.getElementsByName('userpicpersonal')[0].value;
                       document.getElementsByName('userpicpersonal')[0].value = 'http$s://';                        document.getElementsByName('userpicpersonal')[0].value = 'http$s://';
                       document.getElementsByName('userpicpersonalcheck')[0].checked = false;                        document.getElementsByName('userpicpersonalcheck')[0].checked = false;
                   }                    }
                   if (x == 1) {                    if (x == 1) {
                       source = "$facesurl/"+document.creator.userpic.options[document.creator.userpic.selectedIndex].value;                        source = "$facesurl/"+document.creator.userpic.options[document.creator.userpic.selectedIndex].value;
                   } else {                    } else {
                       document.creator.userpic.options[0].selected = true;                        document.creator.userpic.options[0].selected = true;
                       source = document.getElementsByName('userpicpersonal')[0].value;                        source = document.getElementsByName('userpicpersonal')[0].value;
                       if (!source || source == 'http$s://') source = "$facesurl/blank.gif";                        if (!source || source == 'http$s://') source = "$facesurl/blank.gif";
                   }                    }
                   document.images.icons.style.display = 'none';                    document.images.icons.style.display = 'none';
                   document.images.icons.width = '';                    document.images.icons.width = '';
                   document.images.icons.height = '';                    document.images.icons.height = '';
                   document.images.icons.src = source;                    document.images.icons.src = source;
                   resize_time = 2;                    resize_time = 2;
                   img_resize_names = new Array ('avatar_img_resize_1');                    img_resize_names = new Array ('avatar_img_resize_1');
                   resize_images();                    resize_images();
               }                }
           // -->            // -->
           </script>            </script>
           <select name="userpic" id="userpic" size="6" onchange="showimage(1);">            <select name="userpic" id="userpic" size="6" onchange="showimage(1);">
           $images            $images
           </select>&nbsp;&nbsp;<img src="$pic" id="icons" name="avatar_img_resize" alt="$alt" border="0" hspace="15" style="display:none" /><br />            </select>&nbsp;&nbsp;<img src="$pic" id="icons" name="avatar_img_resize" alt="$alt" border="0" hspace="15" style="display:none" /><br />
           <br />            <br />
           <input type="checkbox" name="userpicpersonalcheck" id="userpicpersonalcheck" $checked onclick="if(this.checked==false){UserPicUrl=document.getElementsByName('userpicpersonal')[0].value;document.getElementsByName('userpicpersonal')[0].value='http$s://';}else{document.getElementsByName('userpicpersonal')[0].value=UserPicUrl;}showimage(2);" />&nbsp;<input type="text" name="userpicpersonal" size="40" value="$tmp" onkeyup="document.getElementsByName('userpicpersonalcheck')[0].checked=true;showimage(2);" />~ . ($upload_useravatar ? qq~<br />            <input type="checkbox" name="userpicpersonalcheck" id="userpicpersonalcheck" $checked onclick="if(this.checked==false){UserPicUrl=document.getElementsByName('userpicpersonal')[0].value;document.getElementsByName('userpicpersonal')[0].value='http$s://';}else{document.getElementsByName('userpicpersonal')[0].value=UserPicUrl;}showimage(2);" />&nbsp;<input type="text" name="userpicpersonal" size="40" value="$tmp" onkeyup="document.getElementsByName('userpicpersonalcheck')[0].checked=true;showimage(2);" />~ . ($upload_useravatar ? qq~<br />
           <br />            <br />
           <input type="file" name="file_avatar" size="50" />~ : "") . qq~            <input type="file" name="file_avatar" size="50" />~ : "") . qq~
       </td>        </td>
   </tr>~;    </tr>~;
   }    }
   
   $signature = ${$uid.$user}{'signature'};    $signature = ${$uid.$user}{'signature'};
   $signature =~ s/<br.*?>/\n/g;    $signature =~ s/<br.*?>/\n/g;
   
   $showProfile .= qq~    $showProfile .= qq~
   <tr class="windowbg">    <tr class="windowbg">
       <td align="left"><label for="usertext"><b>$profile_txt{'228'}: </b></label></td>        <td align="left"><label for="usertext"><b>$profile_txt{'228'}: </b></label></td>
       <td align="left"><input type="text" name="usertext" id="usertext" size="40" value="${$uid.$user}{'usertext'}" maxlength="50" /></td>        <td align="left"><input type="text" name="usertext" id="usertext" size="40" value="${$uid.$user}{'usertext'}" maxlength="50" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td align="left"><label for="signature"><b>$profile_txt{'85'}:</b><br /><span class="small">$profile_txt{'606'}</span></label></td>        <td align="left"><label for="signature"><b>$profile_txt{'85'}:</b><br /><span class="small">$profile_txt{'606'}</span></label></td>
       <td align="left"><textarea name="signature" id="signature" rows="4" cols="30" style="width: 100%">$signature</textarea><br />        <td align="left"><textarea name="signature" id="signature" rows="4" cols="30" style="width: 100%">$signature</textarea><br />
           <span class="small">$profile_txt{'664'} <input value="$MaxSigLen" size="3" name="msgCL" class="windowbg" style="border: 0px; width: 40px; padding: 1px; font-size: 11px;" readonly="readonly" /></span><br /><br />            <span class="small">$profile_txt{'664'} <input value="$MaxSigLen" size="3" name="msgCL" class="windowbg" style="border: 0px; width: 40px; padding: 1px; font-size: 11px;" readonly="readonly" /></span><br /><br />
           <script type="text/javascript" language="JavaScript">            <script type="text/javascript" language="JavaScript">
           <!--            <!--
               var supportsKeys = false;                var supportsKeys = false;
               function tick() {                function tick() {
                   calcCharLeft(document.forms[0]);                    calcCharLeft(document.forms[0]);
                   if (!supportsKeys) { timerID = setTimeout("tick()", 1500); }                    if (!supportsKeys) { timerID = setTimeout("tick()", 1500); }
               }                }
   
               function calcCharLeft(sig) {                function calcCharLeft(sig) {
                   clipped = false;                    clipped = false;
                   maxLength = $MaxSigLen;                    maxLength = $MaxSigLen;
                   if (document.creator.signature.value.length > maxLength) {                    if (document.creator.signature.value.length > maxLength) {
                       document.creator.signature.value = document.creator.signature.value.substring(0,maxLength);                        document.creator.signature.value = document.creator.signature.value.substring(0,maxLength);
                       charleft = 0;                        charleft = 0;
                       clipped = true;                        clipped = true;
                   } else {                    } else {
                       charleft = maxLength - document.creator.signature.value.length;                        charleft = maxLength - document.creator.signature.value.length;
                   }                    }
                   document.creator.msgCL.value = charleft;                    document.creator.msgCL.value = charleft;
                   return clipped;                    return clipped;
               }                }
               tick();                tick();
           // -->            // -->
           </script>            </script>
       </td>        </td>
   </tr>~;    </tr>~;
   
   if ($addmemgroup_enabled > 1 && %NoPost) {    if ($addmemgroup_enabled > 1 && %NoPost) {
       my ($addmemgroup, $selsize) = &DrawGroups(${$uid.$user}{'addgroups'}, ${$uid.$user}{'position'}, 0);        my ($addmemgroup, $selsize) = &DrawGroups(${$uid.$user}{'addgroups'}, ${$uid.$user}{'position'}, 0);
   
       $showProfile .= qq~        $showProfile .= qq~
   <tr class="windowbg">    <tr class="windowbg">
       <td align="left"><label for="joinmemgroup"><b>$profile_txt{'910'}:</b><br /><span class="small">$profile_txt{'910a'}</span></label></td>        <td align="left"><label for="joinmemgroup"><b>$profile_txt{'910'}:</b><br /><span class="small">$profile_txt{'910a'}</span></label></td>
       <td align="left">        <td align="left">
           <select name="joinmemgroup" id="joinmemgroup" size="$selsize" multiple="multiple">            <select name="joinmemgroup" id="joinmemgroup" size="$selsize" multiple="multiple">
           $addmemgroup            $addmemgroup
           </select>            </select>
       </td>        </td>
   </tr>~ if $addmemgroup;    </tr>~ if $addmemgroup;
   }    }
   
   if    (${$uid.$user}{'numberformat'} == 1) { $unfsl1 = ' selected="selected" '; }    if    (${$uid.$user}{'numberformat'} == 1) { $unfsl1 = ' selected="selected" '; }
   elsif (${$uid.$user}{'numberformat'} == 2) { $unfsl2 = ' selected="selected" '; }    elsif (${$uid.$user}{'numberformat'} == 2) { $unfsl2 = ' selected="selected" '; }
   elsif (${$uid.$user}{'numberformat'} == 3) { $unfsl3 = ' selected="selected" '; }    elsif (${$uid.$user}{'numberformat'} == 3) { $unfsl3 = ' selected="selected" '; }
   elsif (${$uid.$user}{'numberformat'} == 4) { $unfsl4 = ' selected="selected" '; }    elsif (${$uid.$user}{'numberformat'} == 4) { $unfsl4 = ' selected="selected" '; }
   elsif (${$uid.$user}{'numberformat'} == 5) { $unfsl5 = ' selected="selected" '; }    elsif (${$uid.$user}{'numberformat'} == 5) { $unfsl5 = ' selected="selected" '; }
   elsif ($forumnumberformat == 1) { $unfsl1 = ' selected="selected" '; }    elsif ($forumnumberformat == 1) { $unfsl1 = ' selected="selected" '; }
   elsif ($forumnumberformat == 2) { $unfsl2 = ' selected="selected" '; }    elsif ($forumnumberformat == 2) { $unfsl2 = ' selected="selected" '; }
   elsif ($forumnumberformat == 3) { $unfsl3 = ' selected="selected" '; }    elsif ($forumnumberformat == 3) { $unfsl3 = ' selected="selected" '; }
   elsif ($forumnumberformat == 4) { $unfsl4 = ' selected="selected" '; }    elsif ($forumnumberformat == 4) { $unfsl4 = ' selected="selected" '; }
   elsif ($forumnumberformat == 5) { $unfsl5 = ' selected="selected" '; }    elsif ($forumnumberformat == 5) { $unfsl5 = ' selected="selected" '; }
   if    (${$uid.$user}{'timeselect'} == 7) { $tsl7 = ' selected="selected" '; }    if    (${$uid.$user}{'timeselect'} == 7) { $tsl7 = ' selected="selected" '; }
   elsif (${$uid.$user}{'timeselect'} == 6) { $tsl6 = ' selected="selected" '; }    elsif (${$uid.$user}{'timeselect'} == 6) { $tsl6 = ' selected="selected" '; }
   elsif (${$uid.$user}{'timeselect'} == 5) { $tsl5 = ' selected="selected" '; }    elsif (${$uid.$user}{'timeselect'} == 5) { $tsl5 = ' selected="selected" '; }
   elsif (${$uid.$user}{'timeselect'} == 4) { $tsl4 = ' selected="selected" '; }    elsif (${$uid.$user}{'timeselect'} == 4) { $tsl4 = ' selected="selected" '; }
   elsif (${$uid.$user}{'timeselect'} == 3) { $tsl3 = ' selected="selected" '; }    elsif (${$uid.$user}{'timeselect'} == 3) { $tsl3 = ' selected="selected" '; }
   elsif (${$uid.$user}{'timeselect'} == 2) { $tsl2 = ' selected="selected" '; }    elsif (${$uid.$user}{'timeselect'} == 2) { $tsl2 = ' selected="selected" '; }
   elsif (${$uid.$user}{'timeselect'} == 1) { $tsl1 = ' selected="selected" '; }    elsif (${$uid.$user}{'timeselect'} == 1) { $tsl1 = ' selected="selected" '; }
   elsif (${$uid.$user}{'timeselect'} == 8) { $tsl8 = ' selected="selected" '; }    elsif (${$uid.$user}{'timeselect'} == 8) { $tsl8 = ' selected="selected" '; }
   elsif ($timeselected == 8) { $tsl8 = ' selected="selected" '; }    elsif ($timeselected == 8) { $tsl8 = ' selected="selected" '; }
   elsif ($timeselected == 7) { $tsl7 = ' selected="selected" '; }    elsif ($timeselected == 7) { $tsl7 = ' selected="selected" '; }
   elsif ($timeselected == 6) { $tsl6 = ' selected="selected" '; }    elsif ($timeselected == 6) { $tsl6 = ' selected="selected" '; }
   elsif ($timeselected == 5) { $tsl5 = ' selected="selected" '; }    elsif ($timeselected == 5) { $tsl5 = ' selected="selected" '; }
   elsif ($timeselected == 4) { $tsl4 = ' selected="selected" '; }    elsif ($timeselected == 4) { $tsl4 = ' selected="selected" '; }
   elsif ($timeselected == 3) { $tsl3 = ' selected="selected" '; }    elsif ($timeselected == 3) { $tsl3 = ' selected="selected" '; }
   elsif ($timeselected == 2) { $tsl2 = ' selected="selected" '; }    elsif ($timeselected == 2) { $tsl2 = ' selected="selected" '; }
   elsif ($timeselected == 1) { $tsl1 = ' selected="selected" '; }    elsif ($timeselected == 1) { $tsl1 = ' selected="selected" '; }
   
   my @usertimeoffset = split(/\./, ${$uid.$user}{'timeoffset'});    my @usertimeoffset = split(/\./, ${$uid.$user}{'timeoffset'});
   
   $showProfile .= qq~    $showProfile .= qq~
   <tr class="windowbg">    <tr class="windowbg">
       <td align="left"><label for="usernumberformat"><b>$profile_txt{'usernumbformat'}:</b></label></td>        <td align="left"><label for="usernumberformat"><b>$profile_txt{'usernumbformat'}:</b></label></td>
       <td align="left">        <td align="left">
           <select name="usernumberformat" id="usernumberformat" size="1">            <select name="usernumberformat" id="usernumberformat" size="1">
           <option value="1"$unfsl1>10987.65</option>            <option value="1"$unfsl1>10987.65</option>
           <option value="2"$unfsl2>10987,65</option>            <option value="2"$unfsl2>10987,65</option>
           <option value="3"$unfsl3>10,987.65</option>            <option value="3"$unfsl3>10,987.65</option>
           <option value="4"$unfsl4>10.987,65</option>            <option value="4"$unfsl4>10.987,65</option>
           <option value="5"$unfsl5>10 987,65</option>            <option value="5"$unfsl5>10 987,65</option>
           </select>            </select>
       </td>        </td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td align="left"><label for="usertimeselect"><b>$profile_txt{'486'}:</b><br />        <td align="left"><label for="usertimeselect"><b>$profile_txt{'486'}:</b><br />
           <span class="small">$profile_txt{'479'}</span></label></td>            <span class="small">$profile_txt{'479'}</span></label></td>
       <td align="left">        <td align="left">
           <select name="usertimeselect" id="usertimeselect" size="1">            <select name="usertimeselect" id="usertimeselect" size="1">
           <option value="1"$tsl1>$profile_txt{'480'}</option>            <option value="1"$tsl1>$profile_txt{'480'}</option>
           <option value="5"$tsl5>$profile_txt{'484'}</option>            <option value="5"$tsl5>$profile_txt{'484'}</option>
           <option value="4"$tsl4>$profile_txt{'483'}</option>            <option value="4"$tsl4>$profile_txt{'483'}</option>
           <option value="8"$tsl8>$profile_txt{'483a'}</option>            <option value="8"$tsl8>$profile_txt{'483a'}</option>
           <option value="2"$tsl2>$profile_txt{'481'}</option>            <option value="2"$tsl2>$profile_txt{'481'}</option>
           <option value="3"$tsl3>$profile_txt{'482'}</option>            <option value="3"$tsl3>$profile_txt{'482'}</option>
           <option value="6"$tsl6>$profile_txt{'485'}</option>            <option value="6"$tsl6>$profile_txt{'485'}</option>
           <option value="7"$tsl7>$profile_txt{'480a'}</option>            <option value="7"$tsl7>$profile_txt{'480a'}</option>
           </select>            </select>
       </td>        </td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td align="left"><label for="timeformat"><b>$profile_txt{'486a'}:</b></label></td>        <td align="left"><label for="timeformat"><b>$profile_txt{'486a'}:</b></label></td>
       <td align="left"><input type="text" name="timeformat" id="timeformat" size="40" value="${$uid.$user}{'timeformat'}" /></td>        <td align="left"><input type="text" name="timeformat" id="timeformat" size="40" value="${$uid.$user}{'timeformat'}" /></td>
   </tr>    </tr>
   <tr class="windowbg">    <tr class="windowbg">
       <td align="left"><label for="usertimesign"><b>$profile_txt{'371'}:</b><br /><span class="small">$profile_txt{'372'}</span></label></td>        <td align="left"><label for="usertimesign"><b>$profile_txt{'371'}:</b><br /><span class="small">$profile_txt{'372'}</span></label></td>
       <td align="left"><span class="small">$profile_txt{'373'}:<br /><b>~ . &timeformat($date,1) . qq~</b><br /><br /></span><select name="usertimesign" id="usertimesign"><option value="">+</option><option value="-"~ . ($usertimeoffset[0] < 0 ? ' selected="selected"' : '') . qq~>-</option></select>        <td align="left"><span class="small">$profile_txt{'373'}:<br /><b>~ . &timeformat($date,1) . qq~</b><br /><br /></span><select name="usertimesign" id="usertimesign"><option value="">+</option><option value="-"~ . ($usertimeoffset[0] < 0 ? ' selected="selected"' : '') . qq~>-</option></select>
           <select name="usertimehour" id="usertimehour">~;            <select name="usertimehour" id="usertimehour">~;
   for (my $i = 0; 15 > $i; $i++) {    for (my $i = 0; 15 > $i; $i++) {
       $i = sprintf("%02d", $i);        $i = sprintf("%02d", $i);
       $showProfile .= qq~\n            <option value="$i"~ . (($usertimeoffset[0] == $i || $usertimeoffset[0] == -$i) ? ' selected="selected"' : '') . qq~>$i</option>~;        $showProfile .= qq~\n            <option value="$i"~ . (($usertimeoffset[0] == $i || $usertimeoffset[0] == -$i) ? ' selected="selected"' : '') . qq~>$i</option>~;
   }    }
   $showProfile .= qq~    $showProfile .= qq~
           </select> : <select name="usertimemin">~;            </select> : <select name="usertimemin">~;
   for (my $i = 0; 60 > $i; $i++) {    for (my $i = 0; 60 > $i; $i++) {
       my $j = $i / 60;        my $j = $i / 60;
       $j = (split(/\./, $j))[1] || 0;        $j = (split(/\./, $j))[1] || 0;
       $showProfile .= qq~\n            <option value="$j"~ . ($usertimeoffset[1] eq $j ? ' selected="selected"' : '') . qq~>~ . sprintf("%02d", $i) . qq~</option>~;        $showProfile .= qq~\n            <option value="$j"~ . ($usertimeoffset[1] eq $j ? ' selected="selected"' : '') . qq~>~ . sprintf("%02d", $i) . qq~</option>~;
   }    }
   $showProfile .= qq~    $showProfile .= qq~
           </select>            <