已阅读5页,还剩138页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ASP动态网页编程实训目 录登陆与注册模块(包括:在线计数器)留言板模块设计(简单的)注册与登录模块设计(简单的)留言板模块设计网络随想空间ASP动态网页编程实训登陆与注册(包括:在线计数器) 作品图片剪贴 脚本程序源代码 有一个Microsoft Office Access数据库名叫:user exit.asp% if session(usename) and session(ZH) thenset con=server.CreateObject(adodb.connection)con.open Driver=Microsoft Access Driver (*.mdb);dbq= & server.MapPath(/) & user.mdbcon.execute(update t1 set 状态=0 where 用户名= & session(ZH) & )session(usename)=session(ZH)=response.Redirect(login.asp)elseresponse.Write(禁止访问!)end if% login.asp欢迎登录= 0 And s 2 And s 4 And s %dim use,m,chkyz,messf=request.Cookies(logf)if f thenuse=request.Form(user)m=request.form(mi)chkyz=request.Form(chkC)if loginchkerr thenloginEryend ifend ifresponse.Cookies(logf)=1% 登 陆(login) 注册 用户名: input name=user type=text class=tx id=user maxlength=12 密码: 验证码: loginS.asp无标题文档sub viewOl()f1.h1.value=f1.h1.value=liulanf1.submitend subsub exitl()f1.h1.value=f1.h1.value=exitpf1.submitend sub 本站当前登录人数: Welcome ASP World! 浏览:在线成员 退出 资料及密码修改 % hf=request.Form(h1)if hf=liulan thenset con=server.CreateObject(adodb.connection)con.open Driver=Microsoft Access Driver (*.mdb);dbq= & server.MapPath(/) & user.mdbset rs=con.execute (select 姓名,登录时间 from t1 where 状态=1)response.Write(成员列表: )do while not rs.eofresponse.Write()response.Write( & rs(0) & )response.Write(登录时间: & rs(1) & ) response.Write()rs.movenextloopcon.closeend if% modify.asp无标题文档 sub checkp()if f1.tuse.value= thenalert 姓名不能为空!exit subelseif f1.tm.value= thenalert 旧密码不能为空!exit subelseif f1.tem.valuef1.tem2.value thenalert 两次密码不一致!f1.tem.value=f1.tem2.value=exit subend if f1.submitend sub 修改资料 用户名: input name=tuse type=text class=unnamed1 id=tuse 旧密码: 新密码: 再次输入: sub FH()end sub regpage.asp无标题文档sub checkuse()f2.userh.value=form1.use.valuef2.submitend subsub nlC()for i=1 to len(form1.nl.value)poss=mid(form1.nl.value,i,1)if poss9 thenform1.nl.value=exit subend ifnextif cint(form1.nl.value)100 thenform1.nl.value=end ifend sub=0 and t=a and t=A and t=Z) thencheck=1exit forend ifnext end functionfunction checknl(strnl)for i=1 to len(strnl)t=mid(names,i,1)if t9 thenchecknl=1exit forend ifnextend function%dim Mess ,use,names,m1,m2,xb,nldim f2f, zjFzjf=request.Form(userh)if zjf thenif len(zjf)5 thenf2f=1if checkuseE(zjf)=1 thenmess=此用户存在!elsemess=恭喜你可以使用该帐户!end if elsemess=用户名不得少于6位,请检查!end ifelseif request.Cookies(zcf)= thenmess=请填写您的注册信息!response.Cookies(zcf)=1elseuse=request.Form(use)names=request.Form(names)m1=request.Form(m1)m2=request.Form(m2)xb=request.Form(radiobutton)nl=request.Form(nl)if use= or m1= or m2= or xb= or nl= thenmess=请输入完整的信息!elseif len(use)6 thenmess=用户名不得少于6位,请检查!elseif len(m1)6 thenmess=为了安全,密码不得少于6位!elseif check(names)=1 thenmess=请用正确的姓名!(不得使用字母,数字)elseif m1m2 thenmess=两次密码不一致,请检查!elseif checkuseE(use)1 thencon.open Driver=Microsoft Access Driver (*.mdb);DBQ= & server.MapPath() & user.mdbsql=insert into t1(姓名,性别,用户名,密码,年龄) values( & names & , & xb & , & use & , & m1 & , & nl & )con.execute(sql)con.closesession(usename)=namessession(ZH)=useresponse.Cookies(logpas)=okresponse.Redirect(suff.asp)elsemess=此帐户已经存在!end ifend ifend ifend ifend if% 欢迎 注册 用户名: input name=use type=text class=txS id=use size=25 maxlength=12 value=% if f2f1 then response.W
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 山东体考武术冲刺模拟试题及答案
- 山东户外运动旅游攻略与技能测试答案
- 山西历史与文化单招考试题库
- 山西心理测试题库及答案解析
- 网络安全防御技巧测试题及答案详解
- 生存技能大考验日常生活成人智力测试题及答案
- 山东单招专业考试试题集理论测试卷及答案详解
- 少先队主题知识竞赛试题集
- 山东省安全生产考试题库及答案详解
- 生物科学微课练习题答案详解集
- 清华大学接受国内访问学者申请表
- QC19032201 质量控制分析报告 输入功率 输入电流 功率因数试验
- 超星尔雅《葡萄酒与西方文化》期末考试答案
- 小学数学专题讲座(课堂PPT)
- 重症患者SOFA评分表
- -热力学第一定律课件
- 信息论 信息熵课件
- 微机原理与接口技术课件全套
- 老年人睡眠障碍的特点与诊治
- 领导之道-高建华课件
- 低压配电柜培训ppt课件
评论
0/150
提交评论