<!--<?php print <<<EOT
-->
<style type="text/css">
.Correct,.Wrong,.Exp{display:block;height:18px;line-height:17px;padding:0 5px 0 2em;}
.Correct{background:#e6ffe6 url($imgpath/post/register/register.png) 5px 2px no-repeat;border:1px dashed #00a8ff;color:#008800;}
.Wrong{background:#fff2e9 url($imgpath/post/register/register.png) 5px -79px no-repeat;border:1px dashed #ff6600;color:#8b2b34;}
.Exp{background:#e2f5ff url($imgpath/post/register/register.png) 5px -134px 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:.2em 0; margin:0}
.regItem dt{  margin:0;width:20%; float:left; padding-right:2em;text-align:right; font-size:12px; }
.regItem dd{ width:23%; float:left;padding-right:2em; margin:0}
.regItem dd.regTips { width:48%;text-align:left;height:30px;padding-right:0; margin:0}

.p10 td{padding:.5em 1em;}
</style>
<!--
EOT;
if(GetGP('vip')=='activating'){print <<<EOT
-->
<div >
	<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><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>
			<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 checkAll();">
						<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">
								不能有空格，可以是中文，长度控制在 {$rg_regminname}-{$rg_regmaxname} 字节以内
								</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">最小长度：{$rg_regminpwd} 最大长度：{$rg_regmaxpwd}</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">
										请填写真实并且最常用的邮箱
<!--
EOT;
if($rg_email){print <<<EOT
-->
									<div style="overflow:hidden;margin:4px auto">为避免无法收取论坛邮件，请使用以下邮箱进行注册：<br>($rg_email)</div>
<!--
EOT;
}print <<<EOT
-->									
									</span>

								</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>
                            </dl>
<!--
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" maxlength="4" />
									<span onclick="try{opencode('menu_gd',this)}catch(e){}" style="cursor:pointer;margin-left:3px">看不清楚，换一张</span>
									<div id="menu_gd"></div><img src="ck.php?nowtime=$timestamp" align="absmiddle" onclick="try{opencode('menu_gd',this)}catch(e){}" style="cursor:pointer;" id="ckcode" alt="看不清楚，换一张" />
								</dd>
								<dd class="regTips"><span id="gdcode_info"></span></dd>
							</dl>
<!--
EOT;
}print <<<EOT
-->
							<dl class="cc">
								<dt>&nbsp;</dt>
								<dd>
									<div style="padding:0 0 1em 0"><input type="checkbox" size="20" name="rgpermit" value="1" id="registerclause"/>&nbsp;我已阅读并完全同意<a onclick="permit();" style="cursor:pointer" class="b">条款内容</a></div>
								</dd>
								<dd class="regTips"><span id="registerclause_info"></span></dd>
							</dl>
							
							<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[reg][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>
						</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">
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');
var regdetail	= parseInt('$rg_regdetail');

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");
}

regInfo[7] 		= new Array(
						"已同意。",
						"请先确定已阅读并完全同意条款内容。");
var registerclause 	= new Element("registerclause",regInfo[7],"registerclause_info");

function permit() {
	getObj("registerclause").disabled = 'disabled';
	try {ajax.send('register.php?ajax=1&step=permit','',ajax.get);} catch(e){}
}
if (regdetail) {
	setTimeout('permit();',1000);
}
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';
}
</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><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>
			<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;
if($rg_timestart < $rg_timeend && $rg_timeend && $rg_timeend){
for($i=$rg_timestart;$i<=$rg_timeend;$i++){print <<<EOT
-->
										<option value="$i">$i</option>
<!--
EOT;
}}elseif($rg_timestart > $rg_timeend && $rg_timeend && $rg_timeend){
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">（将在每个帖子下方显示，字节限制：少于{$_G[signnum]}字节）</div>
								</dd>
								<dd class="regTips"></dd>
							</dl>
							<dl class="cc">
								<dt>自我简介</dt>
								<dd>
									<textarea name="regintroduce" rows="4" cols="50"></textarea>
									<div style="padding:.5em 0">字节限制：少于500字节</div>
								</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>
			<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></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()" style="cursor:pointer;">上传</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>
											</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">
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;
}}}elseif($step=='permit'){print<<<EOT
-->
<table width="480" cellspacing="1" cellpadding="5">
	<tr><th class="h" style="cursor:move" onmousedown="read.move(event);">条款内容</th></tr>
	<tr>
		<td>
			<div style="width:97%; height:220px; overflow:auto; border:1px solid #eee">
				$rg_rgpermit
			</div>
		</td>
	</tr>
</table>
<ul><li style="text-align:center;padding:4px 0;"><input type="button" class="btn" onclick="unpermit();" value="同 意" /></li></ul>
<script language="JavaScript">
function unpermit() {
	getObj("registerclause").disabled = '';
	getObj("registerclause").checked = 'checked';
	closep();
}
</script>
<!--
EOT;
}?>-->
