{template header}
{template memcp_navbar}

</td><td valign="top" style="padding-left:{TABLESPACE}px !important">

<script type="text/javascript" src="include/javascript/calendar.js"></script>
<script type="text/javascript" src="include/javascript/bbcode.js"></script>
<script type="text/javascript">
var charset = '$charset';
var maxsigsize = parseInt('$maxsigsize');
var maxbiosize = parseInt('$maxbiosize');
var allowhtml = 0;
var forumallowhtml = 0;
var allowsmilies = 0;
var allowbbcode = 0;
var allowimgcode = 0;
var allowbiobbcode = parseInt('$allowbiobbcode');
var allowbioimgcode = parseInt('$allowbioimgcode');
var allowsigbbcode = parseInt('$allowsigbbcode');
var allowsigimgcode = parseInt('$allowsigimgcode');

function validate(theform) {
	<!--{if $maxsigsize}-->
	if(mb_strlen(theform.signaturenew.value) > maxsigsize) {
		alert('{lang memcp_profile_sig_toolong}');
		return false;
	}
	<!--{/if}-->
	if(mb_strlen(theform.bionew.value) > maxbiosize) {
		alert('{lang memcp_profile_bio_toolong}');
		return false;
	}
	return true;
}
</script>
<form name="reg" method="post" action="memcp.php?action=profile" $enctype onSubmit="return validate(this)">
<input type="hidden" name="formhash" value="{FORMHASH}">
<div class="spaceborder">
<table cellspacing="0" cellpadding="{TABLESPACE}" align="center" width="100%">

<!--{if !$passport_status || $seccodecheck || $_DCACHE['fields_required']}-->
	<tr>
	<td colspan="2" class="header">{lang memcp_profile}</td>
	</tr>
	<tr class="category">
	<td colspan="2">{lang required_info}</td>
	</tr>
<!--{/if}-->

<!--{if $seccodecheck}-->
	<tr>
	<td class="altbg1"><span class="bold">{lang seccode}</span></td>
	<td class="altbg2"><div id="seccodeimage"></div><input type="text" name="seccodeverify" size="4" maxlength="4"> <span class="smalltxt">{lang secode_refresh}</span></td>
	</tr>
	<script type="text/javascript">
	<!--{if $attackevasive & 1}-->
		setTimeout("updateseccode($seccodedata['width'], $seccodedata['height'])", 2001);
	<!--{else}-->
		updateseccode($seccodedata['width'], $seccodedata['height'])
	<!--{/if}-->
	</script>
<!--{/if}-->

<!--{if !$passport_status}-->
	<tr>
	<td class="altbg1"><span class="bold">{lang old_password}</span></td>
	<td class="altbg2"><input type="password" name="oldpassword" size="25"> <span class="smalltxt">{lang memcp_profile_old_passwd_comment}</span></td>
	</tr>

	<tr>
	<td class="altbg1"><span class="bold">{lang new_password}</span></td>
	<td class="altbg2"><input type="password" name="newpassword" size="25"> <span class="smalltxt">{lang memcp_profile_passwd_comment}</span></td>
	</tr>

	<tr>
	<td class="altbg1"><span class="bold">{lang new_password_confirm}</span></td>
	<td class="altbg2"><input type="password" name="newpassword2" size="25"> <span class="smalltxt">{lang memcp_profile_passwd_comment}</span></td>
	</tr>

	<tr>
	<td class="altbg1" width="21%"><span class="bold">{lang email}</span></td>
	<td class="altbg2"><input type="text" name="emailnew" size="25" value="$member[email]">
	<!--{if $regverify == 1 && (($grouptype == 'member' && $adminid == 0) && $groupid == 8)}--> <span class="smalltxt"><span class="bold">{lang memcp_profile_email_comment}</span></span><!--{/if}-->
	</td>
	</tr>
<!--{/if}-->

