<!--
<?php
print <<<EOT
-->
<table width="100%" border="0" cellspacing="1" cellpadding="1" align="center" class="MainTable">
  <tr> 
    <td height="100" valign="top" class="Main"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" id="viewarticle">
        <tr> 
          <td class="head"><h3 class="L"></h3>
            <span class="TAG">欢迎注册 </span>
            <h3 class="R"></h3></td>
        </tr>
        <tr> 
          <td class="middle"> 
<!--
EOT;
//if(!$_fromurl&&!$step){
$_fromurl=urlencode($_fromurl);
if(!$step){
print <<<EOT
-->
              <table width="100%" cellspacing="5" cellpadding="5" style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word'>
                <tr> 
                  
                <td align="left">在注册前请先阅读以下协议 
                  <p>一、不得利用本站危害国家安全、泄露国家秘密，不得侵犯国家社会集体的和公民的合法权益，不得利用本站制作、复制和传播下列信息： 
                  </p>
                  <p>（一）煽动抗拒、破坏宪法和法律、行政法规实施的；<br>
                    （二）煽动颠覆国家政权，推翻社会主义制度的；<br>
                    （三）煽动分裂国家、破坏国家统一的；<br>
                    （四）煽动民族仇恨、民族歧视，破坏民族团结的；<br>
                    （五）捏造或者歪曲事实，散布谣言，扰乱社会秩序的；<br>
                    （六）宣扬封建迷信、淫秽、色情、赌博、暴力、凶杀、恐怖、教唆犯罪的；<br>
                    （七）公然侮辱他人或者捏造事实诽谤他人的，或者进行其他恶意攻击的；<br>
                    （八）损害国家机关信誉的；<br>
                    （九）其他违反宪法和法律行政法规的；<br>
                    （十）发布黄色反动文章</p>
                  <p>二、互相尊重，对自己的言论和行为负责。</p>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="center">
                        <input type="button" name="Submit" onclick="window.location.href='?step=1&_fromurl=$_fromurl'" value="我同意" class="button">
                        <input type="button" name="Submit2" onclick="window.location.href='$webdb[www_url]'"  value="不同意" class="button">
                      </td>
                    </tr>
                  </table>
                </td>
                </tr>
              </table>
<!--
EOT;
}elseif($_fromurl||$step==1){
print <<<EOT
-->
            <table width="100%" border="0" cellspacing="5" cellpadding="5">
			<form name="form1" method="post" action="?f" onsubmit="return regpost();">
              <tr>
                <td height="25">
                    <table width="100%" border="0" cellspacing="1" cellpadding="6">
                      <tr> 
                        <td colspan="2" style="border-bottom:1px solid #ccc;background:#eee;">重要信息(必填)</td>
                      </tr>
<!--
EOT;
if($webdb[RegCompany]){print <<<EOT
-->
					  <tr> 
                        <td width="28%">会员类型:</td>
                        <td width="72%"> 
                          <input type="radio" name="grouptype" value="0" style="border:0px;" checked>
                          个人用户 
                          <input type="radio" name="grouptype" value="1" style="border:0px;">
                          企业用户</td>
                      </tr>
<!--
EOT;
}print <<<EOT
-->
			
			
			<!--
EOT;
if($webdb[reg_group]&&$webdb[reg_group]!='8'){
$detail=explode(",",$webdb[reg_group]);
if(!in_array(8,$detail)){
$detail[-1]=8;
ksort($detail);
}
$groupck[8]=' checked ';
print <<<EOT
-->
					  <tr> 
                        <td width="28%">所属会员组:</td>
                        <td width="72%"> 
						
	<!--
EOT;
foreach($detail AS $value){
print <<<EOT
-->
                          <input type="radio" {$groupck[$value]} name="groupid" value="$value" style="border:0px;" >
                          {$ltitle[$value]}
<!--
EOT;
}print <<<EOT
-->	
						  
						  </td>
                      </tr>
<!--
EOT;
}
print <<<EOT
-->		  
                      <tr> 
                        <td width="28%">帐号:</td>
                        <td width="72%"> 
                          <input type="text" name="username" style="width:130px;height:16px;" id="reg_username" onBlur="ckdata('reg_username','username_msg','name')"> <span id="username_msg"></span>
                        </td>
                      </tr>
                      <tr> 
                        <td width="28%">邮箱:</td>
                        <td width="72%"> 
                          <input type="text" name="email" style="width:130px;height:16px;" id="reg_email" onBlur="ckdata('reg_email','email_msg','email')"> <span id="email_msg"></span>
                        </td>
                      </tr>
                      <tr> 
                        <td width="28%">密码:</td>
                        <td width="72%"> 
                          <input type="password" name="password" style="width:130px;height:16px;" id="reg_password" onBlur="ckdata('reg_password','password_msg','pwd')"> <span id="password_msg"></span>
                        </td>
                      </tr>
                      <tr> 
                        <td width="28%">重复输入密码:</td>
                        <td width="72%"> 
                          <input type="password" name="password2" style="width:130px;height:16px;" id="reg_password2">
                        </td>
                      </tr>
<!--
EOT;
if($webdb[yzNumReg] == 2){
print <<<EOT
-->
					<tr> 
                        <td width="28%">注册码:</td>
                        <td width="72%"> 
                          <input type="text" name="yznum" size="8"/>
                          &nbsp;<br>
                          请在右边方框输入手机号码获取注册码 
                          <input type="text" id="mobblenum" size="20" name="mobphone" />
                          <input  value="发送短信" type="button"  onClick="sendsms(2);"/>
                        </td>
                      </tr>
<!--
EOT;
}
elseif($webdb[yzNumReg] == 1){
print <<<EOT
-->
					<tr> 
                        <td width="28%">注册码:</td>
                        <td width="72%"> 
                          <input type="text" name="yznum" size="8"/>
                          &nbsp;<br>
                          请点击发送邮件获取注册码 
                          <input  value="发送邮件" type="button"  onClick="sendsms(1);"/>
                        </td>
                      </tr>        
<!--
EOT;
}
if($webdb[yzImgReg]){
print <<<EOT
-->
                      <tr>
                        <td width="28%">验 证 码:</td>
                        <td width="72%"><input type="text" name="yzimg" size="8">
<!-- 
EOT;
if($webdb[YzImg_voice]){
print <<<EOT
-->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="0" height="0" id="code_play" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="FlashVars" value="url=$webdb[www_url]/do/voice_code.php" />
<param name="movie" value="$webdb[www_url]/images/default/code_play.swf"/>
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed id="code_play" name="code_play" src="$webdb[www_url]/images/default/code_play.swf"  FlashVars="url=$webdb[www_url]/do/voice_code.php" quality="high" bgcolor="#ffffff" width="0" height="0" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<a href="javascript:void(0);" onclick="javascript:readVoiceCode();" style="color:blue" title="点击获取验证码"><img src="$webdb[www_url]/images/default/seccodeplayer.gif"/>点击获取验证码</a> (请输入你听到的字符)

<SCRIPT LANGUAGE="JavaScript">
<!--
function readVoiceCode()
{
    window.document.code_play.SetVariable("isPlay", "1");
}
//-->
</SCRIPT>
<!--
EOT;
}else{
print <<<EOT
-->
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write('<img border="0" name="imageField" onclick="this.src=this.src+Math.random();" src="$webdb[www_url]/do/yzimg.php?'+Math.random()+'">');
//-->
</SCRIPT>
<!-- 
EOT;
}
print <<<EOT
-->
               </td>
                      </tr>          
<!--
EOT;
}
print <<<EOT
-->
                    </table>

<SCRIPT LANGUAGE="JavaScript">
<!--
var filed_id='';
var filed_name='';
function ckregdata(a,b){
	filed_id=a;
	filed_name=b;
}
function ckregdatapost(){
	id_array=filed_id.split(',');
	name_array=filed_name.split(',');
	for(var i=0;i<id_array.length;i++){
		if(id_array[i]!=''&&document.getElementById(id_array[i]).value==''){
			alert("“"+name_array[i]+'”不能为空');
			document.getElementById(id_array[i]).focus();
			return false;
		}
	}
}
document.write('<script src="$webdb[www_url]/images/default/setday.js"><\/script>');
/*如要为页面布局考虑的话，你可以把template\default\regfield.htm里边的内容复制过来，然后把以下两行删除即可*/
document.write('<div id="showRegDiv"></div>');
AJAX.get("showRegDiv","$webdb[www_url]/do/regfield.php?job=reg");
//-->
</SCRIPT>
                    <table width="100%" border="0" cellspacing="1" cellpadding="6">
                      <tr> 
                        <td colspan="2" style="border-bottom:1px solid #ccc;background:#eee;">其它信息(可不填)</td>
                      </tr>
                      <tr> 
                        <td width="28%">生日:</td>
                        <td width="72%"> 
                          <select name="bday_y">
                            <option value=""></option>
                            <option value="1940">1940</option>
                            <option value="1941">1941</option>
                            <option value="1942">1942</option>
                            <option value="1943">1943</option>
                            <option value="1944">1944</option>
                            <option value="1945">1945</option>
                            <option value="1946">1946</option>
                            <option value="1947">1947</option>
                            <option value="1948">1948</option>
                            <option value="1949">1949</option>
                            <option value="1950">1950</option>
                            <option value="1951">1951</option>
                            <option value="1952">1952</option>
                            <option value="1953">1953</option>
                            <option value="1954">1954</option>
                            <option value="1955">1955</option>
                            <option value="1956">1956</option>
                            <option value="1957">1957</option>
                            <option value="1958">1958</option>
                            <option value="1959">1959</option>
                            <option value="1960">1960</option>
                            <option value="1961">1961</option>
                            <option value="1962">1962</option>
                            <option value="1963">1963</option>
                            <option value="1964">1964</option>
                            <option value="1965">1965</option>
                            <option value="1966">1966</option>
                            <option value="1967">1967</option>
                            <option value="1968">1968</option>
                            <option value="1969">1969</option>
                            <option value="1970">1970</option>
                            <option value="1971">1971</option>
                            <option value="1972">1972</option>
                            <option value="1973">1973</option>
                            <option value="1974">1974</option>
                            <option value="1975">1975</option>
                            <option value="1976">1976</option>
                            <option value="1977">1977</option>
                            <option value="1978">1978</option>
                            <option value="1979">1979</option>
                            <option value="1980">1980</option>
                            <option value="1981">1981</option>
                            <option value="1982">1982</option>
                            <option value="1983">1983</option>
                            <option value="1984">1984</option>
                            <option value="1985">1985</option>
                            <option value="1986">1986</option>
                            <option value="1987">1987</option>
                            <option value="1988">1988</option>
                            <option value="1989">1989</option>
                            <option value="1990">1990</option>
                            <option value="1991">1991</option>
                            <option value="1992">1992</option>
                            <option value="1993">1993</option>
                            <option value="1994">1994</option>
                            <option value="1995">1995</option>
                            <option value="1996">1996</option>
                            <option value="1997">1997</option>
                            <option value="1998">1998</option>
                            <option value="1999">1999</option>
                            <option value="2000">2000</option>
							 <option value="2001">2001</option>
							 <option value="2002">2002</option>
							 <option value="2003">2003</option>
							 <option value="2004">2004</option>
							 <option value="2005">2005</option>
							 <option value="2006">2006</option>
							  <option value="2007">2007</option>
							  <option value="2008">2008</option>
							  <option value="2009">2009</option>
							  <option value="2010">2010</option>
                          </select>
                          年 
                          <select name="bday_m">
                            <option value=""></option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6">6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                          </select>
                          月 
                          <select name="bday_d">
                            <option value=""></option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6">6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                            <option value="13">13</option>
                            <option value="14">14</option>
                            <option value="15">15</option>
                            <option value="16">16</option>
                            <option value="17">17</option>
                            <option value="18">18</option>
                            <option value="19">19</option>
                            <option value="20">20</option>
                            <option value="21">21</option>
                            <option value="22">22</option>
                            <option value="23">23</option>
                            <option value="24">24</option>
                            <option value="25">25</option>
                            <option value="26">26</option>
                            <option value="27">27</option>
                            <option value="28">28</option>
                            <option value="29">29</option>
                            <option value="30">30</option>
                            <option value="31">31</option>
                          </select>
                          日 </td>
                      </tr>
                      <tr> 
                        <td width="28%">性别:</td>
                        <td width="72%"> 
                          <input type="radio" name="sex" value="0" checked>
                          保密 
                          <input type="radio" name="sex" value="1">
                          男 
                          <input type="radio" name="sex" value="2">
                          女 </td>
                      </tr>
                      <tr> 
                        <td width="28%">QQ:</td>
                        <td width="72%"> 
                          <input type="text" name="oicq" style="width:130px;height:16px;">
                        </td>
                      </tr>
                      <tr> 
                        <td width="28%">MSN:</td>
                        <td width="72%"> 
                          <input type="text" name="msn" style="width:130px;height:16px;">
                        </td>
                      </tr>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="center">
                          <input type="submit" name="Submit3" value="提 交" class="button">
                          <input type="hidden" name="step" value="2">
                          <input type="hidden" value="$_fromurl" name="jumpto">
<SCRIPT LANGUAGE="JavaScript">
<!--
function regpost(){
	if(document.getElementById('reg_username').value==''){
		alert('用户名不能为空');
		document.getElementById('reg_username').focus();
		return false;
	}
	if(document.getElementById('reg_email').value==''){
		alert('邮箱不能为空');
		document.getElementById('reg_email').focus();
		return false;
	}
	if(document.getElementById('reg_password').value==''){
		alert('密码不能为空');
		document.getElementById('reg_password').focus();
		return false;
	}
	if(document.getElementById('reg_password2').value==''){
		alert('重复密码不能为空');
		document.getElementById('reg_password2').focus();
		return false;
	}
	if(ckregdatapost()==false){
		return false;
	}
}
function ckdata(a,b,c){
	AJAX.get(b,"$webdb[www_url]/do/job.php?job=ckreg&name="+document.getElementById(a).value+"&type="+c);
}
function sendsms(type){
	if(type == 2){
		if(document.getElementById('mobblenum').value==''){
			alert('请输入手机号码');
			document.getElementById('mobblenum').focus();
			return false;
		}
		window.open("$webdb[www_url]/do/job.php?job=regsendnum&num="+document.getElementById('mobblenum').value+"&type="+type);
	}	
	if(type == 1){
		if(document.getElementById('reg_email').value==''){
			alert('请输入邮箱帐号');
			document.getElementById('reg_email').focus();
			return false;
		}
		window.open("$webdb[www_url]/do/job.php?job=regsendnum&num="+document.getElementById('reg_email').value+"&type="+type);
	}
}
//-->
</SCRIPT>                        </td>
                      </tr>
                    </table>
                  </td>
              </tr> </form>
            </table>
         
<!--
EOT;
}print <<<EOT
--> </td>
        </tr><tr><td class="foot"><h3 class="L"></h3><h3 class="R"></h3></td></tr>
      </table>
    </td>
  </tr>
</table>
<!--
EOT;
?>
-->