




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
#參考文獻1.陳明.軟件工程學教程.科技出版社,20022.薩師煊,王珊.數(shù)據(jù)庫系統(tǒng)概論.第三版.高等教育出版社,2000飛思科技產(chǎn)品研發(fā)中心.jsp與數(shù)據(jù)庫應用開發(fā)?電子工業(yè)出版社,2003張海藩.軟件工程[2].北京:人民郵電出版社,2006:89-234孫衛(wèi)琴.精通jsp[3].北京:電子工業(yè)出版社,2006:60-90胡百敬,姚巧玫.SQLServer2000數(shù)據(jù)庫開發(fā)詳解?北京:電子工業(yè)出版社,2008:88-324徐言聲.設計模式解析[2].北京:人民郵電出版社,2006:45-237附錄1添加試卷種類<%@pagecontentType="text/html;charset=gb2312"%><%@pagelanguage="java"pageEncoding="gb2312"%><html><head>vtitle>題庫管理系統(tǒng)</title〉<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"><linkhref="../456/common/css/sunhoo.css"rel="stylesheet"type="text/css"><scriptlanguage="JavaScript">functionValidateLoginForm(form){if(.value==""){alert("請輸試卷種類名稱”);returnfalse}returntrue}</script></head><bodybgcolor="#F4F5FF"leftmargin="0"topmargin="0"background="../../pic/back.jpg"><formname="login"action="addOk.jsp"method=postonSubmit="returnValidateLoginForm(this)"><tablewidth="100%"height="100%"border="0"cellpadding="0"cellspacing="0"><tr><tdwidth="12%"height="307"valign="top"></td><tdwidth="88%"valign="top"><tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr><tdvalign="top"> ;</td></tr><tr><td><tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr><tdwidth="19%"> ;</td><tdwidth="81%"background="image/index_right_bg.gif"><tablewidth="38%"border="0"cellpadding="4"cellspacing="1"bgcolor="#999999"><tralign="center"bgcolor="#f6f6f6">vtdcolspan="2"xb>添加試卷種類</bx/td></tr><tralign="center"bgcolor="#FFFFFF">vtdxdivalign="right">試卷名稱</divx/td><td><inputtype="text"name="name"></td></tr><tralign="center"bgcolor="#FFFFFF">vtdxdivalign="right">添加試卷</div></td><tdcolspan="2"><inputtype="submit"width="50"height="22"border="0"value="提交">v/a>v/td>v/tr>v/table>vspanclass="top">v/form>v/td>v/tr>v/td>v/tr>vtr>vtd>vspanclass="top">v/td>v/tr>v/td>v/tr>v/Form>v/body>v/html>刪除用戶v%@pagecontentType="text/html;charset=gb2312"%>v%@pagelanguage="java"%>v%@pageimport="java.sql.*"%>v%@pageimport="conn.ConnSql"%>v%ConnSqlcs=newConnSql();Stringid=request.getParameter("id").trim();Stringdel="deletefromcustomer_infowherecustomer_id='"+id+"'";cs.executeUpdata(del);%>vhtml>vhead>vtitle>刪除成功v/title〉vlinkrel="stylesheet"href="../style.css"type="text/css">v/head>vbodybackground="../../pic/back.jpg">vcenter>vh5>刪除成功v/h5>v/center>v/body>v/html>下載試卷v%@pagecontentType="text/html;charset=gb2312"%><%@pagelanguage="java"%><%@pageimport="java.sql.*"%><%@pageimport="conn.ConnSql"%><%〃驅(qū)動程序名,比較舊了,如果你用mysql5,自己改。ConnSqlcs=newConnSql();Statementstatement=cs.getStatement();//每頁顯示記錄數(shù)intPageSize=10;intStartRow=0;//開始顯示記錄的編號intPageNo=0;〃需要顯示的頁數(shù)intCounterStart=0;〃每頁頁碼的初始值intCounterEnd=0;〃顯示頁碼的最大值intRecordCount=0;〃總記錄數(shù);intMaxPage=O;〃總頁數(shù)//獲取需要顯示的頁數(shù),由用戶提交if(request.getParameter("PageNo")==null){//如果為空,則表示第1頁if(StartRow==0){PageNo=StartRow+1;//設定為1}}else{PageNo=Integer.parseInt(request.getParameter("PageNo"));//獲得用戶提交的頁數(shù)StartRow=(PageNo-1)*PageSize;//獲得開始顯示的記錄編號}//因為顯示頁碼的數(shù)量是動態(tài)變化的,假如總共有一百頁,則不可能同時顯示100個鏈接。而是根據(jù)當前的頁數(shù)顯示//一定數(shù)量的頁面鏈接//設置顯示頁碼的初始值!!if(PageNo%PageSize==0){CounterStart=PageNo-(PageSize-1);}else{CounterStart=PageNo-(PageNo%PageSize)+1;}CounterEnd=CounterStart+(PageSize-1);%><html><head><title>搜索記錄顯示</title〉<linkrel="stylesheet"href="../style.css"type="text/css"></head><%Stringname="%";if(request.getParameter("name")!=null){//如果為空,則表示第1頁name=newString(request.getParameter("name").getBytes("ISO-8859-1"),"gb2312");}//獲取總記錄數(shù)ResultSetrs=statement.executeQuery("selectcount(*)frompaperwherequestionlike'%"+name+"%'");rs.next();RecordCount=rs.getInt(1);rs=statement.executeQuery("selecttop10id,question,q_url,answer,a_url,classfrompaperwherequestionlike'%"+name+"%'andid>"+StartRow);//獲取總頁數(shù)MaxPage=RecordCount%PageSize;if(RecordCount%PageSize==0){MaxPage=RecordCount/PageSize;}else{MaxPage=RecordCount/PageSize+1;}%><bodybackground="../../pic/back.jpg"><center><formmethod="get"action="downPaper.jsp"name="divPage"><tablewidth="100%"border="0"class="InternalHeader"><tr>vtdwidth="24%"xfontsize=4>搜索試題名稱:v/fontx/td><tdwidth="36%"><fontsize=4><inputtype="text"name="name"></font></td><tdwidth="36%">vfontsize=4>vinputtype="submit"value="搜索"name="buttonl">v/font></td></tr></table></form></center><tablewidth="l00%"border="0"class="InternalHeader"><tr>vtdwidth="24%"xfontsize=4>搜索記錄顯示</fontx/td><tdwidth="76%"><fontsize=4><%="總共"+RecordCount+"條記錄-當前頁:"+PageNo+"/"+MaxPage%></font></td></tr></table><br><center><tablewidth="100%"border="0"class="NormalTableTwo"><tr>vtdclass="InternalHeader">記錄編號</td><tdclass="InternalHeader">ID</td>vtdclass="InternalHeader">種類v/td>vtdclass="InternalHeader">試卷v/td>vtdclass="InternalHeader">下載v/td>vtdclass="InternalHeader">答案v/td>vtdclass="InternalHeader">下載v/td>v/tr>v%inti=1,row;while(rs.next()){intbil=i;%>vtr>vtdclass="NormalFieldTwo">v%=bil%>v/td>vtdclass="NormalFieldTwo">v%=rs.getString(1)%>v/td>vtdclass="NormalFieldTwo">v%=rs.getString(6)%>v/td>vtdclass="NormalFieldTwo">v%=rs.getString(2)%>v/td>vtdclass="NormalFieldTwo">vAhref="../../v%=rs.getString(3)%>"id="files">下載v/A>v/td>vtdclass="NormalFieldTwo">v%=rs.getString(4)%>v/td>vtdclass="NormalFieldTwo">vAhref="../../v%=rs.getString(5)%>"id="files">下載v/A>v/td>v/tr>v%i++;}%>v/table>v/center>vbr>vtablewidth="100%"border="0"class="InternalHeader"><tr><td><divalign="center"><%out.print("<fontsize=4>");//顯示第一頁或者前一頁的鏈接//如果當前頁不是第1頁,則顯示第一頁和前一頁的鏈接out.print("[");//打印需要顯示的頁碼for(intc=CounterStart;c<=CounterEnd;c++){if(c<MaxPage){if(c==PageNo){if(c%PageSize==0){out.print(c);}else{out.print(c+",");}}elseif(c%PageSize==0){out.print("<ahref=downPaper.jsp?PageNo="+c+">"+c+"</a>");}else{out.print("<ahref=downPaper.jsp?PageNo="+c+">"+c+"</a>,");}}else{if(PageNo==MaxPage){out.print(c);break;}else{out.print("<ahref=downPaper.jsp?PageNo="+c+">"+c+"</a>");break;}}}out.print("]");;out.print("</font>");%></div></td></tr></table><%statement.close();%></body></html>查找試卷<%@pagecontentType="text/html;charset=gb2312"%><%@pagelanguage="java"%><%@pageimport="java.sql.*"%><%@pageimport="conn.ConnSql"%><%ConnSqlcs=newConnSql();Statementstatement=cs.getStatement();//每頁顯示記錄數(shù)intPageSize=10;intStartRow=0;//開始顯示記錄的編號intPageNo=0;〃需要顯示的頁數(shù)intCounterStart=0;〃每頁頁碼的初始值intCounterEnd=0;〃顯示頁碼的最大值intRecordCount=0;〃總記錄數(shù);intMaxPage=O;〃總頁數(shù)//獲取需要顯示的頁數(shù),由用戶提交if(request.getParameter("PageNo")==null){//如果為空,則表示第1頁if(StartRow==0){PageNo=StartRow+1;//設定為1}}else{PageNo=Integer.parseInt(request.getParameter("PageNo"));//獲得用戶提交的頁數(shù)StartRow=(PageNo-1)*PageSize;//獲得開始顯示的記錄編號}//因為顯示頁碼的數(shù)量是動態(tài)變化的,假如總共有一百頁,則不可能同時顯示100個鏈接而是根據(jù)當前的頁數(shù)顯示//一定數(shù)量的頁面鏈接//設置顯示頁碼的初始值!!if(PageNo%PageSize==0){CounterStart=PageNo-(PageSize-1);}else{CounterStart=PageNo-(PageNo%PageSize)+1;}CounterEnd=CounterStart+(PageSize-1);%><html><head>vtitle>搜索記錄顯示</title〉<linkrel="stylesheet"href="../style.css"type="text/css"></head><%Stringname="%";if(request.getParameter("name")!=null){//如果為空,則表示第1頁name=newString(request.getParameter("name").getBytes("ISO-8859-1"),"gb2312");}//獲取總記錄數(shù)ResultSetrs=statement.executeQuery("selectcount(*)frompaperwherequestionlike'%"+name+"%'");rs.next();RecordCount=rs.getInt(1);rs=statement.executeQuery("selecttop10id,question,q_url,answer,a_url,classfrompaperwherequestionlike'%"+name+"%'andid>"+StartRow);//獲取總頁數(shù)MaxPage=RecordCount%PageSize;if(RecordCount%PageSize==0){MaxPage=RecordCount/PageSize;}else{MaxPage=RecordCount/PageSize+1;}%><bodybackground="../../pic/back.jpg"><center><formmethod="get"action="searchPaper.jsp"name="divPage"><tablewidth="100%"border="0"class="InternalHeader"><tr><tdwidth="24%"xfontsize=4>搜索試題名稱:v/fontx/td><tdwidth="36%"><fontsize=4><inputtype="text"name="name"></font></td><tdwidth="36%">vfontsize=4>vinputtype="submit"value="搜索"name="buttonl">v/font></td></tr></table></form></center><tablewidth="100%"border="0"class="InternalHeader"><tr>vtdwidth="24%"xfontsize=4>搜索記錄顯示</fontx/td><tdwidth="76%"><fontsize=4><%="總共"+RecordCount+"條記錄-當前頁"+PageNo+"/"+MaxPage%></font></td></tr></table><br><center><tablewidth="100%"border="0"class="NormalTableTwo"><tr>vtdclass="InternalHeader">記錄編號</td><tdclass="InternalHeader">ID</td>vtdclass="InternalHeader">試卷v/td>vtdclass="InternalHeader">答案v/td>vtdclass="InternalHeader">種類v/td>v/tr>v%inti=1,row;while(rs.next()){intbil=i;%>vtr>vtdclass="NormalFieldTwo">v%=bil%>v/td>vtdclas
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 醫(yī)學治療技術研究進展
- 公共安全科學導論
- 動物醫(yī)學課程旁聽指南
- 《臨時調(diào)整》課件
- 《化妝的藝術與技巧》課件
- 《Katie De Sousa》上篇:精彩紛呈的課件展示
- 《臥室衣柜規(guī)劃》課件
- 《術后鎮(zhèn)痛管理策略》課件
- 粉末活動策劃方案
- 《心臟驟停、復蘇》課件
- 獨居石稀土精礦的氫氧化鈉分解工藝技術
- 手弧焊的基本操作
- 漢密爾頓抑郁量表(HAMD)
- 施工項目安全交底確認書
- 國際機票后端引擎緩存系統(tǒng)架構
- 貴州干部履歷表(2023版)
- 滿堂支架現(xiàn)澆砼連續(xù)箱梁的監(jiān)理實施細則
- “楓橋經(jīng)驗”PPT課件
- 30萬噸年煤制甲醇變換工段初步設計
- 通信架空管道直埋光纜線路工程施工規(guī)范
- BrownBear自制可打印可涂色
評論
0/150
提交評論