教务管理系统源代码Word格式文档下载.docx
《教务管理系统源代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《教务管理系统源代码Word格式文档下载.docx(21页珍藏版)》请在冰点文库上搜索。
Dimuserid,pswd,strsql,rs
userid=Request.Form("
pswd=Request.Form("
EndIf
Ifrequest.form("
D1"
)="
学生"
Then
strsql="
Select*FromstuWheresno='
&
userid&
'
Setrs=db.Execute(strsql)
Ifpswd=rs("
spin"
)Then
Session("
stuid"
)=userid
Response.Redirect"
student.asp"
Else
Response.write"
密码错误"
EndIf
ElseIfrequest.form("
教师"
Select*FromteaWheretno='
tpin"
teaid"
teacher.asp"
教务管理员"
Select*FromadmWhereadm='
apin"
admid"
adm.asp"
Else
EndIf
%>
二、学生用户界面
(一)实现选课student.asp
IfSession("
Response.Redirect"
default.asp"
Response.write"
请先登录"
Else
Dimstuid,cnoid
stuid=Session("
cnoid=Request.form("
T1"
Dimdb
Setdb=Server.CreateObject("
db.Open"
Dimstrsql,rs
strsql="
InsertIntoscore(cno,sno)Values('
cnoid&
'
stuid&
)"
Setrs=db.Execute(strsql)
db.close
Setdb=Nothing
(二)显示课表cou_list.asp
SelectDistincto,ame,cou.tno,cou.roomFromcou"
Endif
divalign="
center"
<
tableborder="
1"
width="
80%"
id="
table2"
cellpadding="
0"
<
tr>
tdalign="
课程编号<
/td>
<
课程名称<
任课教师<
上课地点<
/tr>
DoWhileNotrs.Eof
%>
%=rs("
cno"
)%>
cname"
tno"
room"
rs.MoveNext
Loop
%>
/table>
/div>
(三)成绩查询mark.asp
Dimrs,strsql
Select*FromscoreWheresno='
Session("
)&
height="
34"
学号<
课号<
成绩<
DoWhileNotrs.Eof
>
sno"
mark"
三、教师用户界面实现成绩录入功能teacher.asp
ElseIfRequest.Form("
)<
AndRequest.Form("
T2"
T3"
Dimstrsql,cno,sno,mark
cno=Request.Form("
sno=Request.Form("
mark=Request.Form("
UpdatescoreSetmark='
mark&
Wherecno='
cno&
Andsno='
sno&
Andtno='
db.Execute(strsql)
Response.Write"
添加成功"
四、教务管理员登录界面adm.asp
(一)课程信息维护
1、显示课程信息adm_cou.asp
Select*Fromcou"
formmethod="
POST"
action="
100%"
table8"
<
27"
height="
ahref="
update_cou.asp?
cno=<
修改<
/a>
dele_cou.asp?
删除<
Loop
/form>
2、修改课程信息update_cou.asp
Dimcno
cno=Request.QueryString("
)=cno
Select*FromcouWherecno='
3、修改课程的执行程序update3.asp
Dimcnoid
cnoid=Session("
IfRequest.Form("
T5"
Dimcno,cname,tno,stime,room,strsql
cname=Request.Form("
tno=Request.Form("
room=Request.Form("
UpdatecouSetcno='
cname='
cname&
tno='
tno&
room='
room&
Wherecno='
adm_cou.asp"
Response.Write"
修改成功"
4、删除课程的执行程序dele_cou.asp
Dimstrsql,cno
DeleteFromcouWherecno='
Response.Redirect"
5、添加课程的执行程序add_cou.asp
IfSession("
Response.Redirect"
Dimstrsql,cno,cname,tno,stime,room
cno=Request.Form("
cname=Request.Form("
tno=Request.Form("
room=Request.Form("
InsertIntocou(cno,cname,tno,room)Values('
db.Execute(strsql)
add_cou.asp"
(二)教师信息维护
1、显示教师信息adm_tea.asp
Selecttno,tname,ttelFromtea"
tdwidth="
20%"
align="
tname"
19%"
ttel"
update_tea.asp?
tno=<
dele_tea.asp?
<
2、修改教师信息update_tea
Dimtno
tno=Request.QueryString("
)=tno
3、修改教师信息的执行程序update2.asp
Dimtnoid
tnoid=Session("
Dimtno,tname,ttel,strsql
tname=Request.Form("
ttel=Request.Form("
UpdateteaSettno='
tname='
tname&
ttel='
ttel&
Wheretno='
tnoid&
adm_tea.asp"
请将所有信息填写完整"
ahref='
adm_tea.asp'
重新修改<
4、删除教师信息的执行程序dele_tea.asp
Dimstrsql,tno
DeleteFromteaWheretno='
5、添加信息教师信息的执行程序add_tea.asp
Dimstrsql,tno,tname,ttel
tname=Request.Form("
ttel=Request.Form("
InsertIntotea(tno,tname,ttel)Values('
add_tea.asp"
(三)学生信息维护
1、显示学生信息adm_stu.asp