asp博客源码html5,asp做注册页面代码(修改)

这是一个基于ASP.NET的用户管理系统实现,包括用户注册、登录、信息修改和数据库操作。用户通过index.asp页面进行登录,注册页面(reg.asp)处理新用户注册,login.asp文件验证用户身份,change.asp用于信息修改,而addnewdata.asp处理新用户注册的数据验证和存储。所有操作都与Access数据库(info表)交互,确保用户数据的安全和一致性。
摘要由CSDN通过智能技术生成

1,(index.asp

用户登陆页面)

会员

会员注册系统

action="login.asp">

height="30">用户名:

height="30">

type="text" id="username"

size="15">

height="30">密码:

name="password" type="password" id="password"

size="15">

align="center">

name="Submit" value="确定">

value="重置">

href="reg.asp"

target="_self">注册

2,(login.asp

用户数据处理文件)

username = Request.Form("userName")

password = Request.Form("password")

if

username = "" or password = "" then

response.Write("用户名或密码不能为空")

response.End()

end if

'打开数据库判断用户是否存在,info为表名,username为字段名

set rsc=server.createobject("adodb.recordset")

sqlc="select * from info where

username='"&request.Form("username")&"'

and

password='"&request.Form("password")&"'"

rsc.open sqlc,conn,1,1

if

rsc.eof then

Response.Write("用户名或密码错误")

Response.End()

else

session("uName")=rsc("username")

session("uID")=rsc("id")

end

if

rsc.close

set

rsc=nothing

response.Redirect("change.asp")

'如果用户不存在,session("username")为空

%>

3,(change.asp

用户信息修改页面)

修改

set

rsc=server.createobject("adodb.recordset")

sqlc="select * from info where

username='"&session("username")&"'

and

password='"&session("password")&"'"

rsc.open sqlc,conn,1,1

nr=rsc("password")

username=rsc("username")

password=rsc("password")

sex=rsc("sex")

qq=rsc("qq")

mail=rsc("mail")

add=rsc("add")

personalinfo=rsc("personalinfo")

vv=rsc("ntime")

set rsc=nothing

if nr="" then

response.Redirect("index.asp")

end if

if strcomp(nr,request.Form("password"))=0 then

response.Write("欢迎你!"&request.Form("username"))

response.Write("你是在"&vv&"注册的")

session("username")=request.Form("username")

end if

if session("username")="" then

response.Redirect("index.asp")

end if

%>

action="change.asp?ac=ch">

>

height="30">用户名:

height="30">

type="text" id="username"

value="">

*

密 码:

name="password" type="text" id="password"

value="">

*

性 别:

name="sex" type="text" id="sex"

value="">

height="30">QQ:

name="qq" type="text" id="qq"

value="">

height="30">Mail:

name="mail" type="text" id="mail"

value="">

地 址:

name="add" type="text" id="add"

value="">

介绍

name="personalinfo" cols="30" rows="6"

id="personalinfo">

type="submit" name="Submit" value="修改">

target="_self">退出系统

strcomp(request.QueryString("se"),"y")=0 then

session("username")=""

response.Redirect("index.asp")

end if

%>

if strcomp(request.QueryString("ac"),"ch")=0 then

set rs=server.createobject("adodb.recordset")

sql="select * from info where

username='"&session("username")&"'"

rs.open sql,conn,1,3

rs("username")=request.Form("username")

rs("password")=request.Form("password")

rs("mail")=request.Form("mail")

rs("sex")=request.Form("sex")

rs("qq")=request.Form("qq")

rs("add")=request.Form("add")

rs("personalinfo")=request.Form("personalinfo")

rs.update

set rs=nothing

response.Write("修改完成!")

end if

%>

4,(reg.asp

新用户注册页面)

用户注册

用户注册

 带*为必填项

action="addnewdata.asp?ac=adduser">

bordercolor="#99CCFF" >

height="30">

align="center">用户名:

height="30">

type="text" id="username">

*用户名应为6-12位

align="center">密码:

name="password" type="password" id="password">

*密码应为6-18位

align="center">确定密码:

name="password2" type="password"

id="password2">

*请在此输入密码

align="center">性别:

