<?

/*
FlexCMS (http://www.flexcms.com)
Flexible, Powerful, Affordable.


Contents of this file are protected by the copyright
notice found at http://www.flexcms.com/flex/pages/copyright.html,
and its usage is subject to the terms of the licensing agreement 
available at http://www.flexcms.com/flex/pages/license.html
*/



	// ========================================================================================
	// Edit Profile
	// ========================================================================================

	$PageTitle = '<img src="'.$ImagesURL.'/admin/admincp_account.gif" width="26" height="20"> '.$MsgText[0][78];
	$BrowserTitle = $MsgText[0][78];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="'.$MainURL.'/options.html">'.$MsgText[0][4].'</a> > '.$MsgText[0][78];
	
	
	if ($LoggedIn == 'y') {
	
		ReadPermissions();
		Global $Permissions;
		
		if ($Arguments2 == '') { $Arguments2 = $CookieUsername; }
				
		$query = "select Level from `".$Settings['DBPrefix']."core-Users` where Username='".$Arguments2."' limit 1";
	   	$result = mysql_query($query) or die (mysql_error());
		$row = mysql_fetch_array($result);
		
		if ($Arguments2 == $CookieUsername || ($Permissions[5] == 'y' && $row['Level'] <= $UserLevel)) {
		
			$query = "select * from `".$Settings['DBPrefix']."core-Users` where Username='".$Arguments2."' limit 1";
		  	$result = mysql_query($query) or die (mysql_error());
			$row = mysql_fetch_array($result);
				
			$DisplayEmailChecked[$row['DisplayEmail']] = ' checked';
			
			if ($Settings['AllowUsernameChanges'] == 'y') {
				$UsernamePrint .= $MsgText[0][99].':<br><input type="text" name="Username" size="20" maxlength="40" value="'.$row['Username'].'" style="'.$FormStyle.'">
<br><br>';
			}
			else {
				$UsernamePrint = $MsgText[0][99].':&nbsp;&nbsp;'.$row['Username'].'<input type="hidden" name="Username" value="'.$row['Username'].'"><br><br>';
			}
			
			
			
			if ($Permissions[4] == 'y' && $Arguments2 != $CookieUsername) {
				$LevelSelected[$row['Level']] = ' selected';
				$query3 = "select * from `".$Settings['DBPrefix']."core-Permissions` where Level>=1 and Level<='".$UserLevel."' order by Level desc";
				$result3 = mysql_query($query3) or die (mysql_error());
				while ($row3 = mysql_fetch_array($result3)) {
					$LevelsDropdown .= '<option value="'.$row3['Level'].'"'.$LevelSelected[$row3['Level']].'> '.$row3['Description'].' ('.$row3['Level'].')</option>';
					//$LevelDescriptions[$row['Level']] = $row['Description'];
				}
		
				$NewUserLevel = '<br><br><br><b>'.$MsgText[0][224].'</b>:<br><select name="NewUserLevel" style="'.$FormStyle.'">'.$LevelsDropdown.'</select><br><br>';
			}
			else {
				$NewUserLevel = '<input type="hidden" name="NewUserLevel" value="'.$row['Level'].'">';
			}
			
			
			
			
		$RegFormOpts = explode('%%', $Settings['RegFormOpts']);
			
		$FieldName[1] = $MsgText[0][100];
		$FieldValue[1] = $row['FirstName'];
		$FieldCode[1] = '<input type="text" name="FirstName" size="20" maxlength="40" style="'.$FormStyle.'" value="'.$row['FirstName'].'">';
		
		$FieldName[2] = $MsgText[0][101];
		$FieldValue[2] = $row['LastName'];
		$FieldCode[2] = '<input type="text" name="LastName" size="20" maxlength="40" style="'.$FormStyle.'" value="'.$row['LastName'].'">';
		
		$FieldName[3] = $MsgText[0][102];
		$FieldValue[3] = $row['OrganizationCompany'];
		$FieldCode[3] = '<input type="text" name="OrganizationCompany" size="35" maxlength="50" style="'.$FormStyle.'" value="'.str_replace('"','&#34;',$row['OrganizationCompany']).'">';
		
		$FieldName[4] = $MsgText[0][103];
		$FieldValue[4] = $row['Address1'];
		$FieldCode[4] = '<input type="text" name="Address1" size="30" maxlength="40" style="'.$FormStyle.'" value="'.$row['Address1'].'">';
		$FieldName[5] = $MsgText[0][103];
		$FieldValue[5] = $row['Address2'];
		$FieldCode[5] = '<input type="text" name="Address2" size="30" maxlength="40" style="'.$FormStyle.'" value="'.$row['Address2'].'">';
		$FieldName[6] = $MsgText[0][103];
		$FieldValue[6] = $row['Address3'];
		$FieldCode[6] = '<input type="text" name="Address3" size="30" maxlength="40" style="'.$FormStyle.'" value="'.$row['Address3'].'">';
		$FieldName[7] = $MsgText[0][103];
		$FieldValue[7] = $row['Address4'];
		$FieldCode[7] = '<input type="text" name="Address4" size="30" maxlength="40" style="'.$FormStyle.'" value="'.$row['Address4'].'">';
		
		$FieldName[8] = $MsgText[0][104];
		$FieldValue[8] = $row['City'];
		$FieldCode[8] = '<input type="text" name="City" size="20" maxlength="40" style="'.$FormStyle.'" value="'.$row['City'].'">';
				
		$FieldName[9] = $MsgText[0][105];
		$FieldValue[9] = $row['StateProvince'];
		$FieldCode[9] = '<input type="text" name="StateProvince" size="25" maxlength="40" style="'.$FormStyle.'" value="'.$row['StateProvince'].'">';
		
		$FieldName[10] = $MsgText[0][106];
		$FieldValue[10] = $row['ZipPostal'];
		$FieldCode[10] = '<input type="text" name="ZipPostal" size="10" maxlength="15" style="'.$FormStyle.'" value="'.$row['ZipPostal'].'">';
		
		$FieldName[11] = $MsgText[0][107];
		$FieldValue[11] = $row['Country'];
		$FieldCode[11] = '<select name="Country" style="'.$FormStyle.'"><option value="'.$row['Country'].'">'.$row['Country'].'<option value="AF">Afghanistan<option value="AL">Albania<option value="DZ">Algeria<option value="AS">American Samoa<option value="AD">Andorra<option value="AO">Angola<option value="AI">Anguilla<option value="AQ">Antarctica<option value="AG">Antigua and Barbuda<option value="AR">Argentina<option value="AM">Armenia<option value="AW">Aruba<option value="AU">Australia<option value="AT">Austria<option value="AZ">Azerbaijan<option value="BS">Bahamas<option value="BH">Bahrain<option value="BD">Bangladesh<option value="BB">Barbados<option value="BY">Belarus<option value="BE">Belgium<option value="BZ">Belize<option value="BJ">Benin<option value="BM">Bermuda<option value="BT">Bhutan<option value="BO">Bolivia<option value="BA">Bosnia and Herzegovina<option value="BW">Botswana<option value="BV">Bouvet Island<option value="BR">Brazil<option value="IO">British Indian Ocean Territory<option value="BN">Brunei Darussalam<option value="BG">Bulgaria<option value="BF">Burkina Faso<option value="BI">Burundi<option value="KH">Cambodia<option value="CM">Cameroon<option value="CA">Canada<option value="CV">Cape Verde<option value="KY">Cayman Islands<option value="CF">Central African Republic<option value="TD">Chad<option value="CL">Chile<option value="CN">China<option value="CX">Christmas Island<option value="CC">Cocos (Keeling) Islands<option value="CO">Colombia<option value="KM">Comoros<option value="CG">Congo<option value="CK">Cook Islands<option value="CR">Costa Rica<option value="CI">Cote D\'Ivoire (Ivory Coast)<option value="HR">Croatia (Hrvatska)<option value="CU">Cuba<option value="CY">Cyprus<option value="CZ">Czech Republic<option value="CS">Czechoslovakia (former)<option value="DK">Denmark<option value="DJ">Djibouti<option value="DM">Dominica<option value="DO">Dominican Republic<option value="TP">East Timor<option value="EC">Ecuador<option value="EG">Egypt<option value="SV">El Salvador<option value="GQ">Equatorial Guinea<option value="ER">Eritrea<option value="EE">Estonia<option value="ET">Ethiopia<option value="FK">Falkland Islands (Malvinas)<option value="FO">Faroe Islands<option value="FJ">Fiji<option value="FI">Finland<option value="FR">France<option value="GF">French Guiana<option value="PF">French Polynesia<option value="TF">French Southern Territories<option value="GA">Gabon<option value="GM">Gambia<option value="GE">Georgia<option value="DE">Germany<option value="GH">Ghana<option value="GI">Gibraltar<option value="GR">Greece<option value="GL">Greenland<option value="GD">Grenada<option value="GP">Guadeloupe<option value="GU">Guam<option value="GT">Guatemala<option value="GN">Guinea<option value="GW">Guinea-Bissau<option value="GY">Guyana<option value="HT">Haiti<option value="HM">Heard and McDonald Islands<option value="HN">Honduras<option value="HK">Hong Kong<option value="HU">Hungary<option value="IS">Iceland<option value="IN">India<option value="ID">Indonesia<option value="IR">Iran<option value="IQ">Iraq<option value="IE">Ireland<option value="IM">Isle of Man<option value="IL">Israel<option value="IT">Italy<option value="JM">Jamaica<option value="JP">Japan<option value="DQ">Jarvis Island<option value="JO">Jordan<option value="KZ">Kazakhstan<option value="KE">Kenya<option value="KI">Kiribati<option value="KP">Korea (North)<option value="KR">Korea (South)<option value="KW">Kuwait<option value="KG">Kyrgyzstan<option value="LA">Laos<option value="LV">Latvia<option value="LB">Lebanon<option value="LS">Lesotho<option value="LR">Liberia<option value="LY">Libya<option value="LI">Liechtenstein<option value="LT">Lithuania<option value="LU">Luxembourg<option value="MO">Macau<option value="MK">Macedonia<option value="MG">Madagascar<option value="MW">Malawi<option value="MY">Malaysia<option value="MV">Maldives<option value="ML">Mali<option value="MT">Malta<option value="MH">Marshall Islands<option value="MQ">Martinique<option value="MR">Mauritania<option value="MU">Mauritius<option value="YT">Mayotte<option value="MX">Mexico<option value="FM">Micronesia<option value="MD">Moldova<option value="MC">Monaco<option value="MN">Mongolia<option value="MS">Montserrat<option value="MA">Morocco<option value="MZ">Mozambique<option value="MM">Myanmar<option value="NA">Namibia<option value="NR">Nauru<option value="NP">Nepal<option value="NL">Netherlands<option value="AN">Netherlands Antilles<option value="NT">Neutral Zone<option value="NC">New Caledonia<option value="NZ">New Zealand (Aotearoa)<option value="NI">Nicaragua<option value="NE">Niger<option value="NG">Nigeria<option value="NU">Niue<option value="NF">Norfolk Island<option value="MP">Northern Mariana Islands<option value="NO">Norway<option value="OM">Oman<option value="PK">Pakistan<option value="PW">Palau<option value="PA">Panama<option value="PG">Papua New Guinea<option value="PY">Paraguay<option value="PE">Peru<option value="PH">Philippines<option value="PN">Pitcairn<option value="PL">Poland<option value="PT">Portugal<option value="PR">Puerto Rico<option value="QA">Qatar<option value="RE">Reunion<option value="RO">Romania<option value="RU">Russian Federation<option value="RW">Rwanda<option value="KN">Saint Kitts and Nevis<option value="LC">Saint Lucia<option value="VC">Saint Vincent and the Grenadines<option value="WS">Samoa<option value="SM">San Marino<option value="ST">Sao Tome and Principe<option value="SA">Saudi Arabia<option value="SN">Senegal<option value="SC">Seychelles<option value="SL">Sierra Leone<option value="SG">Singapore<option value="SK">Slovak Republic<option value="SI">Slovenia<option value="SB">Solomon Islands<option value="SO">Somalia<option value="ZA">South Africa<option value="GS">South Georgia and South Sandwich Isls.<option value="ES">Spain<option value="LK">Sri Lanka<option value="SH">St. Helena<option value="PM">St. Pierre and Miquelon<option value="SD">Sudan<option value="SR">Suriname<option value="SJ">Svalbard and Jan Mayen Islands<option value="SZ">Swaziland<option value="SE">Sweden<option value="CH">Switzerland<option value="SY">Syria<option value="TW">Taiwan<option value="TJ">Tajikistan<option value="TZ">Tanzania<option value="TH">Thailand<option value="TG">Togo<option value="TK">Tokelau<option value="TO">Tonga<option value="TT">Trinidad and Tobago<option value="TN">Tunisia<option value="TR">Turkey<option value="TM">Turkmenistan<option value="TC">Turks and Caicos Islands<option value="TV">Tuvalu<option value="UM">US Minor Outlying Islands<option value="SU">USSR (former)<option value="UG">Uganda<option value="UA">Ukraine<option value="AE">United Arab Emirate<option value="UK">United Kingdom<option value="US">United States<option value="UY">Uruguay<option value="UZ">Uzbekistan<option value="VU">Vanuatu<option value="VA">Vatican City State (Holy See)<option value="VE">Venezuela<option value="VN">Viet Nam<option value="VG">Virgin Islands (British)<option value="VI">Virgin Islands (U.S.)<option value="WF">Wallis and Futuna Islands<option value="EH">Western Sahara<option value="YE">Yemen<option value="YU">Yugoslavia<option value="ZR">Zaire<option value="ZM">Zambia<option value="ZW">Zimbabwe</select>';
		
		$FieldName[12] = $MsgText[0][108];
		$FieldValue[12] = $row['Phone'];
		$FieldCode[12] = '<input type="text" name="Phone" size="15" maxlength="20" style="'.$FormStyle.'" value="'.$row['Phone'].'">';		
		
		$FieldName[13] = $MsgText[0][109];
		$FieldValue[13] = $row['Fax'];
		$FieldCode[13] = '<input type="text" name="Fax" size="15" maxlength="20" style="'.$FormStyle.'" value="'.$row['Fax'].'">';
		
		$FieldName[14] = $MsgText[0][110];
		$FieldValue[14] = $row['Cell'];
		$FieldCode[14] = '<input type="text" name="Cell" size="15" maxlength="20" style="'.$FormStyle.'" value="'.$row['Cell'].'">';
		
		$FieldName[15] = $MsgText[0][111];
		$FieldValue[15] = $row['Pager'];
		$FieldCode[15] = '<input type="text" name="Pager" size="15" maxlength="20" style="'.$FormStyle.'" value="'.$row['Pager'].'">';
		
		$FieldName[16] = $MsgText[0][112];
		$FieldValue[16] = $row['Website'];
		$FieldCode[16] = '<input type="text" name="Website" size="35" maxlength="70" style="'.$FormStyle.'" value="'.$row['Website'].'">';
		
		$FieldName[17] = $MsgText[0][113];
		$FieldValue[17] = $row['ReferredBy'];
		$FieldCode[17] = '<input type="text" name="ReferredBy" size="35" maxlength="50" style="'.$FormStyle.'" value="'.str_replace('"','&#34;',$row['ReferredBy']).'">';
					
		$FieldName[18] = $RegFormOpts[0];
		$FieldValue[18] = $row['Custom1'];
		$FieldCode[18] = '<input type="text" name="Custom1" size="35" maxlength="50" style="'.$FormStyle.'" value="'.str_replace('"','&#34;',$row['Custom1']).'">';
		
		$FieldName[19] = $RegFormOpts[1];
		$FieldValue[19] = $row['Custom2'];
		$FieldCode[19] = '<input type="text" name="Custom2" size="35" maxlength="50" style="'.$FormStyle.'" value="'.str_replace('"','&#34;',$row['Custom2']).'">';
		
		$FieldName[20] = $RegFormOpts[2];
		$FieldValue[20] = $row['Custom3'];
		$FieldCode[20] = '<input type="text" name="Custom3" size="35" maxlength="50" style="'.$FormStyle.'" value="'.str_replace('"','&#34;',$row['Custom3']).'">';
			
			
					
			for ($i = 3; $i < count($RegFormOpts); $i++) {
			if ($FieldName[$i-2] != '' && $FieldCode[$i-2] != '') {
				
				if ($i == 4) {
					if ($RegFormOpts[$i] == 'r') {
						$RegFormCode .= '<br><b>'.$FieldName[$i-2].'</b>:<br>'.$FieldCode[$i-2];			
					}
					else if ($RegFormOpts[$i] == 'o') {
						$RegFormCode .= '<br>'.$FieldName[$i-2].':<br>'.$FieldCode[$i-2];
					}
				}
				else if ($i == 7 || $i == 8 || $i == 9) {
					if ($RegFormOpts[$i] == 'r') {
						$RegFormCode .= '<br>'.$FieldCode[$i-2];			
					}
					else if ($RegFormOpts[$i] == 'o') {
						$RegFormCode .= '<br>'.$FieldCode[$i-2].' (optional)';
					}
				}
				else {
					if ($RegFormOpts[$i] == 'r') {
						$RegFormCode .= '<br><br><b>'.$FieldName[$i-2].'</b>:<br>'.$FieldCode[$i-2];			
					}
					else if ($RegFormOpts[$i] == 'o') {
						$RegFormCode .= '<br><br>'.$FieldName[$i-2].':<br>'.$FieldCode[$i-2];
					}
				}
				
				//if ($RegFormOpts[$i] == 'r' && $FieldValue[$i-2] == '') {
				//	$ErrorsFound = 'y';
				//	$RegFormCode .= ' <font color="#ff0000"><b>(Required)</b></font>';
				//}
			} 
		}
			
			
			/*if ($RegFormCode != '') {
			
				$RegFormCode = '<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Save Changes" style="'.$FormStyle.'">
<br><br>' . $RegFormCode . '<br><br>';
			
			}*/
			
			
			
			if ($dir = @opendir('./images/avatars')) {
				while (($file = readdir($dir)) !== false) {
					if (!is_dir('./images/avatars/'.$file) && $file != '.' && $file != '..' && $file != '_') {
						$ActiveAvatars[] = $file;
						$AvatarsCount++;
	  				}
				}
				closedir($dir);
			}
			
			for ($x = 0; $x <= $AvatarsCount; $x++) {
				for ($y = 0; $y < ($AvatarsCount-1); $y++) {
				
					if ($ActiveAvatars[$y] > $ActiveAvatars[$y+1]) {
					
						$Swap = $ActiveAvatars[$y+1];
						
						$ActiveAvatars[$y+1] = $ActiveAvatars[$y];
						
						$ActiveAvatars[$y] = $Swap;
					
					}
				
				}
			}
			
			
			if ($IM['mb'] == 'y') {
			
				if ($AvatarsCount > 0) {
				
					$AvatarOptions = '<option value="">[No Avatar]</option>';
					
					if ($row['CustomAvatar'] != '') {
						$AvatarOptions .= '<option value="_" selected>[My Own Avatar]</option>';
					}
									
					for ($x = 0; $x < $AvatarsCount; $x++) {
						if ($ActiveAvatars[$x] == $row['ForumAvatar'] ) {
							$AvatarOptions .= '<option value="'.$ActiveAvatars[$x].'" selected>'.$ActiveAvatars[$x].'</option>';
						}
						else {
							$AvatarOptions .= '<option value="'.$ActiveAvatars[$x].'">'.$ActiveAvatars[$x].'</option>';
						}
					}	
					
					$CommunityAvatars = 'Community Avatars:<br><select name="ForumAvatar" id="ForumAvatar" size="1" style="'.$FormStyle.'" onChange="UpdateAvatarPreview();">'.$AvatarOptions.'</select><br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="10" alt="" border="0"><br>Or Upload/Replace Your Own:<br>';				
					
				}
				else {
					$AvatarOptions = '<option value="">[No Avatar]</option>';
					
					if ($row['CustomAvatar'] != '') {
						$AvatarOptions .= '<option value="_" selected>[My Own Avatar]</option>';
					}
					
					$CommunityAvatars = '<select name="ForumAvatar" id="ForumAvatar" size="1" style="'.$FormStyle.'" onChange="UpdateAvatarPreview();">'.$AvatarOptions.'</select><br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="10" alt="" border="0"><br>Upload/Replace Your Avatar:<br>';					
								
				}
				
				
				$RegFormCode .= '<br><br><br><br><table cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><font face="'.$FontFace.'" size="'.$FontSize.'">Forum Avatar:<br><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="8" alt="" border="0"><br>'.$CommunityAvatars.'<input type="file" name="FileData"><br><font size="1">GIF/JPG/PNG 100x100</font></font></td><td><img src="'.$ImagesURL.'/admin/spacer.gif" width="50" height="1" alt="" border="0"></td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><img name="AvatarPreview" id="AvatarPreview" src="'.$ImagesURL.'/admin/spacer.gif" width="100" height="100" alt="" border="0"></font>
				
				<script>
				function UpdateAvatarPreview() { 
					if (document.getElementById("ForumAvatar").value == "_") {
						document.getElementById("AvatarPreview").src="'.$ImagesURL.'/user_avatars/'.$row['CustomAvatar'].'";
					}
					else if (document.getElementById("ForumAvatar").value != "") {
						document.getElementById("AvatarPreview").src="'.$ImagesURL.'/avatars/"+document.getElementById("ForumAvatar").value;
					} 
					else { 
						document.getElementById("AvatarPreview").src="'.$ImagesURL.'/admin/spacer.gif";
					}
				} 
				
				UpdateAvatarPreview();
				</script>
				
				</td></tr></table><br>';
				
				
				
				$query888 = "select * from `".$Settings['DBPrefix']."mb-Settings`";
				$result888 = mysql_query($query888) or die (mysql_error());
				while ($row888 = mysql_fetch_array($result888)) {
					$mbSettings[$row888['Name']] = $row888['Value'];
				}
				
				if ($mbSettings['SignatureImageMaxWidth'] < 1) {
					$mbSettings['SignatureImageMaxWidth'] = 500;
				}
				if ($mbSettings['SignatureImageMaxHeight'] < 1) {
					$mbSettings['SignatureImageMaxHeight'] = 200;
				}
				
							
				$RegFormCode .= '<br>'.$MsgText[2][162].':<br><textarea name="ForumSignature" id="ForumSignature" cols="40" rows="3" wrap="virtual" style="width:400; '.$FormStyle.'">'.str_replace('<','&lt;',$row['ForumSignature']).'</textarea><br><font size="1">'.$MsgText[2][164].': '.$mbSettings['SignatureImageMaxWidth'].'x'.$mbSettings['SignatureImageMaxHeight'].'</font>';
			}
			
						
				
			$PageContents = '('.$MsgText[0][114].')<br><form name="ImageForm" action="'.$MainURL.'/profile-edit-save" method="post" enctype="multipart/form-data"><input type="hidden" name="UsernameToEdit" value="'.$row['Username'].'">
'.$UsernamePrint.'
'.$MsgText[0][115].':<br><input type="text" name="DisplayName" size="20" maxlength="40" value="'.$row['DisplayName'].'" style="'.$FormStyle.'">
<br>'.$MsgText[0][86].':<br><input type="text" name="RealName" size="30" maxlength="40" value="'.$row['RealName'].'" style="'.$FormStyle.'">
<br><br><b>'.$MsgText[0][88].'</b>: ('.$MsgText[0][116].')<br><input type="text" name="Email" size="35" maxlength="50" value="'.$row['Email'].'" style="'.$FormStyle.'">
<br>'.$MsgText[0][117].' <input type="radio" name="DisplayEmail" value="y"'.$DisplayEmailChecked['y'].'> '.$MsgText[0][118].'&nbsp;&nbsp;<input type="radio" name="DisplayEmail" value="n"'.$DisplayEmailChecked['n'].'> '.$MsgText[0][119].'
<br><br>'.$MsgText[0][87].':<br><input type="text" name="Location" size="35" maxlength="50" value="'.$row['Location'].'" style="'.$FormStyle.'">
<br><br><br>'.$MsgText[0][120].'<br><input type="password" name="Password1" size="20" maxlength="40" style="'.$FormStyle.'">
<br>'.$MsgText[0][121].'<br><input type="password" name="Password2" size="20" maxlength="40" style="'.$FormStyle.'">
<br>

'.$RegFormCode.'
<br>'.$NewUserLevel.'<br><br><br><input type="checkbox" name="DeleteAccount" value="delete"> '.$MsgText[0][122].'<br><br><br><br><input type="submit" value="'.$MsgText[0][123].'" style="'.$FormStyle.'">

</form>';

		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}
		
	}
	else {
	
		RedirectToLogin();
		
	}				

	

	// ========================================================================================




?>