<!--{loop $_DCACHE['fields_required'] $field}-->
	<tr>
	<td class="altbg1" width="21%"><span class="bold">$field[title]</span><!--{if $field['description']}--><br><span class="smalltxt">$field[description]</span><!--{/if}--></td>
	<td class="altbg2">
	<!--{if $field['selective']}-->
		<select name="field_$field[fieldid]new" <!--{if $member['field_'.$field[fieldid]] && $field['unchangeable']}-->disabled<!--{/if}-->>
		<option value="">{lang please_select}</option>
		<!--{loop $field['choices'] $index $choice}-->
			<option value="$index" <!--{if $index == $member['field_'.$field[fieldid]]}-->selected="selected"<!--{/if}-->>$choice</option>
		<!--{/loop}-->
		</select>
	<!--{else}-->
		<input type="text" name="field_$field[fieldid]new" size="25" value="$member['field_'.$field[fieldid]]" <!--{if $member['field_'.$field[fieldid]] && $field['unchangeable']}-->disabled<!--{/if}-->>
	<!--{/if}-->
	<!--{if $field['unchangeable']}-->&nbsp;<span class="smalltxt"><span class="bold">{lang memcp_profile_unchangeable_comment}</span></span><!--{/if}-->
	</td></tr>
<!--{/loop}-->

<tr class="category">
<td colspan="2">{lang optional_info}</td>
</tr>
<tr>
<td class="altbg1"><span class="bold">{lang security_question}</span></td>
<td class="altbg2"><select name="questionidnew">
<!--{if $discuz_secques}--><option value="-1">{lang memcp_profile_security_keep}</option><!--{/if}-->
<option value="0">{lang security_question_0}</option>
<option value="1">{lang security_question_1}</option>
<option value="2">{lang security_question_2}</option>
<option value="3">{lang security_question_3}</option>
<option value="4">{lang security_question_4}</option>
<option value="5">{lang security_question_5}</option>
<option value="6">{lang security_question_6}</option>
<option value="7">{lang security_question_7}</option>
</select> <span class="smalltxt"><span class="bold">{lang memcp_profile_security_comment}</span></span>
</td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang security_answer}</span></td>
<td class="altbg2"><input type="text" name="answernew" size="25"> <span class="smalltxt">{lang memcp_profile_security_answer_comment}</span></td>
</tr>

<tr><td colspan="2" class="singleborder">&nbsp;</td></tr>

<!--{loop $_DCACHE['fields_optional'] $field}-->
	<tr>
	<td class="altbg1" width="21%"><span class="bold">$field[title]</span><!--{if $field['description']}--><br><span class="smalltxt">$field[description]</span><!--{/if}--></td>
	<td class="altbg2">
	<!--{if $field['selective']}-->
		<select name="field_$field[fieldid]new" <!--{if $member['field_'.$field[fieldid]] && $field['unchangeable']}-->disabled<!--{/if}-->>
		<option value="">{lang please_select}</option>
		<!--{loop $field['choices'] $index $choice}-->
			<option value="$index" <!--{if $index == $member['field_'.$field[fieldid]]}-->selected="selected"<!--{/if}-->>$choice</option>
		<!--{/loop}-->
		</select>
	<!--{else}-->
		<input type="text" name="field_$field[fieldid]new" size="25" value="$member['field_'.$field[fieldid]]" <!--{if $member['field_'.$field[fieldid]] && $field['unchangeable']}-->disabled<!--{/if}-->>
	<!--{/if}-->
	<!--{if $field['unchangeable']}-->&nbsp;<span class="smalltxt"><span class="bold">{lang memcp_profile_unchangeable_comment}</span></span><!--{/if}-->
	</td></tr>
<!--{/loop}-->

<!--{if $allownickname}-->
	<tr>
	<td class="altbg1"><span class="bold">{lang nickname}</span></td>
	<td class="altbg2"><input type="text" name="nicknamenew" size="25" value="$member[nickname]"></td>
	</tr>
<!--{/if}-->

<tr>
<td class="altbg1" width="21%"><span class="bold">{lang gender}</span></td>
<td class="altbg2">
<input class="radio" type="radio" name="gendernew" value="1" $gendercheck[1]> {lang male} &nbsp;
<input class="radio" type="radio" name="gendernew" value="2" $gendercheck[2]> {lang female} &nbsp;
<input class="radio" type="radio" name="gendernew" value="0" $gendercheck[0]> {lang secret}
</td></tr>