type="radio" name="Sex" value="男">男

type="radio" name="Sex"

value="女">女

align="center">QQ:

name="qq" type="text"

id="qq">

align="center">Mail:

name="mail" type="text"

id="mail">

align="center">地址:

name="add" type="text"

id="add">

align="center">个人介绍

name="personalinfo" cols="30" rows="6"

id="personalinfo">

=request.QueryString("msg")

%>

type="submit" name="Submit"

value="提交">

5,(addnewdata.asp

新用户注册数据处理文件)

成功

ac=request.QueryString("ac")

msg="注册错误信息:"

if request.Form("username")="" then

msg=msg&"
"&"*用户名不能为空"

end if

if len(request.Form("username"))<6 and

len(request.Form("username"))>0 then

msg=msg&"
"&"*用户名不足6位"

end if

if len(request.Form("username"))>12 then

msg=msg&"
"&"*密码超过18位"

end if

if request.Form("password")="" then

msg=msg&"
"&"*密码不能为空"

end if

if request.Form("password2")="" then

msg=msg&"
"&"*确认密码密码不能为空"

end if

if

strcomp(cstr(request.Form("password")),cstr(request.Form("password2")))<>0

then

msg=msg&"
"&"*两次密码输入不同"

end if

if

len(request.Form("password"))<6 and

len(request.Form("password"))<>0

then

msg=msg&"
"&"*密码不足6位"

end if

if

len(request.Form("password"))>18 then

msg=msg&"
"&"*密码超过18位"

end if

if

strcomp(msg,"注册错误信息:")>0 then

response.Redirect("reg.asp?msg=" & msg)

end if

if ac="adduser" then

set rsc=server.createobject("adodb.recordset")

sql="select * from info where

username='"&request.Form("username")&"'"

rsc.open sql,conn,1,1

ck=rsc("username")

set rsc=nothing

if ck<>"" then

msg=msg&"
"&"用户名被人注册"

response.Redirect("reg.asp?msg="&msg)

end if

dsql="select * from info where id is null"

set rs=server.createobject("adodb.recordset")

rs.open dsql,conn,1,3

rs.addnew

rs("username")=request.Form("username")

rs("password")=request.Form("password")

rs("mail")=request.Form("mail")

rs("sex")=request.Form("sex")

rs("qq")=request.Form("qq")

rs("add")=request.Form("add")

rs("personalinfo")=request.Form("personalinfo")

rs("ntime")=now

rs.update

set rs=nothing

%>

target="_self">注册成功,点击登陆

end if

%>

6,(conn.asp

数据库连接文件)

'连接数据库开始

dim conn,rs,sql

on error resume next

dbpath=server.mappath("userinfo.mdb")

set conn=server.createobject("adodb.connection")

conn.open "PROVIDER=Microsoft.jet.OLEDB.4.0;data

source="&dbpath

'创建记录对象

set rs=server.createobject("adodb.recordset")

%>7,(userinfo.mdb ACCESS 数据库)

在ACCESS中建一个表,然后在这个表中建立字段名称

表名:info

字段名称 数据类型

id 自动编号

username 文本

password 文本

sex 文本

quest 文本

qq 文本

mail 文本

personalinfo 文本

