<?
include_once (dirname(__FILE__).'/for_header.php');
?>
<?
require ("include/mysql_db.php");
session_start();
?>
<HTML><HEAD><TITLE>会员注册-</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<script>
function checkform(theform)
{
  var letters = "abcdefghijklmnopqrstuvwxyz_0123456789" +
                "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  var letter =  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

  var allword = letters + "~!@#$%^&*()+|/?;:'[{]}`"
  var errletter = ""
  if(theform.username1.value.length < 1)
  {
    alert("请输入会员名称！")
    theform.username1.focus()
    return false
  }

  if(letter.indexOf(theform.username1.value.charAt(0)) == -1)
  {
    alert("会员名称必须是英文或拼音！" )
    theform.username1.focus()
    return false
  }
  
   if(theform.password1.value.length < 6)
  {
    alert("密码不能少于6个字符！")
    theform.password1.focus()
    return false
  } 

  if(theform.repassword1.value.length < 1)
  {
    alert("请重复输入密码！")
    theform.repassword1.focus()
    return false
  }

  if(theform.password1.value != theform.repassword1.value)
  {
    alert("密码与重复密码不同！")
    theform.repassword1.focus()
    return false
  }
 
  if(theform.uemail.value.length < 1)
  {
    alert("请输入EMAIL地址！")
    theform.uemail.focus()
    return false
  }
  
  if(theform.uemail.value.indexOf("@") == -1)
  {
    alert("EMAIL格式不正确，应如：abc@abc.com！")
    theform.uemail.focus()
    return false
  }
  
   if(theform.realname.value.length < 1)
  {
    alert("请输入真实姓名！")
    theform.realname.focus()
    return false
  }
  
  if(theform.address.value.length < 2)
  {
    alert("请输入联系地址！")
    theform.address.focus()
    return false
  }

 if(theform.zip.value.length < 1)
  {
    alert("请输入邮政编码！")
    theform.zip.focus()
    return false
  }
  
if(theform.tele.value.length < 1)
  {
    alert("请输入电话号码！")
    theform.tele.focus()
    return false
  }
  return true
} 
</script>
</HEAD>
<? include("include/style.php") ?>
<BODY bgColor=#FFFFFF leftMargin=0 topMargin=0>
<? include("include/head.php") ?>
<TABLE height=300 cellSpacing=0 cellPadding=0 width=600 align=center border=0>
  <TBODY> 
  <TR> 
    <TD vAlign=top height="500" align="center">
      <br>
        <? if ($mod=="agent")
		{
		echo "<b>网上连锁加盟</b>";
		}else{
		echo "<b>新会员注册</b>";
		}
		?>
		
<form onSubmit="return checkform(this)" name="form1" method="post" action="apply_2.php">
          <TABLE cellSpacing=1 cellPadding=0 width=100% border=0>
            <tr> 
              <td height=28 colspan=2 bgcolor="#ff9900"> 
                <div align="center"><font color="#FF0000"><b><font color="#FFFFFF">提示：请牢记您的密码和邮箱地址</font></b></font></div></td>
            </tr>
            <tr> 
              <td height="28" align="right"> 会员名称：</td>
              <script language="javascript">