<tr>
<td class="altbg1"><span class="bold">{lang birthday}</span></td>
<td class="altbg2"><input type="text" name="bdaynew" size="25" onclick="showcalendar(event, this)" onfocus="showcalendar(event, this);if(this.value=='0000-00-00')this.value=''" value="$member[bday]"></td>
</tr>

<tr>
<td class="altbg1" width="21%"><span class="bold">{lang location}</span></td>
<td class="altbg2"><input type="text" name="locationnew" size="25" value="$member[location]"></td>
</tr>

<tr>
<td class="altbg1" width="21%"><span class="bold">{lang homepage}</span></td>
<td class="altbg2"><input type="text" name="sitenew" size="25" value="$member[site]"></td>
</tr>

<tr>
<td class="altbg1" width="21%"><span class="bold">QQ</span></td>
<td class="altbg2"><input type="text" name="qqnew" size="25" value="$member[qq]"></td>
</tr>

<tr>
<td class="altbg1" width="21%"><span class="bold">ICQ</span></td>
<td class="altbg2"><input type="text" name="icqnew" size="25" value="$member[icq]"></td>
</tr>

<tr>
<td class="altbg1" width="21%"><span class="bold">Yahoo</span></td>
<td class="altbg2"><input type="text" name="yahoonew" size="25" value="$member[yahoo]"></td>
</tr>

<tr>
<td class="altbg1" width="21%"><span class="bold">MSN</span></td>
<td class="altbg2"><input type="text" name="msnnew" size="25" value="$member[msn]"></td>
</tr>

<tr>
<td class="altbg1" width="21%"><span class="bold">{lang taobao}</span></td>
<td class="altbg2"><input type="text" name="taobaonew" size="25" value="$member[taobao]"></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang alipay}</span></td>
<td class="altbg2"><input type="text" name="alipaynew" size="25" value="$member[alipay]"></td>
</tr>

<tr>
<td class="altbg1" valign="top" width="21%"><span class="bold">{lang bio} ($maxbiosize {lang bytes_limited})</span><br><br>
<span class="smalltxt">
{faq discuzcode} <span class="bold"><!--{if $allowbiobbcode}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></span><br>
{lang post_imgcode} <span class="bold"><!--{if $allowbioimgcode}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></span><br><br>
<a href="###" onclick="allowbbcode = allowbiobbcode;allowimgcode = allowbioimgcode;$('biopreview').innerHTML = bbcode2html($('bionew').value)">{lang memcp_profile_preview}</a>
</span></td>
<td class="altbg2"><div id="biopreview"></div><textarea rows="8" cols="30" style="width: 380px" id="bionew" name="bionew">$member[bio]</textarea>
</td>
</tr>