ntime 文本

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
* 前台 o 首页 + 地址重写[Do] + 登陆[Do] # 图片验证码[Do] + 注册[Do] # 图片验证码[Do] + 站内公告模块[Do] + 新闻时事模块[Do] + 人气博客模块[Do] + 推荐博客模块[Do] + 焦点日志模块[Do] + 精彩博文模块[Do] + 博客之星模块[Do] + 最新日志模块[Do] + 热门皮肤模块[Do] + 最新皮肤模块[Do] + 友情链接模块[Do] + 日志列表模块[Do] + 博客列表模块[Do] + 用户列表模块[Do] # 加好友[Null] # 发消息[Do] + 皮肤列表模块[Do] # 添加皮肤[Do] + 圈子列表模块[Null] # 加入圈子[Null] + 站点地图[Null] o 博客 + 博客日志模块[Do] + 分类日志模块[Do] + 博主档案模块[Do] + 日志分类模块[Do] + 博客日历模块[Do] + 博客搜索模块[Do] + 日志存档模块[Do] + 最新日志模块[Do] + 日志评分模块[Do] + 日志评论模块[Do] + 博主管理评论模块[Do] + 博主管理日志模块[Do] + 相册模块[Null] + 博主个人控制面板[Do] # 编辑文章[Do] * UBB编辑器[Do] * 所见所得编辑器[Null] * 文章附件[Null] # 修改个人信息[Do] # 修改博客信息[Do] # 修改密码[Do] # 修改博客设置[Do] # 管理文章分类[Do] # 管理博客皮肤[Do] # 管理相册[Null] # 消息中心[Do] # 好友[Null] # 管理圈子[Null] # 友情链接[Null] # 信息预览[Do] o 圈子[Null] o 搜索[Do] + 搜索日志[Do] + 搜索博客[Do] + 搜索相册[Null] + 搜索相片[Null] + 搜索用户[Null] + 搜索圈子[Null] + 搜索皮肤[Null] + 搜索智能提示[Null] o RSS订阅[Do] + 站内最新文章订阅[Do] + 用户博客最新文章订阅[Do] + 博客分类最新文章订阅[Do] + 文章评论订阅[Null] * 后台管理 o 系统配置模块[Do] o 显示设置模块[Do] o 公告管理模块[Do] o 新闻管理模块[Do] o 博客管理模块[Do] o 分类管理模块 + 圈子分类管理模块[Do] + 博客分类管理模块[Do] + 相册分类管理模块[Do] + 皮肤分类管理模块[Do] o 皮肤管理模块 + 圈子皮肤管理模块[Null] + 博客皮肤管理模块[Do] + 网站皮肤管理模块[Do] o 留言评论管理[Null] o 附件管理[Null] + 多附件上传[Null] + 在线解压缩[Null] o 站点友情链接管理[Do] o 管理员中心[Do] o 博客用户管理[Do] * 记不起来了。。。。。。
个人博客系统V1.4 标准版 HituxBlog V1.4 Standard -------------------------系 统 简 介----------------------------  个人博客系统是专业为个人建站而开发的一款网站程序。该系统采用最流行的ASP+ACCESS进行搭建,页面使用DIV+CSS进行编写,全面兼容时下IE、FireFox、Chrome等主流浏览器。系统内置多达30款主题及精美相册,后台一键切换。前台所有内容均可以在后台进行修改删除等操作。   通过该系统建立您的博客或者是个人网站将变得轻而易举。不需要具备多么专业的网页设计知识,不需要对程序有多熟悉,仅仅下载海纳个人博客源码上传到您申请的空间里,即生成了您的网站。接下来您要的只是对网站的更新,写一篇文章,或是上传一张图片。将更多的精力用在宣传您的网站上,而不是建立网站。21世纪人人上网,人人有网站的时代,您不再无助,愿助您一臂之力,携手共进! 系统无与伦比的五大特色: 1、页面设计够简单,拒绝花俏; 2、便捷后台,管理前台所有内容; 3、页面全静态化,易优化且高效; 4、内置多达30款主题,自由切换; 5、相册展示模式,美伦美奂。 -------------------------安 全 建 议------------------------------ 网站解压后上传到网站的根目录,直接打开网站首页就可以访问了。 后台管理地址:http://你的网站域名/AdminCool/login.asp 用户名:admin 密码:admin 后台文件夹名:AdminCool 数据库存放位置:DatabaseX 提醒:为确保网站安全,我们建议: 1、更改默认的后台用户名和密码; 2、更改默认的后台文件夹名admincool,直接修改根目录下的文件夹名称即可; 3、更改默认的数据库文件夹DatabaseX及数据库名称,请确保inc文件夹下的数据库连接文件conn.asp内也作相应修改。 -------------------------系 统 信 息------------------------------ 系统名称:个人博客系统 HituxBlog V1.4 Standard EMAIL:121673232@qq.com 购买地址http://item.taobao.com/item.htm?id=18713203128 建议升级至个人博客 V1.5 Ultimate 高级版,支持原创仅需10元 http://item.taobao.com/item.htm?spm=686.1000925.1000774.14.Sff87E&id=25284492723
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值