<!--<?php print <<<EOT
-->
<style type="text/css">
.Correct,.Wrong,.Exp{display:block;height:25px;line-height:24px;padding:0 5px 0 2em;}
.Correct{background:#e6ffe6 url($imgpath/post/register/register.png) 5px 5px no-repeat;border:1px dashed #00a8ff;color:#008800;}
.Wrong{background:#fff2e9 url($imgpath/post/register/register.png) 5px -76px no-repeat;border:1px dashed #ff6600;color:#8b2b34;}
.Exp{background:#e2f5ff url($imgpath/post/register/register.png) 5px -130px no-repeat;border:1px dashed #00a8ff;color:#006699;}
/*提示*/
.angle{position:absolute;border-left:5px transparent solid;_border-left:5px $forumcolortwo solid;border-top:5px $tablecolor solid;border-right:5px transparent solid;_border-right:5px $forumcolortwo solid;border-bottom:0;display:block;width:0;height:0;overflow:hidden;bottom:-5px;right:13px;}
.p-cloes{cursor:pointer;position:absolute;top:8px;width:16px;height:16px;}
.p-sitemsg{display:block;text-indent:-2000em;height:18px;width:18px;background:url($imgpath/sitemsg.gif);cursor:pointer;margin-right:15px;}
.sitemsg{position:absolute;right:5px;_right:15px;bottom:6px;_bottom:40px;padding:5px 8px;border:1px solid $tablecolor;background:$bgcolor;line-height:16px;}
.regItem { padding-bottom:2em }
.regItem dl { padding:.5em 0;}
.regItem dt{ width:20%; float:left; padding-right:2em;margin-left:3em;text-align:right; font-size:14px;}
.regItem dd{ width:22%; float:left;padding-right:2em;}
.regItem dd.regTips { width:45%;text-align:left;height:30px;}

.p10 td{padding:.5em 1em;}
</style>
<!--
EOT;
if(GetGP('vip')=='activating'){print <<<EOT
-->
<div class="wrapB">
	<div class="p10 cc f16 b s5">郵件激活</div>
		<div class="y-bg"></div>
		<div class="y-bg2"></div>
		<div class="y-bg3"></div>
		<div class="y-bg4">
			<div class="p10 cc">
				<form action="$db_registerfile?" method="post" name="register">
				<input type="hidden" name="verify" value="$verifyhash" />
				<input type="hidden" name="step" value="finish" />
				<input type="hidden" name="option" value="1" />
				<table width="100%" cellspacing="0" cellpadding="0" align="center">
					<tr align="center"><td>郵件激活成功</td></tr>
					<tr align="center"><td>親愛的會員，您郵件激活成功。</td></tr>
					<tr align="center"><td><input class="btn" type="button" onclick="window.location.href='$loginurl'" value="立即登錄" />&nbsp;<a href="./$db_bfn" style="color:blue">先去逛逛</a></td></tr>
				</table>
			</div>
		</div>
		<div class="y-bg3"></div>
		<div class="y-bg2"></div>
		<div class="y-bg"></div>
</div>
<!--
EOT;
}elseif(!$step && $step!=2){print <<<EOT
-->
		<div class="wrapB">
			<div class="p10 cc f16 b s5">注冊</div>
			<div>
				<div class="y-bg"></div>
				<div class="y-bg2"></div>
				<div class="y-bg3"></div>
				<div class="y-bg4">
					<div class="p10 cc">
						<div class="cc b p10 f14">請填寫以下必填信息完成注冊</div>
						<form action="$db_registerfile?" method="post" name="register" onSubmit="return leavemsg(this);">
						<input type="hidden" value="$forward" name="forward" />
						<input type="hidden" value="2" name="step" />
						<div class="cc p10 regItem">
							<dl class="cc">
								<dt>用戶名<font color="red">*</font></dt>
								<dd>
									 <input class="input" type="text" size="20" maxlength="$rg_regmaxname" name="regname" id="regname" />
								</dd>
								<dd class="regTips"><span class="span" id="regname_info"></span></dd>
							</dl>
							<dl class="cc">
								<dt>密&#160;&#160;碼<font color="red">*</font></dt>
								<dd>
									<input class="input" type="password" size="20" maxlength="$rg_regmaxpwd" name="regpwd" id="regpwd" onKeyUp="CreateRatePasswdReq(this,'$rg_regminname');" />
								</dd>
								<dd class="regTips"><span id="pwd_info"></span></dd>
							</dl>
							<dl class="cc">
								<dt>&nbsp;</dt>
								<dd><div class="fl">密碼強度&nbsp;&nbsp;</div>
									<div class="fl" style="width:132px;margin-right:1em;">
									<table id="passwdBar" cellSpacing="0" cellPadding="0" border="0" width="132" style="border:0px;margin-top:7px;">
										<tbody>
											<tr>
												<td id="posBar" style="width:0px;padding:0;border-right:0;height:4px;background:#e5e9eb;"></td>
												<td id="negBar" style="padding:0;border-right:0;height:4px;background:#e5e9eb;"></td>					
											</tr>
										</tbody>
									</table>
									</div >
								</dd>
								<dd class="regTips"><span id="passwdRating" class="fl" style="height:20px;line-height:20px;"></span></dd>
							</dl>
							<dl class="cc">
								<dt>確認密碼<font color="red">*</font></dt>
								<dd>
									<input class="input" type="password" size="20" maxlength="75" name="regpwdrepeat" id="regpwdrepeat" />
								</dd>
								<dd class="regTips"><span id="pwdrepeat_info"></span></dd>
							</dl>
							<dl class="cc">
								<dt>Email<font color="red">*</font></dt>
								<dd>
									<input class="input" type="text" size="20" maxlength="75" name="regemail" value="" id="regemail"/> 
									<div style="padding:.5em 0"><input type="checkbox" name="regemailtoall" value="1" /> 公開郵箱</div>
								</dd>
								<dd class="regTips"><span id="email_info"></span> 
<!--
EOT;
if($rg_email){print <<<EOT
-->
									<div style="overflow:hidden;margin:4px auto">為避免無法收取論壇郵件，請使用以下郵箱進行注冊︰<br>($rg_email)</div>
<!--
EOT;
}print <<<EOT
-->									
								</dd>
							</dl>
<!--
EOT;
if($inv_open){print <<<EOT
-->
							<dl class="cc">
								<dt>邀請注冊碼<font color="red">*</font>
								</dt>
								<dd>
									<input class="input" type="text" value="$invcode" name="invcode" id="invcode" />
								</dd>
								<dd class="regTips"><span id="invcode_info"></span> 
<!--
EOT;
if($inv_price){print <<<EOT
-->
								&nbsp;<a href="hack.php?H_name=invite&action=pay">獲取邀請碼</a>
<!--
EOT;
}print <<<EOT
-->				
								</dd>
							</dl>
<!--
EOT;
}if($regq && $db_question){
$qkey = array_rand($db_question);
print <<<EOT
-->
							<dl class="cc">
								<dt>論壇防惡意注冊<font color="red">*</font></dt>
								<dd>
									<input class="input" type="text" name="qanswer" id="qanswer" />
									<input type="hidden" id="qkey" name="qkey" value="$qkey" />
								</dd>
								<dd class="regTips"><span id="qanswer_info"></span></dd>
							</dl>
<!--
EOT;
}if($rg_ifcheck){print <<<EOT
-->
							<dl class="cc">
								<dt>注冊原因<font color="red">*</font></dt>
								<dd>
									<textarea name="regreason" rows="4" cols="50"></textarea>
								</dd>
								<dd class="regTips"></dd>
							</dl>
<!--
EOT;
}if($customfield){
$fields = array();
print <<<EOT
-->
							<dl class="cc">
								<dt><b>附加信息</b></dt>
								<dd>&nbsp;</dd>
								<dd class="regTips"></dd>
							</dl>
<!--
EOT;
foreach($customfield as $key=>$val){
$field="field_".(int)$val[id];
$fieldinfo = $field."_info";
$required=$val[required]?'<font color="red">*</font>':'';
$editable=(!$userdb[$field]||$val[editable])?'':'disabled';
!$val[editable] && $val[descrip] .='(請認真填寫該欄信息，填寫後將不允許修改)';
if($val[type]=='1'){
if($val[required]){
$fields[] = array('field'=>$field,'type'=>'text','descrip'=>$val[descrip]);
}
$field_type="<input class=\"input\" type=\"text\" size=\"30\" name=\"$field\" id=\"$field\" />";
}elseif($val[type]=='2'){
if($val[required]){
$fields[] = array('field'=>$field,'type'=>'textarea','descrip'=>$val[descrip]);
}
$field_type="<textarea name=\"$field\" id=\"$field\" rows=\"5\" cols=\"50\"></textarea>";
}elseif($val[type]=='3'){
$field_type="<select name=\"$field\" id=\"$field\">";
$options=explode("\n",$val[options]);
foreach($options as $k=>$v){
list($k,$v)=explode('=',$v);
$field_type.="<option value=\"$k\">$v</option>";
}$field_type.="</select>";
}print <<<EOT
-->
							<dl class="cc">
								<dt>$val[title] {$required}</dt>
								<dd>{$field_type}</dd>
								<dd class="regTips"><span id="$fieldinfo">
<!--
EOT;
if(!$val[required]){print <<<EOT
-->
								$val[descrip]
<!--
EOT;
}print <<<EOT
-->						
								</span>
								</dd>
							</dl>
<!--
EOT;
}}print <<<EOT
-->
<!--
EOT;
if($db_ifsafecv){print <<<EOT
-->
							<dl class="cc">
								<dt>安全問題</dt>
								<dd>
									<select name="question" onchange="showcustomquest(this.value)" style="width:130px">
										<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>
								</dd>
								<dd class="regTips"><input id="customquest" style="display:none" type="text" name="customquest" class="input"> <span class="gray">如果啟用了安全問題，需要填寫正確的答案才能登錄論壇</span></dd>
							</dl>
							<dl class="cc">
								<dt>您的答案</dt>
								<dd><input type="text" name="answer" class="input" id="answer"></dd>
								<dd class="regTips"></dd>
							</dl>
<!--
EOT;
}if($custominfo){
print <<<EOT
-->
							<dl class="cc"><dt><b>選填信息</b></dt>
							<dd>&nbsp;</dd><dd class="regTips"></dd></tr>
<!--
EOT;
foreach($custominfo as $key=>$val){
if(substr($val[3],0,1)=='1'){print <<<EOT
-->
							<dl class="cc">
								<dt>$val[0]</dt>
								<dd><input class="input" type="text" size="20" name="customdata[$key]" value="" /> $val[1]</dd>
								<dd class="regTips"></dd>
							</dl>
<!--
EOT;
}}}if($db_gdcheck & 1){print <<<EOT
-->
							<dl class="cc">
								<dt>認證碼<font color="red">*</font></dt>
								<dd>
									<input class="input" type="text" id="gdcode" name="gdcode" size="6" onclick="try{opencode('menu_gd',this)}catch(e){}" /><span style="cursor:pointer; margin-left:3px" onclick="this.previousSibling.focus();">點此顯示驗證碼</span>
								</dd>
								<dd class="regTips"><span id="gdcode_info"></span>
									<div class="menu" id="menu_gd" style="visibility:hidden;"><img src="ck.php?" align="absmiddle" style="cursor:pointer;" id="ckcode" alt="看不清楚，換一張" /></div>
								</dd>
							</dl>
<!--
EOT;
}print <<<EOT
-->
							<dl class="cc">
								<dt>&nbsp;</dt>
								<dd>
									<input class="btn" type="submit" value="提交注冊" /><input class="bt" type="reset" value="重 置" />
								</dd>
								<dd class="regTips">
									<div style="position:relative;">
<!--
EOT;
if($db_sitemsg['reg']['0']){
print<<<EOT
-->
									<a class="fr p-sitemsg" onclick="showsitemsg();" title="提示信息">提示信息</a>
									<span id="sitemsg" class="sitemsg" style="display:none" onmouseout="showsitemsg();">
									<b class="angle"></b>{$db_sitemsg[login][array_rand($db_sitemsg[reg])]}
									</span>
<script language="JavaScript">
function showsitemsg() {
	if (getObj('sitemsg').style.display == "") {
		getObj('sitemsg').style.display = "none";
	} else {
		getObj('sitemsg').style.display = "";
	}
}
setTimeout('showsitemsg();',1500);
</script>
<!--
EOT;
}print<<<EOT
-->	
									</div>
								</dd>
							</dl>

							<dl class="cc">
								<dt>&nbsp;</dt>
								<dd style="width:60%">
									<div style="padding:0 0 1em 0"><input class="input" type="checkbox" size="20" name="rgpermit" value="1" />&nbsp;我已閱讀並完全同意條款內容</div>
									<div style="width:100%;padding:.5em; height:100px; overflow:auto; border:1px solid #eee">$rg_rgpermit
									</div>
								</dd>
							</dl>
						</div>
						</form>
					</div>
				</div>
				<div class="y-bg3"></div>
				<div class="y-bg2"></div>
				<div class="y-bg"></div>
			</div>
		</div>
<script type="text/javascript" language="JavaScript" src="js/pw_register.js"></script>
<script type="text/javascript" language="JavaScript" src="js/passwordstrength.js"></script>
<script language="JavaScript" src="js/pw_dialog.js"></script>
<script language="JavaScript">
var charset = '$db_charset';
var retminname	= parseInt('$rg_regminname');
var regmaxname	= parseInt('$rg_regmaxname');
var rglower		= parseInt('$rg_rglower');
var regminpwd 	= parseInt('$rg_regminpwd');
var regmaxpwd 	= parseInt('$rg_regmaxpwd');
var regnpdifferf= parseInt('$rg_npdifferf');
var regemail	= parseInt('$rg_emailcheck');
document.getElementById('pwd_info').innerHTML = '';
document.getElementById('pwdrepeat_info').innerHTML = '';
var inticlass 	= "Exp";
var rightclass	= "Correct";
var falseclass	= "Wrong";

var pwdcomplex	= '$rg_pwdcomplex';
var extracheck	= new Array();
var regInfo 	= new Array();

regInfo[0] 		= new Array(
						"恭喜您，該用戶名還未被注冊，您可以使用這個用戶名注冊！",
						"用戶名長度錯誤！",
						"此用戶名包含不可接受字符或被管理員屏蔽,請選擇其它用戶名",
						"為了避免論壇用戶名混亂,用戶名中禁止使用大寫字母,請使用小寫字母",
						"該用戶名已經被注冊，請選用其他用戶名。" ,
						"用戶名不能為空！",
						"不能有空格，可以是中文，長度控制在 "+retminname+"-"+regmaxname+" 字節以內 " + (rglower?"區分大小寫":"不區分大小寫"));
var regname 	= new Element("regname",regInfo[0],"regname_info");

regInfo[1] 		= new Array(
						"填寫正確。",
						"密碼設置錯誤。密碼中必須包含小寫字母。",
						"密碼設置錯誤。密碼中必須包含大寫字母。",
						"密碼設置錯誤。密碼中必須包含數字。",
						"密碼設置錯誤。密碼中必須包含符號。",
						"密碼設置錯誤。密碼長度過小。",
						"密碼設置錯誤。密碼過長。",
						"密碼設置錯誤。密碼不允許和用戶名相同。",
						"密碼設置錯誤。密碼不允以下字符︰\\ & ' \" ! / * , < > % # ?。",
						"不允許注冊帳號與密碼相同。",
                        getPwdRule());
var regpwd 		= new Element("regpwd",regInfo[1],"pwd_info");

regInfo[2] 		= new Array(
						"填寫正確。",
						"兩次輸入的密碼不一致。請再輸入一次您上面輸入的密碼。",
						"請再輸入一遍您上面填寫的密碼");
var regpwdrepeat= new Element("regpwdrepeat",regInfo[2],"pwdrepeat_info");

regInfo[3] 		= new Array(
						"填寫正確。",
						"您的填寫有誤。",
						"該郵箱已被注冊，請更換別郵箱。",
						"請填寫真實並且最常用的郵箱。"+(regemail?"我們需要通過郵箱對您進行認證。":""));
var regemail 	= new Element("regemail",regInfo[3],"email_info");

if(parseInt("$db_gdcheck")&1){
	regInfo[4] 	= new Array(
						"填寫正確。",
						"驗證碼不正確。",
						"登陸已超時,請刷新驗證碼。",
						"請輸入驗證碼。"	);
	var gdcode 	= new Element("regemail",regInfo[4],"gdcode_info");
}
if(getObj('qkey')){
	regInfo[5] 	= new Array(
						"填寫正確。",
						"驗證答案錯誤。",
						"請輸入答案︰$db_question[$qkey]"	);
	var qanswer = new Element("qanswer",regInfo[5],"qanswer_info");
}
if(parseInt("$inv_open")==1){
	regInfo[6] 	= new Array(
						"填寫正確。",
						"邀請碼不能為空。",
						"邀請碼錯誤。",
						"本站開啟邀請注冊,請填寫邀請碼!"	);
	var invcode = new Element("invcode",regInfo[6],"invcode_info");
}

function getPwdRule(){
	var intiString 	= "";
	if(regminpwd){
		intiString 	+= "最小長度︰"+regminpwd+" ";
	}
	if(regmaxpwd){
		intiString 	+= "最大長度︰"+regmaxpwd+" ";
	}
	if(regnpdifferf){
		intiString	+= "密碼不能與用戶名相同。";
	}
	if(!pwdcomplex){
		return intiString;
	}
	var addString 	= "密碼里必須包含以下字符類型︰";
	var rule = pwdcomplex.split(',');
	for(var i=0;i<rule.length;i++){
		switch(Number(rule[i])){
			case 1:
				addString += "小寫字母 ";
				break;
			case 2:
				addString += "大寫字母 ";
				break;
			case 3:
				addString += "數字 ";
				break;
			case 4:
				addString += "符號 ";
				break;
			default:
				break;
		}
	}
	return intiString + addString;
}
<!--
EOT;
if(count($fields)){
print <<<EOT
-->
var keep = 20;
<!--
EOT;
foreach($fields as $field){
print <<<EOT
-->
<!--
EOT;
if($field[type]!='text'){
print <<<EOT
-->
getObj("$field[field]").onfocus 	= onFocus;
getObj("$field[field]").onblur 		= onBlur;
extracheck.push(getObj("$field[field]"));
<!--
EOT;
}print <<<EOT
-->
regInfo[keep] 	= new Array(
						"填寫正確。",
						"本選項不能為空。",
						"$field[descrip]"	);
var $field[field] = new Element("$field[field]",regInfo[keep],"$field[field]"+"_info");
keep++;
<!--
EOT;
}}print <<<EOT
-->

function showcustomquest(qid){
	getObj("customquest").style.display = qid==-1 ? '' : 'none';
}

function leavemsg(obj) {
	if (obj.rgpermit.checked == false) {
		showDialog("error",'請先確定已閱讀並完全同意條款內容','1');
		return false;
	}
	return true;
}
</script>
<!--
EOT;
}elseif($step=='finish'){
if($email && $rg_emailcheck){
print<<<EOT
-->
<div class="p10 cc f16 b s5">注冊</div>
<div>
		<div class="y-bg"></div>
		<div class="y-bg2"></div>
		<div class="y-bg3"></div>
		<div class="y-bg4 f24" style="line-height:30px;padding:30px 0;">
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr align="center"><td>注冊成功，請立即開通賬戶</td></tr>
<tr align="center"><td>親愛的會員，您已經通過郵箱{$email}注冊成為PHPWind大家庭中的一員了。
</td></tr>
<tr align="center"><td>我們已經把激活郵件發送到了{$email}郵箱，快去激活吧！</td></tr>
<tr align="center"><td><input class="btn" type="button" value="去我的郵箱激活" onclick="window.location.href='$emailurl'"/>&nbsp;<a href="$db_registerfile?step=finish&email=$email&verify=$_GET[verify]&r=1" style="color:blue" target="_blank">再次發送激活郵件</a></td></tr>
<tr align="center"><td>小貼士︰如果你沒有收到激活郵件，可能郵件被誤放入垃圾郵件中了；<br />
你還可以選擇<a href="$db_registerfile?step=finish&email=$email&verify=$_GET[verify]&r=1" style="color:blue" target="_blank">再次發送激活郵件</a>來接收激活郵件。</td></tr>
</table>
		</div>
		<div class="y-bg3"></div>
		<div class="y-bg2"></div>
		<div class="y-bg"></div>
</div>
<!--
EOT;
}else{
if(!$option){print<<<EOT
-->
<div class="p10 cc f16 b s5">注冊</div>
<div>
		<div class="y-bg"></div>
		<div class="y-bg2"></div>
		<div class="y-bg3"></div>
		<div class="y-bg4 f16 b" style="line-height:2;padding:30px 0;">
		<form action="$db_registerfile?" method="post" name="register">
		<input type="hidden" name="verify" value="$verifyhash" />
		<input type="hidden" name="step" value="finish" />
		<input type="hidden" name="option" value="1" />
		<table width="100%" cellspacing="0" cellpadding="0" align="center">
			<tr align="center"><td>恭喜您！注冊成功</td></tr>
			<tr align="center"><td>親愛的會員，您已經注冊成功。</td></tr>
			<tr align="center"><td><input class="btn" type="submit" value="現在去完善資料" />&nbsp;<a href="./$db_bfn" class="f12 fn">先去逛逛</a></td></tr>
		</table>
		</div>
		<div class="y-bg3"></div>
		<div class="y-bg2"></div>
		<div class="y-bg"></div>
</div>
<!--
EOT;
}elseif($option==1){print<<<EOT
-->
		<div class="wrapB">
			<div class="p10 cc f16 b s5">完善資料</div>
			<div>
				<div class="y-bg"></div>
				<div class="y-bg2"></div>
				<div class="y-bg3"></div>
				<div class="y-bg4">
					<div class="p10 cc">
						<form action="$db_registerfile?" method="post">
						<input type="hidden" name="step" value="finish" />
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" name="option" value="2" />
						<div class="cc b p10 f14" style="padding-left:21%;">基本信息</div>
						<div class="cc p10 regItem">
							<dl class="cc">
								<dt>性別</dt>
								<dd>
									<select name="regsex">
										<option value="1">男</option>
										<option value="2">女</option>
										<option value="0" selected>保密</option>
									</select>
								</dd>
								<dd class="regTips"></dd>
							</dl>
							<dl class="cc">
								<dt>生日</dt>
								<dd>
									<select name="regbirthyear">
										<option value=""></option>
<!--
EOT;
for($i=$rg_timestart;$i<=$rg_timeend;$i++){print <<<EOT
-->
										<option value="$i">$i</option>
<!--
EOT;
}print <<<EOT
-->
									</select> 年
									<select name="regbirthmonth">
										<option value=""></option>
<!--
EOT;
for($i=1;$i<=12;$i++){print <<<EOT
-->
										<option value="$i">$i</option>
<!--
EOT;
}print <<<EOT
	-->
									</select>月
									<select name="regbirthday">
										<option value=""></option>
<!--
EOT;
for($i=1;$i<=31;$i++){print <<<EOT
-->
										<option value="$i">$i</option>
<!--
EOT;
}print <<<EOT
-->
									</select>天</font>
								</dd>
								<dd class="regTips"></dd>
							</dl>
							<dl class="cc">
								<dt>來自</dt>
								<dd>
									<input class="input" type="text" size="20" maxlength="20" name="regfrom" />
								</dd>
								<dd class="regTips"></dd>
							</dl>
						</div>
						<div class="cc b p10 f14" style="padding-left:21%;">聯系資料</div>
						<div class="cc p10 regItem">
							<dl class="cc">
								<dt>QQ</dt>
								<dd>
									<input class="input" type="text" size="20" maxlength="14" name="regoicq" value="" />
								</dd>
								<dd class="regTips"></dd>
							</dl>
							<dl class="cc">
								<dt>個人主頁</dt>
								<dd>
									<input class="input" type="text" size="20" maxlength="75" name="reghomepage" value="" />
								</dd>
								<dd class="regTips"></dd>
							</dl>
							<dl class="cc">
								<dt>個性化簽名</dt>
								<dd>
									<textarea cols="50" name="regsign" rows="4"></textarea>
									<div style="padding:.5em 0">將附在每篇文章後</div>
								</dd>
								<dd class="regTips"></dd>
							</dl>
							<dl class="cc">
								<dt>自我簡介</dt>
								<dd>
									<textarea name="regintroduce" rows="4" cols="50"></textarea>
								</dd>
								<dd class="regTips"></dd>
							</dl>
							
							<dl class="cc">
								<dt>&nbsp;</dt>
								<dd>
									<input class="btn" type="submit" value="  下一步  " />
									<input class="bt"  type="submit" name="option" value="跳過" />
								</dd>
								<dd class="regTips"></dd>
							</dl>
						</div>
						</form>
					</div>
				</div>
				<div class="y-bg3"></div>
				<div class="y-bg2"></div>
				<div class="y-bg"></div>
			</div>
		</div>
<!--
EOT;
}elseif($option==2 || $_POST['option']){print<<<EOT
-->
		<div class="wrapB">
			<div class="p10 cc f16 b s5">上傳頭像</div>
			<div>
				<div class="y-bg"></div>
				<div class="y-bg2"></div>
				<div class="y-bg3"></div>
				<div class="y-bg4">
					<div class="p10 cc">
						<form id="creator" name="creator" action="$db_registerfile?" method="post" enctype="multipart/form-data">
						<input type="hidden" name="step" value="finish" />
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" name="option" value="3" />
						<div class="cc p10 regItem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
								<tr>
									<td width="25%" align="center">
										<img src="$imgpath/face/none.gif" name="useravatars" />
									</td>
									<td>
										<div id="openchang" style="float:left;width:100%;margin-top:1%;">
											<div style="float:left;margin-right:1%;">
												<input type="radio" name="facetype" value="1" onclick="CkFaceType(this.value)">系統頭像
											</div>
<!--
EOT;
if($_G[allowportait]){print <<<EOT
-->
											<div style="float:left;margin-right:1%;">
												<input type="radio" name="facetype" value="2" onclick="CkFaceType(this.value)">頭像鏈接
											</div>
<!--
EOT;
}if($db_ifupload && $_G[upload]){print <<<EOT
-->
											<div style="float:left;">
												<input type="radio" name="facetype" value="3" onclick="CkFaceType(this.value)">頭像上傳
											</div>
<!--
EOT;
}print <<<EOT
-->
											<div class="c"></div>
											<div id="face1" style="float:left;width:100%;margin-top:1%;display:none;">
												<a id="icon" style="cursor:pointer" onclick="sendmsg('pw_ajax.php','action=showface',this.id);" title=""><b>[頭像列表]</b></a>
												<input type="hidden" name="proicon" value="$iconfile" />
											</div>
											<div id="face2" style="float:left;width:100%;margin-top:1%;display:none;">
											頭像鏈接 <input name="httpurl[0]" class="input" type="text" size="40" /> 必須以 http://開頭<br />
											頭像寬度 <input name="httpurl[1]" class="input" size="2" maxlength="3" /> 必須是 1 -- $db_imgwidth 之間的一個整數。<br />
											頭像高度 <input name="httpurl[2]" class="input" size="2" maxlength="3" /> 必須是 1 -- $db_imgheight 之間的一個整數。<b>頭像高度留空，則根據寬度自適應</b>
											</div>
											<div id="face3" style="float:left;width:100%;margin-top:1%;display:none;">
											頭像上傳 <span id="reupload" style="margin-left:1px"><input class="input file" type="file" id="upload" name="upload" /><a class="abt" unselectable="on" onclick="UpLoadFace()">上傳</a></span><br />
											頭像寬度 <input name="uploadurl[1]" class="input" size="2" maxlength="3" /> 必須是 1 -- $db_imgwidth 之間的一個整數。<br />
											頭像高度 <input name="uploadurl[2]" class="input" size="2" maxlength="3" /> 必須是 1 -- $db_imgheight 之間的一個整數。<b>頭像高度留空，則根據寬度自適應</b></b>
											</div>
										</div>
									</td>
								</tr>
								<tr>
									<td></td>
									<td>
										<input class="bt" type="button" value="上一步" onclick="javascript:history.go(-1);" />
										<input class="btn" type="submit" value=" 完成 " />
										<a href="./$db_bfn">跳過</a>
									</td>
								</tr>
							</table>
						</div>
						</form>
					</div>
				</div>
				<div class="y-bg3"></div>
				<div class="y-bg2"></div>
				<div class="y-bg"></div>
			</div>
		</div>

<iframe id="hideframe" name="hideframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
<script language="JavaScript" src="js/pw_dialog.js"></script>
<script language="JavaScript">
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;
			getObj('face' + value).style.display = '';
		} else {
			getObj('face' + facetype[i].value).style.display = 'none';
		}
	}
}
CkFaceType('1');
function showimage(imgpath,value){
	var path = imgpath + '/face/';
	facepath(path,value,false);
}
function facepath(iconurl,iconfile,showmsg,iconwidth,iconheight){
	if (showmsg) {
		if (showmsg == 'success') {
			ajax.time = setTimeout(function(){
				closep();
				showDialog('success','上傳成功!',1);
			},1500);
			getObj('reupload').innerHTML = '<input class="input file" type="file" id="upload" name="upload" /><a class="abt" unselectable="on" onclick="UpLoadFace()">上傳</a>';
		} else if (showmsg == 'undefined_action') {
			ajax.time = setTimeout(function(){
				closep();
				showDialog('error','非法操作');
			},1500);
			return false;
		} else {
			ajax.time = setTimeout(function(){
				closep();
				showDialog("error",showmsg);
			},1500);
			return false;
		}
	}
	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 UpLoadFace(){
	if (getObj('upload').value != '') {
		var uploadform = getObj('creator');
		var oldaction = uploadform.action;
		var oldonSubmit = uploadform.onSubmit;
		uploadform.action = 'register.php?step=finish&option=ajaxface';
		uploadform.onSubmit = '';
		uploadform.target = 'hideframe';
		uploadform.submit();
		uploadform.action = oldaction;
		uploadform.onSubmit = oldonSubmit;
		uploadform.target = '';
		read.obj = getObj('upload');
		read.guide();
		document.onmouseout = '';
	} else {
		showDialog("error","請選擇要上傳附件");
	}
}
</script>
<!--
EOT;
}}}?>-->