数据库设计以及源代码Word格式文档下载.docx

上传人:b****5 文档编号:19527645 上传时间:2023-01-07 格式:DOCX 页数:10 大小:164.24KB
下载 相关 举报
数据库设计以及源代码Word格式文档下载.docx_第1页
第1页 / 共10页
数据库设计以及源代码Word格式文档下载.docx_第2页
第2页 / 共10页
数据库设计以及源代码Word格式文档下载.docx_第3页
第3页 / 共10页
数据库设计以及源代码Word格式文档下载.docx_第4页
第4页 / 共10页
数据库设计以及源代码Word格式文档下载.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

数据库设计以及源代码Word格式文档下载.docx

《数据库设计以及源代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《数据库设计以及源代码Word格式文档下载.docx(10页珍藏版)》请在冰豆网上搜索。

数据库设计以及源代码Word格式文档下载.docx

学生的其他信息

性别

入学时间

学生入学的时间

班级

所在班级

专业

所学专业

2系统程序文件设计与编写

与数据库连接的代码:

<

%

db="

message.mdb"

setConn=server.createobject("

adodb.Connection"

conn.open"

Provider=Microsoft.Jet.OLEDB.4.0;

DataSource="

&

server.mappath(db)

%>

登陆界面代码:

代码为:

!

--#includefile="

conn.inc"

-->

ifrequest("

Submit"

)<

>

"

then

setrs=server.createobject("

adodb.recordset"

sql="

SELECTusername,passwordfromuserswhereusername='

request("

username"

)&

'

rs.opensql,conn,1,3

ifrs.bofandrs.eofthen

msg="

错误:

用户名不存在"

else

ifrs("

password"

)=request("

)then

Session("

admin"

)=true

response.redirect"

index.asp?

users=admin"

密码不正确"

endif

rs.close

setrs=nothing

Conn.close

Setconn=Nothing

endif%>

html>

head>

<

title>

管理员<

/title>

scriptlanguage="

JavaScript"

type="

text/JavaScript"

--functionMM_jumpMenu(targ,selObj,restore){//v3.0

eval(targ+"

.location='

+selObj.options[selObj.selectedIndex].value+"

);

if(restore)selObj.selectedIndex=0;

}

//-->

/script>

LINKhref="

style.css"

rel=Stylesheettype=text/css>

/head>

center>

spanclass="

style1”>

学生信息管理系统<

/span>

/center>

/td>

/tr>

tr>

tdcolspan="

2"

<

管理员:

inputname="

text"

maxlength="

10"

密码:

>

inputtype="

submit"

name="

value="

登录"

reset"

Submit2"

重置"

用户类型:

selectname="

menu1"

onChange="

MM_jumpMenu('

parent'

this,0)"

optionvalue="

admin_login.asp"

selected>

/option>

student_login.asp"

学生<

/select>

br>

fontcolor=red>

%=msg%>

/font>

/table>

/form>

/body>

/html>

显示信息:

--#includefile=”conn.inc”

%ifSession(“admin”)<

trueandSession(“student”)<

truethen

Response.Redirect“student_login.asp”

endif%>

doctypehtmlpublic“-//W3C//DTDHTML4.0Transitional//EN”>

学生信息<

LINKhref=”style.css”rel=Stylesheettype=text/css>

/style>

tablealign=center>

tdcolspan=”2”>

spanclass=”style1”>

tdcolspan=”5”>

ahref=”#”>

[<

b>

首页<

/b>

]<

/a>

ahref=”search.asp”>

[查询]<

atitle=”需要管理员权限”href=”post.asp”>

[添加]<

ahref=”admin_login.asp”>

[管理]<

ahref=”logout.asp”>

[退出]<

%users=Request(“users”)

Ifrequest(“PageNo”)=””then

PageNo=1

Else

PageNo=int(request(“PageNo”))

EndIf

sql=”SELECT*fromliuyanorderbyIDdesc”

setrs=server.createobject(“adodb.recordset”)

rs.opensql,conn,1,3

ifnot(rs.eofandrs.bof)then

rs.Pagesize=3

rs.absolutepage=PageNo

x=0

Forx=1tors.Pagesize

ifxmod2then

tr_color=”#EBEBEB”

else

tr_color=”#ffffff”

endif

Ifrs.eofthen

ExitFor

Else

ifisNull(Rs(“Dateandtime”))then

strDateandtime=“”

else

strDateandtime=Cstr(Rs(“Dateandtime”))

endif

‘Username,Email,Content,Sex,Dateandtime

Response.Write“<

tablewidth=50%border=0align=centercellpadding=0cellspacing=0bgcolor=”+tr_color+“>

tdwidth=20%nowrap>

tdwidth=60%class=Tab>

”+Rs(“Username”)+“<

‘修改删除

ifusers=“admin”then

Response.Write“<

tdwidth=20%class=Tabalign=right>

”+“<

ahref=post.asp?

users=”+users+“&

id=”+cstr(Rs(“ID”))+“>

fontcolor=blue>

修改<

ahref=delete.asp?

删除<

tdwidth=20%class=Tab>

td>

性别:

tdcolspan=2>

”+Rs(“Sex”)+“<

”Response.Write“<

班级:

”+Rs(“Class”)+“<

专业:

”+Rs(“Major”)+“<

入学时间:

”+strDateandtime+“<

评语:

”+Rs(“Content”)+“<

E-mail:

”+Rs(“Email”)+“<

tableborder=0align=center>

‘ifusers=“admin”then

‘Response.Write“<

tdalign=rightbgcolor=”+tr_color+“>

fontcolor=red>

”‘endif

tdheight=1>

rs.MoveNext

EndIf

Next

endif

ifrs.recordcount>

0then

共有<

%=rs.recordcount%>

条学生信息&

nbsp;

%=rs.pagesize%>

条/页&

共<

%=rs.pagecount%>

页<

tdalign=”right”class=”Tab”>

分页:

<

%fori=1tors.pagecount

ifpageno<

Ithen

Response.Write“<

Ahref=index.asp?

pageno=”+cstr(i)+“>

”&

i&

”<

else

”&

I&

“<

”endif

next%>

marquee>

目前,没有任何学生信息!

/marquee>

<

Endif

%rs.close

setrs=nothing

Conn.close

Setconn=Nothing%>

4、查询信息页面显示:

%ifSession("

trueandSession("

student"

Response.Redirect"

ifstudentid<

0then

SELECT*fromliuyanwhereID="

studentid

setrs=server.createobject("

rs.close

Setconn=Nothing

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

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1