| ############################################################################### |
| ############################################################################### |
| # Profile.pl # |
| # Profile.pm # |
| |
| # $Date: 01.05.16 $ # |
| ############################################################################### |
| ############################################################################### |
| # 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.2 # |
| # Version: YaBB 2.6.12 # |
| # Packaged: October 21, 2012 # |
| # Packaged: January 5, 2016 # |
| # Distributed by: http://www.yabbforum.com # |
| # Distributed by: http://www.yabbforum.com # |
| # =========================================================================== # |
| # =========================================================================== # |
| # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Copyright (c) 2000-2016 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. # |
| ############################################################################### |
| ############################################################################### |
| |
| # use strict; |
| |
| # use warnings; |
| |
| no warnings qw(uninitialized once redefine); |
| |
| use English qw(-no_match_vars); |
| |
| use CGI::Carp qw(fatalsToBrowser); |
| |
| our $VERSION = '2.6.12'; |
| |
| |
| |
| $profilepmver = 'YaBB 2.6.12 $Revision: 1710 $'; |
| |
| if ( $action eq 'detailedversion' ) { return 1; } |
| |
| |
| |
| LoadLanguage('Profile'); |
| |
| LoadLanguage('Register'); |
| |
| require Sources::AddModerators; |
| |
| get_micon(); |
| |
| get_template('MyProfile'); |
| |
| get_gmod(); |
| |
| |
| $profileplver = 'YaBB 2.5.2 $Revision: 1.2 $'; |
| $pm_lev = PMlev(); |
| if ($action eq 'detailedversion') { return 1; } |
| |
| |
| |
| &LoadLanguage('Profile'); |
| |
| |
| |
| 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{/}sm ) { fatal_error('no_user_slash'); } |
| if ($user =~ m~\\~) { &fatal_error('no_user_backslash'); } |
| if ( $user =~ m{\\}sm ) { fatal_error('no_user_backslash'); } |
| |
| |
| unless (&LoadUser($user)) { &fatal_error('no_profile_exists'); } |
| if ( !LoadUser($user) ) { fatal_error('no_profile_exists'); } |
| |
| |
| if (($user ne $username && !$iamadmin && (!$iamgmod || !$allow_gmod_profile)) || |
| if ( |
| ($user eq 'admin' && $username ne 'admin') || |
| ( |
| ($iamgmod && ${$uid.$user}{'position'} eq 'Administrator')) { &fatal_error('not_allowed_profile_change'); } |
| $user ne $username |
| |
| && !$iamadmin |
| |
| && ( !$iamgmod || !$allow_gmod_profile ) |
| |
| ) |
| |
| || ( $user eq 'admin' && $username ne 'admin' ) |
| |
| || ( $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); |
| |
| return; |
| } |
| } |
| |
| |
| # 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 @x = @_; |
| my $sid_check = substr($date, 5, 5); |
| my $cur_sid = decloak( $INFO{'sid'} ); |
| if ($sid_check <= 600 && $cur_sid >= 99400) { $sid_check += 100000; } |
| my $sid_check = substr $date, 5, 5; |
| |
| if ( $sid_check <= 600 && $cur_sid >= 99_400 ) { $sid_check += 100_000; } |
| $sid_expires = $cur_sid + 600 - $sid_check; |
| |
| |
| $sid_expires = $cur_sid + 600 - $sid_check; |
| &ProfileCheck($_[0]) if $sid_expires < 0 || $cur_sid > $sid_check; |
| |
| |
| if ( $sid_expires < 0 || $cur_sid > $sid_check ) { ProfileCheck( $x[0] ); } |
| |
| if ( $sid_expires < 60 ) { |
| |
| $expsectxt = |
| |
| ( $sid_expires == 1 ) |
| |
| ? $profile_txt{'sid_expires_3'} |
| |
| : $profile_txt{'sid_expires_2'}; |
| |
| $expiretxt = qq~$profile_txt{'sid_expires_1'} $sid_expires $expsectxt~; |
| |
| } |
| |
| else { |
| |
| $expiremin = int( $sid_expires / 60 ); |
| |
| $expiresec = $sid_expires % 60; |
| |
| $expmintxt = |
| |
| ( $expiremin == 1 ) |
| |
| ? $profile_txt{'sid_expires_4'} |
| |
| : $profile_txt{'sid_expires_5'}; |
| |
| $expsectxt = |
| |
| ( $expiresec == 1 ) |
| |
| ? $profile_txt{'sid_expires_3'} |
| |
| : $profile_txt{'sid_expires_2'}; |
| |
| $expiretxt = |
| |
| qq~$profile_txt{'sid_expires_1'} $expiremin $expmintxt $expiresec $expsectxt~; |
| |
| } |
| |
| return; |
| } |
| } |
| |
| |
| sub ProfileCheck { |
| sub ProfileCheck { |
| &PrepareProfile; |
| my @x = @_; |
| |
| PrepareProfile(); |
| |
| |
| my $sid_descript = $mycenter_profile_txt{siddescript}; |
| my $sid_descript = $mycenter_profile_txt{'siddescript'}; |
| if ($_[0]) { |
| if ( $x[0] ) { |
| $sid_descript = $mycenter_profile_txt{timeoutdescript}; |
| $sid_descript = $mycenter_profile_txt{'timeoutdescript'}; |
| $redirsid = $_[0]; |
| $redirsid = $x[0]; |
| $yyjavascript .= qq~\nalert("$profile_txt{'897'}");~ if $redirsid =~ s/2$//; |
| if ( $redirsid =~ s/2$//xsm ) { |
| } else { |
| $yyjavascript .= qq~\nalert("$profile_txt{'897'}");~; |
| $redirsid = $INFO{'page'} || 'profile'; |
| } |
| } |
| } |
| |
| else { |
| $yymain .= qq~ |
| $redirsid = $INFO{'page'} || 'profile'; |
| <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"> |
| |
| <tr><td class="titlebg" colspan="2"><b>$profile_txt{'901'}</b></td></tr> |
| |
| <tr> |
| |
| <td class="windowbg2" align="center"> |
| |
| <label for="passwrd"><span class="small"><br />$sid_descript<br /><br /></span></label> |
| |
| </td> |
| |
| </tr> |
| |
| <tr> |
| |
| <td class="windowbg2" align="center" valign="middle"> |
| |
| <form action="$scripturl?action=profileCheck2;username=$useraccount{$user}" method="post" name="confirmform"> |
| |
| <input type="hidden" name="redir" value="$redirsid" /> |
| |
| <div style="padding-top: 4px;"> |
| |
| <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_char">$profile_txt{'wrong_char'}: <span id="cappasswrd_character"> </span></div> |
| |
| </div> |
| |
| <div style="padding-top: 8px;"> |
| |
| <input type="submit" value="$profile_txt{'900'}" class="button" /> |
| |
| </div> |
| |
| </form> |
| |
| </td> |
| |
| </tr> |
| |
| </table> |
| |
| </div> |
| |
| <script type="text/javascript" language="JavaScript"> |
| |
| <!-- |
| |
| document.confirmform.passwrd.focus(); |
| |
| // --> |
| |
| </script> |
| |
| ~; |
| |
| |
| |
| $yynavigation = qq~› $profile_txt{'900'}~; |
| $yymain .= $myprofile_a; |
| $yytitle = $profile_txt{'900'}; |
| $yymain =~ s/{yabb sid_descript}/$sid_descript/sm; |
| &template; |
| $yymain =~ |
| |
| s/{yabb prof_act}/$scripturl?action=profileCheck2;username=$useraccount{$user}/sm; |
| |
| $yymain =~ s/{yabb redirsid}/$redirsid/sm; |
| |
| |
| |
| $yynavigation = qq~› $profile_txt{'900'}~; |
| |
| $yytitle = $profile_txt{'900'}; |
| |
| template(); |
| |
| return; |
| } |
| } |
| |
| |
| sub ProfileCheck2 { |
| sub ProfileCheck2 { |
| &PrepareProfile; |
| PrepareProfile(); |
| |
| |
| |
| my $password = encode_password( $FORM{'passwrd'} || $INFO{'passwrd'} ); |
| |
| if ( $user eq $username && $password ne ${ $uid . $username }{'password'} ) |
| |
| { |
| |
| fatal_error('current_password_wrong'); |
| |
| } |
| |
| if ( ( $iamadmin || ( $iamgmod && $allow_gmod_profile ) ) |
| |
| && $password ne ${ $uid . $username }{'password'} ) |
| |
| { |
| |
| fatal_error('no_admin_password'); |
| |
| } |
| |
| |
| my $password = &encode_password($FORM{'passwrd'} || $INFO{'passwrd'}); |
| # Update the sessionID too |
| if ($user eq $username && $password ne ${$uid.$username}{'password'}) { |
| ${ $uid . $username }{'session'} = encode_password($user_ip); |
| &fatal_error('current_password_wrong'); |
| UserAccount( $username, 'update' ); |
| } |
| |
| if (($iamadmin || ($iamgmod && $allow_gmod_profile)) && $password ne ${$uid.$username}{'password'}) { |
| # update only this cookie since we don't know when the others will expire |
| &fatal_error('no_admin_password'); |
| $yySetCookies3 = write_cookie( |
| } |
| -name => "$cookiesession_name", |
| # Update the sessionID too |
| -value => "${$uid.$username}{'session'}", |
| ${$uid.$username}{'session'} = &encode_password($user_ip); |
| -path => q{/}, |
| &UserAccount($username, "update"); |
| -expires => 'Sunday, 17-Jan-2038 00:00:00 GMT' |
| |
| ); |
| # update only this cookie since we don't know when the others will expire |
| |
| $yySetCookies3 = &write_cookie( |
| # Get a semi-secure SID - only for profile changes |
| -name => "$cookiesession_name", |
| # cloak the sid -> no point giving anyone the means. |
| -value => "${$uid.$username}{'session'}", |
| $yySetLocation = |
| -path => "/", |
| "$scripturl?action=" |
| -expires => "Sunday, 17-Jan-2038 00:00:00 GMT"); |
| . ( $FORM{'redir'} || $INFO{'redir'} || 'profile' ) |
| |
| . ";username=$useraccount{$user};sid=" |
| # Get a semi-secure SID - only for profile changes |
| . cloak( reverse substr $date, 5, 5 ) |
| # cloak the sid -> no point giving anyone the means. |
| . ( $INFO{'newpassword'} ? ';newpassword=1' : q{} ); |
| $yySetLocation = "$scripturl?action=" . ($FORM{'redir'} || $INFO{'redir'} || 'profile') . ";username=$useraccount{$user};sid=" . &cloak(reverse(substr($date, 5, 5))) . ($INFO{'newpassword'} ? ";newpassword=1" : ""); |
| redirectexit(); |
| &redirectexit; |
| return; |
| } |
| } |
| |
| |
| sub ProfileMenu { |
| sub ProfileMenu { |
| return if $view; |
| return if $view; |
| |
| |
| $yymain .= qq~ |
| if ($buddyListEnabled) { |
| <table cellspacing="1" cellpadding="4" width="100%" border="0" class="bordercolor"> |
| $bdlist = $myprofie_bdlist; |
| <tr> |
| $bdlist =~ s/{yabb menucolor3}/$menucolors[3]/sm; |
| <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> |
| $bdlist =~ s/{yabb bduser}/$useraccount{$user}/sm; |
| <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>~; |
| |
| |
| if ( $pm_lev == 1 ) { |
| if ($buddyListEnabled){ |
| $pmlevel = $myprofile_pmlevel; |
| $yymain .= qq~ |
| $pmlevel =~ s/{yabb menucolor4}/$menucolors[4]/sm; |
| <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>~; |
| $pmlevel =~ s/{yabb pmuser}/$useraccount{$user}/sm; |
| } |
| } |
| |
| if ( |
| if ($PM_level == 1 || ($PM_level == 2 && ($iamadmin || $iamgmod || $iammod)) || ($PM_level == 3 && ($iamadmin || $iamgmod))) { |
| $iamadmin |
| $yymain .= qq~ |
| || ( $iamgmod |
| <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>~; |
| && $allow_gmod_profile |
| } |
| && $gmod_access2{'profileAdmin'} eq 'on' ) |
| |
| ) |
| if ($iamadmin || ($iamgmod && $allow_gmod_profile && $gmod_access2{'profileAdmin'} eq 'on')) { |
| { |
| $yymain .= qq~ |
| $showadmin = $myprofile_showadmin; |
| <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>~; |
| $showadmin =~ s/{yabb menucolor5}/$menucolors[5]/sm; |
| } |
| $showadmin =~ s/{yabb aduser}/$useraccount{$user}/sm; |
| $yymain .= qq~ |
| } |
| </tr> |
| $yymain .= $myprofile_menu; |
| </table> |
| $yymain =~ s/{yabb menu_user}/$useraccount{$user}/gsm; |
| <br /> |
| $yymain =~ s/{yabb sid}/$INFO{'sid'}/gsm; |
| ~; |
| $yymain =~ s/{yabb menucolor0}/$menucolors[0]/sm; |
| |
| $yymain =~ s/{yabb menucolor1}/$menucolors[1]/sm; |
| |
| $yymain =~ s/{yabb menucolor2}/$menucolors[2]/sm; |
| |
| $yymain =~ s/{yabb bdlist}/$bdlist/sm; |
| |
| $yymain =~ s/{yabb pmlevel}/$pmlevel/sm; |
| |
| $yymain =~ s/{yabb showadmin}/$showadmin/sm; |
| |
| return $yymain; |
| } |
| } |
| |
| |
| sub ModifyProfile { |
| sub ModifyProfile { |
| &SidCheck($action); |
| SidCheck($action); |
| &PrepareProfile; |
| PrepareProfile(); |
| |
| |
| $menucolors[0] = "titlebg"; |
| $menucolors[0] = 'selected-bg'; |
| &ProfileMenu; |
| ProfileMenu(); |
| |
| |
| if ($iamadmin) { |
| if ($iamadmin) { |
| $confdel_text = qq~$profile_txt{'775'} $profile_txt{'777'} $user $profile_txt{'778'}~; |
| $confdel_text = |
| if ($user eq $username) { |
| qq~$profile_txt{'775'} $profile_txt{'777'} $user $profile_txt{'778'}~; |
| $passtext = $profile_txt{'821'}; |
| if ( $user eq $username ) { |
| } else { |
| $passtext = $profile_txt{'821'}; |
| $passtext = qq~$profile_txt{'2'} $profile_txt{'36'}~; |
| } |
| } |
| else { |
| } else { |
| $passtext = qq~$profile_txt{'2'} $profile_txt{'36'}~; |
| $confdel_text = qq~$profile_txt{'775'} $profile_txt{'776'} $profile_txt{'778'}~; |
| } |
| $passtext = $profile_txt{'821'}; |
| } |
| } |
| else { |
| |
| $confdel_text = |
| $passtext .= qq~<br /><span class="small" style="font-weight: normal;">$profile_txt{'895'}</span>~; |
| qq~$profile_txt{'775'} $profile_txt{'776'} $profile_txt{'778'}~; |
| |
| $passtext = $profile_txt{'821'}; |
| my $scriptAction = qq~profile2~; |
| } |
| if ($view) { |
| |
| $scriptAction = qq~myprofile2~; |
| $passtext .= qq~<br /><span class="small norm">$profile_txt{'895'}</span>~; |
| $yytitle = $profile_txt{'editmyprofile'}; |
| |
| $profiletitle = qq~$profile_txt{'editmyprofile'} ($user)~; |
| my $scriptAction = q~profile2~; |
| $yynavigation = qq~› <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> › $profiletitle~; |
| if ($view) { |
| } else { |
| $scriptAction = q~myprofile2~; |
| $yytitle = $profile_txt{'79'}; |
| $yytitle = $profile_txt{'editmyprofile'}; |
| $profiletitle = qq~$profile_txt{'79'} ($user)~; |
| $profiletitle = qq~$profile_txt{'editmyprofile'} ($user)~; |
| $yynavigation = qq~› $profiletitle~; |
| $yynavigation = |
| } |
| qq~› <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> › $profiletitle~; |
| |
| } |
| if (${$uid.$user}{'gender'} eq 'Male') { $GenderMale = ' selected="selected" '; } |
| else { |
| if (${$uid.$user}{'gender'} eq 'Female') { $GenderFemale = ' selected="selected" '; } |
| $yytitle = $profile_txt{'79'}; |
| |
| $profiletitle = qq~$profile_txt{'79'} ($user)~; |
| my $timeorder; |
| $yynavigation = qq~› $profiletitle~; |
| if(${$uid.$user}{'timeselect'}) { |
| } |
| if (${$uid.$user}{'timeselect'} == 6) { $timeorder = 1; } |
| |
| elsif (${$uid.$user}{'timeselect'} == 3) { $timeorder = 1; } |
| if ( ${ $uid . $user }{'gender'} eq 'Male' ) { |
| elsif (${$uid.$user}{'timeselect'} == 2) { $timeorder = 1; } |
| $GenderMale = ' selected="selected" '; |
| } |
| } |
| else { |
| if ( ${ $uid . $user }{'gender'} eq 'Female' ) { |
| if ($timeselected == 6) { $timeorder = 1; } |
| $GenderFemale = ' selected="selected" '; |
| elsif ($timeselected == 3) { $timeorder = 1; } |
| } |
| elsif ($timeselected == 2) { $timeorder = 1; } |
| CalcAge( $user, 'parse' ); |
| } |
| |
| |
| my ( $editAgeTxt, $editAgeCount, $disableBdayFields, $editGenderTxt, |
| &CalcAge($user, "parse"); |
| $editGenderCount, $disableGenderField, $genderField, $bdayFields ); |
| $dayormonthm = qq~<label for="bday1">$profile_txt{'564'}</label><input type="text" name="bday1" id="bday1" size="2" maxlength="2" value="$umonth" /> ~; |
| $editGenderLimit ||= 0; |
| $dayormonthd = qq~<label for="bday2">$profile_txt{'565'}</label><input type="text" name="bday2" id="bday2" size="2" maxlength="2" value="$uday" /> ~; |
| if ( $editGenderLimit > 0 |
| if ($timeorder) { $dayormonth = $dayormonthd . $dayormonthm; } |
| && !$iamadmin |
| else { $dayormonth = $dayormonthm . $dayormonthd; } |
| && ( !$iamgmod || !$allow_gmod_profile ) ) |
| $dayormonth =~ s/for="bday\d"/for="birthday"/o; |
| { |
| $dayormonth =~ s/id="bday\d"/id="birthday"/o; |
| if ( $editGenderLimit == 1 && ${ $uid . $user }{'gender'} eq q{} ) { |
| |
| $editGenderTxt = qq~$profile_txt{'gender_edit_1'}~; |
| &LoadLanguage('Register'); |
| } |
| $showProfile .= qq~ |
| elsif ( ${ $uid . $user }{'disablegender'} >= $editGenderLimit ) { |
| <form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator"> |
| $editGenderTxt = qq~$profile_txt{'gender_edit_3'}~; |
| <table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0"> |
| $disableGenderField = q~ disabled="disabled"~; |
| <tr> |
| $genderField = qq~ |
| <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> |
| <input type="hidden" name="gender" value="${ $uid . $user }{'gender'}" />~; |
| </tr> |
| } |
| <tr class="windowbg"> |
| elsif (${ $uid . $user }{'disablegender'} eq q{} |
| <td width="220" align="left"><label for="passwrd1"><b>$profile_txt{81}: </b><br /> |
| && ${ $uid . $user }{'gender'} eq q{} ) |
| <span class="small">$profile_txt{'896'}</span></label> |
| { |
| </td> |
| if ( $editGenderCount == 1 ) { |
| <td align="left"> |
| $editGenderTxt = |
| <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')" /> </div> |
| qq~ $profile_txt{'gender_edit_2'} $editGenderLimit $profile_txt{'dob_edit_5'}~; |
| <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> |
| else { |
| <div class="pstrength-bar" id="passwrd1_bar" style="border: 1px solid #FFFFFF; height: 4px"></div> |
| $editGenderTxt = |
| <div class="pstrength-info" id="passwrd1_text"> </div> |
| qq~ $profile_txt{'gender_edit_2'} $editGenderLimit $profile_txt{'dob_edit_6'}~; |
| </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"> </span></div> |
| elsif ( ${ $uid . $user }{'disablegender'} < $editGenderLimit ) { |
| </td> |
| $editGenderCount = |
| </tr> |
| $editGenderLimit - ${ $uid . $user }{'disablegender'}; |
| <tr class="windowbg"> |
| if ( $editGenderCount == 1 ) { |
| <td width="220" align="left"><label for="passwrd2"><b>$profile_txt{82}: </b><br /> |
| $editGenderTxt = |
| <span class="small">$profile_txt{'896'}</span></label> |
| qq~ $profile_txt{'gender_edit_2'} $editGenderCount $profile_txt{'dob_edit_3'}~; |
| </td> |
| } |
| <td align="left"> |
| else { |
| <input type="password" maxlength="30" name="passwrd2" id="passwrd2" size="20" onkeypress="capsLock(event,'cappasswrd2')" /> |
| $editGenderTxt = |
| <div style="color: red; font-weight: bold; display: none" id="cappasswrd2">$profile_txt{'capslock'}</div> |
| qq~ $profile_txt{'gender_edit_2'} $editGenderCount $profile_txt{'dob_edit_4'}~; |
| <div style="color: red; font-weight: bold; display: none" id="cappasswrd2_char">$profile_txt{'wrong_char'}: <span id="cappasswrd2_character"> </span></div> |
| } |
| </td> |
| } |
| </tr> |
| $editGenderTxt = qq~<br /><span class="small">$editGenderTxt</span>~; |
| <tr class="windowbg"> |
| } |
| <td width="220" align="left"><label for="name"><b>$profile_txt{68}: </b><br />~; |
| |
| if ($name_cannot_be_userid) { |
| $editAgeLimit ||= 0; |
| $showProfile .= qq~ |
| if ( $editAgeLimit > 0 && !$iamadmin && ( !$iamgmod || !$allow_gmod_profile ) ) |
| <span class="small">$profile_txt{'8'}</span></label>~; |
| { |
| } |
| if ( $editAgeLimit == 1 && ${ $uid . $user }{'disableage'} eq q{} ) { |
| $showProfile .= qq~ |
| $editAgeTxt = qq~$profile_txt{'dob_edit_1'}~; |
| </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> |
| elsif ( ${ $uid . $user }{'disableage'} >= $editAgeLimit && ${ $uid . $user }{'bday'} ne q{}) { |
| </tr> |
| $editAgeTxt = qq~$profile_txt{'dob_edit_7'}~; |
| <tr class="windowbg"> |
| $disableBdayFields = q~ disabled="disabled"~; |
| <td width="220" align="left"><label for="gender"><b>$profile_txt{231}: </b></label></td> |
| $bdayFields = qq~ |
| <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> |
| <input type="hidden" name="bday1" value="$umonth" /> |
| </tr> |
| <input type="hidden" name="bday2" value="$uday" /> |
| <tr class="windowbg"> |
| <input type="hidden" name="bday3" value="$uyear" />~; |
| <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> |
| elsif (${ $uid . $user }{'disableage'} eq q{} |
| </tr> |
| && ${ $uid . $user }{'bday'} eq q{} ) |
| <tr class="windowbg"> |
| { |
| <td width="220" align="left"><label for="location"><b>$profile_txt{'227'}: </b></label></td> |
| if ( $editAgeCount == 1 ) { |
| <td align="left"><input type="text" maxlength="30" name="location" id="location" size="30" value="${$uid.$user}{'location'}" /></td> |
| $editAgeTxt .= |
| </tr>~; |
| qq~ $profile_txt{'dob_edit_2'} $editAgeLimit $profile_txt{'dob_edit_5'}~; |
| |
| } |
| if ($extendedprofiles) { |
| else { |
| require "$sourcedir/ExtendedProfiles.pl"; |
| $editAgeTxt .= |
| $showProfile .= &ext_editprofile($user, "edit"); |
| qq~ $profile_txt{'dob_edit_2'} $editAgeLimit $profile_txt{'dob_edit_6'}~; |
| } |
| } |
| |
| } |
| if ($sessions == 1 && $sessionvalid == 1 && ($iamadmin || $iamgmod || $iammod) && $username eq $user) { |
| elsif ( ${ $uid . $user }{'disableage'} < $editAgeLimit ) { |
| &LoadLanguage('Sessions'); |
| $editAgeCount = $editAgeLimit - ${ $uid . $user }{'disableage'}; |
| require "$sourcedir/Decoder.pl"; |
| if ( $editAgeCount == 1 ) { |
| my $decanswer = &descramble(${$uid.$user}{'sesanswer'}, $user); |
| $editAgeTxt .= |
| $questsel = qq~<select name="sesquest" id="sesquest" size="1">\n~; |
| qq~ $profile_txt{'dob_edit_2'} $editAgeCount $profile_txt{'dob_edit_3'}~; |
| while (($key, $val) = each %sesquest_txt) { |
| } |
| if (${$uid.$user}{'sesquest'} eq $key && ${$uid.$user}{'sesquest'} ne "") { |
| else { |
| $sessel = qq~ selected="selected"~; |
| $editAgeTxt .= |
| } elsif ($key eq "password" && ${$uid.$user}{'sesquest'} eq "") { |
| qq~ $profile_txt{'dob_edit_2'} $editAgeCount $profile_txt{'dob_edit_4'}~; |
| $sessel = qq~ selected="selected"~; |
| } |
| } else { |
| } |
| $sessel = ""; |
| $editAgeTxt = qq~<br /><span class="small">$editAgeTxt</span>~; |
| } |
| } |
| $questsel .= qq~<option value="$key"$sessel>$val</option>\n~; |
| |
| } |
| my $timeorder; |
| $questsel .= qq~</select>\n~; |
| my @selist = ( 2, 3, 6, 8 ); |
| $showProfile .= qq~ |
| if ( ${ $uid . $user }{'timeselect'} ) { |
| <tr> |
| for my $i (@selist) { |
| <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> |
| if ( ${ $uid . $user }{'timeselect'} == $i ) { $timeorder = 1; } |
| </tr> |
| } |
| <tr class="windowbg"> |
| } |
| <td width="220" align="left">$questsel</td> |
| else { |
| <td align="left"><input type="text" maxlength="30" name="sesanswer" size="20" value="$decanswer" /></td> |
| for my $i (@selist) { |
| </tr>~; |
| if ( $timeselected == $i ) { $timeorder = 1; } |
| } |
| } |
| $showProfile .= qq~ |
| } |
| <tr class="catbg"> |
| |
| <td height="50" valign="middle" align="center" colspan="2"><input type="submit" name="moda" value="$profile_txt{'88'}" class="button" />~; |
| $selectyear = q{}; |
| if ($self_del_user == 1) { |
| $seluyear = |
| if ( ( $iamadmin && ( $username ne $user ) ) || ( $username ne 'admin' ) ) { |
| qq~$profile_txt{'566'}<select name="bday3"$disableBdayFields><option value="">--</option>\n~; |
| $showProfile .= |
| for my $e ( 1905 .. ( $year - 3 ) ) { |
| |
| $seluyear .= |
| |
| qq~<option value="$e" ${isselected($uyear == $e)}>$e</option>\n~; |
| |
| } |
| |
| $seluyear .= q~</select> ~; |
| |
| |
| |
| $selectmnth = q{}; |
| |
| $dayormonthm = |
| |
| qq~<label for="bday1">$profile_txt{'564'}</label><select name="bday1" id="bday1"$disableBdayFields><option value="">--</option>\n~; |
| |
| for my $bb ( 1 .. 12 ) { |
| |
| if ( $bb < 10 ) { $c = "0$bb"; } |
| |
| else { $c = $bb; } |
| |
| $dayormonthm .= |
| |
| qq~<option value="$c" ${isselected($umonth == $bb)}>$c</option>\n~; |
| |
| } |
| |
| $dayormonthm .= q~</select> ~; |
| |
| |
| |
| $selectday = q{}; |
| |
| $dayormonthd = |
| |
| qq~<label for="bday2">$profile_txt{'565'}</label><select name="bday2" id="bday2"$disableBdayFields><option value="">--</option>\n~; |
| |
| for my $aa ( 1 .. 31 ) { |
| |
| if ( $aa < 10 ) { $d = "0$aa"; } |
| |
| else { $d = $aa; } |
| |
| $dayormonthd .= |
| |
| qq~<option value="$d" ${isselected($uday == $aa)}>$d</option>\n~; |
| |
| } |
| |
| $dayormonthd .= q~</select> ~; |
| |
| |
| |
| if ($timeorder) { $dayormonth = $dayormonthd . $dayormonthm; } |
| |
| else { $dayormonth = $dayormonthm . $dayormonthd; } |
| |
| $dayormonth =~ s/for="bday\d"/for="birthday"/oxsm; |
| |
| $dayormonth =~ s/id="bday\d"/id="birthday"/oxsm; |
| |
| |
| |
| $my_newpass = ( $INFO{'newpassword'} ? $profile_txt{'80'} : q{} ); |
| |
| $my_passchk = password_check(); |
| |
| $my_name_not = q{}; |
| |
| if ($name_cannot_be_userid) { |
| |
| $my_name_not = qq~ |
| |
| <span class="small">$profile_txt{'8'}</span></label>~; |
| |
| } |
| |
| if ( $showage == 1 ) { |
| |
| my $checked = q{}; |
| |
| if ( ${ $uid . $user }{'hideage'} ) { $checked = ' checked="checked"'; } |
| |
| $my_showageshow = $myprofile_showage; |
| |
| $my_showageshow =~ s/{yabb agechecked}/$checked/sm; |
| |
| } |
| |
| |
| |
| if ($extendedprofiles) { |
| |
| require Sources::ExtendedProfiles; |
| |
| my $show_ext_prof = ext_editprofile( $user, 'edit' ); |
| |
| $my_show_ext_prof = $show_ext_prof; |
| |
| } |
| |
| |
| |
| if ( $birthday_on_reg > 1 ) { |
| |
| $myrequirebd = qq~ <span class="small">$profile_txt{'563b'}</span>~; |
| |
| } |
| |
| $showProfile .= qq~ |
| |
| <form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator" accept-charset="$yymycharset"> |
| |
| $myprofile_edit~; |
| |
| $showProfile =~ s/{yabb profiletitle}/$profiletitle/sm; |
| |
| $showProfile =~ s/{yabb my_newpass}/$my_newpass/sm; |
| |
| $showProfile =~ s/{yabb my_passchk}/$my_passchk/sm; |
| |
| $showProfile =~ s/{yabb my_name_not}/$my_name_not/sm; |
| |
| $showProfile =~ s/{yabb user}/${$uid.$user}{'realname'}/gsm; |
| |
| $showProfile =~ s/{yabb editGenderTxt}/$editGenderTxt/sm; |
| |
| $showProfile =~ s/{yabb disableGenderField}/$disableGenderField/sm; |
| |
| $showProfile =~ s/{yabb GenderMale}/$GenderMale/sm; |
| |
| $showProfile =~ s/{yabb GenderFemale}/$GenderFemale/sm; |
| |
| $showProfile =~ s/{yabb genderField}/$genderField/sm; |
| |
| $showProfile =~ s/{yabb editAgeTxt}/$editAgeTxt/sm; |
| |
| $showProfile =~ s/{yabb require_bd}/$myrequirebd/sm; |
| |
| $showProfile =~ s/{yabb bdaysel}/$dayormonth$seluyear$bdayFields/sm; |
| |
| $showProfile =~ s/{yabb showageshow}/$my_showageshow/sm; |
| |
| $showProfile =~ s/{yabb user_location}/${$uid.$user}{'location'}/sm; |
| |
| $showProfile =~ s/{yabb my_show_ext_prof}/$my_show_ext_prof/sm; |
| |
| ## Mod Hook showProfile1 ## |
| |
| |
| |
| if ( $sessions == 1 |
| |
| && $sessionvalid == 1 |
| |
| && ($staff) |
| |
| && $username eq $user ) |
| |
| { |
| |
| LoadLanguage('Sessions'); |
| |
| my $decanswer = ${ $uid . $user }{'sesanswer'}; |
| |
| $questsel = qq~<select name="sesquest" id="sesquest" size="1">\n~; |
| |
| while ( ( $key, $val ) = each %sesquest_txt ) { |
| |
| if ( ${ $uid . $user }{'sesquest'} eq $key |
| |
| && ${ $uid . $user }{'sesquest'} ne q{} ) |
| |
| { |
| |
| $sessel = q~ selected="selected"~; |
| |
| } |
| |
| elsif ( $key eq 'password' && ${ $uid . $user }{'sesquest'} eq q{} ) |
| |
| { |
| |
| $sessel = q~ selected="selected"~; |
| |
| } |
| |
| else { |
| |
| $sessel = q{}; |
| |
| } |
| |
| $questsel .= qq~<option value="$key"$sessel>$val</option>\n~; |
| |
| } |
| |
| $questsel .= qq~</select>\n~; |
| |
| $showProfile .= $myprofile_session; |
| |
| $showProfile =~ s/{yabb questsel}/$questsel/sm; |
| |
| $showProfile =~ s/{yabb decanswer}/$decanswer/sm; |
| |
| $showProfile =~ s/{yabb sesstext9}/$session_txt{'9'}/sm; |
| |
| $showProfile =~ s/{yabb sesstext9a}/$session_txt{'9a'}/sm; |
| |
| } |
| |
| if ( $self_del_user == 1 ) { |
| |
| if ( ( $iamadmin && ( $username ne $user ) ) |
| |
| || ( $username ne 'admin' ) ) |
| |
| { |
| |
| $show_confdel = |
| qq~ <input type="submit" name="moda" value="$profile_txt{'89'}" onclick="return confirm('$confdel_text')" class="button" />~; |
| qq~ <input type="submit" name="moda" value="$profile_txt{'89'}" onclick="return confirm('$confdel_text')" class="button" />~; |
| } |
| } |
| } |
| } |
| else { |
| else { |
| if ( $iamadmin && $username ne $user ) { |
| if ( $iamadmin && $username ne $user ) { |
| $showProfile .= |
| $show_confdel = |
| qq~ <input type="submit" name="moda" value="$profile_txt{'89'}" onclick="return confirm('$confdel_text')" class="button" />~; |
| qq~ <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 .= $myprofile_bottom; |
| </td> |
| $showProfile =~ s/{yabb show_confdel}/$show_confdel/sm; |
| </tr> |
| $showProfile =~ s/{yabb sid_expires}/$expiretxt/sm; |
| </table> |
| |
| </form> |
| if ( !$view ) { |
| |
| $yymain .= $showProfile; |
| <script language="JavaScript1.2" type="text/javascript"> |
| template(); |
| <!-- |
| } |
| // Password_strength_meter start |
| return; |
| 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 scores = new Array($pwstrengthmeter_scores); |
| |
| var common = new Array($pwstrengthmeter_common); |
| |
| var minchar = $pwstrengthmeter_minchar; |
| |
| |
| |
| function runPassword(D) { |
| |
| var nPerc = checkPassword(D); |
| |
| if (nPerc > -199 && nPerc < 0) { |
| |
| strColor = colors[0]; |
| |
| strText = verdects[1]; |
| |
| strWidth = "5%"; |
| |
| } else if (nPerc == -200) { |
| |
| strColor = colors[1]; |
| |
| strText = verdects[0]; |
| |
| strWidth = "0%"; |
| |
| } else if (scores[0] == -1 && scores[1] == -1 && scores[2] == -1 && scores[3] == -1) { |
| |
| strColor = colors[4]; |
| |
| strText = verdects[7]; |
| |
| strWidth = "100%"; |
| |
| } else if (nPerc <= scores[0]) { |
| |
| strColor = colors[1]; |
| |
| strText = verdects[2]; |
| |
| strWidth = "10%"; |
| |
| } else if (nPerc > scores[0] && nPerc <= scores[1]) { |
| |
| strColor = colors[2]; |
| |
| strText = verdects[3]; |
| |
| strWidth = "25%"; |
| |
| } else if (nPerc > scores[1] && nPerc <= scores[2]) { |
| |
| strColor = colors[3]; |
| |
| strText = verdects[4]; |
| |
| strWidth = "50%"; |
| |
| } else if (nPerc > scores[2] && nPerc <= scores[3]) { |
| |
| strColor = colors[4]; |
| |
| strText = verdects[5]; |
| |
| strWidth = "75%"; |
| |
| } else { |
| |
| strColor = colors[5]; |
| |
| strText = verdects[6]; |
| |
| strWidth = "100%"; |
| |
| } |
| |
| document.getElementById("passwrd1_bar").style.width = strWidth; |
| |
| document.getElementById("passwrd1_bar").style.backgroundColor = strColor; |
| |
| document.getElementById("passwrd1_text").style.color = strColor; |
| |
| document.getElementById("passwrd1_text").childNodes[0].nodeValue = strText; |
| |
| } |
| |
| |
| |
| function checkPassword(C) { |
| |
| if (C.length == 0 || C.length < minchar) return -100; |
| |
| |
| |
| for (var D = 0; D < common.length; D++) { |
| |
| if (C.toLowerCase() == common[D]) return -200; |
| |
| } |
| |
| |
| |
| var F = 0; |
| |
| if (C.length >= minchar && C.length <= (minchar+2)) { |
| |
| F = (F + 6) |
| |
| } else if (C.length >= (minchar + 3) && C.length <= (minchar + 4)) { |
| |
| F = (F + 12) |
| |
| } else if (C.length >= (minchar + 5)) { |
| |
| F = (F + 18) |
| |
| } |
| |
| |
| |
| if (C.match(/[a-z]/)) { |
| |
| F = (F + 1) |
| |
| } |
| |
| if (C.match(/[A-Z]/)) { |
| |
| F = (F + 5) |
| |
| } |
| |
| if (C.match(/d+/)) { |
| |
| F = (F + 5) |
| |
| } |
| |
| if (C.match(/(.*[0-9].*[0-9].*[0-9])/)) { |
| |
| F = (F + 7) |
| |
| } |
| |
| if (C.match(/.[!,\@,#,\$,\%,^,&,*,?,_,\~]/)) { |
| |
| F = (F + 5) |
| |
| } |
| |
| if (C.match(/(.*[!,\@,#,\$,\%,^,&,*,?,_,\~].*[!,\@,#,\$,\%,^,&,*,?,_,\~])/)) { |
| |
| F = (F + 7) |
| |
| } |
| |
| if (C.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){ |
| |
| F = (F + 2) |
| |
| } |
| |
| if (C.match(/([a-zA-Z])/) && C.match(/([0-9])/)) { |
| |
| F = (F + 3) |
| |
| } |
| |
| if (C.match(/([a-zA-Z0-9].*[!,\@,#,\$,\%,^,&,*,?,_,\~])|([!,\@,#,\$,\%,^,&,*,?,_,\~].*[a-zA-Z0-9])/)) { |
| |
| F = (F + 3) |
| |
| } |
| |
| return F; |
| |
| } |
| |
| // Password_strength_meter end |
| |
| // --> |
| |
| </script> |
| |
| ~; |
| |
| |
| |
| if (!$view) { |
| |
| $yymain .= $showProfile; |
| |
| &template; |
| |
| } |
| |
| } |
| } |
| |
| |
| sub ModifyProfileContacts { |
| sub ModifyProfileContacts { |
| &SidCheck($action); |
| SidCheck($action); |
| &PrepareProfile; |
| PrepareProfile(); |
| |
| |
| |
| $menucolors[1] = 'selected-bg'; |
| |
| ProfileMenu(); |
| |
| |
| |
| my $scriptAction = q~profileContacts2~; |
| |
| if ($view) { |
| |
| $scriptAction = q~myprofileContacts2~; |
| |
| $yytitle = |
| |
| qq~$profile_txt{'editmyprofile'} › $profile_txt{'819'}~; |
| |
| $profiletitle = |
| |
| qq~$profile_txt{'editmyprofile'} ($user) › $profile_txt{'819'}~; |
| |
| $yynavigation = |
| |
| qq~› <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> › $profiletitle~; |
| |
| } |
| |
| else { |
| |
| $yytitle = qq~$profile_txt{'79'} › $profile_txt{'819'}~; |
| |
| $profiletitle = |
| |
| qq~$profile_txt{'79'} ($user) › $profile_txt{'819'}~; |
| |
| $yynavigation = qq~› $profiletitle~; |
| |
| } |
| |
| |
| |
| ${ $uid . $user }{'aim'} =~ tr/+/ /; |
| |
| ${ $uid . $user }{'yim'} =~ tr/+/ /; |
| |
| if ($allow_hide_email) { |
| |
| my $checked = q{}; |
| |
| if ( ${ $uid . $user }{'hidemail'} ) { |
| |
| $checked = ' checked="checked"'; |
| |
| } |
| |
| $my_hidemail = $myprofile_hidemail; |
| |
| $my_hidemail =~ s/{yabb checked}/$checked/sm; |
| |
| } |
| |
| |
| |
| if ( !$minlinkweb ) { $minlinkweb = 0; } |
| |
| if ( ${ $uid . $user }{'postcount'} >= $minlinkweb |
| |
| || ${ $uid . $user }{'position'} eq 'Administrator' |
| |
| || ${ $uid . $user }{'position'} eq 'Global Moderator' ) |
| |
| { |
| |
| $my_minlinkweb = $myprofile_minlinkweb; |
| |
| $my_minlinkweb =~ s/{yabb my_webtitle}/${$uid.$user}{'webtitle'}/sm; |
| |
| $my_minlinkweb =~ s/{yabb my_weburl}/${$uid.$user}{'weburl'}/sm; |
| |
| } |
| |
| if ( |
| |
| $pm_lev == 1 |
| |
| && ( |
| |
| $enable_MCaway > 2 |
| |
| || ( |
| |
| $enable_MCaway |
| |
| && ( ${ $uid . $user }{'position'} eq 'Administrator' |
| |
| || ${ $uid . $user }{'position'} eq 'Global Moderator' |
| |
| || ${ $uid . $user }{'position'} eq 'Mid Moderator' |
| |
| || is_moderator($user) ) |
| |
| ) |
| |
| ) |
| |
| ) |
| |
| { |
| |
| my $offChecked = q~ selected="selected"~; |
| |
| my $awayChecked = q{}; |
| |
| |
| |
| if ( ${ $uid . $user }{'offlinestatus'} eq 'away' ) { |
| |
| $offChecked = q{}; |
| |
| $awayChecked = q~ selected="selected"~; |
| |
| } |
| |
| |
| |
| my $awayreply = ${ $uid . $user }{'awayreply'}; |
| |
| $awayreply =~ s/<br \/>/\n/gsm; |
| |
| $my_away = $myprofile_away; |
| |
| $my_away .= |
| |
| qq~ <textarea name="awayreply" id="awayreply" rows="4" cols="50">$awayreply</textarea><br />~; |
| |
| $my_away .= $myprofile_away_b; |
| |
| $my_away =~ s/{yabb offChecked}/$offChecked/sm; |
| |
| $my_away =~ s/{yabb awayChecked}/$awayChecked/sm; |
| |
| $my_away =~ s/{yabb MaxAwayLen}/$MaxAwayLen/gsm; |
| |
| } |
| |
| if ( |
| |
| ( |
| |
| ${ $uid . $user }{'position'} eq 'Administrator' |
| |
| || ${ $uid . $user }{'position'} eq 'Global Moderator' |
| |
| ) |
| |
| && $enable_MCstatusStealth |
| |
| ) |
| |
| { |
| |
| my $stealthChecked = q{}; |
| |
| if ( ${ $uid . $user }{'stealth'} ) { |
| |
| $stealthChecked = ' checked="checked"'; |
| |
| } |
| |
| $my_stealth = $myprofile_stealth; |
| |
| $my_stealth =~ s/{yabb stealthChecked}/$stealthChecked/sm; |
| |
| } |
| |
| |
| $menucolors[1] = "titlebg"; |
| if ($extendedprofiles) { |
| &ProfileMenu; |
| require Sources::ExtendedProfiles; |
| |
| $my_extended .= ext_editprofile( $user, 'contact' ); |
| |
| } |
| |
| |
| my $scriptAction = qq~profileContacts2~; |
| $showProfile .= qq~ |
| if ($view) { |
| <form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator" accept-charset="$yymycharset"> |
| $scriptAction = qq~myprofileContacts2~; |
| $myprofile_contact |
| $yytitle = qq~$profile_txt{'editmyprofile'} › $profile_txt{'819'}~; |
| ~; |
| $profiletitle = qq~$profile_txt{'editmyprofile'} ($user) › $profile_txt{'819'}~; |
| $showProfile =~ s/{yabb profiletitle}/$profiletitle/sm; |
| $yynavigation = qq~› <a href="$scripturl?action=mycenter" class="nav">$img_txt{'mycenter'}</a> › $profiletitle~; |
| $showProfile =~ s/{yabb user_email}/${$uid.$user}{'email'}/sm; |
| } else { |
| $showProfile =~ s/{yabb my_hidemail}/$my_hidemail/sm; |
| $yytitle = qq~$profile_txt{'79'} › $profile_txt{'819'}~; |
| $showProfile =~ s/{yabb my_icq}/${$uid.$user}{'icq'}/sm; |
| $profiletitle = qq~$profile_txt{'79'} ($user) › $profile_txt{'819'}~; |
| $showProfile =~ s/{yabb my_aim}/${$uid.$user}{'aim'}/sm; |
| $yynavigation = qq~› $profiletitle~; |
| $showProfile =~ s/{yabb my_yim}/${$uid.$user}{'yim'}/sm; |
| } |
| $showProfile =~ s/{yabb my_gtalk}/${$uid.$user}{'gtalk'}/sm; |
| |
| $showProfile =~ s/{yabb my_skype}/${$uid.$user}{'skype'}/sm; |
| ${$uid.$user}{'aim'} =~ tr/+/ /; |
| $showProfile =~ s/{yabb my_myspace}/${$uid.$user}{'myspace'}/sm; |
| ${$uid.$user}{'yim'} =~ tr/+/ /; |
| $showProfile =~ s/{yabb my_facebook}/${$uid.$user}{'facebook'}/sm; |
| |
| $showProfile =~ s/{yabb my_twitter}/${$uid.$user}{'twitter'}/sm; |
| $showProfile .= qq~ |
| $showProfile =~ s/{yabb my_youtube}/${$uid.$user}{'youtube'}/sm; |
| <form action="$scripturl?action=$scriptAction;username=$useraccount{$INFO{'username'}};sid=$INFO{'sid'}" method="post" name="creator"> |
| $showProfile =~ s/{yabb my_minlinkweb}/$my_minlinkweb/sm; |
| <table cellspacing="1" cellpadding="4" width="100%" align="center" class="bordercolor" border="0"> |
| $showProfile =~ s/{yabb my_away}/$my_away/sm; |
| <tr> |
| $showProfile =~ s/{yabb my_stealth}/$my_stealth/sm; |
| <td colspan="2" class="catbg"><img src="$imagesdir/profile.gif" alt="" border="0" /> <b>$profiletitle</b></td> |
| $showProfile =~ s/{yabb my_extended}/$my_extended/sm; |
| </tr> |
| $showProfile =~ s/{yabb sid_expires}/$expiretxt/sm; |
| <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> |
| if ( !$view ) { |
| <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> |
| $yymain .= $showProfile; |
| </tr>~; |
| template(); |
| if ($allow_hide_email) { |
| } |
| my $checked = ''; |
| return; |
| if (${$uid.$user}{'hidemail'}) { $checked = ' checked="checked"'; } |
| |
| $showProfile .= qq~ |
| |
| <tr class="windowbg"> |
| |
| <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> |
| |
| </tr>~; |
| |
| } |
| |
| $showProfile .= qq~ |
| |
| <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 align="left"><input type="text" maxlength="10" name="icq" id="icq" size="40" value="${$uid.$user}{'icq'}" /></td> |
| |
| </tr> |
| |
| <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 align="left"><input type="text" maxlength="30" name="aim" id="aim" size="40" value="${$uid.$user}{'aim'}" /></td> |
| |