<tr class="category">
<td colspan="2">{lang board_options}</td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang style}</span></td>
<td class="altbg2"><select name="styleidnew">
<option value="">{lang use_default}</option>
$styleselect</select></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang tpp}</span></td>
<td class="altbg2"><select name="tppnew">
<option value="0" $tppchecked[0]>{lang use_default}</option>
<option value="10" $tppchecked[10]>10</option>
<option value="20" $tppchecked[20]>20</option>
<option value="30" $tppchecked[30]>30</option>
</select></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang ppp}</span></td>
<td class="altbg2"><select name="pppnew">
<option value="0" $pppchecked[0]>{lang use_default}</option>
<option value="5" $pppchecked[5]>5</option>
<option value="10" $pppchecked[10]>10</option>
<option value="15" $pppchecked[15]>15</option>
</select></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang memcp_profile_signature_conf}</span></td>
<td class="altbg2"><select name="ssnew">
<option value="2" $sschecked[2]>{lang use_default}</option>
<option value="1" $sschecked[1]>{lang memcp_profile_signature}</option>
<option value="0" $sschecked[0]>{lang memcp_profile_nosignature}</option>
</select></td>
</tr>
<tr>
<td class="altbg1"><span class="bold">{lang memcp_profile_avatar_conf}</span></td>
<td class="altbg2"><select name="sanew">
<option value="2" $sachecked[2]>{lang use_default}</option>
<option value="1" $sachecked[1]>{lang memcp_profile_avatar}</option>
<option value="0" $sachecked[0]>{lang memcp_profile_noavatar}</option>
</select></td>
</tr>
<tr>
<td class="altbg1"><span class="bold">{lang memcp_profile_image_conf}</span><br>{lang memcp_profile_image_conf_comment}</td>
<td class="altbg2"><select name="sinew">
<option value="2" $sichecked[2]>{lang use_default}</option>
<option value="1" $sichecked[1]>{lang memcp_profile_image}</option>
<option value="0" $sichecked[0]>{lang memcp_profile_noimage}</option>
</select></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang memcp_profile_editor_mode}</span></td>
<td class="altbg2"><select name="editormodenew">
<option value="2" $emcheck[2]>{lang use_default}</option>
<option value="0" $emcheck[0]>{lang memcp_profile_editor_mode_discuzcode}</option>
<option value="1" $emcheck[1]>{lang memcp_profile_editor_mode_wysiwyg}</option>
</select></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang timeoffset}</span></td>
<td class="altbg2">
<select name="timeoffsetnew">
<option value="9999" $toselect[9999]>{lang use_default}</option>
<option value="-12" $toselect[-12]>(GMT -12:00) Eniwetok, Kwajalein</option>
<option value="-11" $toselect[-11]>(GMT -11:00) Midway Island, Samoa</option>
<option value="-10" $toselect[-10]>(GMT -10:00) Hawaii</option>
<option value="-9" $toselect[-9]>(GMT -09:00) Alaska</option>
<option value="-8" $toselect[-8]>(GMT -08:00) Pacific Time (US &amp; Canada), Tijuana</option>
<option value="-7" $toselect[-7]>(GMT -07:00) Mountain Time (US &amp; Canada), Arizona</option>
<option value="-6" $toselect[-6]>(GMT -06:00) Central Time (US &amp; Canada), Mexico City</option>
<option value="-5" $toselect[-5]>(GMT -05:00) Eastern Time (US &amp; Canada), Bogota, Lima, Quito</option>
<option value="-4" $toselect[-4]>(GMT -04:00) Atlantic Time (Canada), Caracas, La Paz</option>
<option value="-3.5" $toselect[-3.5]>(GMT -03:30) Newfoundland</option>
<option value="-3" $toselect[-3]>(GMT -03:00) Brassila, Buenos Aires, Georgetown, Falkland Is</option>
<option value="-2" $toselect[-2]>(GMT -02:00) Mid-Atlantic, Ascension Is., St. Helena</option>
<option value="-1" $toselect[-1]>(GMT -01:00) Azores, Cape Verde Islands</option>
<option value="0"  $toselect[0]>(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</option>
<option value="1" $toselect[1]>(GMT +01:00) Amsterdam, Berlin, Brussels, Madrid, Paris, Rome</option>
<option value="2" $toselect[2]>(GMT +02:00) Cairo, Helsinki, Kaliningrad, South Africa</option>
<option value="3" $toselect[3]>(GMT +03:00) Baghdad, Riyadh, Moscow, Nairobi</option>
<option value="3.5" $toselect[3.5]>(GMT +03:30) Tehran</option>
<option value="4" $toselect[4]>(GMT +04:00) Abu Dhabi, Baku, Muscat, Tbilisi</option>
<option value="4.5" $toselect[4.5]>(GMT +04:30) Kabul</option>
<option value="5" $toselect[5]>(GMT +05:00) Ekaterinburg, Islamabad, Karachi, Tashkent</option>
<option value="5.5" $toselect[5.5]>(GMT +05:30) Bombay, Calcutta, Madras, New Delhi</option>
<option value="5.75" $toselect[5.75]>(GMT +05:45) Katmandu</option>
<option value="6" $toselect[6]>(GMT +06:00) Almaty, Colombo, Dhaka, Novosibirsk</option>
<option value="6.5" $toselect[6.5]>(GMT +06:30) Rangoon</option>
<option value="7" $toselect[7]>(GMT +07:00) Bangkok, Hanoi, Jakarta</option>
<option value="8" $toselect[8]>(GMT +08:00) Beijing, Hong Kong, Perth, Singapore, Taipei</option>
<option value="9" $toselect[9]>(GMT +09:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk</option>
<option value="9.5" $toselect[9.5]>(GMT +09:30) Adelaide, Darwin</option>
<option value="10" $toselect[10]>(GMT +10:00) Canberra, Guam, Melbourne, Sydney, Vladivostok</option>
<option value="11" $toselect[11]>(GMT +11:00) Magadan, New Caledonia, Solomon Islands</option>
<option value="12" $toselect[12]>(GMT +12:00) Auckland, Wellington, Fiji, Marshall Island</option>
</select></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang timeformat}</span></td>
<td class="altbg2"><input class="radio" type="radio" value="0" name="timeformatnew" $tfcheck[0]>{lang default} &nbsp;
<input class="radio" type="radio" value="1" name="timeformatnew" $tfcheck[1]>12 {lang hour} &nbsp;
<input class="radio" type="radio" value="2" name="timeformatnew" $tfcheck[2]>24 {lang hour}</td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang dateformat}</span><br><span class="smalltxt">{lang eg} yyyy/mm/dd, mm/dd/yy</span></td>
<td class="altbg2">
<input class="radio" type="radio" value="0" name="dateformatnew" $dfcheck[0]>{lang default} &nbsp;
<input class="radio" type="radio" value="1" name="dateformatnew" $dfcheck[1]>{lang customize}:
<input type="text" name="cdateformatnew" size="25" value="$member[dateformat]"></td>
</tr>

