<!--<?php
require_once uTemplate::PrintEot('header');
require_once uTemplate::PrintEot('profile_left');
print <<<EOT
-->
        <div class="contUser">
        	<div class="p15">
            	<h4 class="site"><span>帳號</span></h4>
                <div class="navC">
                    <ul id="infolist">
						<li id="base"><a href="javascript:;" hidefocus="true" onclick="selectTab('base')">基本資料</a></li>
						<li id="trade"><a href="javascript:;" hidefocus="true" onclick="selectTab('trade')">交易信息</a></li>
						<li id="link"><a href="javascript:;" hidefocus="true" onclick="selectTab('link')">聯系方式</a></li>
						<li id="face"><a href="javascript:;" hidefocus="true" onclick="selectTab('face')">修改頭像</a></li>
						<li id="safe"><a href="javascript:;" hidefocus="true" onclick="selectTab('safe')">密碼安全</a></li>
<!--
EOT;
if ($_G['userbinding'] || $ubinding) {print <<<EOT
-->
						<li id="binding"><a href="javascript:;" hidefocus="true" onclick="selectTab('binding')">多帳號綁定</a></li>
<!--
EOT;
}if ($customfield) {print <<<EOT
-->
						<li id="other"><a href="javascript:;" hidefocus="true" onclick="selectTab('other')">擴展資料</a></li>
<!--
EOT;
}print <<<EOT
-->
                    </ul>
                </div>
				<table width="100%" height="450">
				<tr><td class="vt"><div class="p15">
					<form id="creator" name="creator" action="profile.php?action=modify&" method="post" onsubmit="return setFaceLen()">
					<input type="hidden" name="verify" value="$verifyhash" />
					<input type="hidden" value="2" name="step" />
					<input type="hidden" id="info_type" name="info_type" value="info_base" />
					<div style="display:none" id="info_base">
						<table width="100%" class="setTable">
