所属类别:Asp
文章作者:佚名
特别推荐:免费发布信息 承包关键词~~抢爆了!HOT!
*********************用户注册***************************************<%'用户注册,userinsert.asp%><%response.buffer = true%>用户注册<!--function dd(list){var listtext="";if ((list.selectedIndex != -1)&&(list.selectedIndex != 0))listtext = list.options[list.selectedIndex].value;document.forms[0].sex.value = listtextreturn true;}function windowload(){document.forms[0].name.focus();}function formsubmit(){document.forms[0].submit();}function mm(text){var aa=""if (text==1)aa=document.forms[0].name.valueif (text==2)aa=document.forms[0].sex.valueif (text==3)aa=document.forms[0].pass.valueif (text==4)aa=document.forms[0].pass1.valuereturn aa;}function msg(text){alert(text);return;}// --><!--function input(tt)dim sc_name,sc_sex,sc_pass,sc_pass1,sc_flagsc_flag = 0'姓名sc_name = ""sc_name = trim(mm(1))if sc_name = "" thenmsg("必须输入:您的昵称")sc_flag = 1end ifsc_sex = ""sc_sex = trim(mm(2))if sc_sex = "" thenmsg("必须输入:您的性别")sc_flag = 1end ifsc_pass = ""sc_pass = mm(3)if sc_pass = "" thenmsg("必须输入:您的口令")sc_flag = 1end ifsc_pass1 = ""sc_pass1 = mm(4)if sc_pass1 = "" thenmsg("必须输入:确认口令")sc_flag = 1end ifif sc_pass <> sc_pass1 thenmsg("口令和确认口令不一致")sc_flag = 1end ifif sc_flag = 0 thenformsubmit()elsewindowload()end ifend function-->您的昵称:(必须填写,不能有空格)您的性别:自填俊男美女精灵野兽(必须填写)您的口令:(必须填写)口令确认:(必须填写)您的提示问题:提示问题答案:您的E_mail:*******************************注册处理*********************************<%'insertusercl.asp%><%response.buffer = true%>注册处理<%dim sc_name,sc_sex,sc_pass,sc_quesstion,sc_answer,sc_email,sc_ip,sc_flagsc_ip = request.servervariables("remote_addr")sc_name = replace(trim(request.form("name")),"<","<")sc_sex = replace(trim(request.form("sex")),"<","<")sc_pass = request.form("pass")sc_quesstion = request.form("quesstion")sc_answer = request.form("answer")sc_email = request.form("email")set conn=server.createobject("adodb.connection")conn.open "chat","chat","chat001"sc_flag = 0'账号存在sql1 = "select * from user_info_table where user_name = '" + sc_name + "'"set rs=conn.execute(sql1)if not rs.eof thensc_flag = 1end ifrs.close'一台机器登录超过5个账号sql1 = "select count(*) from user_info_table where user_ip = '" + sc_ip +"'"set rs=conn.execute(sql1)if rs(0) >= 5 thensc_flag =2end ifrs.closeif sc_flag = 0 thensql1 = "insert user_info_table values('" + sc_name + "','" + sc_pass + "','" + sc_sex +"','" + sc_email +"','" + sc_quesstion + "','" + sc_answer + "','" + sc_ip +"',2)"set rs1 = conn.execute(sql1)sql1 = "insert user_hello_table values('" + sc_name +"','" + sc_name + "进来了','" + sc_name + "走了')"set rs1 = conn.execute(sql1)end ifconn.closeselect case sc_flagcase 0response.redirect "insertuserok.asp"case 1response.redirect "insertuserin.asp"case 2response.redirect "insertuserup.asp"end select%>*****************************注册成功**************************<%'insertuserok.asp%>注册成功注册成功!!请登录聊天室!<!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><!--webbot bot="SaveResults" endspan -->*****************************账号已经存在******************************<%'insertuserin.asp%>账号已经存在<!--function good(){location.href = "insertuser.asp";}function closewindow(){window.close();}// -->账号已经存在!!换一个好吗?<!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><!--webbot bot="SaveResults" endspan -->*******************************超过上限*********************************<%'insertuserup.asp%>超过上限登录用户太多了!!一台机器可以登录5 名用户<!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><!--webbot bot="SaveResults" endspan --> 关闭本页
相关信息· SaaS之光照亮经济型酒店信息化道路
· Asp.Net 2.0的默认提交按钮
· TM2005正式版亲密试用手记
· 为编程开发准备一台友好的CVS服务器
104178
68708