function opencheckuser()
{
var f=document.form1;
if (f.username1.value == "") {
alert("请输入帐号. ");
return false;
}

winobject = window.open("","","scrollbars=no,resizable=yes,width=230,height=100");
winobject.document.location = "username.php?username=" + f.username1.value;
winobject.focus();
}
</script>
              <td height="24"> <input name="username1" id="username1" maxlength=12> 
                <font color=red>*</font> <INPUT type="button" onClick="javascript:opencheckuser()" value="重复查询">
                (字母或数字组合)</td>
            </tr>
            <tr> 
              <td height="28" align="right"> 密码：</td>
              <td> <input type=password name="password1" id="password1" maxlength=12> 
                <font color=red>*</font> (长度6-12个字符)</td>
            </tr>
            <tr> 
              <td height="28" align="right"> 确认密码：</td>
              <td> <input type=password name="repassword1" id="repassword1" maxlength=12> 
                <font color=red>*</font></td>
            </tr>
            <tr> 
              <td height="28" align="right"> 电子邮箱：</td>
              <td height="24"> <input name="uemail" id="uemail" maxlength=30> 
                <font color=red>*</font> (必需填写正确)</td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">问题：</div></td>
              <td height=20 width="462"> <input type="text" name="question" id="question"> 
                <font color=red>*</font> </td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">回答：</div></td>
              <td height=20 width="462"> <input type="text" name="answer" id="answer"> 
                <font color=red>*</font> (请牢记，用于取回密码) </td>
            </tr>
			<? if ($mod=="agent")
			{
			?>
            <tr align=center bgcolor=#ff9900> 
              <td height='28' colspan='2'><strong><font color=#FFFFFF>帐 户 信 
                息</font></strong></td>
            </tr>
            <tr> 
              <td height='28' align='right'> 户头号码：</td>
              <td height='24'> <input name='account' id='account' maxlength=30> 
                <font color=red>*</font> (必需填写正确)</td>
            </tr>
            <tr bgcolor=''> 
              <td height=28 width='282'> <div align='right'>开户银行：</div></td>
              <td height=20 width='462'> <input type='text' name='bank' id='bank'> 
                <font color=red>*</font> </td>
            </tr>
			<tr bgcolor=''> 
              <td height=28 width='282'> <div align='right'>网站名称：</div></td>
              <td height=20 width='462'> <input type='text' name='sitename' id='sitename'> 
                <font color=red>*</font> </td>
            </tr>
			<tr bgcolor=''> 
              <td height=28 width='282'> <div align='right'>网站地址：</div></td>
              <td height=20 width='462'> <input type='text' name='siteurl' id='siteurl'> 
                <font color=red>*</font> </td>
            </tr><input type='hidden' name='mod' value='agent'>
			<?
			} 
			?> 
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">真实姓名：</div></td>
              <td height=20 width="462"> <input maxlength=20 name=realname id="realname"> 
              </td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">性别：</div></td>
              <td height=20 width="462"> <SELECT id=sex name=sex>
                  <OPTION value=0>男</OPTION>
                  <OPTION value=1>女</OPTION>
                </SELECT> </td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">出生年月：</div></td>
              <td height=20 width="462"> <select name=bir[0]>
                  <option value="19" selected>19</option>
                </select>
			  <select name=bir[3]>
                  <option value="1" selected>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="0">0</option>
                </select>
				<select name=bir[4]>
                  <option value="1" selected>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="0">0</option>
                </select>
                年 
                <select name=bir[1]>
                  <option value="01" selected>1</option>
                  <option value="02">2</option>
                  <option value="03">3</option>
                  <option value="04">4</option>
                  <option value="05">5</option>
                  <option value="06">6</option>
                  <option value="07">7</option>
                  <option value="08">8</option>
                  <option value="09">9</option>
                  <option value="10">10</option>
                  <option value="11">11</option>
                  <option value="12">12</option>
                </select>
                月 
                <select name="bir[2]">
                  <option value="01" selected>1</option>
                  <option value="02">2</option>
                  <option value="03">3</option>
                  <option value="04">4</option>
                  <option value="05">5</option>
                  <option value="06">6</option>
                  <option value="07">7</option>
                  <option value="08">8</option>
                  <option value="09">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 bgcolor=""> 
              <td height=28 width="282"> <div align="right">国家：</div></td>
              <td height=20 width="462"> <font 
            color=#ff0000> 
                <select name="country">
                  <option value="CHN" selected> china </option>
                  <option value="USA">United States </option>
                  <option value="CAN">Canada </option>
                  <option value="DEU">Germany </option>
                  <option value="FRA">France </option>
                  <option value="GBR">United Kingdom </option>
                  <option value="IND">India </option>
                  <option value="">--------------------- </option>
                  <option value="AFG">Afghanistan </option>
                  <option value="ALB">Albania </option>
                  <option value="DZA">Algeria </option>
                  <option value="ASM">American Samoa </option>
                  <option value="AND">Andorra </option>
                  <option value="AGO">Angola </option>
                  <option value="AIA">Anguilla </option>
                  <option value="ATA">Antarctica </option>
                  <option value="ATG">Antigua and Barbuda </option>
                  <option value="ARG">Argentina </option>
                  <option value="ARM">Armenia </option>
                  <option value="ABW">Aruba </option>
                  <option value="AUS">Australia </option>
                  <option value="AUT">Austria </option>
                  <option value="AZE">Azerbaijan </option>
                  <option value="BHS">Bahamas </option>
                  <option value="BHR">Bahrain </option>
                  <option value="BGD">Bangladesh </option>
                  <option value="BRB">Barbados </option>
                  <option value="BLR">Belarus </option>
                  <option value="BEL">Belgium </option>
                  <option value="BLZ">Belize </option>
                  <option value="BEN">Benin </option>
                  <option value="BMU">Bermuda </option>
                  <option value="BTN">Bhutan </option>
                  <option value="BOL">Bolivia </option>
                  <option value="BIH">Bosnia-Herzegovina </option>
                  <option value="BWA">Botswana </option>
                  <option value="BVT">Bouvet Island </option>
                  <option value="BRA">Brazil </option>
                  <option value="IOT">British Indian O.Terr.</option>
                  <option value="BRN">Brunei Darussalam </option>
                  <option value="BGR">Bulgaria </option>
                  <option value="BFA">Burkina Faso </option>
                  <option value="BDI">Burundi </option>
                  <option value="KHM">Cambodia </option>
                  <option value="CMR">Cameroon </option>
                  <option value="CPV">Cape Verde </option>
                  <option value="CYM">Cayman Islands </option>
                  <option value="CAF">Central African Rep.</option>
                  <option value="TCD">Chad </option>
                  <option value="CHL">Chile </option>
                  <option value="CXR">Christmas Island </option>
                  <option value="CCK">Cocoa (Keeling) Isl.</option>
                  <option value="COL">Colombia </option>
                  <option value="COM">Comoros </option>
                  <option value="COG">Congo </option>
                  <option value="COK">Cook Islands </option>
                  <option value="CRI">Costa Rica </option>
                  <option value="CIV">Cote Divoire </option>
                  <option value="HRV">Croatia </option>
                  <option value="CUB">Cuba </option>
                  <option value="CYP">Cyprus </option>
                  <option value="CZE">Czech Republic </option>
                  <option value="DNK">Denmark </option>
                  <option value="DJI">Djibouti </option>
                  <option value="DMA">Dominica </option>
                  <option value="DOM">Dominican Republic </option>
                  <option value="TMP">East Timor </option>
                  <option value="ECU">Ecuador </option>
                  <option value="EGY">Egypt </option>
                  <option value="SLV">El Salvador </option>
                  <option value="GNQ">Equatorial Guinea </option>
                  <option value="ERI">Eritrea </option>
                  <option value="EST">Estonia </option>
                  <option value="ETH">Ethiopia </option>
                  <option value="FLK">Falkland Isl. </option>
                  <option value="FRO">Faroe Isl. </option>
                  <option value="FJI">Fiji </option>
                  <option value="FIN">Finland </option>
                  <option value="FXX">France, Metropolitan </option>
                  <option value="GUF">French Guiana </option>
                  <option value="PYF">French Polynesia </option>
                  <option value="ATF">French Southern Terr.</option>
                  <option value="GAB">Gabon </option>
                  <option value="GMB">Gambia </option>
                  <option value="GEO">Georgia </option>
                  <option value="GHA">Ghana </option>
                  <option value="GIB">Gibraltar </option>
                  <option value="GRC">Greece </option>
                  <option value="GRL">Greenland </option>
                  <option value="GRD">Grenada </option>
                  <option value="GLP">Guadeloupe </option>
                  <option value="GUM">Guam </option>
                  <option value="GTM">Guatemala </option>
                  <option value="GIN">Guinea </option>
                  <option value="GNB">Guinea-Bissau </option>
                  <option value="GUY">Guyana </option>
                  <option value="HTI">Haiti </option>
                  <option value="HMD">Heard & Mc Donald Isl.</option>
                  <option value="HND">Honduras </option>
                  <option value="HKG">Hong Kong </option>
                  <option value="HUN">Hungary </option>
                  <option value="ISL">Iceland </option>
                  <option value="IDN">Indonesia </option>
                  <option value="IRN">Iran </option>
                  <option value="IRQ">Iraq </option>
                  <option value="IRL">Ireland </option>
                  <option value="ISR">Israel </option>
                  <option value="ITA">Italy </option>
                  <option value="JAM">Jamaica </option>
                  <option value="JPN">Japan </option>
                  <option value="JOR">Jordan </option>
                  <option value="KAZ">Kazakhstan </option>
                  <option value="KEN">Kenya </option>
                  <option value="KIR">Kiribati </option>
                  <option value="PRK">Korea (North)</option>
                  <option value="KOR">Korea (South)</option>
                  <option value="KWT">Kuwait </option>
                  <option value="KGZ">Kyrgyzstan </option>
                  <option value="LAO">Laos </option>
                  <option value="LVA">Latvia </option>
                  <option value="LBN">Lebanon </option>
                  <option value="LSO">Lesotho </option>
                  <option value="LBR">Liberia </option>
                  <option value="LBY">Libyan Arab Jamahiriya</option>
                  <option value="LIE">Liechtenstein </option>
                  <option value="LTU">Lithuania </option>
                  <option value="LUX">Luxembourg </option>
                  <option value="MAC">Macau </option>
                  <option value="MKD">Macedonia</option>
                  <option value="MDG">Madagascar </option>
                  <option value="MWI">Malawi </option>
                  <option value="MYS">Malaysia </option>
                  <option value="MDV">Maldives </option>
                  <option value="MLI">Mali </option>
                  <option value="MLT">Malta </option>
                  <option value="MHL">Marshall Islands </option>
                  <option value="MTQ">Martinique </option>
                  <option value="MRT">Mauritania </option>
                  <option value="MVS">Mauritius </option>
                  <option value="MYT">Mayotte </option>
                  <option value="MEX">Mexico </option>
                  <option value="FSM">Micronesia </option>
                  <option value="MDA">Moldova </option>
                  <option value="MCO">Monaco </option>
                  <option value="MNG">Mongolia </option>
                  <option value="MSR">Montserrat </option>
                  <option value="MAR">Morocco </option>
                  <option value="MOZ">Mozambique </option>
                  <option value="MMR">Myanmar </option>
                  <option value="NAM">Namibia </option>
                  <option value="NRU">Nauru </option>
                  <option value="NPL">Nepal </option>
                  <option value="NLD">Netherlands </option>
                  <option value="ANT">Netherlands Antilles </option>
                  <option value="NCL">New Caledonia </option>
                  <option value="NZL">New Zealand </option>
                  <option value="NIC">Nicaragua </option>
                  <option value="NER">Niger </option>
                  <option value="NGA">Nigeria </option>
                  <option value="NIU">Niue </option>
                  <option value="NFK">Norfolk Island </option>
                  <option value="MNP">Northern Mariana Isl.</option>
                  <option value="MOR">Norway </option>
                  <option value="OMN">Oman </option>
                  <option value="PAK">Pakistan </option>
                  <option value="PLW">Palau </option>
                  <option value="PAN">Panama </option>
                  <option value="PNG">Papua New Guinea </option>
                  <option value="PRY">Paraguay </option>
                  <option value="PER">Peru </option>
                  <option value="PHL">Philippines </option>
                  <option value="PCN">Pitcairn </option>
                  <option value="POL">Poland </option>
                  <option value="PRT">Portugal </option>
                  <option value="PRI">Puerto Rico </option>
                  <option value="QAT">Qatar </option>
                  <option value="REU">Reunion </option>
                  <option value="ROM">Romania </option>
                  <option value="RUS">Russian Federation </option>
                  <option value="RWA">Rwanda </option>
                  <option value="LCA">Saint Lucia </option>
                  <option value="WSM">Samoa </option>
                  <option value="SMR">San Marino </option>
                  <option value="STP">Sao Tome & Principe </option>
                  <option value="SAU">Saudi Arabia </option>
                  <option value="SEN">Senegal </option>
                  <option value="SYC">Seychelles </option>
                  <option value="SLE">Sierra Leone </option>
                  <option value="SGP">Singapore </option>
                  <option value="SVK">Slovakia </option>
                  <option value="SVN">Slovenia </option>
                  <option value="SLB">Solomon Isl. </option>
                  <option value="SOM">Somalia </option>
                  <option value="ZAF">South Africa </option>
                  <option value="SGS">South korea </option>
                  <option value="ESP">Spain </option>
                  <option value="LKA">Sri Lanka </option>
                  <option value="SHN">St. Helena </option>
                  <option value="SPM">St. Pierre & Miquelon </option>
                  <option value="KNA">St. Kitts Nevis Anguilla </option>
                  <option value="VCT">St. Vincent & Grenadines</option>
                  <option value="SDN">Sudan </option>
                  <option value="SUR">Suriname </option>
                  <option value="SJM">Svalbard & Jan Mayen Isl.</option>
                  <option value="SWZ">Swaziland </option>
                  <option value="SWE">Sweden </option>
                  <option value="CHE">Switzerland </option>
                  <option value="SYR">Syrian Arab Republic </option>
                  <option value="TWN">Taiwan </option>
                  <option value="TJK">Tajikistan </option>
                  <option value="TZA">Tanzania </option>
                  <option value="THA">Thailand </option>
                  <option value="TGO">Togo </option>
                  <option value="TKL">Tokelau </option>
                  <option value="TON">Tonga </option>
                  <option value="TTO">Trinidad & Tobago </option>
                  <option value="TUN">Tunisia </option>
                  <option value="TUR">Turkey </option>
                  <option value="TKM">Turkmenistan </option>
                  <option value="TCA">Turks & Caicos Isl. </option>
                  <option value="TUV">Tuvalu </option>
                  <option value="UGA">Uganda </option>
                  <option value="UKR">Ukraine </option>
                  <option value="ARE">United Arab Emirates </option>
                  <option value="UMI">US Minor Outlying Isl.</option>
                  <option value="URY">Uruguay </option>
                  <option value="UZB">Uzbekistan </option>
                  <option value="VUT">Vanuatu </option>
                  <option value="VAT">Vatican City State </option>
                  <option value="VEN">Venezuela </option>
                  <option value="VNM">Viet Nam </option>
                  <option value="VGB">Virgin Islands (British)</option>
                  <option value="VIR">Virgin Islands (U.S.) </option>
                  <option value="WLF">Wallisw & Futuna Isl.</option>
                  <option value="ESH">Western Sahara </option>
                  <option value="YEM">Yeman </option>
                  <option value="YUG">Yugoslavia </option>
                  <option value="ZAR">Zaire </option>
                  <option value="ZMB">Zambia </option>
                  <option value="ZWE">Zimbabwe </option>
                  <option value="UNK">Not Listed </option>
                </select>
                </font></td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">所在地区：</div></td>
              <td height=20 width="462"> <select name=city>
                  <option value="北京" selected>北京</option>
                  <option value="上海">上海</option>
                  <option value="天津">天津</option>
                  <option value="重庆">重庆</option>
                  <option value="黑龙江">黑龙江</option>
                  <option value="吉林">吉林</option>
                  <option value="辽宁">辽宁</option>
                  <option value="内蒙古">内蒙古</option>
                  <option value="新疆">新疆</option>
                  <option value="西藏">西藏</option>
                  <option value="青海">青海</option>
                  <option value="宁夏">宁夏</option>
                  <option value="甘肃">甘肃</option>
                  <option value="四川">四川</option>
                  <option value="云南">云南</option>
                  <option value="河北">河北</option>
                  <option value="山西">山西</option>
                  <option value="陕西">陕西</option>
                  <option value="贵州">贵州</option>
                  <option value="山东">山东</option>
                  <option value="河南">河南</option>
                  <option value="湖北">湖北</option>
                  <option value="浙江">浙江</option>
                  <option value="湖南">湖南</option>
                  <option value="广西">广西</option>
                  <option value="江苏">江苏</option>
                  <option value="安徽">安徽</option>
                  <option value="江西">江西</option>
                  <option value="广东">广东</option>
                  <option value="福建">福建</option>
                  <option value="海南">海南</option>
                  <option value="香港">香港</option>
                  <option value="澳门">澳门</option>
                  <option value="台湾">台湾</option>
                  <option value="其它">其它国家</option>
                </select> </td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">联系地址：</div></td>
              <td height=20 width="462"> <input maxlength=50 name=address id="address"> 
              </td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">邮政编码：</div></td>
              <td height=20 width="462"> <input maxlength=6 size=10 name=zip id="postcode"> 
              </td>
            </tr>
            <tr bgcolor=""> 
              <td height=28 width="282"> <div align="right">联系电话：</div></td>
              <td height=20 width="462"> <input maxlength=30 name=tele id="tele"> 
              </td>
            </tr>
            <tr> 
              <td height="28" colspan="2" bgcolor="#ff9900"> 
                <div align="center"> 
                  <input type="hidden" name="password" value="<?=$password ?>">
                  <input type="hidden" name="userid" value="<?=$userid ?>">
                  <input type="hidden" name="agentid" value="<?=$agentid ?>">
                  <input type="hidden" name="email" value="<?=$email ?>">
                  <input type="submit" name="Submit" value="确认提交">
                </div></td>
            </tr>
          </table>
      </form>
    </TD>
  </TR>
  </TBODY> 
</TABLE>
<? include("include/copyright.php") ?>
</BODY></HTML>
<?
include_once (dirname(__FILE__).'/for_footer.php');
?>