<!--
EOT;
if($groupselect){print <<<EOT
-->
							<tr>
								<th class="th">頭餃選擇</th>
								<td class="td"><select name="newgroupid" class="select_wa mr10">$groupselect</select>選擇一個用戶組頭餃作為你在站點上的頭餃</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">性別</th>
								<td class="td">
                                	<label for="progender0" class="mr20"><input type="radio" id="progender0" name="progender" value="0" $sexselect[0] /> 保密</label>
									<label for="progender1" class="mr20"><input type="radio" id="progender1" name="progender" value="1" $sexselect[1] /> 男</label>
									<label for="progender2" class="mr20"><input type="radio" id="progender2" name="progender" value="2" $sexselect[2] /> 女</label>
								</td>
							</tr>
							<tr>
								<th class="th">生日</th>
								<td class="td">
									<select name="proyear">
<!--
EOT;
if($rg_timestart < $rg_timeend){
for($i=$rg_timestart;$i<=$rg_timeend;$i++){print <<<EOT
-->
									<option value="$i" $yearslect[$i]>$i</option>
<!--
EOT;
}}else{
for($i=$rg_timestart;$i>=$rg_timeend;$i--){print <<<EOT
-->
									<option value="$i" $yearslect[$i]>$i</option>
<!--
EOT;
}}print <<<EOT
-->
									</select>
                                    <span class="p_lr_10">年</span>
									<select name="promonth">
<!--
EOT;
for($i=1;$i<=12;$i++){print <<<EOT
-->
										<option value="$i" $monthslect[$i]>$i</option>
<!--
EOT;
}print <<<EOT
-->
									</select><span class="p_lr_10">月</span>
									<select name="proday">
<!--
EOT;
for($i=1;$i<=31;$i++){print <<<EOT
-->
										<option value="$i" $dayslect[$i]>$i</option>
<!--
EOT;
}print <<<EOT
-->
									</select><span class="p_lr_10">日</span>
								</td>
							</tr>
<!--
EOT;
foreach($custominfo as $key => $value){print <<<EOT
-->
							<tr>
								<th class="th">$value[0]</th>
								<td class="td"><input class="input input_wa" type="text" name="customdata[$key]" value="{$customdata[$key]}" /></td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">來自</th>
								<td class="td"><input class="input input_wa" type="text" maxlength="14" name="profrom" value="$userdb[location]" /></td>
							</tr>
							<tr>
								<th class="th">個人主頁</th>
								<td class="td"><input class="input input_wb mr5" type="text" maxlength="75" name="prohomepage" value="$userdb[site]" /><span>建議加 http://開頭</span></td>
							</tr>
<!--
EOT;
if($_G[allowhonor]){print <<<EOT
-->
							<tr>
								<th class="th">個性簽名</th>
								<td class="td">
									<input class="input input_wb mr10" type="text" name="prohonor" value="$userdb[honor]" />（將在帖子頁面用戶信息處顯示）
								</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">自我簡介</th>
								<td class="td"><textarea name="prointroduce" id="prointroduce" class="textareaA mb5">$userdb[introduce]</textarea><p id="prointroduce_warn">限500字節</p></td>
							</tr>
							<tr>
								<th class="th">帖子簽名</th>
								<td class="td"><textarea name="prosign" id="prosign" class="textareaA mb5">$userdb[signature]</textarea><p>（將在每個帖子下方顯示，<span id="prosign_warn">限{$_G[signnum]}字節</span>）</p></td>
							</tr>
<!--
EOT;
if($db_signmoney && false!==strpos($db_signgroup,",$groupid,")){print <<<EOT
-->
							<tr>
								<th class="th">簽名展示功能</th>
								<td class="td">
                                	<p class="mb5">
									<label for="showsign1" class="mr20"><input type="radio" id="showsign1" name="showsign" value="1" $prosign_Y /> 開啟</label>
									<label for="showsign0"><input type="radio" id="showsign0" name="showsign" value="0" $prosign_N /> 關閉</label>
                                    </p>
                                    <p>（簽名顯示一天需要相應{$credit->cType[$db_signcurtype]}<b>$db_signmoney</b>{$credit->cUnit[$db_signcurtype]}）</p>
								</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">時區選擇<!--選擇您所在的時區<br />將時間顯示為您當地時間--></th>
								<td class="td">
									<select name="timedf" class="select_wa">
										<option value="0">使用默認</option>
<!--
EOT;
include(R_P.'template/admin/timezone.htm');print <<<EOT
-->
									</select>
								</td>
							</tr>
							<tr>
								<th class="th">是否接受郵件</th>
								<td class="td">
									<label for="proreceivemail1" class="mr20"><input type="radio" id="proreceivemail1" name="proreceivemail" value="1" $email_Y /> 接收郵件</label>
									<label for="proreceivemail0"><input type="radio" id="proreceivemail0" name="proreceivemail" value="0" $email_N /> 不接收郵件</label>
								</td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em">
							<span class="btn"><span><button type="submit">保存資料</button></span></span>
						</div>
<script>
var charset = '$db_charset';
var signnum = '$_G[signnum]' * 1;
initCheckTextNum('prointroduce', 'prointroduce_warn', 500);
if (signnum) {
	initCheckTextNum('prosign','prosign_warn', signnum);
} else {
	getObj('prosign_warn').innerHTML = '不限字數';
}
</script>
					</div>
					<div style="display:none" id="info_trade">
						<table width="100%" class="setTable">
							<tr>
								<th class="th">支付寶帳號</th>
								<td class="td">
<!--
EOT;
if ($isAuthAlipay) {print<<<EOT
-->
									<div class="s5 mb5">$trade[alipay]</div>
									<ul style="line-height:24px;" class="mb10">
										<li><span class="s3 mr10">&#8730;已通過身份驗證</span><a href="javascript:void(0)" class="mr10"  onclick="window.open('profile.php?action=auth&check_step=alipay', 'alipayCredit', 'height=520, width=1050');">重新驗證</a></li>
<!--
EOT;
	if ($trade[iscertified] == 'T') {print<<<EOT
-->
										<li><span class="s3">&#8730;已通過實名認證</span></li>
<!--
EOT;
	} else {print <<<EOT
-->
										<li>尚未通過<a href="http://www.alipay.com" target="_blank">實名認證</a></li>
<!--
EOT;
	}
print <<<EOT
-->
									</ul>
<!--
EOT;
} else {print<<<EOT
-->
									<input class="input input_wa" type="text" name="alipay" value="$trade[alipay]" />
<!--
EOT;
	if ($db_authstate) {print <<<EOT
-->
									<a href="javascript:void(0)" class="mr10"  onclick="window.open('profile.php?action=auth&check_step=alipay', 'alipayCredit', 'height=520, width=1050');">[綁定]</a>
<!--
EOT;
	}
}print <<<EOT
-->
								</td>
							</tr>
							<tr>
								<th class="th">個人商品分類</th>
								<td class="td">
									<table width="240">
										<tr>
											<td width="60%" class="pb15">分類名</td>
											<td class="pb15"><a href="javascript:;" class="s3" onclick="addtrade();">[添加]</a></td>
										</tr>
										<tbody id="trade_mode" style="display:none"><tr>
											<td class="pb15"><input class="input" type="text" name="tradetype[]" size="18" /></td>
											<td class="pb15"><a href="javascript:;" onclick="removetrade(this);">[刪除]</a></td>
										</tr></tbody>
										<tbody id="trade_c">
<!--
EOT;
if ($trade['tradetype']) {
foreach ($trade['tradetype'] as $key => $value) {print <<<EOT
-->
										<tr>
											<td class="pb15"><input class="input" type="text" name="tradetype[$key]" value="$value" size="18" /></td>
											<td class="pb15"><a href="javascript:;" onclick="removetrade(this);">[刪除]</a></td>
										</tr>
<!--
EOT;
}}print <<<EOT
-->
										</tbody>
									</table>
								</td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em">
							<span class="btn"><span><button type="submit">保存資料</button></span></span>
						</div>
<script>
function addtrade() {
	var s = getObj('trade_mode').firstChild.cloneNode(true);
	getObj('trade_c').appendChild(s);
}
function removetrade(obj) {
	var o = obj.parentNode.parentNode;
	o.parentNode.removeChild(o);
}
addtrade();
</script>
					</div>
					<div style="display:none" id="info_link">
						<table width="100%" class="setTable">
							<tr>
								<th class="th">手機號</th>
								<td class="td">
<!--
EOT;
if (!$db_authstate) {print <<<EOT
-->
									<input class="input" type="text" size="25" maxlength="16" name="proauthmobile" value="$userdb[authmobile]" />
<!--
EOT;
} elseif ($isAuthMobile) {print <<<EOT
-->
									<span id="td_span_mobile" class="mr20">$authmobile</span><img src="u/images/attest/mobile.gif" align="absmiddle" class="mr5"/>已綁定手機 <a id="a_edit_mobile" href="profile.php?action=auth&check_step=mobile">[修改]</a>
<!--
EOT;
} else {print <<<EOT
-->
									<input class="input" type="text" size="25" maxlength="16" name="proauthmobile" id="td_input_mobile" value="$userdb[authmobile]" />
									<a href="javascript:void(0);" onclick="checkMobile();return false;" class="mr10">[綁定]</a>
<!--
EOT;
}print <<<EOT
-->
								</td>
							</tr>
							<tr>
								<th class="th">QQ</th>
								<td class="td"><input class="input" type="text" size="25" maxlength="12" name="prooicq" value="$userdb[oicq]" /></td>
							</tr>
							<tr>
								<th class="th">阿里旺旺</th>
								<td class="td"><input class="input" type="text" size="25" maxlength="30" name="proaliww" value="$userdb[aliww]" /></td>
							</tr>
							<tr>
								<th class="th">Yahoo</th>
								<td class="td"><input class="input" type="text" size="25" name="proyahoo" value="$userdb[yahoo]" /></td>
							</tr>
							<tr>
								<th class="th">Msn</th>
								<td class="td"><input class="input" type="text" size="25" name="promsn" value="$userdb[msn]" /></td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em">
							<span class="btn"><span><button type="submit">保存資料</button></span></span>
						</div>
					</div>
					<div style="display:none" id="info_face">
						<table width="100%" class="setTable vt">
							<tr>
								<td width="180">
									<img src="$iconurl?$timestamp" name="useravatars" class="img" $iconsize/>
								</td>
								<td>
									<div id="openchang">
                    <label class="mr20" for="facetype1"><input type="radio" id="facetype1" name="facetype" value="1" onclick="CkFaceType(this.value)">系統頭像</label>
<!--
EOT;
if($_G[allowportait]){print <<<EOT
-->
										<label class="mr20" for="facetype2"><input type="radio" id="facetype2" name="facetype" value="2" onclick="CkFaceType(this.value)">頭像鏈接</label>
<!--
EOT;
}if($db_ifupload && $_G[upload]){print <<<EOT
-->
										<label class="mr20" for="facetype3"><input type="radio" id="facetype3" name="facetype" value="3" onclick="CkFaceType(this.value)">頭像上傳</label>
<!--
EOT;
}print <<<EOT
-->
										<div class="c mb10"></div>
										<div id="face1" style="display:none;">
											<div id="iconbox">
												<div class="mb10">
<!--
EOT;
if ($num >= 10) {print <<<EOT
-->
                                                	<a onclick="showSystemIcon(0);" href="javascript:;" class="mr20">上一頁</a>
													<a onclick="showSystemIcon(2);" href="javascript:;">下一頁</a>
<!--
EOT;
}print <<<EOT
-->
												</div>
												<div class="profileFace">
                                                	<ul class="cc">
<!--
EOT;
foreach ($imgname_array as $key => $value) {print <<<EOT
-->
														<li onclick="showimage('$imgpath','$value')"><img src='$imgpath/face/$value' width="50" height="50" class="img"></li>
<!--
EOT;
}print <<<EOT
-->
													</ul>
												</div>
											</div>
											<input type="hidden" name="proicon" value="$iconfile" />
										</div>
										<div id="face2" style="display:none;">
										<table cellpadding="0" cellspacing="0" class="setTable">
											<tr>
												<td class="td"><span class="mr20">頭像鏈接</span><input name="httpurl[0]" id="httpurl_url" value="$httpurl" class="input input_wb mr10" type="text" /> 必須以 http://開頭</td>
											</tr>
											<tr>
												<td class="td"><span class="mr20"></span><input name="httpurl[1]" value="$iconwidth" class="input input_wc mr10" maxlength="3" onblur="if(1 <= this.value && this.value <= $db_imgwidth){document.images.useravatars.width = this.value;}" /> 必須是 1 -- $db_imgwidth 之間的一個整數。</td>
											</tr>
											<tr>
												<td class="td"><span class="mr20"></span><input name="httpurl[2]" value="$iconheight" class="input input_wc mr10" maxlength="3" onblur="if(1 <= this.value &&  this.value <= $db_imgheight){document.images.useravatars.height = this.value;}" /> 必須是 1 -- $db_imgheight 之間的一個整數。</td>
											</tr>
										</table>
                                        <div class="p15">當高度和寬度留空，或只設置一個值時，則根據圖片原尺寸進行縮放</div>
										<input type="hidden" id="httpurl_w" name="httpurl[3]" />
										<input type="hidden" id="httpurl_h" name="httpurl[4]" />
										</div>
										<div id="face3" style="display:none;">
<!--
EOT;
if($db_bbsifopen != 1){print <<<EOT
-->
<div class="blockquote3">
抱歉，站點正處于內部開放狀態，只有在完全開放狀態下，才能使用頭像上傳功能。<br />
<span class="gray">（站點狀態的後台設置路徑︰全局 &#187; 站點設置）</span>
</div>
<!--
EOT;
}else{print <<<EOT
-->
											<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="500" height="405" id="FlashVars" align="middle">
												<param name="movie" value="js/face.swf" />
												<param name="FlashVars" value="$icon_encode_url" />
												<embed  width="500" height="405" src="js/face.swf" flashvars="$icon_encode_url" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"  type="application/x-shockwave-flash" />
											</object>
<!--
EOT;
}print <<<EOT
-->
										</div>
									</div>
								</td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em" id="face_button">
							<span class="btn"><span><button type="submit">保存資料</button></span></span>
						</div>
					</div>
					<div style="display:none" id="info_safe">
						<table width="100%" class="setTable">
<!--
EOT;
if($ifppt){print <<<EOT
-->
							<tr>
								<th class="th">原密碼</th>
								<td class="td"><input class="input input_wa mr10" type="password" maxlength="75" name="oldpwd" value="" />修改密碼或電子郵箱時需要密碼驗證</td>
							</tr>
							<tr>
								<th class="th">新密碼</th>
								<td class="td"><input class="input input_wa" type="password" maxlength="75" name="propwd" value="" /></td>
							</tr>
							<tr>
								<th class="th">確認密碼</th>
								<td class="td"><input class="input input_wa" type="password" maxlength="75" name="check_pwd" value="" /></td>
							</tr>
							<tr>
								<th class="th">電子郵箱</th>
								<td class="td"><input class="input input_wa" type="text" maxlength="75" name="proemail" value="$userdb[email]" />
								<label for="propublicemail"><input type="checkbox" id="propublicemail" name="propublicemail" value="1" $ifpublic />公開電子郵箱</label></td>
							</tr>
<!--
EOT;
if($db_ifsafecv){print <<<EOT
-->
							<tr>
								<th class="th">安全問題</th>
								<td class="td">
									<select name="question" onchange="showcustomquest(this.value)" class="select_wa mr10">
										<option value="-2">不修改安全問題和答案</option>
										<option value="0">無安全問題</option><option value="1">我爸爸的出生地</option><option value="2">我媽媽的出生地</option><option value="3">我的小學校名</option><option value="4">我的中學校名</option><option value="5">我最喜歡的運動</option><option value="6">我最喜歡的歌曲</option><option value="7">我最喜歡的電影</option><option value="8" >我最喜歡的顏色</option><option value="-1">自定義問題</option>
									</select>
									<input id="customquest" style="display:none" type="text" name="customquest" class="input input_wa">
								</td>
							</tr>
							<tr>
								<th class="th">您的答案</th>
								<td class="td"><input type="text" name="answer" class="input input_wa"></td>
							</tr>
<!--
EOT;
}}else{print <<<EOT
-->
							<tr><td colspan="2" class="td">站點開啟通行證功能，修改用戶密碼，請登錄 <a href="$db_pptserverurl">$db_pptserverurl</a></td></tr>
<!--
EOT;
}print <<<EOT
-->
						</table>
<!--
EOT;
if ($ifppt) {print <<<EOT
-->
						<div class="tac p10">
							<span class="btn"><span><button type="submit">保存資料</button></span></span>
						</div>
<!--
EOT;
}print <<<EOT
-->
					</div>
					<div style="display:none" id="info_binding"></div>
<!--
EOT;
if($customfield){print <<<EOT
-->
					<div style="display:none" id="info_other">
						<table width="100%" class="setTable">
<!--
EOT;
foreach($customfield as $value){
$value[required] && $value[descrip].='（必填內容）';
$editable=(!$userdb[$value[field]]||$value[editable])?'':'disabled';
if($value[type]=='1'){
$field_type="<input class=\"input input_wa\" type=\"text\" name=\"$value[field]\" value=\"{$userdb[$value[field]]}\" $editable />";
}elseif($value[type]=='2'){
$field_type="<textarea name=\"$value[field]\" rows=\"5\" class=\"textarea_a\" $editable>{$userdb[$value[field]]}</textarea>";
}elseif($value[type]=='3'){
$field_type='';
foreach($value[options] as $v){
list($k,$v)=explode('=',$v);
$selected=$userdb[$value[field]]==$k?'selected':'';
$field_type.="<option value=\"$k\" $selected>$v</option>";
}$field_type="<select name=\"$value[field]\" class=\"select_wa\" $editable>$field_type</select>";
}print <<<EOT
-->
							<tr>
								<th class="th">$value[title]</th>
								<td class="td"><span class="mr10">$field_type</span>$value[descrip]</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
						</table>
						<div class="tac p10">
							<span class="btn"><span><button type="submit">保存資料</button></span></span>
						</div>
					</div>
<!--
EOT;
}print <<<EOT
-->
					</form>
					<div id="userbinding-node" style="display:none">
<!--
EOT;
if (($_G['userbinding'] || $ubinding) && $ubindingneedupdatepwd) {
print <<<EOT
-->
						<form action="profile.php?action=modify&" method="post">
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" value="5" name="step" />
                        	<p class="wrongTip mb10">您的帳號密碼與帳號綁定中的密碼不一致，請輸入帳號密碼來更新帳號綁定中的密碼</p>
							<table width="100%" class="setTable">
								<tr>
									<th class="th">帳號密碼</th>
									<td class="td"><input type="password" name="bindpassword" class="input input_wa" /></td>
								</tr>
								<tr>
									<th>&nbsp;</th>
									<td class="td"><span class="btn"><span><button type="submit">更新</button></span></span></td>
								</tr>
							</table>
						</form>
<!--
EOT;
}

if ($_G['userbinding'] && !$ubindingneedupdatepwd) {print <<<EOT
-->
						<form action="profile.php?action=modify&" method="post">
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" value="3" name="step" />
                        	<h5 class="h5 mb10"><strong>添加其他帳號</strong></h5>
							<table width="100%" class="setTable">
								<tr>
									<th class="th">用戶名</th>
									<td class="td"><input type="text" name="username" class="input input_wa" /></td>
								</tr>
								<tr>
									<th class="th">密碼</th>
									<td class="td"><input type="password" name="password" class="input input_wa" /></td>
								</tr>
<!--
EOT;
	if ($db_ifsafecv) {
print <<<EOT
-->
								<tr>
									<th class="th">安全問題</th>
									<td class="td"><select name="question" class="select" onchange="showcustomquest(this.value,'customquest2')"><option value="0">無安全問題</option><option value="1">我爸爸的出生地</option><option value="2">我媽媽的出生地</option><option value="3">我的小學校名</option><option value="4">我的中學校名</option><option value="5">我最喜歡的運動</option><option value="6">我最喜歡的歌曲</option><option value="7">我最喜歡的電影</option><option value="8" >我最喜歡的顏色</option><option value="-1">自定義問題</option></select> <input id="customquest2" style="display:none" type="text" name="customquest" class="input input_wa" tabindex="5" /></td>
								</tr>
								<tr>
									<th class="th">您的答案</th>
									<td class="td"><input type="text" name="answer" class="input input_wa" /></td>
								</tr>
<!--
EOT;
	}
print <<<EOT
-->
							</table>
							<div class="tac mb20" style="padding:1em"><span class="btn"><span><button type="submit">添 加</button></span></span></div>
						</form>
<!--
EOT;
}
if ($ubinding && !$ubindingneedupdatepwd) {
	$ltitle = L::config('ltitle', 'level');
print <<<EOT
-->
						<form action="profile.php?action=modify&" method="post">
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" value="4" name="step" />
                        	<h5 class="h5 mb10"><strong>已綁定帳戶</strong></h5>
							<table width="100%" class="tA">
								<tr class="tr">
									<td>用戶名</td>
									<td>用戶組</td>
									<td>注冊時間</td>
									<td>發帖數</td>
									<td>選擇</td>
								</tr>
<!--
EOT;
	foreach ($ubinding as $key => $value) {print <<<EOT
-->
								<tr>
									<td><a href="{$db_userurl}$value[uid]" target="_blank">$value[username]</a></td>
									<td>{$ltitle[$value[groupid]]}</td>
									<td>$value[regdate]</td>
									<td><a href="apps.php?q=article&u=$value[uid]" target="_blank">$value[postnum]</a></td>
									<td><input type="checkbox" name="selid[]" value="$value[uid]" /></td>
								</tr>
<!--
EOT;
	}
print <<<EOT
-->
							</table>
							<div class="tac" style="padding:1em">
								<span class="bt"><span><button type="button" onclick="CheckAll(this.form)">全 選</button></span></span>
								<span class="btn"><span><button type="submit">解除綁定</button></span></span>
							</div>
						</form>

<!--
EOT;
}
print <<<EOT
-->
					</div>
				</div></td></tr></table>
            </div>
        </div>
<script>
var display = '$display';
function CkFaceType(value) {
	var facetype = document.getElementsByName('facetype');
	for (i = 0; i < facetype.length; i++) {
		if (facetype[i].value == value) {
			facetype[i].checked = true;
			if (value == '3') {
				getObj('face_button').style.display = 'none';
			}
			getObj('face' + value).style.display = '';
		} else {
			getObj('face_button').style.display = '';
			getObj('face' + facetype[i].value).style.display = 'none';
		}
	}
}
CkFaceType('$icontype');
function showimage(imgpath,value) {
	var path = imgpath + '/face/';
	facepath(path,value,false);
}
function facepath(iconurl,iconfile,showmsg,iconwidth,iconheight) {
	document.images.useravatars.src = iconurl + iconfile + '?' + new Date().getTime();
	if (iconwidth>0) document.images.useravatars.width = iconwidth;
	if (iconheight>0) document.images.useravatars.height = iconheight;
	document.creator.proicon.value = iconfile;
	return false;
}
function showSystemIcon(page) {
	getObj('iconbox').innerHTML = '<div class="tac" style="width:272px;padding:30px 0 0;"><div><img src="'+imgpath+'/loading.gif" align="absmiddle" /> 正在加載數據...</div></div>';
	ajax.send('pw_ajax.php?action=showface&page='+page,'',getIcon);
}

function getIcon() {
	var iconlist = ajax.request.responseText;
	setTimeout(function(){getObj('iconbox').innerHTML = iconlist;},300);
}

function SetCookie(name,value) {
	expires = new Date();
	expires.setTime(expires.getTime()+(86400*365));
	document.cookie=name+"="+escape(value)+"; expires="+expires.toGMTString()+"; path=/";
}

function DelCookie(name) {
	expires = new Date();
	expires.setTime(expires.getTime()-(86400*365));
	document.cookie=name+"=; expires="+expires.toGMTString()+"; path=/";
}

function FetchCookie(name) {
	var start = document.cookie.indexOf(name);
	var end = document.cookie.indexOf(";",start);
	return start==-1 ? null : unescape(document.cookie.substring(start+name.length+1,(end>start ? end : document.cookie.length)));
}

function setFaceLen() {
	var v = 0;
	var facetype = document.getElementsByName('facetype');
	for (i = 0; i < facetype.length; i++) {
		if (facetype[i].checked === true) {
			v = facetype[i].value;break
		}
	}
	if (v == 2) {
		var img = new Image();
		img.src = getObj('httpurl_url').value;
		getObj('httpurl_w').value = img.width;
		getObj('httpurl_h').value = img.height;
	}
	return true;
}
function selectTab(tab) {
	showTabs('infolist', tab, 'li', 'current');
	getObj('userbinding-node').style.display = (tab == 'binding') ? '' : 'none';
}

function checkMobile() {
	var url = 'profile.php?action=auth&check_step=mobile';
	var mobile = getObj('td_input_mobile').value;

	if (mobile != '' && typeof (mobile) != 'undefined') {
		url += '&check_mobile='+mobile;
	}
	window.location.href = url;
}

~function() {
	var info_type = FetchCookie('pro_tab');
	DelCookie('pro_tab');
	if (!info_type) info_type = '$info_type';
	selectTab(info_type);
}();
</script>
<!--
EOT;
require_once uTemplate::printEot('footer');
?>-->