<tr>
<td class="altbg1"><span class="bold">{lang pmsound}</span></td>
<td class="altbg2"><input class="radio" type="radio" value="0" name="pmsoundnew" $pscheck[0]>{lang none} &nbsp;
<input class="radio" type="radio" value="1" name="pmsoundnew" $pscheck[1]><a href="images/sound/pm_1.wav">#1</a> &nbsp;
<input class="radio" type="radio" value="2" name="pmsoundnew" $pscheck[2]><a href="images/sound/pm_2.wav">#2</a> &nbsp;
<input class="radio" type="radio" value="3" name="pmsoundnew" $pscheck[3]><a href="images/sound/pm_3.wav">#3</a></td>
</tr>

<!--{if $allowcstatus}-->
	<tr>
	<td class="altbg1" width="21%"><span class="bold">{lang custom_status}</span></td>
	<td class="altbg2">
	<input type="text" name="cstatusnew" size="25" value="$member[customstatus]"></td>
	</tr>
<!--{/if}-->

<tr>
<td class="altbg1" valign="top"><span class="bold">{lang other_options}</span></td>
<td class="altbg2">
<!--{if $allowinvisible}-->
	<input class="checkbox" type="checkbox" name="invisiblenew" value="1" $invisiblechecked> {lang online_invisible}<br>
<!--{/if}-->
<input class="checkbox" type="checkbox" name="showemailnew" value="1" $emailchecked> {lang show_email_addr}<br>
<input class="checkbox" type="checkbox" name="newsletternew" value="1" $newschecked> {lang allow_newsletter}<br>
</td></tr>


<!--{if $allowavatar == 1}-->
	<tr>
	<td class="altbg1" valign="top"><span class="bold">{lang avatar}</span></td>
	<td class="altbg2">
	<input type="text" name="urlavatar" id="urlavatar" size="25" value="$member[avatar]"> <input type="button" value="{lang memcp_avatar_list}" onclick="$('avatardiv').style.display = $('avatardiv').style.display == 'none' ? '' : 'none'; if($('avatardiv').innerHTML == ''){ showAvatar(1); }">
	<span id="statusid"></span>
	<div id="avatardiv" style="display: none; margin-top: 10px;"></div></td>
	</tr>
