版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、<p> XX大學(xué)XXXX學(xué)院</p><p><b> 課程設(shè)計(jì)</b></p><p> 課題題目: 教務(wù)管理系統(tǒng)</p><p> 學(xué) 部: XX學(xué)部</p><p> 專 業(yè): XXXX </p><p> 班 級(jí)
2、: X班 </p><p> 學(xué) 號(hào): </p><p> 姓 名 XXX</p><p> 指導(dǎo)老師: XXX</p><p> 2011 年 6月 23 日</p><p><b> 成績(jī):</b></p
3、><p> 一 系統(tǒng)功能分析與設(shè)計(jì)</p><p><b> 1. 需求分析</b></p><p> 制作教務(wù)管理信息系統(tǒng)的目的是為學(xué)校學(xué)生提供一個(gè)方便創(chuàng)建教師、學(xué)生信息的工具,實(shí)現(xiàn)能夠方便、快捷的查詢信息。</p><p> 管理信息系統(tǒng)是進(jìn)行信息的采集,存儲(chǔ),修改,維護(hù),備份和使用的系統(tǒng),它是隨著管理科學(xué)
4、和技術(shù)科學(xué)的發(fā)展而形成的.教務(wù)管理信息系統(tǒng)是一個(gè)教育單位不可缺少的部分,它的內(nèi)容對(duì)于學(xué)校的決策者和管理者來說都至關(guān)重要,所以教務(wù)管理信息系統(tǒng)應(yīng)該能夠?yàn)橛脩籼峁┏渥愕男畔⒑涂旖莸牟樵兪侄?對(duì)學(xué)生來說可以輕松的查閱自己在校的信息以及選課等。</p><p> 2. 功能模塊圖分析說明</p><p> 2.1 總體功能模塊圖</p><p> 2.2 各個(gè)
5、模塊分析說明</p><p> 2.2.1學(xué)生學(xué)籍管理</p><p> 該模塊主要實(shí)現(xiàn)學(xué)生信息的基本管理,便于管理員添加學(xué)生、刪除學(xué)生、查詢學(xué)生等管理學(xué)生學(xué)籍的功能。</p><p><b> 2.2.2教學(xué)管理</b></p><p> 該模塊實(shí)現(xiàn)對(duì)課程的基本管理。課程管理主要實(shí)現(xiàn)對(duì)課程信息的查詢,添加課程,
6、替學(xué)生選課等功能。</p><p><b> 2.2.3教師管理</b></p><p> 該模塊實(shí)現(xiàn)教師情況的管理,如:對(duì)教師的信息查詢,添加,刪除,修改。</p><p><b> 2.2.4教材管理</b></p><p> 該模塊主要實(shí)現(xiàn)對(duì)教材的查詢,添加,修改管理。</p&g
7、t;<p><b> 二、數(shù)據(jù)庫設(shè)計(jì)</b></p><p> 1. 全局E-R圖</p><p><b> 2 . 關(guān)系模式</b></p><p> student(studentnum,studentname,ssecret,sex,stuyear,stumon,studay,inyear,
8、inmon,inday,specialnum,phone,city);</p><p> teacher(teachernum,teachername,ssecret,sex,teayear,teamon,teaday,classnum,position,phone,city);</p><p> book(booknum,bookname,edition,number,editor,
9、rate,pagenum,);</p><p> class(classnum, classname,exam,knowledge,credits);</p><p> stc(classnum, studentnum, teachernum);</p><p> boocla(classnum, booknum);</p><p>
10、 3. 數(shù)據(jù)字典</p><p> 3.1 student(學(xué)生表):</p><p> 3.2teacher(教師表):</p><p> 3.3 book(教材表):</p><p> 3.4 class(課程表):</p><p> 3.5 stc(選課表):</p>&
11、lt;p> 3.6 ookcla(選教材表):</p><p><b> 三 系統(tǒng)實(shí)現(xiàn)</b></p><p> 管理員登陸如圖1所示,可對(duì)學(xué)生學(xué)籍、教師、教學(xué)、教材進(jìn)行管理</p><p><b> 圖1</b></p><p> 管理員登陸后的界面如圖2所示,初始頁面為“學(xué)生
12、學(xué)籍管理”頁面,點(diǎn)擊“教學(xué)管理”、“教學(xué)管理”、“教材管理”鏈接進(jìn)入相應(yīng)的頁面</p><p><b> 圖2</b></p><p> 在“學(xué)生學(xué)籍管理”頁面,輸入需要查找的相應(yīng)信息,點(diǎn)擊查找按鈕即可對(duì)此進(jìn)行搜索,并列出符合條件的學(xué)生列表,如圖3所示,性別選擇女,點(diǎn)擊查找按鈕,列出性別為女的學(xué)生</p><p><b> 圖3
13、</b></p><p> 點(diǎn)擊查找按鈕后面的“添加”鏈接,跳轉(zhuǎn)到“添加學(xué)生”頁面,界面如圖4所示</p><p><b> 圖4</b></p><p> 填好需要添加的學(xué)生的相應(yīng)信息后,點(diǎn)擊提交按鈕,彈出“添加成功!”,說明該學(xué)生信息已成功添加,如圖5所示</p><p><b> 圖5
14、</b></p><p> 在返回的“學(xué)生學(xué)籍管理”主頁面,輸入該學(xué)生的學(xué)號(hào)0838010301進(jìn)行查找,結(jié)果列出該生的全部信息,如圖6所示 </p><p><b> 圖6</b></p><p> 點(diǎn)擊該學(xué)生信息后的“修改”鏈接,跳轉(zhuǎn)到“學(xué)生信息修改”頁面,可對(duì)除學(xué)號(hào)外所有信息進(jìn)行修改,如圖7所示</p>&
15、lt;p><b> 圖7</b></p><p> 修改好相應(yīng)信息后,點(diǎn)擊“修改”按鈕,彈出“修改成功!”提示框,表明修改已成功,如圖8所示</p><p><b> 圖8</b></p><p> 在“學(xué)生學(xué)籍管理”主頁面,輸入該學(xué)生的學(xué)號(hào)0838010301進(jìn)行查找,結(jié)果列出該生的全部信息,如圖9所示,發(fā)
16、現(xiàn)已有修改</p><p><b> 圖9</b></p><p> 點(diǎn)擊“修改”鏈接后的刪除鏈接,可對(duì)學(xué)生的信息進(jìn)行刪除處理,彈出“刪除成功!”提示框,說明已刪除成功,如圖10所示</p><p><b> 圖10</b></p><p> 輸入學(xué)生的學(xué)號(hào)和密碼后可登陸到“學(xué)生信息查詢”頁
17、面,如圖11所示 </p><p><b> 圖11</b></p><p> 如果學(xué)號(hào)和密碼正確,則再彈出“登陸成功!”提示框,如圖12所示</p><p><b> 圖12</b></p><p> 然后跳轉(zhuǎn)到“學(xué)生資料查詢”頁面,如圖13所示</p><p>&
18、lt;b> 圖13</b></p><p> 點(diǎn)擊“查詢課程”鏈接后,跳轉(zhuǎn)到“學(xué)生個(gè)人課表查詢”頁面,如圖14所示</p><p><b> 圖14</b></p><p> 點(diǎn)擊“修改”按鈕跳轉(zhuǎn)到學(xué)生資料修改頁面,可對(duì)密碼、電話、籍貫進(jìn)行修改,如圖15所示</p><p><b>
19、 圖15</b></p><p> 點(diǎn)擊“修改”,彈出“修改成功!”提示框,說明修改資料成功,如圖16所示</p><p><b> 圖16</b></p><p><b> 四 小結(jié)</b></p><p> 全組組員在設(shè)計(jì)數(shù)據(jù)庫前期規(guī)劃和設(shè)計(jì)上都有很突出的貢獻(xiàn),畫E-R圖,
20、轉(zhuǎn)邏輯關(guān)系,設(shè)計(jì)數(shù)據(jù)字典,幾乎是一氣呵成。</p><p> 五 開發(fā)工具和參考文獻(xiàn)</p><p><b> 1. 開發(fā)工具</b></p><p> Adobe Dreamweaver CS3</p><p> Adobe Photoshop CS5 Extended</p><p&g
21、t; Microsoft SQL Server 2000 Personal SP4</p><p><b> 2. 參考文獻(xiàn)</b></p><p> 2.1 劉濤.動(dòng)態(tài)網(wǎng)站開發(fā):ASP SQL Server Dreamweaver.北京:高等教育出版社,2008</p><p> 2.2 王珊,薩師煊.數(shù)據(jù)庫系統(tǒng)概論(第4版).
22、北京:高等教育出版社,2006(2010重?。?lt;/p><p> 2.3 http://www.laozhe.net/articles/15.html</p><p> 2.4 http://wenku.baidu.com/view/e64662232f60ddccda38a012.html</p><p> 2.5 劉浩增,張坤,宋強(qiáng)等.ASP動(dòng)態(tài)網(wǎng)站
23、開發(fā)教程.北京:清華大學(xué)出版社,2009</p><p> 2.6 李曉黎,張巍. ASP+SQL Server網(wǎng)絡(luò)應(yīng)用系統(tǒng)開發(fā)與實(shí)例.北京:人民郵電出版社,2004(2005重印)</p><p><b> 六 源程序清單</b></p><p><b> 1. 建表代碼</b></p><
24、;p> create table teacher(</p><p> teachernumvarchar(10)not nullprimary key,</p><p> teachernamevarchar(10)not null,</p><p> ssecretvarchar(10)not null,</p>
25、<p> sexvarchar(10)nullcheck (sex in ('男','女')),</p><p> teayearvarchar(10)null,</p><p> teamonvarchar(4)null,</p><p> teadayvarchar(4)null
26、,</p><p> classnumvarchar(10)not null,</p><p> positionvarchar(10)not null,</p><p> phonevarchar(11)null,</p><p> cityvarchar(20)null,</p>&l
27、t;p><b> );</b></p><p> create table book(booknumvarchar(10)not nullprimary key,</p><p> booknamevarchar(20)not null,</p><p> editionvarchar(20)null,&l
28、t;/p><p> numbervarchar(10)not null,</p><p> editorvarchar(10)null,</p><p> ratevarchar(10)not null,</p><p> pagenumvarchar(10)null,</p><p&g
29、t;<b> );</b></p><p> create table class(knowledgevarchar(10)null,</p><p> creditsvarchar(10)null,</p><p> classnumvarchar(10)not nullprimary key,</p&g
30、t;<p> classnamevarchar(10)not null,</p><p> examvarchar(10)nullcheck (exam in ('考試','考查')),</p><p><b> );</b></p><p> create table st
31、udent(studentnumvarchar(10)not nullprimary key,</p><p> studentnamevarchar(10)not null,</p><p> ssecretvarchar(10)not null,</p><p> sexvarchar(10)nullcheck (sex in
32、 ('男','女')),</p><p> stuyearvarchar(10)null,</p><p> stumonvarchar(10)null,</p><p> studayvarchar(10)null,</p><p> inyearvarchar(10)n
33、ull,</p><p> inmonvarchar(10)null,</p><p> indayvarchar(10)null,</p><p> specialnumvarchar(10)not null,</p><p> phonevarchar(11)null,</p>&
34、lt;p> cityvarchar(20)null,</p><p><b> );</b></p><p> create table stc(</p><p> classnumvarchar(10)not null,</p><p> studentnumvarchar(10)n
35、ot null,</p><p> teachernumvarchar(10)not null,</p><p> primary key(studentnum,teachernum,classnum),</p><p> foreign key(studentnum) references student(studentnum),</p&
36、gt;<p> foreign key(teachernum) references teacher(teachernum),</p><p> foreign key(classnum) references class(classnum),</p><p><b> );</b></p><p> create t
37、able boocla(</p><p> classnumvarchar(10)not null,</p><p> booknumvarchar(10)not null,</p><p> primary key(classnum,booknum),</p><p> foreign key(booknum) r
38、eferences book(booknum),</p><p> foreign key(classnum) references class(classnum),</p><p><b> );</b></p><p> 2. 網(wǎng)頁關(guān)鍵代碼</p><p> 2.1 鏈接數(shù)據(jù)庫核心代碼(Connect
39、ions/conn.asp)</p><p><b> <%</b></p><p> Dim MM_conn_STRING</p><p> MM_conn_STRING = "Provider=SQLOLEDB;data source=(local);initial catalog=teachers;uid=sa;pw
40、d=;"</p><p><b> %></b></p><p> 2.2 網(wǎng)頁通用調(diào)用方法</p><p> <!-- #include file="/ Connections/conn.asp" --></p><p> 2.3 管理員查詢和刪除頁面關(guān)鍵代碼
41、(index_stu.asp)</p><p><b> <%</b></p><p> Set conn = Server.Createobject("ADODB.Connection")</p><p> conn.open MM_conn_STRING</p><p><b&g
42、t; %></b></p><p><b> <%</b></p><p> del=request.QueryString("studentnum")</p><p> if(del<>"") then</p><p> conn.e
43、xecute("delete from student where studentnum='"&del&"'")</p><p> Response.Write("<script>alert('刪除成功!') ;window.location.href = 'index_stu.asp'
44、;</script>")</p><p><b> end if</b></p><p> studentnum=request.form("studentnum")</p><p> studentname=request.form("studentname")</p
45、><p> ssecret=request.form("ssecret")</p><p> sex=request.form("sex")</p><p> stuyear=request.form("stuyear")</p><p> stumon=request.form
46、("stumon")</p><p> studay=request.form("studay")</p><p> inyear=request.form("inyear")</p><p> inmon=request.form("inmon")</p><
47、p> inday=request.form("inday")</p><p> specialnum=request.form("specialnum")</p><p> phone=request.form("phone")</p><p><b> dim rs</b&g
48、t;</p><p> set rs=server.CreateObject("adodb.recordset")</p><p> sql="select * from student where studentnum like ('"&studentnum&"%') and studentna
49、me like ('"&studentname&"%') and studentnum like ('"&studentnum&"%') and ssecret like ('"&ssecret&"%') and sex like ('"&
50、sex&"%') and stuyear like ('"&stuyear&"%') and stumon like ('"&stumon&"%') and studay like ('"&studay&"%') and inyea
51、r like ('"&inyear&"%') and inmon like ('"&inmon&"%') and inday like ('"&inday&"%') and specialnum like ('"&specialnum&
52、amp;"%') and phone like (</p><p> rs.open sql,conn,1,3</p><p> if not rs.eof then</p><p> const maxperpage=10 '定義每一頁顯示的數(shù)據(jù)記錄的常量</p><p> dim curren
53、tpage '定義當(dāng)前頁的變量</p><p> rs.pagesize=maxperpage</p><p> currentpage=request("page")</p><p> if currentpage="" or not Isnumeric(currentpage) then</p>
54、<p> currentpage=1</p><p> elseif currentpage<1 then</p><p> c1urrentpage=1</p><p><b> else</b></p><p> currentpage=clng(currentpage)</p>
55、;<p> if currentpage > rs.pagecount then</p><p> currentpage=rs.pagecount</p><p><b> end if</b></p><p><b> end if</b></p><p>
56、9;如果變量currentpage的數(shù)據(jù)類型不是數(shù)值型</p><p> '就1賦給變量currentpage</p><p> if not isnumeric(currentpage) then</p><p> currentpage=1</p><p><b> end if</b></p&
57、gt;<p> dim totalput,n '定義變量</p><p> totalput=rs.recordcount</p><p> if totalput mod maxperpage=0 then</p><p> n=totalput\maxperpage</p><p><b> el
58、se</b></p><p> n=totalput\maxperpage+1</p><p><b> end if</b></p><p> if n=0 then</p><p><b> n=1</b></p><p><b> end
59、 if</b></p><p> rs.move(currentpage-1)*maxperpage</p><p><b> i=0</b></p><p> do while i< maxperpage and not rs.eof</p><p><b> i=i+1</b
60、></p><p><b> %></b></p><p><b> <%</b></p><p> rs.movenext</p><p><b> loop</b></p><p><b> end if<
61、/b></p><p><b> rs.close</b></p><p> set rs=nothing</p><p><b> %></b></p><p> 2.4 添加頁面關(guān)鍵代碼(student_add.asp)</p><p><b&
62、gt; <%</b></p><p> Dim MM_editAction</p><p> MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))</p><p> If (Request.QueryString <> ""
63、;) Then</p><p> MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)</p><p><b> End If</b></p><p> ' boolean to abort re
64、cord edit</p><p> Dim MM_abortEdit</p><p> MM_abortEdit = false</p><p><b> %></b></p><p><b> <%</b></p><p> If (CStr(Req
65、uest("MM_insert")) = "form1") Then</p><p> If (Not MM_abortEdit) Then</p><p> ' execute the insert</p><p> Dim MM_editCmd</p><p> Set MM_edi
66、tCmd = Server.CreateObject ("ADODB.Command")</p><p> MM_editCmd.ActiveConnection = MM_conn_STRING</p><p> MM_editCmd.CommandText = "INSERT INTO dbo.student (studentnum, studentn
67、ame, ssecret, sex, stuyear, stumon, studay, inyear, inmon, inday, specialnum, phone, city) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" </p><p> MM_editCmd.Prepared = true</p><p> MM_e
68、ditCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 10, Request.Form("studentnum")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter(
69、"param2", 201, 1, 10, Request.Form("studentname")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, 10, Request.Form("
70、ssecret")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 201, 1, 10, Request.Form("sex")) ' adLongVarChar</p><p> M
71、M_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 201, 1, 10, Request.Form("stuyear")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter(
72、"param6", 201, 1, 10, Request.Form("stumon")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 201, 1, 10, Request.Form("studa
73、y")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 201, 1, 10, Request.Form("inyear")) ' adLongVarChar</p><p> MM_e
74、ditCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 201, 1, 10, Request.Form("inmon")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("
75、;param10", 201, 1, 10, Request.Form("inday")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 201, 1, 10, Request.Form("specialnu
76、m")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 201, 1, 10, Request.Form("phone")) ' adLongVarChar</p><p> MM_e
77、ditCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 201, 1, 10, Request.Form("city")) ' adLongVarChar</p><p> MM_editCmd.Execute</p><p> MM_editCmd.ActiveCon
78、nection.Close</p><p> Response.Write("<script>alert('添加成功!');window.location.href = 'index_stu.asp';</script>")</p><p> Response.end</p><p>&
79、lt;b> End If</b></p><p><b> End If</b></p><p><b> %></b></p><p><b> <%</b></p><p><b> Dim rc</b><
80、/p><p> Dim rc_cmd</p><p> Dim rc_numRows</p><p> Set rc_cmd = Server.CreateObject ("ADODB.Command")</p><p> rc_cmd.ActiveConnection = MM_conn_STRING</p&g
81、t;<p> rc_cmd.CommandText = "SELECT * FROM dbo.student" </p><p> rc_cmd.Prepared = true</p><p> Set rc = rc_cmd.Execute</p><p> rc_numRows = 0</p><p&
82、gt;<b> %></b></p><p> 2.5 管理員修改頁面關(guān)鍵代碼(modify_stu.asp)</p><p><b> <%</b></p><p> Dim MM_editAction</p><p> MM_editAction = CStr(Reque
83、st.ServerVariables("SCRIPT_NAME"))</p><p> If (Request.QueryString <> "") Then</p><p> MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Reque
84、st.QueryString)</p><p><b> End If</b></p><p> ' boolean to abort record edit</p><p> Dim MM_abortEdit</p><p> MM_abortEdit = false</p><p&
85、gt;<b> %></b></p><p><b> <%</b></p><p> If (CStr(Request("MM_update")) = "form1") Then</p><p> If (Not MM_abortEdit) Then</p
86、><p> ' execute the update</p><p> Dim MM_editCmd</p><p> Set MM_editCmd = Server.CreateObject ("ADODB.Command")</p><p> MM_editCmd.ActiveConnection = MM
87、_conn_STRING</p><p> MM_editCmd.CommandText = "UPDATE dbo.student SET studentname = ?, ssecret = ?, sex = ?, stuyear = ?, stumon = ?, studay = ?, inyear = ?, inmon = ?, inday = ?, specialnum = ?, phone
88、 = ?, city = ? WHERE studentnum = ?" </p><p> MM_editCmd.Prepared = true</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 10, Request.Form("
89、;studentname")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 10, Request.Form("ssecret")) ' adLongVarChar</p><
90、;p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, 10, Request.Form("sex")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParam
91、eter("param4", 201, 1, 10, Request.Form("stuyear")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 201, 1, 10, Request.Form("
92、;stumon")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 201, 1, 10, Request.Form("studay")) ' adLongVarChar</p><p>
93、 MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 201, 1, 10, Request.Form("inyear")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParamete
94、r("param8", 201, 1, 10, Request.Form("inmon")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 201, 1, 10, Request.Form("inda
95、y")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 201, 1, 10, Request.Form("specialnum")) ' adLongVarChar</p><p>
96、 MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 201, 1, 10, Request.Form("phone")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter
97、("param12", 201, 1, 10, Request.Form("city")) ' adLongVarChar</p><p> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 200, 1, 10, Request.Form("MM_r
98、ecordId")) ' adVarChar</p><p> MM_editCmd.Execute</p><p> MM_editCmd.ActiveConnection.Close</p><p> Response.Write("<script>alert('修改成功!') ;window.loc
99、ation.href = 'index_stu.asp';</script>")</p><p> Response.end</p><p><b> End If</b></p><p><b> End If</b></p><p><b>
100、 %></b></p><p><b> <%</b></p><p> Dim Recordset1__MMColParam</p><p> Recordset1__MMColParam = "1"</p><p> If (Request.QueryString
101、("studentnum") <> "") Then </p><p> Recordset1__MMColParam = Request.QueryString("studentnum")</p><p><b> End If</b></p><p><b&g
102、t; %></b></p><p><b> <%</b></p><p> Dim Recordset1</p><p> Dim Recordset1_cmd</p><p> Dim Recordset1_numRows</p><p> Set Reco
103、rdset1_cmd = Server.CreateObject ("ADODB.Command")</p><p> Recordset1_cmd.ActiveConnection = MM_conn_STRING</p><p> Recordset1_cmd.CommandText = "SELECT * FROM dbo.student WHERE
104、 studentnum = ?" </p><p> Recordset1_cmd.Prepared = true</p><p> Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 10, Recordset1__MMColParam)
105、39; adVarChar</p><p> Set Recordset1 = Recordset1_cmd.Execute</p><p> Recordset1_numRows = 0</p><p><b> %></b></p><p> 2.6 學(xué)生查詢信息頁面關(guān)鍵代碼(student_inde
106、x.asp)</p><p><b> <%</b></p><p> ' *** Logout the current user.</p><p> MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1&
107、quot;</p><p> If (CStr(Request("MM_Logoutnow")) = "1") Then</p><p> Session.Contents.Remove("MM_Username")</p><p> Session.Contents.Remove("MM_
108、UserAuthorization")</p><p> MM_logoutRedirectPage = "index.asp"</p><p> ' redirect with URL parameters (remove the "MM_Logoutnow" query param).</p><p>
109、; if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))</p><p> If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.Q
110、ueryString <> "") Then</p><p> MM_newQS = "?"</p><p> For Each Item In Request.QueryString</p><p> If (Item <> "MM_Logoutnow") Then</
111、p><p> If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"</p><p> MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))</
112、p><p><b> End If</b></p><p><b> Next</b></p><p> if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS</p><p
113、><b> End If</b></p><p> Response.Redirect(MM_logoutRedirectPage)</p><p><b> End If</b></p><p><b> %></b></p><p> <!--#
114、include file="Connections/conn.asp" --></p><p><b> <%</b></p><p> Dim Recordset1__MMColParam</p><p> Recordset1__MMColParam = "1"</p>
115、<p> If (session("username") <> "") Then </p><p> Recordset1__MMColParam = session("username")</p><p><b> End If</b></p><p>
116、<b> %></b></p><p><b> <%</b></p><p> Dim Recordset1</p><p> Dim Recordset1_cmd</p><p> Dim Recordset1_numRows</p><p> S
117、et Recordset1_cmd = Server.CreateObject ("ADODB.Command")</p><p> Recordset1_cmd.ActiveConnection = MM_conn_STRING</p><p> Recordset1_cmd.CommandText = "SELECT * FROM dbo.studen
118、t WHERE studentnum = ?" </p><p> Recordset1_cmd.Prepared = true</p><p> Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 10, Recordset1__MMColPa
119、ram) ' adVarChar</p><p> Set Recordset1 = Recordset1_cmd.Execute</p><p> Recordset1_numRows = 0</p><p><b> %></b></p><p><b> <%</b>
120、;</p><p> Dim MM_paramName </p><p><b> %></b></p><p><b> <%</b></p><p> ' *** Go To Record and Move To Record: create strings for
121、maintaining URL and Form parameters</p><p> Dim MM_keepNone</p><p> Dim MM_keepURL</p><p> Dim MM_keepForm</p><p> Dim MM_keepBoth</p><p> Dim MM_remo
122、veList</p><p> Dim MM_item</p><p> Dim MM_nextItem</p><p> ' create the list of parameters which should not be maintained</p><p> MM_removeList = "&ind
123、ex="</p><p> If (MM_paramName <> "") Then</p><p> MM_removeList = MM_removeList & "&" & MM_paramName & "="</p><p><b>
124、; End If</b></p><p> MM_keepURL=""</p><p> MM_keepForm=""</p><p> MM_keepBoth=""</p><p> MM_keepNone=""</p>&l
125、t;p> ' add the URL parameters to the MM_keepURL string</p><p> For Each MM_item In Request.QueryString</p><p> MM_nextItem = "&" & MM_item & "="</p&g
126、t;<p> If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then</p><p> MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))</p><p><b> End If
127、</b></p><p><b> Next</b></p><p> ' add the Form variables to the MM_keepForm string</p><p> For Each MM_item In Request.Form</p><p> MM_nextIt
128、em = "&" & MM_item & "="</p><p> If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then</p><p> MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(R
129、equest.Form(MM_item))</p><p><b> End If</b></p><p><b> Next</b></p><p> ' create the Form + URL string and remove the intial '&' from each
130、 of the strings</p><p> MM_keepBoth = MM_keepURL & MM_keepForm</p><p> If (MM_keepBoth <> "") Then </p><p> MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth)
131、- 1)</p><p><b> End If</b></p><p> If (MM_keepURL <> "") Then</p><p> MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)</p><p><b&
132、gt; End If</b></p><p> If (MM_keepForm <> "") Then</p><p> MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)</p><p><b> End If</b></p&g
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 數(shù)據(jù)庫課程設(shè)計(jì)—教務(wù)管理系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)---教務(wù)管理系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)---教務(wù)管理系統(tǒng)
- 數(shù)據(jù)庫教務(wù)管理系統(tǒng)課程設(shè)計(jì)
- 大型數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告--教務(wù)管理系統(tǒng)后臺(tái)數(shù)據(jù)庫
- 數(shù)據(jù)庫課程設(shè)計(jì)--學(xué)校教務(wù)管理系統(tǒng)
- 數(shù)據(jù)庫技術(shù)課程設(shè)計(jì)--教務(wù)管理數(shù)據(jù)庫系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)-教務(wù)信息管理系統(tǒng)
- 工資管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)報(bào)告(數(shù)據(jù)庫課程設(shè)計(jì))
- 工資管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)報(bào)告數(shù)據(jù)庫課程設(shè)計(jì)
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告---餐飲管理系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告--食堂管理系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告(教材管理系統(tǒng))
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告--餐飲管理系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告---圖書館管理系統(tǒng)數(shù)據(jù)庫
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告---酒店管理系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告--酒店管理系統(tǒng)
- 數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告--成績(jī)管理系統(tǒng)
- 工資管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)報(bào)告(數(shù)據(jù)庫課程設(shè)計(jì))模板
- 學(xué)籍管理系統(tǒng)數(shù)據(jù)庫課程設(shè)計(jì)報(bào)告
評(píng)論
0/150
提交評(píng)論