数据库设计以源代码.doc

上传人:李医生 文档编号:6059693 上传时间:2020-09-02 格式:DOC 页数:10 大小:713KB
返回 下载 相关 举报
数据库设计以源代码.doc_第1页
第1页 / 共10页
数据库设计以源代码.doc_第2页
第2页 / 共10页
数据库设计以源代码.doc_第3页
第3页 / 共10页
数据库设计以源代码.doc_第4页
第4页 / 共10页
数据库设计以源代码.doc_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《数据库设计以源代码.doc》由会员分享,可在线阅读,更多相关《数据库设计以源代码.doc(10页珍藏版)》请在三一文库上搜索。

1、系统建设详细设计1.数据库设计管理员用户表信息:字段名称类 型大 小字段描述管理员ID自动编号长整型管理员身份识别管理员名称文本50管理员登陆名称密码文本50管理员登陆的密码身份文本50有别于学生登陆界面 学生用户表:字段名称类 型大 小字段描述学生ID自动编号长整型学生学号学生名称文本50学生名称密码文本50学生登陆的密码身份文本50有别于管理员登陆界面 学生信息表:字段名称类 型大 小字段描述学生ID自动编号长整型学生学号学生名称文本50学生名称电子邮箱文本50学生的电子邮箱备注/学生的其他信息性别文本50性别入学时间文本50学生入学的时间班级文本50所在班级专业文本50所学专业2 系统程

2、序文件设计与编写与数据库连接的代码:登陆界面代码:代码为:%if request(Submit) then set rs=server.createobject(adodb.recordset) sql=SELECT username,password from users where username=&request(username)& rs.open sql,conn,1,3 if rs.bof and rs.eof then msg=错误:用户名不存在 else if rs(password)=request(password) then Session(admin)=true re

3、sponse.redirect index.asp?users=adminelse msg=错误:密码不正确end if end if rs.close set rs=nothing Conn.close Set conn = Nothingend if% 管理员学生信息管理系统 管理员: 密码: 用户类型: 管理员学生 显示信息:代码为:!-#include file=”conn.inc” %if Session(“admin”)true and Session(“student”)true then Response.Redirect “student_login.asp” end if%

4、学生信息 学生信息管理系统 首页查询添加管理退出%users = Request(“users”)If request(“PageNo”)=” thenPageNo=1ElsePageNo=int(request(“PageNo”)End Ifsql=”SELECT * from liuyan order by ID desc”set rs=server.createobject(“adodb.recordset”)rs.open sql,conn,1,3if not(rs.eof and rs.bof) thenrs.Pagesize=3rs.absolutepage=PageNox = 0

5、 For x = 1 to rs.Pagesizeif x mod 2 thentr_color=”#EBEBEB”elsetr_color=”#ffffff”end ifIf rs.eof then Exit For Elseif isNull(Rs(“Dateandtime”) thenstrDateandtime = “”elsestrDateandtime = Cstr(Rs(“Dateandtime”)end ifUsername,Email,Content,Sex,DateandtimeResponse.Write “”Response.Write “”Response.Write

6、 “姓名:”Response.Write “” + Rs(“Username”) + “”修改 删除 链接if users = “admin” thenResponse.Write “” + “修改 删除” + “”elseResponse.Write “”end ifResponse.Write “”Response.Write “”Response.Write “性别:”Response.Write “” + Rs(“Sex”) + “”Response.Write “”Response.Write “”Response.Write “班级:”Response.Write “” + Rs(

7、“Class”) + “”Response.Write “”Response.Write “”Response.Write “专业:”Response.Write “” + Rs(“Major”) + “”Response.Write “”Response.Write “”Response.Write “入学时间:”Response.Write “” + strDateandtime + “”Response.Write “”Response.Write “”Response.Write “评语:”Response.Write “” + Rs(“Content”) + “”Response.W

8、rite “”Response.Write “”Response.Write “E-mail:”Response.Write “” + Rs(“Email”) + “”Response.Write “”Response.Write “”Response.Write “”if users = “admin” thenResponse.Write “”Response.Write “删除”Response.Write “”end ifResponse.Write “”Response.Write “”Response.Write “”Response.Write “”rs.MoveNext End

9、 If Nextend ifif rs.recordcount 0 then共有条学生信息 条/页 共页 分页:%for i=1 to rs.pagecountif pageno I thenResponse.Write “”&i&” ”elseResponse.Write “” & I & “ ”end ifnext% Else目前,没有任何学生信息! End if4、查询信息页面显示:代码为:%if Session(admin)true and Session(student)true then Response.Redirect student_login.asp end if%if studentid 0 then sql=SELECT * from liuyan where ID=&studentidset rs=server.createobject(adodb.recordset)rs.open sql,conn,1,3

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1