<!--{elseif $allowavatar == 2}-->
	<tr>
	<td class="altbg1" valign="top"><span class="bold">{lang avatar}</span></td>
	<td class="altbg2">
	<input type="text" name="urlavatar" id="urlavatar" size="25" value="$member[avatar]"> <input type="button" value="{lang memcp_avatar_list}" onclick="$('avatardiv').style.display = $('avatardiv').style.display == 'none' ? '' : 'none'; if($('avatardiv').innerHTML == ''){ showAvatar(1); }">
	<span id="statusid"></span>
	<div id="avatardiv" style="display: none; margin-top: 10px;"></div>
	<br>{lang width}: <input type="text" name="avatarwidthnew" size="1" value="*">($member[avatarwidth]) &nbsp; {lang height}: <input type="text" name="avatarheightnew" size="1" value="*">($member[avatarheight])</td>
	</tr>
<!--{elseif $allowavatar == 3}-->
	<tr>
	<td class="altbg1" valign="top"><span class="bold">{lang avatar}</span></td>
	<td class="altbg2">
	<input type="text" name="urlavatar" id="urlavatar" size="25" value="$member[avatar]"> <input type="button" value="{lang memcp_avatar_list}" onclick="$('avatardiv').style.display = $('avatardiv').style.display == 'none' ? '' : 'none'; if($('avatardiv').innerHTML == ''){ showAvatar(1); }">
	<span id="statusid"></span>
	<div id="avatardiv" style="display: none; margin-top: 10px;"></div>
	<br><input type="file" name="customavatar" size="25">
	<br>{lang width}: <input type="text" name="avatarwidthnew" size="1" value="*">($member[avatarwidth]) &nbsp; {lang height}: <input type="text" name="avatarheightnew" size="1" value="*">($member[avatarheight])</td>
	</tr>
<!--{/if}-->

<!--{if $maxsigsize}-->
	<tr>
	<td class="altbg1" valign="top"><span class="bold">{lang signature} ($maxsigsize {lang bytes_limited})</span><br><br>
	<span class="smalltxt">
	{faq discuzcode}<span class="bold"><!--{if $allowsigbbcode}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></span><br>
	{lang post_imgcode} <span class="bold"><!--{if $allowsigimgcode}-->{lang enabled}<!--{else}-->{lang disabled}<!--{/if}--></span><br><br>
	<a href="###" onclick="allowbbcode = allowsigbbcode;allowimgcode = allowsigimgcode;$('signaturepreview').innerHTML = bbcode2html($('signaturenew').value)">{lang memcp_profile_preview}</a>
	</span></td>
	<td class="altbg2"><div id="signaturepreview"></div><textarea rows="8" cols="30" style="width: 380px" id="signaturenew" name="signaturenew">$member[signature]</textarea>
	</td>
	</tr>
<!--{/if}-->

</table></div><br>

<div class="option" style="width: 100%"><div class="submitbutton"><input class="button" type="submit" name="editsubmit" value="{lang submit}"></div></div>
</form>

</td></tr></table>
<script type="text/javascript">
var xml_http_building_link = '{lang xml_http_building_link}';
var xml_http_sending = '{lang xml_http_sending}';
var xml_http_loading = '{lang xml_http_loading}';
var xml_http_load_failed = '{lang xml_http_load_failed}';
var xml_http_data_in_processed = '{lang xml_http_data_in_processed}';
function showAvatar(page) {
	var x = new Ajax('XML', 'statusid');
	x.get('member.php?action=viewavatars&page='+page, function(s){
		$("avatardiv").innerHTML = s;
		if($('multipage')) {
			var multiChildNodes = $('multipage').firstChild.childNodes;
			for(k in multiChildNodes) {
				if(multiChildNodes[k].href) {
					var r = multiChildNodes[k].href.match(/page=(\d*)/);
					var currpage = parseInt(r[1]);
					if(multiChildNodes) {
						multiChildNodes[k].href = isNaN(currpage) ? '' : 'javascript:showAvatar("'+currpage+'")';
					}
				}
			}
		}
	});
}
</script>
{template footer}