<!--#include file="conn.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title><%=webname%></title> <style type="text/css"> <!-- .style1 {font-size: 12px} .style2 {color: #FF0000} --> </style> <style type="text/css"> .tabber{border:0px solid #AACCEE;clear:both;} .tabber .tmenu ul{margin:0;padding:0; display:block;} .tabber .tmenu li{ float:left; height:25px; line-height:25px; border-bottom:0px solid #AACCEE; border-right:1px solid #AACCEE; border-left:1px solid #AACCEE; border-color:#AACCEE; border-width:1px; color:#005294; cursor:pointer; display:block; text-align:center;} .tabber .tmenu li.on{ background:#fff; border-bottom-color:##DEF0FF; cursor:default; font-weight:bold;} .tabber .tbox{ clear:both;} .block{display:block;padding:5px;} .none{display:none;padding:5px;} </style> <style> body,div { font-family:verdana; /* line-height:100%; */ font-size:12px; } /*-------------*/ #divc { border:1px solid #005294; margin-top:429px; margin-left:665px; } #divc1 { border:1px solid #005294; margin-top:454px; margin-left:665px; } #divc2 { border:1px solid #005294; margin-top:480px; margin-left:665px; } #divc3 { border:1px solid #005294; margin-top:505px; margin-left:665px; } #divc4 { border:1px solid #005294; margin-top:404px; margin-left:665px; } .mouseover { color:#ffffff; background-color:highlight; width:100%; cursor:default; } .mouseout { color:#000000; width:100%; background-color:#ffffff; cursor:default; } </style> <SCRIPT LANGUAGE="JavaScript"> function jsAuto(instanceName,objID) { this._msg = []; this._x = null; this._o = document.getElementById( objID ); if (!this._o) return; this._f = null; this._i = instanceName; this._r = null; this._c = 0; this._s = false; this._v = null; this._o.style.visibility = "hidden"; this._o.style.position = "absolute"; this._o.style.zIndex = "9999"; this._o.style.overflow = "auto"; this._o.style.height = "200"; return this; }; jsAuto.prototype.directionKey=function() { with (this) { var e = _e.keyCode ? _e.keyCode : _e.which; var l = _o.childNodes.length; (_c>l-1 || _c<0) ? _s=false : ""; if( e==40 && _s ) { _o.childNodes[_c].className="mouseout"; (_c >= l-1) ? _c=0 : _c ++; _o.childNodes[_c].className="mouseover"; } if( e==38 && _s ) { _o.childNodes[_c].className="mouseout"; _c--<=0 ? _c = _o.childNodes.length-1 : ""; _o.childNodes[_c].className="mouseover"; } if( e==13 ) { if(_o.childNodes[_c] && _o.style.visibility=="visible") { _r.value = _x[_c]; _o.style.visibility = "hidden"; } } if( !_s ) { _c = 0; _o.childNodes[_c].className="mouseover"; _s = true; } }}; // mouseEvent. jsAuto.prototype.domouseover=function(obj) { with (this) { _o.childNodes[_c].className = "mouseout"; _c = 0; obj.tagName=="DIV" ? obj.className="mouseover" : obj.parentElement.className="mouseover"; }}; jsAuto.prototype.domouseout=function(obj) { obj.tagName=="DIV" ? obj.className="mouseout" : obj.parentElement.className="mouseout"; }; jsAuto.prototype.doclick=function(msg) { with (this) { if(_r) { _r.value = msg; _o.style.visibility = "hidden"; } else { alert("javascript autocomplete ERROR :nn can not get return object."); return; } }}; // object method; jsAuto.prototype.item=function(msg) { if( msg.indexOf(",")>0 ) { var arrMsg=msg.split(","); for(var i=0; i<arrMsg.length; i++) { arrMsg[i] ? this._msg.push(arrMsg[i]) : ""; } } else { this._msg.push(msg); } this._msg.sort(); }; jsAuto.prototype.append=function(msg) { with (this) { _i ? "" : _i = eval(_i); _x.push(msg); var div = document.createElement("DIV"); //bind event to object. div.onmouseover = function(){_i.domouseover(this)}; div.onmouseout = function(){_i.domouseout(this)}; div.onclick = function(){_i.doclick(msg)}; var re = new RegExp("(" + _v + ")","i"); div.style.lineHeight="140%"; div.className = "mouseout"; if (_v) div.innerHTML = msg.replace(re , "<strong>$1</strong>"); div.style.fontFamily = "verdana"; _o.appendChild(div); }}; jsAuto.prototype.display=function() { with(this) { if(_f&&_v!="") { _o.style.left = _r.offsetLeft; _o.style.width = _r.offsetWidth; _o.style.top = _r.offsetTop + _r.offsetHeight; _o.style.visibility = "visible"; } else { _o.style.visibility="hidden"; } }}; jsAuto.prototype.handleEvent=function(fValue,fID,event) { with (this) { var re; _e = event; var e = _e.keyCode ? _e.keyCode : _e.which; _x = []; _f = false; _r = document.getElementById( fID ); _v = fValue; _i = eval(_i); re = new RegExp("^" + fValue + "", "i"); _o.innerHTML=""; for(var i=0; i<_msg.length; i++) { if(re.test(_msg[i])) { _i.append(_msg[i]); _f = true; } } _i ? _i.display() : alert("can not get instance"); if(_f) { if((e==38 || e==40 || e==13)) { _i.directionKey(); } else { _c=0; _o.childNodes[_c].className = "mouseover"; _s=true; } } }}; window.onerror=new Function("return true;"); </SCRIPT> <script type="text/javascript"> function SetTab(tab,id,cnt){ var menus=document.getElementById(tab).getElementsByTagName("li"); for(i=0;i<cnt;i++){ i==id?menus[i].className="on":menus[i].className=""; i==id?document.getElementById(tab+"-content"+i).className="block":document.getElementById(tab+"-content"+i).className="none"; } } </script> <script language="JavaScript" src="Mymodify.js"></script> </head> <body> <!--#include file="top.asp"--> <table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="313" valign="top"><!--#include file="left.asp"--></td> <td width="667" valign="top"><table width="665" height="413" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td valign="top" bgcolor="#FFFFFF"><table width="665" height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="#EAEAEA"> <tr> <td width="15" align="left" bgcolor="#3782C3"></td> <td width="145" align="left" bgcolor="#3782C3" style="font-size:16px;"><font color="#FFFFFF">注册新用户</font></td> <td width="505" align="right"> </td> </tr> </table> <table width="475" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="images/index3.gif"/></td> </tr> </table> <br /> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <div class="tabber" style="width: 500px;"> <div class="tmenu"> <ul id="tab1"> <li style="width: 100px;" class="on" onmouseover="SetTab('tab1',0,4);">开发小组</li> <li style="width: 100px;" onmouseover="SetTab('tab1',1,4);">教师</li> <li style="width: 100px;" onmouseover="SetTab('tab1',2,4);">学生</li> </ul> </div> <div class="tbox"> <div id="tab1-content0" class="block"> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <% if request("tj")=1 then if request("yhm")="" or request("mm")="" or request("qrmm")="" or request("name")="" or request("xh_fzr")="" or request("xh_cyz1")="" or request("xh_cyz2")="" or request("xh_cyz3")="" or request("xh_cyz4")="" then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('带*号为必填项,请您填写完整!');history.go(-1);</script>") response.End() end if mm=trim(request.form("mm")) qrmm=trim(request.form("qrmm")) if mm<>qrmm then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('两次密码不一样!');history.go(-1);</script>") response.End() end if if request("xh_fzr")<>"" then set rs2=server.createobject("adodb.recordset") xh_fzr=left(request("xh_fzr"),4) sql2="select * from admin_xs where xh="&xh_fzr&"" rs2.open sql2,conn,3,3 If rs2.Eof and rs2.Bof Then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('您填写的负责人_学号还未添加,请先到学生界面注册!');history.go(-1);</script>") response.End() end if rs2.close set rs2=nothing else end if if request("xh_cyz1")<>"" then set rs3=server.createobject("adodb.recordset") xh_cyz1=left(request("xh_cyz1"),4) sql3="select * from admin_xs where xh="&xh_cyz1&"" rs3.open sql3,conn,3,3 If rs3.Eof and rs3.Bof Then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('您填写的参与者_学号1还未添加,请先到学生界面注册!');history.go(-1);</script>") response.End() end if rs3.close set rs3=nothing else end if if request("xh_cyz2")<>"" then set rs4=server.createobject("adodb.recordset") xh_cyz2=left(request("xh_cyz2"),4) sql4="select * from admin_xs where xh="&xh_cyz2&"" rs4.open sql4,conn,3,3 If rs4.Eof and rs4.Bof Then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('您填写的参与者_学号2还未添加,请先到学生界面注册!');history.go(-1);</script>") response.End() end if rs4.close set rs4=nothing else end if if request("xh_cyz3")<>"" then set rs5=server.createobject("adodb.recordset") xh_cyz3=left(request("xh_cyz3"),4) sql5="select * from admin_xs where xh="&xh_cyz3&"" rs5.open sql5,conn,3,3 If rs5.Eof and rs5.Bof Then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('您填写的参与者_学号3还未添加,请先到学生界面注册!');history.go(-1);</script>") response.End() end if rs5.close set rs5=nothing else end if if request("xh_cyz4")<>"" then set rs6=server.createobject("adodb.recordset") xh_cyz4=left(request("xh_cyz4"),4) sql6="select * from admin_xs where xh="&xh_cyz4&"" rs6.open sql6,conn,3,3 If rs6.Eof and rs6.Bof Then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('您填写的参与者_学号4还未添加,请先到学生界面注册!');history.go(-1);</script>") response.End() end if rs6.close set rs6=nothing else end if set rs=server.createobject("adodb.recordset") yhm=trim(request.form("yhm")) sql="select * from admin_kfxz where admin_name='"&yhm&"'" rs.open sql,conn,3,3 If rs.Eof and rs.Bof Then sqlstr="select * from admin_kfxz" set rs=createobject("adodb.recordset") rs.open sqlstr,conn,1,3 rs.addnew rs("admin_name")=trim(request.Form("yhm")) rs("admin_pass")=trim(request.Form("mm")) rs("mingcheng")=trim(request.Form("name")) rs("xh_fzr")=left(request("xh_fzr"),4) rs("xh_cyz1")=left(request("xh_cyz1"),4) rs("xh_cyz2")=left(request("xh_cyz2"),4) rs("xh_cyz3")=left(request("xh_cyz3"),4) rs("xh_cyz4")=left(request("xh_cyz4"),4) rs.update %> <script language="JavaScript" type="text/JavaScript"> alert("成功!"); location='<%="zc.asp"%>'; //本句为跳转 //history.go(-1); //本句为返回前页 </script> <% else response.Write("<script>alert('该用户名已注册!');history.go(-1);</"&"script>") response.end() end if rs.close set rs=nothing else end if on error resume next rs.close %> <script> var checkobj function agreesubmit(el){ checkobj=el if (document.all||document.getElementById){ for (i=0;i<checkobj.form.length;i++){ //hunt down submit button var tempobj=checkobj.form.elements[i] if(tempobj.type.toLowerCase()=="submit") tempobj.disabled=!checkobj.checked } } } function defaultagree(el){ if (!document.all&&!document.getElementById){ if (window.checkobj&&checkobj.checked) return true else{ alert("Please read/accept terms to submit form") return false } } } </script> <form name="agreeform" onSubmit="return defaultagree(this)" method=post action="?tj=1"> <tr> <td width="96" height="25" align="right">用户名:</td> <td width="404"><input name="yhm" type="text" id="yhm" /> <font color="#FF0000">* </font></td> </tr> <tr> <td height="25" align="right">密码:</td> <td><input name="mm" type="password" id="mm" /> <font color="#FF0000">* </font></td> </tr> <tr> <td height="25" align="right">确认密码:</td> <td><input name="qrmm" type="password" id="qrmm" /> <font color="#FF0000">* </font></td> </tr> <tr> <td height="25" align="right">负责人姓名:</td> <td><input name="name" type="text" id="name" /> <font color="#FF0000">* </font></td> </tr> <tr> <td height="25" align="right">负责人_学号:</td> <td><div id="divc4"> <!--this is the autocomplete container.--> </div> <div align="left"> <input name="xh_fzr" id="auto4" onkeyup="jsAutoInstance4.handleEvent(this.value,'auto4',event)" size="30"> <font color="#FF0000">* </font></div> <SCRIPT LANGUAGE="JavaScript"> var jsAutoInstance4 = new jsAuto("jsAutoInstance4","divc4"); <% sql="select * from admin_xs order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 do until rs.eof %> jsAutoInstance4.item("<%=rs("xh")%><%=rs("mingcheng")%>"); <%rs.movenext loop rs.close %> </SCRIPT></td> </tr> <tr> <td height="25" align="right">参与者_学号1:</td> <td><div id="divc"> <!--this is the autocomplete container.--> </div> <div align="left"> <input name="xh_cyz1" id="auto" onkeyup="jsAutoInstance.handleEvent(this.value,'auto',event)" size="30"> <font color="#FF0000">* </font></div> <SCRIPT LANGUAGE="JavaScript"> var jsAutoInstance = new jsAuto("jsAutoInstance","divc"); <% sql="select * from admin_xs order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 do until rs.eof %> jsAutoInstance.item("<%=rs("xh")%><%=rs("mingcheng")%>"); <%rs.movenext loop rs.close %> </SCRIPT></td> </tr> <tr> <td height="25" align="right">参与者_学号2:</td> <td><div id="divc1"> <!--this is the autocomplete container.--> </div> <div align="left"> <input name="xh_cyz2" id="auto1" onkeyup="jsAutoInstance1.handleEvent(this.value,'auto1',event)" size="30"> <font color="#FF0000">* </font></div> <SCRIPT LANGUAGE="JavaScript"> var jsAutoInstance1 = new jsAuto("jsAutoInstance1","divc1"); <% sql="select * from admin_xs order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 do until rs.eof %> jsAutoInstance1.item("<%=rs("xh")%><%=rs("mingcheng")%>"); <%rs.movenext loop rs.close %> </SCRIPT></td> </tr> <tr> <td height="25" align="right">参与者_学号3:</td> <td><div id="divc2"> <!--this is the autocomplete container.--> </div> <div align="left"> <input name="xh_cyz3" id="auto2" onkeyup="jsAutoInstance2.handleEvent(this.value,'auto2',event)" size="30"> <font color="#FF0000">* </font></div> <SCRIPT LANGUAGE="JavaScript"> var jsAutoInstance2 = new jsAuto("jsAutoInstance2","divc2"); <% sql="select * from admin_xs order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 do until rs.eof %> jsAutoInstance2.item("<%=rs("xh")%><%=rs("mingcheng")%>"); <%rs.movenext loop rs.close %> </SCRIPT></td> </tr> <tr> <td height="25" align="right">参与者_学号4:</td> <td><div id="divc3"> <!--this is the autocomplete container.--> </div> <div align="left"> <input name="xh_cyz4" id="auto3" onkeyup="jsAutoInstance3.handleEvent(this.value,'auto3',event)" size="30"> <font color="#FF0000">* </font></div> <SCRIPT LANGUAGE="JavaScript"> var jsAutoInstance3 = new jsAuto("jsAutoInstance3","divc3"); <% sql="select * from admin_xs order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 do until rs.eof %> jsAutoInstance3.item("<%=rs("xh")%><%=rs("mingcheng")%>"); <%rs.movenext loop rs.close %> </SCRIPT></td> </tr> <tr> <td height="25" align="right"><input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"></td> <td>我以阅读以下申明</td> </tr> <tr> <td height="25"> </td> <td><textarea name="sm" cols="45" rows="6" id="sm">宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法</textarea></td> </tr> <tr> <td height="25"> </td> <td height="50" align="center"><input type="submit" value="提交" disabled> <input type="reset" name="Submit" value="重置" /></td> </tr> </form> <script> //change two names below to your form's names document.forms.agreeform.agreecheck.checked=false </script> </table> </div> <div id="tab1-content1" class="none"> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <% if request("tj")=2 then if request("yhm")="" or request("mm")="" or request("qrmm")="" or request("name")="" or request("xb")="" or request("gh")="" or request("zy")="" or request("nl")="" then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('带*号为必填项,请您填写完整!');history.go(-1);</script>") response.End() end if mm=trim(request.form("mm")) qrmm=trim(request.form("qrmm")) if mm<>qrmm then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('两次密码不一样!');history.go(-1);</script>") response.End() end if set rs=server.createobject("adodb.recordset") yhm=trim(request.form("yhm")) sql="select * from admin_js where admin_name='"&yhm&"'" rs.open sql,conn,3,3 If rs.Eof and rs.Bof Then sqlstr="select * from admin_js" set rs=createobject("adodb.recordset") rs.open sqlstr,conn,1,3 rs.addnew rs("admin_name")=trim(request.Form("yhm")) rs("admin_pass")=trim(request.Form("mm")) rs("mingcheng")=trim(request.Form("name")) rs("xb")=trim(request.Form("xb")) rs("gh")=trim(request.Form("gh")) rs("zy")=trim(request.Form("zy")) rs("nl")=trim(request.Form("nl")) rs.update %> <script language="JavaScript" type="text/JavaScript"> alert("成功!"); location='<%="zc.asp"%>'; //本句为跳转 //history.go(-1); //本句为返回前页 </script> <% else response.Write("<script>alert('该用户名已注册!');history.go(-1);</"&"script>") response.end() end if rs.close set rs=nothing else end if on error resume next rs.close %> <script> var checkobj function agreesubmit(el){ checkobj=el if (document.all||document.getElementById){ for (i=0;i<checkobj.form.length;i++){ //hunt down submit button var tempobj=checkobj.form.elements[i] if(tempobj.type.toLowerCase()=="submit") tempobj.disabled=!checkobj.checked } } } function defaultagree(el){ if (!document.all&&!document.getElementById){ if (window.checkobj&&checkobj.checked) return true else{ alert("Please read/accept terms to submit form") return false } } } </script> <form name="agreeform" onSubmit="return defaultagree(this)" method=post action="?tj=2"> <tr> <td width="96" height="25" align="right">用户名:</td> <td width="404"><input name="yhm" type="text" id="yhm" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">密码:</td> <td><input name="mm" type="password" id="mm" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">确认密码:</td> <td><input name="qrmm" type="password" id="qrmm" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">真实姓名:</td> <td><input name="name" type="text" id="name" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">性别:</td> <td><input type="radio" name="xb" value="男" /> 男 <input type="radio" name="xb" value="女" /> 女<font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">工号:</td> <td><input name="gh" type="text" id="gh" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">专业:</td> <td><input name="zy" type="text" id="zy" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">年龄:</td> <td><input name="nl" type="text" id="nl" size="5" /> 岁<font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right"><input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"></td> <td>我以阅读以下申明</td> </tr> <tr> <td height="25"> </td> <td><textarea name="sm" cols="45" rows="6" id="sm">宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法</textarea></td> </tr> <tr> <td height="25"> </td> <td height="50" align="center"><input type="submit" value="提交" disabled> <input type="reset" name="Submit" value="重置" /></td> </tr> </form> <script> //change two names below to your form's names document.forms.agreeform.agreecheck.checked=false </script> </table> </div> <div id="tab1-content2" class="none"> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <% if request("tj")=3 then if request("yhm")="" or request("mm")="" or request("qrmm")="" or request("name")="" or request("xb")="" or request("xh")="" or request("bj")="" or request("xx")="" or request("csny")="" then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('带*号为必填项,请您填写完整!');history.go(-1);</script>") response.End() end if mm=trim(request.form("mm")) qrmm=trim(request.form("qrmm")) if mm<>qrmm then response.Write("<script language='JavaScript' type='text/JavaScript'>alert('两次密码不一样!');history.go(-1);</script>") response.End() end if set rs=server.createobject("adodb.recordset") yhm=trim(request.form("yhm")) sql="select * from admin_xs where admin_name='"&yhm&"'" rs.open sql,conn,3,3 If rs.Eof and rs.Bof Then sqlstr="select * from admin_xs" set rs=createobject("adodb.recordset") rs.open sqlstr,conn,1,3 rs.addnew rs("admin_name")=trim(request.Form("yhm")) rs("admin_pass")=trim(request.Form("mm")) rs("mingcheng")=trim(request.Form("name")) rs("xb")=trim(request.Form("xb")) rs("xh")=trim(request.Form("xh")) rs("bj")=trim(request.Form("bj")) rs("xx")=trim(request.Form("xx")) rs("csny")=trim(request.Form("csny")) rs.update %> <script language="JavaScript" type="text/JavaScript"> alert("成功!"); location='<%="zc.asp"%>'; //本句为跳转 //history.go(-1); //本句为返回前页 </script> <% else response.Write("<script>alert('该用户名已注册!');history.go(-1);</"&"script>") response.end() end if rs.close set rs=nothing else end if on error resume next rs.close %> <script> var checkobj function agreesubmit(el){ checkobj=el if (document.all||document.getElementById){ for (i=0;i<checkobj.form.length;i++){ //hunt down submit button var tempobj=checkobj.form.elements[i] if(tempobj.type.toLowerCase()=="submit") tempobj.disabled=!checkobj.checked } } } function defaultagree(el){ if (!document.all&&!document.getElementById){ if (window.checkobj&&checkobj.checked) return true else{ alert("Please read/accept terms to submit form") return false } } } </script> <form name="agreeform" onSubmit="return defaultagree(this)" method=post action="?tj=3"> <tr> <td width="96" height="25" align="right">用户名:</td> <td width="404"><input name="yhm" type="text" id="yhm" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">密码:</td> <td><input name="mm" type="password" id="mm" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">确认密码:</td> <td><input name="qrmm" type="password" id="qrmm" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">真实姓名:</td> <td><input name="name" type="text" id="name" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">性别:</td> <td><input type="radio" name="xb" value="男" /> 男 <input type="radio" name="xb" value="女" /> 女<font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">学号:</td> <td><input name="xh" type="text" id="xh" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">班级:</td> <td><input name="bj" type="text" id="bj" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">学校:</td> <td><input name="xx" type="text" id="xx" /> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right">出生年月:</td> <td><input name="csny" type="text" id="csny" onfocus="show_cele_date(csny,'','',csny)"> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" align="right"><input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"></td> <td>我以阅读以下申明</td> </tr> <tr> <td height="25"> </td> <td><textarea name="sm" cols="45" rows="6" id="sm">宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法宋祖德放假啊司法所阿斯蒂芬啊是发送方啊我是发发撕开阿斯科的罚款阿萨德发卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法卡司法所发卡疯狂萨菲卡二斯蒂芬卡塞蒂发卡生速度飞快艾莎家法</textarea></td> </tr> <tr> <td height="25"> </td> <td height="50" align="center"><input type="submit" value="提交" disabled> <input type="reset" name="Submit" value="重置" /></td> </tr> </form> <script> //change two names below to your form's names document.forms.agreeform.agreecheck.checked=false </script> </table> </div> </div> </div> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <!--#include file="foot.asp"--> </body> </html>
我可以注册信息,而且注册完学生的话可以登录,但是数据库里就是没信息,所以无法注册其他的,不知道那边错了,网址是http://hmw115186.chinaw3.com/zc.asp下面是注册的asp代码,求高人指导下
asp可以不用学了,现在都是asp.net。
我就是因为网站出来问题,别人让我搞下试试的,我其实都不会的,我以前都没接触过,连怎么调试都不会,能帮我改下不?谢了
sqlstr="select * from admin_kfxz" set rs=createobject("adodb.recordset") rs.open sqlstr,conn,1,3 rs.addnew rs("admin_name")=trim(request.Form("yhm")) rs("admin_pass")=trim(request.Form("mm")) rs("mingcheng")=trim(request.Form("name")) rs("xh_fzr")=left(request("xh_fzr"),4) rs("xh_cyz1")=left(request("xh_cyz1"),4) rs("xh_cyz2")=left(request("xh_cyz2"),4) rs("xh_cyz3")=left(request("xh_cyz3"),4) rs("xh_cyz4")=left(request("xh_cyz4"),4) rs.update
我不太确定,但似乎这是一个结果集,不是用于插入的。
我也觉得没有写入数据库的语句,只有读取的,能帮我改下不?我这一块其实不会的
rs.addnew不能添加一个记录集么?
@落尘祥:
我搜索了一下,发现最后都要关闭记录集和连接:
http://www.sosuo8.com/article/show.asp?id=253
http://www.jb51.net/article/24452.htm
http://www.wangchao.net.cn/bbsdetail_754216.html
http://blog.csdn.net/zjcxc/article/details/384551
rs.update
rs.close
conn.close
set rs=nothing
set sql=nothing
@猫行天下: 这个有的end if
rs.close
set rs=nothing
else
end if
on error resume next
rs.close
@落尘祥:
%>
<script language="JavaScript" type="text/JavaScript">
alert("成功!");
location='<%="zc.asp"%>'; //本句为跳转
//history.go(-1); //本句为返回前页
</script>
<%
else
response.Write("<script>alert('该用户名已注册!');history.go(-1);</"&"script>")
response.end()
end if
rs.close
conn.close
set rs=nothing
else
end if
on error resume next
rs.close
conn.close
%>
@猫行天下: 这样的话,注册页面就进不去了,死在那了
@落尘祥: 你看数据库里头加进去了没有。
@猫行天下: 不行,我加conn.close后连注册页面都进不去,更加无法写入数据库了,会不会是那个数据库的asp有问题?
@猫行天下: 只要加第二个的就打不开,加第一个却还是没用数据库依旧加不进去
rs.close
conn.close
%>
@落尘祥:
Recordset 对象能够支持两种更新类型: 立即更新 - 一旦调用 Update 方法,所有更改被立即写入数据库。批更新 - provider 将缓存多个更改,然后使用 UpdateBatch 方法把这些更改传送到数据库。
试试UpdateBatch
我刚看到你最后的描述。
@猫行天下: 有QQ么,求交流下,我的835253052,谢谢
@落尘祥: 不好意思,前段日子电脑坏了,你那方法UpdateBath试了,也还是不行,我在想跟那几个管理员的asp会不会有关
代码似乎没有问题。你可以在这里先关闭一下RS
rs.open sql,conn,3,3 If rs.Eof and rs.Bof Then sqlstr="select * from admin_kfxz" rs.Close '先关闭前一个rs连接 set rs=createobject("adodb.recordset") rs.open sqlstr,conn,1,3
还是不行,会不会是跟数据库连一块的那个asp文件有问题,我这是etwldbs.asp
这个我后面有加的
<%
else
response.Write("<script>alert('该用户名已注册!');history.go(-1);</"&"script>")
response.end()
end if
rs.close
@落尘祥: 在使用两个不同的RecordSet时,一般先关闭第一个,再打开第二个。因为打开时的参数不同。
@邀月: 能加个QQ交流下么,这一块我真的都不懂,希望指导下,我QQ号835253052,谢谢!