├── README.md
├── WebRoot
├── META-INF
│ └── MANIFEST.MF
├── My97DatePicker
│ ├── WdatePicker.js
│ ├── calendar.js
│ ├── lang
│ │ ├── en.js
│ │ ├── zh-cn.js
│ │ └── zh-tw.js
│ └── skin
│ │ ├── WdatePicker.css
│ │ ├── datePicker.gif
│ │ ├── default
│ │ ├── datepicker.css
│ │ └── img.gif
│ │ └── whyGreen
│ │ ├── bg.jpg
│ │ ├── datepicker.css
│ │ └── img.gif
├── WEB-INF
│ ├── classes
│ │ ├── biz
│ │ │ ├── IBbsBiz.class
│ │ │ ├── IHomeWorkBiz.class
│ │ │ ├── IPostBiz.class
│ │ │ ├── ITestBiz.class
│ │ │ ├── ITopicBiz.class
│ │ │ ├── IUpDownBiz.class
│ │ │ ├── IUserBiz.class
│ │ │ └── impl
│ │ │ │ ├── BbsBizImpl.class
│ │ │ │ ├── HomeWorkBizImpl.class
│ │ │ │ ├── PostBizImpl.class
│ │ │ │ ├── TestBizImpl.class
│ │ │ │ ├── TopicBizImpl.class
│ │ │ │ ├── UpDownBizImpl.class
│ │ │ │ └── UserBizImpl.class
│ │ ├── dao
│ │ │ ├── IBbsDao.class
│ │ │ ├── IHomeWorkDao.class
│ │ │ ├── IPostDao.class
│ │ │ ├── ITestDao.class
│ │ │ ├── ITopicDao.class
│ │ │ ├── IUpDownDao.class
│ │ │ ├── IUserDao.class
│ │ │ └── impl
│ │ │ │ ├── BbsDaoImpl.class
│ │ │ │ ├── HomeWorkDaoImpl.class
│ │ │ │ ├── PostDaoImpl.class
│ │ │ │ ├── TestDaoImpl.class
│ │ │ │ ├── TopicDaoImpl.class
│ │ │ │ ├── UpDownDaoImpl.class
│ │ │ │ └── UserDaoImpl.class
│ │ ├── database.properties
│ │ ├── filter
│ │ │ ├── BackFilter.class
│ │ │ └── LoginFilter.class
│ │ ├── model
│ │ │ ├── Answer.class
│ │ │ ├── Bbs.class
│ │ │ ├── HomeWork.class
│ │ │ ├── Post.class
│ │ │ ├── Reply.class
│ │ │ ├── Test.class
│ │ │ ├── Topic.class
│ │ │ ├── Upload.class
│ │ │ └── User.class
│ │ ├── servlet
│ │ │ ├── BbsServlet.class
│ │ │ ├── CollectWorkServlet.class
│ │ │ ├── DownServlet.class
│ │ │ ├── HomeWorkServlet.class
│ │ │ ├── LoginServlet.class
│ │ │ ├── PostServlet.class
│ │ │ ├── TestServlet.class
│ │ │ ├── TopicServlet.class
│ │ │ ├── UploadServlet.class
│ │ │ └── UserServlet.class
│ │ └── util
│ │ │ ├── DBUtils.class
│ │ │ └── DownFile.class
│ ├── lib
│ │ ├── commons-beanutils.jar
│ │ ├── commons-collections-3.2.jar
│ │ ├── commons-digester.jar
│ │ ├── commons-fileupload-1.2.1.jar
│ │ ├── commons-fileupload-1.3.1.jar
│ │ ├── commons-io-1.4.jar
│ │ ├── commons-io-2.4.jar
│ │ ├── commons-lang-2.4.jar
│ │ ├── commons-logging-1.1.1.jar
│ │ ├── ezmorph-1.0.6.jar
│ │ ├── jsf-api.jar
│ │ ├── jsf-impl.jar
│ │ ├── json-lib-2.2.3-jdk15.jar
│ │ ├── jstl-1.2.jar
│ │ └── mysql-connector-java-5.1.18-bin.jar
│ └── web.xml
├── backindex.jsp
├── backstage
│ ├── adduser.jsp
│ ├── backlogin.jsp
│ ├── error.jsp
│ ├── post.jsp
│ ├── postmanager.jsp
│ ├── success.jsp
│ └── usermanager.jsp
├── commons
│ └── taglib.jsp
├── css
│ ├── index.css
│ ├── kczx.css
│ ├── rpage.css
│ └── style.css
├── images
│ ├── 1.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ ├── 4.jpg
│ ├── 5.jpg
│ ├── 6.jpg
│ ├── 7.jpg
│ ├── 8.jpg
│ ├── addtopic.png
│ ├── b4.jpg
│ ├── b42.jpg
│ ├── ba6b3c51-336d-4b86-9e68-13409e85ef43-large.png
│ ├── blockbullets.png
│ ├── blockheadericon.png
│ ├── book.png
│ ├── cyy.jpg
│ ├── doc.png
│ ├── elearn.jpg
│ ├── header.jpg
│ ├── ll.png
│ ├── login.png
│ ├── logout.png
│ ├── menuseparator.png
│ ├── nav.png
│ ├── no-avatar.jpg
│ ├── p1.jpg
│ ├── p2.jpg
│ ├── p3.jpg
│ ├── p4.jpg
│ ├── page.png
│ ├── pageglare.png
│ ├── pdf.png
│ ├── postbullets.png
│ ├── postemailicon.png
│ ├── postpdficon.png
│ ├── postprinticon.png
│ ├── postquote.png
│ ├── ppt.png
│ ├── preloader-01.gif
│ ├── register.png
│ ├── spacer.gif
│ ├── start.png
│ ├── template_preview.png
│ ├── ts010.jpg
│ ├── ts011.jpg
│ ├── ts012.jpg
│ ├── ts014.jpg
│ ├── ts015.jpg
│ ├── ts016.jpg
│ ├── ts022.jpg
│ ├── ts023.jpg
│ ├── ts024.jpg
│ ├── ulogin.png
│ ├── updatepsw.png
│ ├── upload.png
│ ├── userl.png
│ └── xls.png
├── index.jsp
├── js
│ ├── back.js
│ ├── bbs.js
│ ├── homework.js
│ ├── index.js
│ ├── jquery-1.9.1.min.js
│ ├── jquery.js
│ ├── script.js
│ ├── test.js
│ ├── topic.js
│ └── upload.js
├── jsp
│ ├── addtopic.jsp
│ ├── bbs.jsp
│ ├── bbsdan.jsp
│ ├── chaoshi.jsp
│ ├── chuti.jsp
│ ├── communication.jsp
│ ├── coursecenter.jsp
│ ├── coursevideo.jsp
│ ├── download.jsp
│ ├── homework.jsp
│ ├── myupload.jsp
│ ├── onlinetest.jsp
│ ├── postdetail.jsp
│ ├── shouhomework.jsp
│ ├── style.css
│ ├── success.jsp
│ ├── test.jsp
│ ├── testlie.jsp
│ ├── tijiaohomework.jsp
│ ├── topic.jsp
│ ├── topicmanager.jsp
│ ├── upordown.jsp
│ └── wenxue.jsp
├── style.css
└── video
│ └── 001.mp4
├── sql
└── course.sql
├── src
├── biz
│ ├── IBbsBiz.java
│ ├── IHomeWorkBiz.java
│ ├── IPostBiz.java
│ ├── ITestBiz.java
│ ├── ITopicBiz.java
│ ├── IUpDownBiz.java
│ ├── IUserBiz.java
│ └── impl
│ │ ├── BbsBizImpl.java
│ │ ├── HomeWorkBizImpl.java
│ │ ├── PostBizImpl.java
│ │ ├── TestBizImpl.java
│ │ ├── TopicBizImpl.java
│ │ ├── UpDownBizImpl.java
│ │ └── UserBizImpl.java
├── dao
│ ├── IBbsDao.java
│ ├── IHomeWorkDao.java
│ ├── IPostDao.java
│ ├── ITestDao.java
│ ├── ITopicDao.java
│ ├── IUpDownDao.java
│ ├── IUserDao.java
│ └── impl
│ │ ├── BbsDaoImpl.java
│ │ ├── HomeWorkDaoImpl.java
│ │ ├── PostDaoImpl.java
│ │ ├── TestDaoImpl.java
│ │ ├── TopicDaoImpl.java
│ │ ├── UpDownDaoImpl.java
│ │ └── UserDaoImpl.java
├── database.properties
├── filter
│ ├── BackFilter.java
│ └── LoginFilter.java
├── model
│ ├── Answer.java
│ ├── Bbs.java
│ ├── HomeWork.java
│ ├── Post.java
│ ├── Reply.java
│ ├── Test.java
│ ├── Topic.java
│ ├── Upload.java
│ └── User.java
├── servlet
│ ├── BbsServlet.java
│ ├── CollectWorkServlet.java
│ ├── DownServlet.java
│ ├── HomeWorkServlet.java
│ ├── LoginServlet.java
│ ├── PostServlet.java
│ ├── TestServlet.java
│ ├── TopicServlet.java
│ ├── UploadServlet.java
│ └── UserServlet.java
└── util
│ ├── DBUtils.java
│ └── DownFile.java
├── viewImg
├── coursecenter.png
├── index.png
└── test.png
└── 课程网.artx
/README.md:
--------------------------------------------------------------------------------
1 | # 精品课程网(javaWeb)
2 |
3 | > 此项目为本人2015年的毕业设计,含展示页+后台管理系统。用最基础的servlet+jsp+mysql写的,技术老了,但很完整。整个项目的页面设计、功能设计、开发皆由本人一人完成,特此一份。
4 |
5 | > 文末附上开题报告+论文,供大家参考,别忘了点star哦!
6 |
7 | 
8 |
9 | 
10 |
11 | 
12 |
13 | ## 功能列表
14 | 登录注册
15 |
16 | 在线出题
17 |
18 | 在线测试
19 |
20 | 资料下载
21 |
22 | 师生互动
23 |
24 | 我的作业
25 |
26 | 收取作业
27 |
28 | 用户管理
29 |
30 | 公告管理
31 |
32 | ## 目录说明
33 | >展示页和后台管理页都写在了一个工程里
34 |
35 | >大家可以直接拿源码改造,虽然用了jstl标签,但也用了ajax,要改成html也不难。
36 |
37 | sql文件夹:该项目的sql都在这里啦,直接运行即可
38 |
39 | src文件夹:java源码和数据库配置
40 |
41 | webRoot文件夹:css、js、jsp
42 |
43 | webRoot->backstage 文件夹:后台管理系统的页面
44 |
45 | imgView文件夹:可以忽略,仅用于展示
46 |
47 | 课程网.artx:我是用Artisteer设计的首页,此为设计原件
48 |
49 |
50 | ## 预览说明
51 | >webRoot->WEB-INF文件夹下有编译后的class文件,可以直接拿来webRoot运行看效果
52 | ### 操作步骤
53 | 1、在mysql数据库中运行文件下的 "sql.text" 建表(已提供测试数据)
54 |
55 | 2、更改数据库配置: course\WEB-INF\classes\database.properties
56 |
57 | 3、在tomcat的webapps中,新建一个course文件夹(最终访问路径的名称)
58 |
59 | 4、将course\WebRoot下的所有文件,复制到course下
60 |
61 | 5、开启tomcat,点击 tomcat\bin\startup.bat
62 |
63 | ### 首页入口:
64 | localhost:8080/course/index.jsp (8080为tomcat的端口号)
65 |
66 | >测试登录帐号:
67 | >学生:student/123456
68 | >老师:teacher/123456
69 | ### 后台管理入口:
70 | localhost:8080/course/backindex.jsp
71 |
72 | >测试登录帐号:
73 | >admin/admin
74 |
75 | ### 论文地址
76 | 开题报告:https://pan.baidu.com/s/1DqXVvKgSf_kf1V2kWKE6SA (提取码:nvay)
77 |
78 | 毕业论文:https://pan.baidu.com/s/1x8ESJH2qWFep9XLU4ezaug (提取码:9a0z)
79 |
--------------------------------------------------------------------------------
/WebRoot/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/lang/en.js:
--------------------------------------------------------------------------------
1 | var $lang={
2 | errAlertMsg: "Invalid date or the date out of range,redo or not?",
3 | aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
4 | aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
5 | aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
6 | aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"],
7 | clearStr: "Clear",
8 | todayStr: "Today",
9 | okStr: "OK",
10 | updateStr: "OK",
11 | timeStr: "Time",
12 | quickStr: "Quick Selection",
13 | err_1: 'MinDate Cannot be bigger than MaxDate!'
14 | }
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/lang/zh-cn.js:
--------------------------------------------------------------------------------
1 | var $lang={
2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?",
3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
7 | clearStr: "\u6E05\u7A7A",
8 | todayStr: "\u4ECA\u5929",
9 | okStr: "\u786E\u5B9A",
10 | updateStr: "\u786E\u5B9A",
11 | timeStr: "\u65F6\u95F4",
12 | quickStr: "\u5FEB\u901F\u9009\u62E9",
13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!'
14 | }
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/lang/zh-tw.js:
--------------------------------------------------------------------------------
1 | var $lang={
2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?",
3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
7 | clearStr: "\u6E05\u7A7A",
8 | todayStr: "\u4ECA\u5929",
9 | okStr: "\u78BA\u5B9A",
10 | updateStr: "\u78BA\u5B9A",
11 | timeStr: "\u6642\u9593",
12 | quickStr: "\u5FEB\u901F\u9078\u64C7",
13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!'
14 | }
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/skin/WdatePicker.css:
--------------------------------------------------------------------------------
1 | .Wdate{
2 | border:#999 1px solid;
3 | height:20px;
4 | background:#fff url(datePicker.gif) no-repeat right;
5 | }
6 | .Wdate::-ms-clear{display:none;}
7 |
8 | .WdateFmtErr{
9 | font-weight:bold;
10 | color:red;
11 | }
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/skin/datePicker.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/My97DatePicker/skin/datePicker.gif
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/skin/default/img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/My97DatePicker/skin/default/img.gif
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/skin/whyGreen/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/My97DatePicker/skin/whyGreen/bg.jpg
--------------------------------------------------------------------------------
/WebRoot/My97DatePicker/skin/whyGreen/img.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/My97DatePicker/skin/whyGreen/img.gif
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/IBbsBiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/IBbsBiz.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/IHomeWorkBiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/IHomeWorkBiz.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/IPostBiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/IPostBiz.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/ITestBiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/ITestBiz.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/ITopicBiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/ITopicBiz.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/IUpDownBiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/IUpDownBiz.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/IUserBiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/IUserBiz.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/impl/BbsBizImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/impl/BbsBizImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/impl/HomeWorkBizImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/impl/HomeWorkBizImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/impl/PostBizImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/impl/PostBizImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/impl/TestBizImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/impl/TestBizImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/impl/TopicBizImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/impl/TopicBizImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/impl/UpDownBizImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/impl/UpDownBizImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/biz/impl/UserBizImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/biz/impl/UserBizImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/IBbsDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/IBbsDao.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/IHomeWorkDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/IHomeWorkDao.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/IPostDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/IPostDao.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/ITestDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/ITestDao.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/ITopicDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/ITopicDao.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/IUpDownDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/IUpDownDao.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/IUserDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/IUserDao.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/impl/BbsDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/impl/BbsDaoImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/impl/HomeWorkDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/impl/HomeWorkDaoImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/impl/PostDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/impl/PostDaoImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/impl/TestDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/impl/TestDaoImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/impl/TopicDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/impl/TopicDaoImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/impl/UpDownDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/impl/UpDownDaoImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/dao/impl/UserDaoImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/dao/impl/UserDaoImpl.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/database.properties:
--------------------------------------------------------------------------------
1 | ip=localhost
2 | dbname=course
3 | port=3306
4 | account=root
5 | password=root
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/filter/BackFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/filter/BackFilter.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/filter/LoginFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/filter/LoginFilter.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/Answer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/Answer.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/Bbs.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/Bbs.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/HomeWork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/HomeWork.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/Post.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/Post.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/Reply.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/Reply.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/Test.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/Test.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/Topic.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/Topic.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/Upload.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/Upload.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/model/User.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/model/User.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/BbsServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/BbsServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/CollectWorkServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/CollectWorkServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/DownServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/DownServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/HomeWorkServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/HomeWorkServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/LoginServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/LoginServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/PostServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/PostServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/TestServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/TestServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/TopicServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/TopicServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/UploadServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/UploadServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/servlet/UserServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/servlet/UserServlet.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/util/DBUtils.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/util/DBUtils.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/classes/util/DownFile.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/classes/util/DownFile.class
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-beanutils.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-beanutils.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-collections-3.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-collections-3.2.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-digester.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-digester.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-fileupload-1.3.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-fileupload-1.3.1.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-io-1.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-io-1.4.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-io-2.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-io-2.4.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-lang-2.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-lang-2.4.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/ezmorph-1.0.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/ezmorph-1.0.6.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/jsf-api.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/jsf-api.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/jsf-impl.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/jsf-impl.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/json-lib-2.2.3-jdk15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/json-lib-2.2.3-jdk15.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/jstl-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/jstl-1.2.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.18-bin.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.18-bin.jar
--------------------------------------------------------------------------------
/WebRoot/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | LoginFilter
10 | filter.LoginFilter
11 |
12 |
13 | LoginFilter
14 | /jsp/*
15 |
16 |
17 |
18 | BackFilter
19 | filter.BackFilter
20 |
21 |
22 | BackFilter
23 | /backstage/usermanager.jsp
24 | /backindex.jsp
25 | /backstage/postmanager.jsp
26 |
27 |
28 | LoginServlet
29 | servlet.LoginServlet
30 |
31 |
32 | PostServlet
33 | servlet.PostServlet
34 |
35 |
36 | TopicServlet
37 | servlet.TopicServlet
38 |
39 |
40 | TestServlet
41 | servlet.TestServlet
42 |
43 |
44 | BbsServlet
45 | servlet.BbsServlet
46 |
47 |
48 | UploadServlet
49 | servlet.UploadServlet
50 |
51 |
52 | DownServlet
53 | servlet.DownServlet
54 |
55 |
56 | HomeWorkServlet
57 | servlet.HomeWorkServlet
58 |
59 |
60 | CollectWorkServlet
61 | servlet.CollectWorkServlet
62 |
63 |
64 | UserServlet
65 | servlet.UserServlet
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | LoginServlet
79 | /servlet/LoginServlet
80 |
81 |
82 | PostServlet
83 | /servlet/PostServlet
84 |
85 |
86 | TopicServlet
87 | /servlet/TopicServlet
88 |
89 |
90 | TestServlet
91 | /servlet/TestServlet
92 |
93 |
94 | BbsServlet
95 | /servlet/BbsServlet
96 |
97 |
98 | UploadServlet
99 | /servlet/UploadServlet
100 |
101 |
102 | DownServlet
103 | /servlet/DownServlet
104 |
105 |
106 | HomeWorkServlet
107 | /servlet/HomeWorkServlet
108 |
109 |
110 | CollectWorkServlet
111 | /servlet/CollectWorkServlet
112 |
113 |
114 | UserServlet
115 | /servlet/UserServlet
116 |
117 |
118 | index.jsp
119 |
120 |
121 |
--------------------------------------------------------------------------------
/WebRoot/backindex.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----后台管理
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
50 |
51 |
52 |
53 |
54 |
58 |
66 |
67 |
68 |
查询与添加
69 |
70 |
71 | 帐号:
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/WebRoot/backstage/adduser.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----后台管理
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 添加教师
62 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/WebRoot/backstage/backlogin.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%
3 | String path = request.getContextPath();
4 | String basePath = request.getScheme() + "://"
5 | + request.getServerName() + ":" + request.getServerPort()
6 | + path + "/";
7 | %>
8 |
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----后台管理
15 |
16 |
17 |
18 |
19 |
20 |
21 |
62 |
63 |
64 |
65 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/WebRoot/backstage/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%
3 | String path = request.getContextPath();
4 | String basePath = request.getScheme() + "://"
5 | + request.getServerName() + ":" + request.getServerPort()
6 | + path + "/";
7 | %>
8 |
9 |
10 |
11 |
12 |
13 |
14 | My JSP 'success.jsp' starting page
15 |
16 |
17 |
18 |
19 |
20 |
21 |
24 |
33 |
34 |
35 |
36 |
37 | 操作失败!
38 |
39 |
40 |
--------------------------------------------------------------------------------
/WebRoot/backstage/post.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 |
15 | 精品课程网----后台管理
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
71 |
72 |
73 |
74 |
75 |
76 | 发布公告
77 |
99 |
100 | 公告列表
101 |
102 |
103 |
104 | 序号 |
105 | 主题 |
106 | 内容 |
107 | 创建时间 |
108 | 操作 |
109 |
110 |
111 |
112 | ${row.count } |
113 | ${post.title } |
114 | ${post.content } |
115 | ${post.create_time } |
116 |
117 | |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/WebRoot/backstage/postmanager.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="../commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----后台管理
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
41 |
42 |
43 |
44 |
45 |
49 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/WebRoot/backstage/success.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%
3 | String path = request.getContextPath();
4 | String basePath = request.getScheme() + "://"
5 | + request.getServerName() + ":" + request.getServerPort()
6 | + path + "/";
7 | %>
8 |
9 |
10 |
11 |
12 |
13 |
14 | My JSP 'success.jsp' starting page
15 |
16 |
17 |
18 |
19 |
20 |
21 |
24 |
33 |
34 |
35 |
36 |
37 | 操作成功!
38 |
39 |
40 |
--------------------------------------------------------------------------------
/WebRoot/backstage/usermanager.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----后台管理
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | 用户信息
71 |
72 |
73 | 此用户不存在
74 |
75 |
76 |
77 |
78 |
79 | 帐号 |
80 | 姓名 |
81 | 学校 |
82 | 科目 |
83 | 角色 |
84 | 注册时间 |
85 | 状态 |
86 | 操作 |
87 |
88 |
89 | ${u.userName } |
90 | ${u.name } |
91 | ${u.school } |
92 | ${u.subject } |
93 | 教师学生管理员 |
94 | ${u.create_time } |
95 |
96 | 正常冻结 |
97 | |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/WebRoot/commons/taglib.jsp:
--------------------------------------------------------------------------------
1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
4 |
5 |
--------------------------------------------------------------------------------
/WebRoot/css/index.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/css/index.css
--------------------------------------------------------------------------------
/WebRoot/css/kczx.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 0px;
3 | margin: 0px;
4 | color: #303A4F;}
5 |
6 | .left {
7 | border-right: 3px solid #B7BBC4;
8 | width: 230px;
9 | height: 700px;
10 | float: left;
11 | }
12 |
13 | a {
14 | color: #303A4F;
15 | text-decoration: none;
16 | }
17 |
18 | .right {
19 | float: left;
20 | height: 700px;
21 | width: 720px;
22 | }
23 |
24 | input {
25 | width: 150px;
26 | height: 20px;
27 | }
28 |
29 | iframe {
30 | border: 0px;
31 | width: 100%;
32 | height: 100%;
33 | width: 100%;
34 | overflow: hidden;
35 | }
36 |
37 | .kcfl {
38 | border-bottom: 2px solid #B5BCC5;
39 | margin-top: 20px;
40 | width: 135px;
41 | padding: 0px 10px;
42 | margin-top: 20px;
43 | }
44 |
45 | .search {
46 | background: #AFD4EB;
47 | padding: 10px;
48 | }
49 |
50 | .kcfl img {
51 | width: 40px;
52 | vertical-align: middle;
53 | }
54 |
55 | .kcfl font {
56 | font-size: 17px;
57 | margin-left: 20px;
58 | font-weight: bold;
59 | margin-top: 2px;
60 | }
61 |
62 | ul {
63 | padding: 0px;
64 | margin: 0px;
65 | list-style: none;
66 | }
67 |
68 | .left ul {
69 | border: 0px solid red;
70 | }
71 |
72 | .left a {
73 | color: #303A4F;
74 | text-decoration: none;
75 | }
76 |
77 | .left a:HOVER {
78 | color: #AFD4EB;
79 | }
80 |
81 | .left li {
82 | border: 0px solid green;
83 | padding: 7px 10px;
84 | text-align: center;
85 | font-size: 14px;
86 | }
87 |
88 | .title-back {
89 | height: 10px;
90 | background: #2777AD;
91 | }
92 |
93 | h3 {
94 | margin: -16px 0px 0px 10px;
95 | padding: 0px 10px;
96 | background: white;
97 | width: 100px;
98 | color: #303A4F;
99 | }
100 |
101 | .con {
102 | border: 0px solid red;
103 | margin: 15px 0px 15px 10px;
104 | width: 700px;
105 | float: left;
106 | }
107 |
108 | .con li {
109 | width: 220px;
110 | margin: 5px 5px;
111 | text-align: center;
112 | font-size: 13px;
113 | float: left;
114 | }
115 |
116 | .con img {
117 | width: 210px;
118 | padding: 5px;
119 | border: 1px solid #ccc;
120 | }
121 |
122 | .con a {
123 | font-size: 14px;
124 | line-height: 20px;
125 | font-weight: bold;
126 | }
127 |
128 | .con a:HOVER {
129 | color: #2777AD;
130 | }
131 |
132 | .up {
133 | border: 1px sold red;
134 | background: #AFD4EB;
135 | text-align: center;
136 | margin-top: 20px;
137 | width: 100px;
138 | }
139 |
140 | .up img {
141 | vertical-align: middle;
142 | width: 30px;
143 | }
144 |
145 | .up font {
146 | font-size: 14px;
147 | font-weight: bold;
148 | }
149 | #left_add{
150 | width:110px;
151 | margin:20px 0px 0px 55px;
152 | }
--------------------------------------------------------------------------------
/WebRoot/css/rpage.css:
--------------------------------------------------------------------------------
1 | body {
2 | color: #303A4F;
3 | width: 712px;
4 | }
5 |
6 | .title-back {
7 | height: 10px;
8 | background: #2777AD;
9 | }
10 |
11 | h3 {
12 | margin: -16px 0px 0px 10px;
13 | padding: 0px 10px;
14 | background: white;
15 | width: 100px;
16 | text-align: center;
17 | color: #303A4F;
18 | }
19 |
20 | ul,dd {
21 | padding: 0px;
22 | margin: 0px;
23 | list-style: none;
24 | }
25 |
26 | .lie-top {
27 | margin-top: 20px;
28 | text-align: center;
29 | font-size: 16px;
30 | font-weight: bold;
31 | height: 30px;
32 | border-bottom: 3px double #ccc;
33 | }
34 |
35 | .lie {
36 | text-align: left;
37 | font-size: 14px;
38 | height: 17px;
39 | padding: 12px 0px;
40 | border-bottom: 1px dashed #ccc;
41 | }
42 |
43 | .lie-top li,.lie li {
44 | text-align: center;
45 | float: left;
46 | }
47 |
48 | .lie img {
49 | width: 20px;
50 | margin-top: -5px;
51 | padding: 0px 5px;
52 | vertical-align: middle;
53 | }
54 |
55 | .uptext {
56 | width: 300px;
57 | margin: 40px auto;
58 | }
59 |
60 | .uptext button {
61 | margin-left: 180px;
62 | margin-top: 20px;
63 | }
64 |
65 | .liuyan {
66 | border-top: 4px solid #ccc;
67 | margin-top: 20px;
68 | height: 300px;
69 | width: 100%;
70 | padding: 10px 0px 0px 10px;
71 | }
72 |
73 | .liuyan input {
74 | width: 90%;
75 | }
76 |
77 | .liuyan textarea {
78 | width: 90%;
79 | height: 100px;
80 | }
81 |
82 | .liuyan button {
83 | margin: 0px 48%;
84 | width: 50px;
85 | }
86 |
87 | #top-title {
88 | border: 1px solid #ccc;
89 | padding: 10px 10px;
90 | font-size: 16px;
91 | }
92 |
93 | #top-title font,.huifu font {
94 | font-size: 13px;
95 | float: right;
96 | }
97 |
98 | .huifu {
99 | font-size: 14px;
100 | color: gray;
101 | margin-top: 10px;
102 | padding: 10px;
103 | margin-top: 10px;
104 | }
105 | .over{
106 | margin-top:10px;
107 | border: 1px solid #ccc;
108 | height:260px;
109 | overflow: auto;
110 | }
111 |
112 | .huifu li {
113 | border-bottom: 1px dashed #eee;
114 | padding: 5px 0px;
115 | }
116 |
117 | .huifu-text {
118 | line-height: 20px;
119 | color: #303A4F;
120 | }
121 |
122 | .huifu span {
123 | color: #2777AD;
124 | }
125 |
126 | .xhuifu {
127 | padding: 5px 0px;
128 | background: #eee;
129 | }
130 |
131 | .topic-lie {
132 | width: 200px;
133 | height: 100px;
134 | margin: 50px auto;
135 | }
136 |
137 | .test {
138 | border: 1px solid #ccc;
139 | }
140 |
141 | .test-top {
142 | padding: 30px;
143 | border-bottom: 1px solid #ccc;
144 | text-align: center;
145 | }
146 |
147 | .test-top span {
148 | display: none;
149 | color: red;
150 | font-size: 30px;
151 | float: right;
152 | font-weight: bold;
153 | }
154 |
155 | .test-bottom {
156 | font-weight: bold;
157 | padding: 30px;
158 | text-align: center;
159 | padding: 30px;
160 | }
161 |
162 | .worry {
163 | display: none;
164 | float: right;
165 | margin: -10px 20px 0px 0px;
166 | color: red;
167 | font-weight: bold;
168 | float: right;
169 | }
170 |
171 | .right {
172 | display: none;
173 | float: right;
174 | margin: -20px 20px 0px 0px;
175 | color: green;
176 | font-weight: bold;
177 | }
178 |
179 | .test-content {
180 | border-bottom: 1px dashed #ccc;
181 | margin: 0px;
182 | padding: 10px;
183 | }
184 |
185 | .test-content dd {
186 | font-size: 14px;
187 | }
188 |
189 | .test-content dt {
190 | margin-bottom: 10px;
191 | }
192 |
193 | .ninput {
194 | width: 500px;
195 | }
196 |
197 | .add-topic {
198 | margin: 30px auto;
199 | }
200 |
201 | .add-topic td {
202 | padding: 10px 0px;
203 | }
204 |
205 | #tishi {
206 | color: red;
207 | font-size: 14px;
208 | text-align: center;
209 | }
210 |
211 | .tjhomework {
212 | line-height: 40px;
213 | width: 300px;
214 | margin: 30px 250px;
215 | }
216 |
217 | .km {
218 | width: 500px;
219 | margin: 0px 120px;
220 | }
221 |
222 | .wu {
223 | text-align: center;
224 | padding: 50px 0px;
225 | }
--------------------------------------------------------------------------------
/WebRoot/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/1.jpg
--------------------------------------------------------------------------------
/WebRoot/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/2.jpg
--------------------------------------------------------------------------------
/WebRoot/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/3.jpg
--------------------------------------------------------------------------------
/WebRoot/images/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/4.jpg
--------------------------------------------------------------------------------
/WebRoot/images/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/5.jpg
--------------------------------------------------------------------------------
/WebRoot/images/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/6.jpg
--------------------------------------------------------------------------------
/WebRoot/images/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/7.jpg
--------------------------------------------------------------------------------
/WebRoot/images/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/8.jpg
--------------------------------------------------------------------------------
/WebRoot/images/addtopic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/addtopic.png
--------------------------------------------------------------------------------
/WebRoot/images/b4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/b4.jpg
--------------------------------------------------------------------------------
/WebRoot/images/b42.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/b42.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ba6b3c51-336d-4b86-9e68-13409e85ef43-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ba6b3c51-336d-4b86-9e68-13409e85ef43-large.png
--------------------------------------------------------------------------------
/WebRoot/images/blockbullets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/blockbullets.png
--------------------------------------------------------------------------------
/WebRoot/images/blockheadericon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/blockheadericon.png
--------------------------------------------------------------------------------
/WebRoot/images/book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/book.png
--------------------------------------------------------------------------------
/WebRoot/images/cyy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/cyy.jpg
--------------------------------------------------------------------------------
/WebRoot/images/doc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/doc.png
--------------------------------------------------------------------------------
/WebRoot/images/elearn.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/elearn.jpg
--------------------------------------------------------------------------------
/WebRoot/images/header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/header.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ll.png
--------------------------------------------------------------------------------
/WebRoot/images/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/login.png
--------------------------------------------------------------------------------
/WebRoot/images/logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/logout.png
--------------------------------------------------------------------------------
/WebRoot/images/menuseparator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/menuseparator.png
--------------------------------------------------------------------------------
/WebRoot/images/nav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/nav.png
--------------------------------------------------------------------------------
/WebRoot/images/no-avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/no-avatar.jpg
--------------------------------------------------------------------------------
/WebRoot/images/p1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/p1.jpg
--------------------------------------------------------------------------------
/WebRoot/images/p2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/p2.jpg
--------------------------------------------------------------------------------
/WebRoot/images/p3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/p3.jpg
--------------------------------------------------------------------------------
/WebRoot/images/p4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/p4.jpg
--------------------------------------------------------------------------------
/WebRoot/images/page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/page.png
--------------------------------------------------------------------------------
/WebRoot/images/pageglare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/pageglare.png
--------------------------------------------------------------------------------
/WebRoot/images/pdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/pdf.png
--------------------------------------------------------------------------------
/WebRoot/images/postbullets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/postbullets.png
--------------------------------------------------------------------------------
/WebRoot/images/postemailicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/postemailicon.png
--------------------------------------------------------------------------------
/WebRoot/images/postpdficon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/postpdficon.png
--------------------------------------------------------------------------------
/WebRoot/images/postprinticon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/postprinticon.png
--------------------------------------------------------------------------------
/WebRoot/images/postquote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/postquote.png
--------------------------------------------------------------------------------
/WebRoot/images/ppt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ppt.png
--------------------------------------------------------------------------------
/WebRoot/images/preloader-01.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/preloader-01.gif
--------------------------------------------------------------------------------
/WebRoot/images/register.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/register.png
--------------------------------------------------------------------------------
/WebRoot/images/spacer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/spacer.gif
--------------------------------------------------------------------------------
/WebRoot/images/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/start.png
--------------------------------------------------------------------------------
/WebRoot/images/template_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/template_preview.png
--------------------------------------------------------------------------------
/WebRoot/images/ts010.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts010.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts011.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts011.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts012.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts012.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts014.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts014.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts015.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts015.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts016.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts016.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts022.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts022.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts023.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts023.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ts024.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ts024.jpg
--------------------------------------------------------------------------------
/WebRoot/images/ulogin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/ulogin.png
--------------------------------------------------------------------------------
/WebRoot/images/updatepsw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/updatepsw.png
--------------------------------------------------------------------------------
/WebRoot/images/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/upload.png
--------------------------------------------------------------------------------
/WebRoot/images/userl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/userl.png
--------------------------------------------------------------------------------
/WebRoot/images/xls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/images/xls.png
--------------------------------------------------------------------------------
/WebRoot/js/back.js:
--------------------------------------------------------------------------------
1 | var zhflag=true;//帐号是否可用
2 |
3 |
4 | $(function(){
5 | $('.search button:eq(0)').click(function(){//点击第一个查询按钮
6 | var userName=$("input[name=userName] :eq(0)").val();
7 | if(userName!=""){
8 | main.location.href="servlet/UserServlet?type=search&userName="+userName;
9 | }
10 | });
11 | $('.search button:eq(1)').click(function(){//点击第二个按钮,添加老师
12 | main.location.href="backstage/adduser.jsp";
13 | });
14 | $("#op button:eq(0)").click(function(){//点击初始化密码
15 | var userName=$("#userName").html();
16 | $.ajax({
17 | type: "post",
18 | url: ctx+"/servlet/UserServlet",
19 | dataType: "text",
20 | data:"type=csh&userName="+userName,
21 | success:function(flag){
22 | if(flag=1)
23 | alert("操作成功!");
24 | }
25 | });
26 | });
27 | });
28 |
29 | /**
30 | * 1:解冻 2:冻结
31 | * */
32 | function jie(d){
33 | var userName=$("#userName").html();
34 | $.ajax({
35 | type: "post",
36 | url: ctx+"/servlet/UserServlet",
37 | dataType: "text",
38 | data:"type=del&d="+d+"&userName="+userName,
39 | success:function(flag){
40 | if(flag=1)
41 | window.location.reload();
42 | }
43 | });
44 | }
45 | /**
46 | * 检测
47 | * @param p 1:检测帐号是否存在 2:添加
48 | */
49 | function check(p) {
50 | var userName = document.getElementsByName("userName")[0].value;
51 | if(p==1){
52 | $.ajax({
53 | type: "post",
54 | url: ctx+"/servlet/LoginServlet",
55 | data:"p=zh&userName="+userName,
56 | success:function(data){
57 | if(data==0){//帐号不可用
58 | $("#tishi").html("*帐号已存在");
59 | zhflag=false;
60 | }else{
61 | $("#tishi").html("");
62 | zhflag=true;
63 | }
64 | }
65 | });
66 | }else{
67 | if(zhflag){
68 | var name = document.getElementsByName("name")[0].value;
69 | var school = document.getElementsByName("school")[0].value;
70 | var ele;
71 | var flag;
72 | for(var i=0;i<$("input[name=subject]").length;i++){
73 | ele=document.getElementsByName("subject")[i];
74 | if(ele.checked){
75 | flag=true;
76 | return;
77 | }else{
78 | flag=false;
79 | }
80 | }
81 | if (userName == "") {
82 | document.getElementById("tishi").innerHTML = "*帐号不能为空!";
83 | } else if (name == "") {
84 | document.getElementById("tishi").innerHTML = "*姓名不能为空!";
85 | }else if (school == "") {
86 | document.getElementById("tishi").innerHTML = "*学校不能为空!";
87 | }else if (!flag) {
88 | document.getElementById("tishi").innerHTML = "*科目不能为空!";
89 | }else{
90 | return true;
91 | }
92 | return false;
93 | }else{
94 | $("#tishi").html("*帐号已存在");
95 | return false;
96 | }
97 | }
98 | }
99 |
100 | /**
101 | * 发布公告检测
102 | */
103 | function postcheck() {
104 | var title = document.getElementsByName("title")[0].value;
105 | var content = document.getElementsByName("content")[0].value;
106 | if (title == "") {
107 | document.getElementById("tishi").innerHTML = "*主题不能为空!";
108 | } else if (content == "") {
109 | document.getElementById("tishi").innerHTML = "*内容不能为空!";
110 | }else{
111 | $.ajax({
112 | type: "post",
113 | url: ctx+"/servlet/PostServlet?type=fb",
114 | data:$("#addpost").serialize(),
115 | success:function(){
116 | window.location.reload();
117 | }
118 | });
119 | }
120 | return false;
121 | }
122 | /**
123 | * 删除公告
124 | * @param id
125 | */
126 | function delpost(id){
127 | $.ajax({
128 | type: "post",
129 | url: ctx+"/servlet/PostServlet?type=del",
130 | data:"id="+id,
131 | success:function(data){
132 | if(data==1){
133 | window.location.reload();
134 | }
135 | }
136 | });
137 | }
--------------------------------------------------------------------------------
/WebRoot/js/bbs.js:
--------------------------------------------------------------------------------
1 | var course;//工程名
2 | //页面加载调用方法获取工程名
3 | function can(c){
4 | course=c;
5 | }
6 |
7 |
8 | $(function(){
9 | $('.search button:eq(0)').click(function(){//点击第一个搜索按钮,按主题搜索
10 | var title=$("input[name=search] :eq(0)").val();
11 | if(title!=""){
12 | main.location.href=course+"/servlet/BbsServlet?type=search&p=title&index=1&title="+title;
13 | }
14 | });
15 |
16 | $('.search button:eq(1)').click(function(){//点击第二个搜索按钮,按科目搜索
17 | var subject=$("input[name=search] :eq(1)").val();
18 | if(subject!=""){
19 | main.location.href=course+"/servlet/BbsServlet?type=search&p=subject&index=1&subject="+subject;
20 | }
21 | });
22 | });
23 |
24 | function changePage(p,subject,title){
25 | var val = $("#allPageSelect").val();
26 | var pageIndex=val.substring(0,val.indexOf("/"));//当前页码
27 | window.location.href=course+"/servlet/BbsServlet?type=search&p="+p+"&subject="+subject+"&title="+title+"&index="+pageIndex;
28 |
29 | }
30 |
31 | /**
32 | * 检测
33 | * @param p 1:发表新贴 2:发表回复
34 | */
35 | function check(p,id) {
36 | var content = document.getElementsByName("content")[0].value;
37 | if(p==1){//新帖
38 | var title = document.getElementsByName("title")[0].value;
39 | var subject = document.getElementsByName("subject")[0].value;
40 | if (title == "") {
41 | document.getElementById("tishi").innerHTML = "*主题内容不能为空!";
42 | } else if (subject == "") {
43 | document.getElementById("tishi").innerHTML = "*科目不能为空!";
44 | }else if (content == "") {
45 | document.getElementById("tishi").innerHTML = "*内容不能为空!";
46 | }else{
47 | $.ajax({
48 | type: "post",
49 | url: course+"/servlet/BbsServlet?type=addbbs",
50 | dataType: "text",
51 | data:$("#addbbs").serialize(),
52 | success:function(data){
53 | if(data==1){
54 | window.location.href=course+"/servlet/BbsServlet?type=search&p=all&index=1";
55 | }
56 | }
57 | });
58 | }
59 | return false;
60 | }else{//回复
61 | if (content == "") {
62 | document.getElementById("tishi").innerHTML = "*内容不能为空!";
63 | }else{
64 | $.ajax({
65 | type: "post",
66 | url: course+"/servlet/BbsServlet?type=addreply&id="+id,
67 | dataType: "text",
68 | data:"content="+content,
69 | success:function(data){
70 | if(data==1){
71 | window.location.href=course+"/servlet/BbsServlet?type=dan&id="+id;
72 | }
73 | }
74 | });
75 | }
76 | return false;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/WebRoot/js/homework.js:
--------------------------------------------------------------------------------
1 | var course;//工程名
2 | var quanXuan=false;//已全选
3 |
4 | //页面加载调用方法获取工程名
5 | function can(c){
6 | course=c;
7 | }
8 |
9 |
10 | $(function(){
11 | $('#allPageSelect').change(function(){
12 | // 1、当前选中的option的value属性
13 | var val = $(this).val();
14 | var pageIndex=val.substring(0,val.indexOf("/"));//当前页码
15 | window.location.href=course+"/servlet/UploadServlet?type=all&index="+pageIndex;
16 | });
17 | $('#myPageSelect').change(function(){
18 | // 1、当前选中的option的value属性
19 | var val = $(this).val();
20 | var pageIndex=val.substring(0,val.indexOf("/"));//当前页码
21 | window.location.href=course+"/servlet/UploadServlet?type=my&index="+pageIndex;
22 | });
23 | //---------------------------点击全选
24 | $('.collect button:eq(0)').click(function(){
25 | var length=document.getElementsByName("checkbox").length;
26 | if(!quanXuan){//未全选
27 | for(var i=0;i◎"+title+"");
17 | }
18 | }
19 | });
20 |
21 | });
22 |
23 | /**
24 | * 注册 P:1登录 0注册 2 注销 3 修改密码
25 | */
26 | function register(p) {
27 | if(p==0){
28 | $("#art-main").css({
29 | "filter" : "alpha(opacity = 50)",
30 | "-moz-opacity" : " 0.5",
31 | "-khtml-opacity" : "0.5",
32 | "opacity" : " 0.5"
33 | });
34 | $(".register").show();
35 | }else if(p==1){
36 | var userName=document.getElementsByName("userName")[0].value;
37 | var password=document.getElementsByName("password")[0].value;
38 | if(userName!="" && password!=""){
39 | $(".login").submit();
40 | }
41 | }else if(p==2){
42 | $.ajax({
43 | type: "post",
44 | url: "servlet/LoginServlet",
45 | data:"p=logout",
46 | success:function(data){
47 | window.location.reload();
48 | }
49 | });
50 | }else if(p==3){
51 | $("#art-main").css({
52 | "filter" : "alpha(opacity = 50)",
53 | "-moz-opacity" : " 0.5",
54 | "-khtml-opacity" : "0.5",
55 | "opacity" : " 0.5"
56 | });
57 | $(".psw").show();
58 | }
59 | }
60 | /**
61 | * 检验注册信息
62 | * p:1 检测帐号是否重复 2:检测注册信息 3:修改密码
63 | */
64 | function check(p){
65 |
66 | if(p==1){
67 | var userName=document.getElementsByName("userName")[1].value;
68 | $.ajax({
69 | type: "post",
70 | url: "servlet/LoginServlet",
71 | data:"p=zh&userName="+userName,
72 | success:function(data){
73 | if(data==0){//帐号不可用
74 | $("#text").html("*帐号已存在");
75 | zhflag=false;
76 | }else{
77 | $("#text").html("");
78 | zhflag=true;
79 | }
80 | }
81 | });
82 | }else if(p==2){
83 | var userName=document.getElementsByName("userName")[1].value;
84 | var school=document.getElementsByName("school")[0].value;
85 | var name=document.getElementsByName("name")[0].value;
86 | var psd=document.getElementsByName("psd")[0].value;
87 | var repassword=document.getElementsByName("repassword")[0].value;
88 | //alert(school+"-------"+name);
89 | //alert(psd+"-------"+psd);
90 | if(userName!=""&&school!=""&&name!=""&&psd!=""&&repassword!=""){//如果信息都不为空
91 | if(userName.length<6||userName.length>12||psd.length<6||psd.length>12){
92 | $("#text").html("*帐号密码长度需小于6或大于12");
93 | return false;
94 | }
95 | if(!zhflag){
96 | $("#text").html("*帐号已存在");
97 | return false;
98 | }
99 | if(psd==repassword){
100 | return true;
101 | }else{
102 | $("#text").html("*密码不一致");
103 | return false;
104 | }
105 | }else{
106 | $("#text").html("*填写信息不完整");
107 | return false;
108 | }
109 | }else if(p==3){
110 | var yuanpsw=document.getElementsByName("yuanpsw")[0].value;
111 | var xinpsw=document.getElementsByName("xinpsw")[0].value;
112 | var querepsw=document.getElementsByName("querepsw")[0].value;
113 | if(xinpsw.length<6||xinpsw.length>12){
114 | $("#text2").html("*密码长度需小于6或大于12");
115 | }else if(xinpsw!=querepsw){
116 | $("#text2").html("*密码不一致");
117 | }else{
118 | $.ajax({
119 | type: "post",
120 | url: "servlet/UserServlet?type=updatepsw",
121 | data:$("#updatepsw").serialize(),
122 | success:function(data){
123 | if(data==0){
124 | $("#text2").html("*密码不正确,修改失败!");
125 | }else{
126 | alert("密码修改成功!");
127 | window.location.reload();
128 | }
129 | }
130 | });
131 | }
132 | return false;
133 | }
134 | }
--------------------------------------------------------------------------------
/WebRoot/js/test.js:
--------------------------------------------------------------------------------
1 | var course;//工程名
2 | //页面加载调用方法获取工程名
3 | function can(c){
4 | course=c;
5 | }
6 |
7 | /**
8 | * 页面加载
9 | */
10 | $(function(){
11 | $('.search button').click(function(){//点击搜索按钮
12 | var subject=$("input[name=search]").val();
13 | if(subject!=""){
14 | main.location.href=course+"/servlet/TestServlet?type=search&subject="+encodeURIComponent(subject);
15 | }
16 | });
17 | });
18 |
19 | /**
20 | *提交试卷
21 | */
22 | function tijiao(test_id) {
23 | var flag=true;//选项为空标记
24 | var qrFlag=true;//确认提交标记
25 | var myanswer="";//我的答案。用逗号隔开
26 | var radio;
27 | for(var j=1;j<=10;j++){
28 | radio=document.getElementsByName("topic"+j);
29 | for(var i=0;i
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 试卷
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 添加题目
29 |
81 |
82 |
83 |
84 |
85 | 修改题目
86 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/WebRoot/jsp/bbs.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 师生留言
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 计算机类
30 |
31 |
32 | - 回复量
33 | - 标题
34 | - 作者
35 | - 创建时间
36 |
37 |
38 |
39 | - ${row.count }
40 | - ${bbs.title
42 | }
43 |
44 | - ${bbs.name }
45 | - ${bbs.create_time }
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
首页 上一页 下一页 尾页
57 |
69 |
70 |
71 |
83 |
84 |
85 |
86 |
87 | 抱歉~暂无此类讨论
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/WebRoot/jsp/bbsdan.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 师生留言
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 计算机类
29 |
30 | ${bbs.title }
31 |
作者:${bbs.name} ${bbs.create_time }
32 |
${bbs.content }
33 |
34 |
35 |
36 |
37 |
38 |
39 | ${reply.name } 回复:${reply.create_time }
40 |
41 |
42 |
${reply.content }
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 我要回复:
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/WebRoot/jsp/chaoshi.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="../commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 |
15 | My JSP 'success.jsp' starting page
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
41 |
42 |
56 |
57 |
58 |
59 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/WebRoot/jsp/chuti.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
6 | %>
7 |
8 |
9 |
10 |
11 |
12 | 精品课程网----在线出题
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
31 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |

58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/WebRoot/jsp/communication.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
6 | %>
7 |
8 |
9 |
10 |
11 |
12 | 精品课程网----师生互动
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
32 |
50 |
51 |
52 |
53 |
54 |
55 | 主题:
56 |
57 |
58 |
59 | 科目:
60 |
61 |
62 |
63 |
64 |
课程分类
65 |
66 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/WebRoot/jsp/coursecenter.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 |
4 | <%
5 | String path = request.getContextPath();
6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
7 | %>
8 |
9 |
10 |
11 |
12 |
13 | 精品课程网----课程中心
14 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
32 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
课程分类
60 |
61 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/WebRoot/jsp/coursevideo.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 |
4 | <%
5 | String path = request.getContextPath();
6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
7 | %>
8 |
9 |
10 |
11 |
12 | 课程视频
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
科学与技术
25 |
33 |
34 |
35 |
36 |
社会与文化
37 |
45 |
46 |
47 |
48 |
自我与人生
49 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/WebRoot/jsp/download.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----资料下载
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
33 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
课程分类
61 |
62 |
80 |
81 |
82 |

83 |
84 |
85 |
86 |
87 |
88 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/WebRoot/jsp/myupload.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 上传文件
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | 我的上传
27 |
28 |
29 | - 序号
30 | - 文件名
31 | - 上传人
32 | - 大小
33 | - 操作
34 |
35 |
37 |
38 | - ${row.count }
39 |
${upload.title }
41 | - ${upload.name }
42 | - ${upload.size }
43 | - 下载
45 | 删除
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
首页 上一页 下一页 尾页
57 |
69 |
70 |
71 | 上传文件
72 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/WebRoot/jsp/onlinetest.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
6 | %>
7 |
8 |
9 |
10 |
11 |
12 | 精品课程网----在线测试
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
31 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
课程分类
59 |
60 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/WebRoot/jsp/postdetail.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 师生留言
14 |
15 |
16 |
17 |
18 |
19 |
20 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
${p.title }
60 |
发布时间:${p.create_time }
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/WebRoot/jsp/shouhomework.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----资料下载
15 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
27 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | 最近一次
47 |
48 |
49 |
50 | 布置日期:${requestScope.give_time }
51 |
52 |
53 |
54 | 科目:${subject }提交人数:${requestScope.countList[row.index] }人
55 |
56 | 未提交人:${requestScope.weiNamesList[row.index] }
57 |
58 |
59 |
60 |
61 |
62 |
63 | 还没有同学交作业哦~
64 |
65 |
66 |
67 |
68 |
69 |
70 | ${requestScope.give_time }
71 |
72 |
73 |
74 | 提交人数:${requestScope.count }人
75 |
76 | 未提交人:
77 | ${weiUser.name }、
78 |
79 |
80 |
81 |
82 |
83 |
84 | - 序号
85 | - 科目
86 | - 姓名
87 | - 提交日期
88 | - 操作
89 |
90 |
92 |
100 |
101 |
102 |
103 | 该天没有布置${param.subject }作业哦~
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/WebRoot/jsp/success.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%
3 | String path = request.getContextPath();
4 | String basePath = request.getScheme() + "://"
5 | + request.getServerName() + ":" + request.getServerPort()
6 | + path + "/";
7 | %>
8 |
9 |
10 |
11 |
12 |
13 |
14 | My JSP 'success.jsp' starting page
15 |
16 |
17 |
18 |
19 |
20 |
21 |
24 |
36 |
37 |
38 |
39 |
40 | 操作成功!
41 | 返回
42 |
43 |
44 |
--------------------------------------------------------------------------------
/WebRoot/jsp/test.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 试卷
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
25 |
26 |
27 |
28 |
29 |
30 | 计算机类
31 |
32 |
33 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/WebRoot/jsp/testlie.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 试卷列表
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 计算机类
26 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/WebRoot/jsp/tijiaohomework.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 |
14 | 精品课程网----资料下载
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
25 |
27 |
28 |
29 |
30 |
31 |
32 | 我的作业
33 |
34 |
35 |
36 | - 序号
37 | - 科目
38 | - 布置日期
39 | - 提交日期
40 | - 操作
41 |
42 |
43 |
44 |
45 | - ${row.count }
46 | - ${homeWork.subject }
47 | - ${homeWork.give_time }
48 | - ${homeWork.submit_time }
49 | - 下载
50 |
51 |
52 |
53 |
54 |
55 |
56 | 暂无提交记录
57 |
58 |
59 |
60 |
61 | 提交作业
62 |
85 |
86 |
--------------------------------------------------------------------------------
/WebRoot/jsp/topic.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 试卷列表
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 文学类
26 |
27 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/WebRoot/jsp/topicmanager.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 试题管理
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 我出的题
28 |
29 |
30 |
31 | - 序号
32 | - 题目
33 | - 难度
34 | - 更新时间
35 | - 操作
36 |
37 |
39 |
40 | - ${row.count }
41 | - ${topic.title}
42 | - ${topic.difficulty }
43 | - ${topic.update_time }
44 | -
45 |
46 |
47 |
48 |
49 |
50 |
51 |
首页 上一页 下一页 尾页
55 |
67 |
68 |
69 |
70 | 暂无相关题目
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/WebRoot/jsp/upordown.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 上传下载
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 计算机类
30 |
31 |
32 | - 序号
33 | - 文件名
34 | - 上传人
35 | - 大小
36 | - 操作
37 |
38 |
40 |
41 | - ${row.count }
42 |
${upload.title }
44 | - ${upload.name }
45 | - ${upload.size }
46 | - 下载
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
首页 上一页 下一页 尾页
62 |
74 |
75 |
76 |
77 |
78 | 抱歉~没有此类资料
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/WebRoot/jsp/wenxue.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@include file="/commons/taglib.jsp"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme() + "://"
6 | + request.getServerName() + ":" + request.getServerPort()
7 | + path + "/";
8 | %>
9 |
10 |
11 |
12 |
13 | 课程视频
14 |
15 |
16 |
17 |
18 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
文学人类学概说 叶舒宪 (共31课时)
42 | 《文学人类学概说》把握住人类学与知识全球化、后现代认识论的关系,从人类学与文学的相互作用这个新角度着眼,透析出20世纪文学创作观念变革与文学研究的范式革新的一个重要学术思想动力。本课程通过对文学人类学内涵的深刻阐释,充分描绘了文学与社会更深层次的关联;对于四重证据法以及文学人类学与比较文学的关系,叶舒宪教授也进行了极其生动的讲解,从而帮助对于文学人类学有兴趣...
43 |
44 | 学习要求:本课程需要在线学习41集视频(20分钟/集),根据要求按时在线完成课后作业和考试,最终得到教务处确认的综合成绩达到60分以上者,可以认定相应学分。
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/WebRoot/video/001.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oyai32/course/de66daf288c0b8fc64cf2889411c003c4fdc3743/WebRoot/video/001.mp4
--------------------------------------------------------------------------------
/src/biz/IBbsBiz.java:
--------------------------------------------------------------------------------
1 | package biz;
2 |
3 | import java.util.List;
4 |
5 | import model.Bbs;
6 | import model.Reply;
7 |
8 | public interface IBbsBiz {
9 | /**
10 | * 创建新帖
11 | */
12 | public boolean createBbs(String title, String subject, String content, int u_id) ;
13 | /**
14 | * 查询单条内容
15 | */
16 | public Bbs selDanBbs(int bbs_id);
17 | /**
18 | * 添加回复
19 | */
20 | public boolean addReply( int u_id,int bbs_id,String content);
21 | /**
22 | * 搜索帖子
23 | * p:搜索类型
24 | */
25 | public List selBbs(String sql);
26 | /**
27 | * 查询贴下所有回复
28 | */
29 | public List selReply(int bbs_id);
30 | /**
31 | * 查询帖子个数
32 | */
33 | public int countBbs(String sql);
34 | }
--------------------------------------------------------------------------------
/src/biz/IHomeWorkBiz.java:
--------------------------------------------------------------------------------
1 | package biz;
2 |
3 | import java.util.List;
4 |
5 | import model.HomeWork;
6 | import model.User;
7 |
8 | public interface IHomeWorkBiz {
9 | /**
10 | * 查询作业
11 | */
12 | public List selHomeWork(String sql);
13 |
14 | /**
15 | * 提交作业
16 | */
17 | public boolean addHomeWork(String subject, String give_time, int u_id,
18 | String consignee, String filename);
19 |
20 | /**
21 | * 提交人数
22 | */
23 | public int countCollect(String sql);
24 |
25 | /**
26 | * 未交人
27 | */
28 | public List weiUsers(String sql);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/biz/IPostBiz.java:
--------------------------------------------------------------------------------
1 | package biz;
2 |
3 | import java.util.List;
4 |
5 | import model.Post;
6 |
7 | public interface IPostBiz {
8 | /**
9 | * 发布公告
10 | */
11 | public boolean fbPost(String title, String content);
12 |
13 | /**
14 | * 删除公告
15 | */
16 | public boolean delPost(int post_id);
17 |
18 | /**
19 | * 公告列表
20 | */
21 | public List selPost(String sql);
22 | /**
23 | * 查询单个公告详情
24 | */
25 | public Post selPost(int post_id);
26 | }
27 |
--------------------------------------------------------------------------------
/src/biz/ITestBiz.java:
--------------------------------------------------------------------------------
1 | package biz;
2 |
3 | import java.util.List;
4 |
5 | import model.Test;
6 | import model.Topic;
7 |
8 | public interface ITestBiz {
9 | /**
10 | * 查询试卷科目 如:c语言
11 | */
12 | public List selTopic(String sql);
13 |
14 | /**
15 | * 生成试卷,存入试卷表
16 | * @return
17 | */
18 | public boolean createTest( String test_id,int u_id,List topicLists);
19 |
20 | /**
21 | * 将我的答案插入答案表
22 | */
23 | public boolean addAnswer( String test_id,String myanswer,int u_id);
24 |
25 | /**
26 | * 查找单个试卷对象
27 | */
28 | public Test selDanTest(String sql);
29 | }
30 |
--------------------------------------------------------------------------------
/src/biz/ITopicBiz.java:
--------------------------------------------------------------------------------
1 | package biz;
2 |
3 | import java.util.List;
4 |
5 | import model.Topic;
6 |
7 | public interface ITopicBiz {
8 | /**
9 | * 添加题目
10 | */
11 | public boolean addTopic(String subject, String title, String optiona,
12 | String optionb, String optionc, String optiond, String answer,
13 | String difficulty, int u_id);
14 |
15 | /**
16 | * 删除题目
17 | */
18 | public boolean delTopic(int t_id);
19 |
20 | /**
21 | * 修改题目
22 | */
23 | public boolean updateTopic(int t_id, String subject, String title,
24 | String optiona, String optionb, String optionc, String optiond,
25 | String answer, String difficulty) ;
26 |
27 | /**
28 | * 根据题目,查询题目
29 | */
30 | public List selTopic(String sql,String title) ;
31 |
32 | /**
33 | * 查询所有题目
34 | */
35 | public List selTopic(String sql,int u_id,int pageIndex,int pageSize);
36 | /**
37 | * 查询题目个数
38 | */
39 | public int countTopic(String sql) ;
40 |
41 | /**
42 | * 按查询单个题目
43 | */
44 | public Topic selOneTopic(String sql,int t_id);
45 | }
46 |
--------------------------------------------------------------------------------
/src/biz/IUpDownBiz.java:
--------------------------------------------------------------------------------
1 | package biz;
2 |
3 | import java.util.List;
4 |
5 | import model.Upload;
6 |
7 | public interface IUpDownBiz {
8 | /**
9 | * 上传文件
10 | *
11 | * @return
12 | */
13 | public boolean upFile(String subject, String title, String path,
14 | String ext, int u_id, String size) ;
15 |
16 | /**
17 | * 查询所有文件
18 | *
19 | * @return
20 | */
21 | public List selUpload(String sql) ;
22 |
23 | /**
24 | * 删除文件
25 | */
26 | public boolean delUpload(int upload_id);
27 | /**
28 | * 查询文件个数
29 | */
30 | public int countUpload(String sql);
31 | }
32 |
--------------------------------------------------------------------------------
/src/biz/IUserBiz.java:
--------------------------------------------------------------------------------
1 | package biz;
2 |
3 | import model.User;
4 |
5 | public interface IUserBiz {
6 |
7 | /**
8 | * 用户注册
9 | */
10 | public boolean register(String userName, String password, String name,
11 | String school);
12 |
13 | /**
14 | * 根据帐号密码查询用户,返回用户(判断登录)
15 | */
16 | public User login(String sql);
17 |
18 | /**
19 | * 添加教师用户
20 | */
21 | public boolean addTeacher(String username, String password, String name,
22 | String school, String subject);
23 |
24 | /**
25 | * 根据查询单个用户
26 | */
27 | public User selUser(String sql);
28 |
29 | /**
30 | * 冻结用户
31 | */
32 | public boolean delUser(String userName, int d);
33 |
34 | /**
35 | * 初始化密码
36 | */
37 | public boolean cshPassword(String userName);
38 |
39 | /**
40 | * 查询此帐号
41 | */
42 | public boolean cxzh(String userName);
43 |
44 | /**
45 | * 修改密码
46 | */
47 | public boolean updatepsw(String userName, String yuanpsw, String xinpsw);
48 | }
49 |
--------------------------------------------------------------------------------
/src/biz/impl/BbsBizImpl.java:
--------------------------------------------------------------------------------
1 | package biz.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 | import biz.IBbsBiz;
7 |
8 |
9 | import dao.IBbsDao;
10 | import dao.impl.BbsDaoImpl;
11 |
12 | import model.Bbs;
13 | import model.Reply;
14 |
15 | public class BbsBizImpl implements IBbsBiz {
16 | IBbsDao bd=new BbsDaoImpl();
17 | /**
18 | * 创建新帖
19 | */
20 | public boolean createBbs(String title, String subject, String content, int u_id) {
21 | if(bd.createBbs(title, subject, content, u_id)>0){
22 | return true;
23 | }else{
24 | return false;
25 | }
26 |
27 | }
28 | /**
29 | * 查询单条内容
30 | */
31 | public Bbs selDanBbs(int bbs_id){
32 | String sql="select b.*,u.name from bbs b,user u where b.u_id=u.u_id and bbs_id="+bbs_id;
33 | Bbs bbs=bd.selDanBbs(sql);
34 | if(bbs!=null){
35 | return bbs;
36 | }else{
37 | return null;
38 | }
39 | }
40 | /**
41 | * 添加回复
42 | */
43 | public boolean addReply( int u_id,int bbs_id,String content) {
44 | if(bd.addReply(u_id, bbs_id, content)>0){
45 | return true;
46 | }else{
47 | return false;
48 | }
49 | }
50 | /**
51 | * 搜索帖子
52 | * p:搜索类型
53 | */
54 | public List selBbs(String sql) {
55 | List list=bd.selBbs(sql);
56 | return list;
57 | }
58 | /**
59 | * 查询贴下所有回复
60 | */
61 | public List selReply(int bbs_id) {
62 | List list = bd.selReply(bbs_id);
63 | if(list.size()>0){
64 | return list;
65 | }else{
66 | return null;
67 | }
68 | }
69 | /**
70 | * 查询帖子个数
71 | */
72 | public int countBbs(String sql){
73 | return bd.countBbs(sql);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/biz/impl/HomeWorkBizImpl.java:
--------------------------------------------------------------------------------
1 | package biz.impl;
2 |
3 | import java.util.List;
4 |
5 | import biz.IHomeWorkBiz;
6 |
7 |
8 | import dao.IHomeWorkDao;
9 | import dao.impl.HomeWorkDaoImpl;
10 |
11 | import model.HomeWork;
12 | import model.User;
13 |
14 | public class HomeWorkBizImpl implements IHomeWorkBiz {
15 | IHomeWorkDao hd = new HomeWorkDaoImpl();
16 |
17 | /**
18 | * 查询作业
19 | */
20 | public List selHomeWork(String sql) {
21 | List list = hd.selHomeWork(sql);
22 | if (list.size() > 0) {
23 | return list;
24 | }
25 | return null;
26 | }
27 |
28 | /**
29 | * 提交作业
30 | */
31 | public boolean addHomeWork(String subject, String give_time, int u_id,
32 | String consignee, String filename) {
33 | if (hd.addHomeWork(subject, give_time, u_id, consignee, filename) > 0) {
34 | return true;
35 | } else {
36 | return false;
37 | }
38 | }
39 |
40 | /**
41 | * 提交人数
42 | */
43 | public int countCollect (String sql){
44 | return hd.countCollect(sql);
45 | }
46 | /**
47 | * 未交人
48 | */
49 | public List weiUsers(String sql){
50 | List list=hd.weiUsers(sql);
51 | if(list.size()>0){
52 | return list;
53 | }else{
54 | return null;
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/biz/impl/PostBizImpl.java:
--------------------------------------------------------------------------------
1 | package biz.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 |
7 | import dao.IPostDao;
8 | import dao.impl.PostDaoImpl;
9 |
10 | import model.Post;
11 | import biz.IPostBiz;
12 |
13 | public class PostBizImpl implements IPostBiz {
14 | IPostDao dao = new PostDaoImpl();
15 |
16 | public boolean fbPost(String title, String content) {
17 | if (dao.fbPost(title, content) > 0) {
18 | return true;
19 | } else {
20 | return false;
21 | }
22 |
23 | }
24 |
25 | public boolean delPost(int post_id) {
26 | if (dao.delPost(post_id) > 0) {
27 | return true;
28 | } else {
29 | return false;
30 | }
31 | }
32 |
33 | public List selPost(String sql) {
34 | List list = dao.selPost(sql);
35 | if (list != null) {
36 | return list;
37 | }
38 | return null;
39 | }
40 | /**
41 | * 查询单个公告详情
42 | */
43 | public Post selPost(int post_id) {
44 | Post post=dao.selPost(post_id);
45 | return post;
46 |
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/src/biz/impl/TestBizImpl.java:
--------------------------------------------------------------------------------
1 | package biz.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 | import biz.ITestBiz;
7 |
8 | import dao.ITestDao;
9 | import dao.impl.TestDaoImpl;
10 |
11 | import model.Test;
12 | import model.Topic;
13 |
14 | public class TestBizImpl implements ITestBiz{
15 | ITestDao td = new TestDaoImpl();
16 |
17 | /**
18 | * 查询试卷科目 如:c语言
19 | */
20 | public List selTopic(String sql) {
21 | List list = td.selTopic(sql);
22 |
23 | return list;
24 |
25 | }
26 |
27 | /**
28 | * 生成试卷,存入试卷表
29 | * @return
30 | */
31 | public boolean createTest( String test_id,int u_id,List topicLists){
32 | String alltopic="";
33 | String allanswer="";
34 | for(int i=0;i0){
42 | return true;
43 | }
44 | return false;
45 | }
46 |
47 | /**
48 | * 将我的答案插入答案表
49 | */
50 | public boolean addAnswer( String test_id,String myanswer,int u_id){
51 | if(td.addAnswer(test_id, myanswer, u_id)>0){
52 | return true;
53 | }
54 | return false;
55 | }
56 |
57 | /**
58 | * 查找单个试卷对象
59 | */
60 | public Test selDanTest(String sql){
61 | Test t= td.selDanTest(sql);
62 | if(t==null){
63 | return null;
64 | }else{
65 | return t;
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/biz/impl/TopicBizImpl.java:
--------------------------------------------------------------------------------
1 | package biz.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 | import biz.ITopicBiz;
7 |
8 | import dao.ITopicDao;
9 | import dao.impl.TopicDaoImpl;
10 | import model.Topic;
11 |
12 |
13 | public class TopicBizImpl implements ITopicBiz {
14 | ITopicDao td = new TopicDaoImpl();
15 |
16 | /**
17 | * 添加题目
18 | */
19 | public boolean addTopic(String subject, String title, String optiona,
20 | String optionb, String optionc, String optiond, String answer,
21 | String difficulty, int u_id) {
22 | if (td.addTopic(subject, title, optiona, optionb, optionc, optiond,
23 | answer, difficulty, u_id) > 0) {
24 | return true;
25 | }
26 | return false;
27 | }
28 |
29 | /**
30 | * 删除题目
31 | */
32 | public boolean delTopic(int t_id) {
33 | if (td.delTopic(t_id) > 0) {
34 | return true;
35 | }
36 | return false;
37 | }
38 |
39 | /**
40 | * 修改题目
41 | */
42 | public boolean updateTopic(int t_id, String subject, String title,
43 | String optiona, String optionb, String optionc, String optiond,
44 | String answer, String difficulty) {
45 | if (td.updateTopic(t_id, subject, title, optiona, optionb, optionc,
46 | optiond, answer, difficulty) > 0) {
47 | return true;
48 | }
49 | return false;
50 | }
51 |
52 | /**
53 | * 根据题目,查询题目
54 | */
55 | public List selTopic(String sql,String title) {
56 | List topicLists=td.selTopic(sql, title);
57 | if(topicLists.size()>0){
58 | return topicLists;
59 | }
60 | return null;
61 | }
62 |
63 | /**
64 | * 查询所有题目
65 | */
66 | public List selTopic(String sql,int u_id,int pageIndex,int pageSize) {
67 | List topicLists=td.selTopic(sql, u_id, pageIndex,pageSize);
68 | if(topicLists.size()>0){
69 | return topicLists;
70 | }
71 | return null;
72 | }
73 | /**
74 | * 查询题目个数
75 | */
76 | public int countTopic(String sql) {
77 | int a=td.countTopic(sql);
78 |
79 | return a;
80 | }
81 |
82 | /**
83 | * 按查询单个题目
84 | */
85 | public Topic selOneTopic(String sql,int t_id) {
86 | Topic t=td.selOneTopic(sql, t_id);
87 | if(t!=null){
88 | return t;
89 | }
90 | return null;
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/biz/impl/UpDownBizImpl.java:
--------------------------------------------------------------------------------
1 | package biz.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 | import biz.IUpDownBiz;
7 |
8 | import model.Upload;
9 | import dao.IUpDownDao;
10 | import dao.impl.UpDownDaoImpl;
11 |
12 | public class UpDownBizImpl implements IUpDownBiz{
13 | IUpDownDao ud = new UpDownDaoImpl();
14 |
15 | /**
16 | * 上传文件
17 | *
18 | * @return
19 | */
20 | public boolean upFile(String subject, String title, String path,
21 | String ext, int u_id, String size) {
22 | if (ud.upFile(subject, title, path, ext, u_id, size) > 0) {
23 | return true;
24 | }
25 | return false;
26 | }
27 |
28 | /**
29 | * 查询所有文件
30 | *
31 | * @return
32 | */
33 | public List selUpload(String sql) {
34 | List list = ud.selUpload(sql);
35 | if (list.size() > 0) {
36 | return list;
37 | } else {
38 | return null;
39 | }
40 | }
41 |
42 | /**
43 | * 删除文件
44 | */
45 | public boolean delUpload(int upload_id) {
46 | if (ud.delUpload(upload_id) > 0) {
47 | return true;
48 | } else {
49 | return false;
50 | }
51 | }
52 | /**
53 | * 查询文件个数
54 | */
55 | public int countUpload(String sql){
56 | return ud.countUpload(sql);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/biz/impl/UserBizImpl.java:
--------------------------------------------------------------------------------
1 | package biz.impl;
2 |
3 | import biz.IUserBiz;
4 |
5 | import model.User;
6 | import dao.IUserDao;
7 | import dao.impl.UserDaoImpl;
8 |
9 | public class UserBizImpl implements IUserBiz{
10 | IUserDao dao = new UserDaoImpl();
11 |
12 | /**
13 | * 用户注册
14 | */
15 | public boolean register(String userName, String password, String name,
16 | String school) {
17 | if (dao.register(userName, password, name, school) > 0) {
18 |
19 | return true;
20 | }
21 | return false;
22 | }
23 |
24 | /**
25 | * 根据帐号密码查询用户,返回用户(判断登录)
26 | */
27 | public User login(String sql) {
28 | User u = dao.login(sql);
29 | if (u != null) {
30 | return u;
31 | }
32 | return null;
33 | }
34 |
35 | /**
36 | * 添加教师用户
37 | */
38 | public boolean addTeacher(String username, String password, String name,
39 | String school, String subject) {
40 | if (dao.addTeacher(username, password, name, school, subject) > 0) {
41 | return true;
42 | }
43 | return false;
44 | }
45 |
46 | /**
47 | * 根据查询单个用户
48 | */
49 | public User selUser(String sql) {
50 | User user = dao.selUser(sql);
51 | return user;
52 | }
53 |
54 | /**
55 | * 冻结用户
56 | */
57 | public boolean delUser(String userName,int d) {
58 | if (dao.delUser(userName,d) > 0) {
59 | return true;
60 | }
61 | return false;
62 | }
63 |
64 | /**
65 | * 初始化密码
66 | */
67 | public boolean cshPassword(String userName) {
68 | if (dao.cshPassword(userName) > 0) {
69 | return true;
70 | }
71 | return false;
72 | }
73 | /**
74 | * 查询此帐号
75 | */
76 | public boolean cxzh(String userName){
77 | if(dao.cxzh(userName)<1){//不存在此帐号
78 | return true;
79 | }
80 | return false;
81 | }
82 | /**
83 | * 修改密码
84 | */
85 | public boolean updatepsw(String userName ,String yuanpsw,String xinpsw){
86 | if(dao.updatepsw(userName, yuanpsw, xinpsw)>0){
87 | return true;
88 | }
89 | return false;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/src/dao/IBbsDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Bbs;
6 | import model.Reply;
7 |
8 | public interface IBbsDao {
9 | /**
10 | * 创建新帖
11 | */
12 | public int createBbs(String title, String subject, String content, int u_id);
13 |
14 | /**
15 | * 添加回复
16 | */
17 | public int addReply(int u_id, int bbs_id, String content);
18 |
19 | /**
20 | * 搜索帖子
21 | */
22 | public List selBbs(String sql) ;
23 |
24 | /**
25 | * 查询单条内容
26 | */
27 | public Bbs selDanBbs(String sql) ;
28 | /**
29 | * 查询帖子个数
30 | */
31 | public int countBbs(String sql);
32 | /**
33 | * 查询贴下所有回复
34 | */
35 | public List selReply(int bbs_id);
36 | }
--------------------------------------------------------------------------------
/src/dao/IHomeWorkDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.HomeWork;
6 | import model.User;
7 |
8 | public interface IHomeWorkDao {
9 | /**
10 | * 查询作业
11 | */
12 | public List selHomeWork(String sql) ;
13 |
14 | /**
15 | * 提交作业
16 | */
17 | public int addHomeWork(String subject,String give_time,int u_id,String consignee,String filename);
18 | /**
19 | * 提交人数
20 | */
21 | public int countCollect (String sql);
22 | /**
23 | * 未交人
24 | */
25 | public List weiUsers(String sql);
26 |
27 | // public List selAll(String name);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/dao/IPostDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 |
6 |
7 | import model.Post;
8 |
9 | public interface IPostDao {
10 | /**
11 | * 发布公告
12 | */
13 | public int fbPost(String title, String content);
14 | /**
15 | * 删除公告
16 | */
17 | public int delPost(int post_id) ;
18 |
19 | /**
20 | * 公告列表
21 | */
22 | public List selPost(String sql);
23 | /**
24 | * 查询单个公告详情
25 | */
26 | public Post selPost(int post_id);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/dao/ITestDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Test;
6 | import model.Topic;
7 |
8 | public interface ITestDao {
9 | /**
10 | * 查询试卷科目 如:c语言
11 | */
12 | public List selTopic(String sql);
13 |
14 | /**
15 | * 生成试卷,存入试卷表
16 | *
17 | * @return
18 | */
19 | public int createTest(String test_id, String alltopic, String allanswer,
20 | int u_id, String subject, String difficulty);
21 |
22 | /**
23 | * 将我的答案插入答案表
24 | */
25 | public int addAnswer(String test_id, String myanswer, int u_id);
26 |
27 | /**
28 | * 查找单个试卷对象
29 | */
30 | public Test selDanTest(String sql);
31 | }
32 |
--------------------------------------------------------------------------------
/src/dao/ITopicDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Topic;
6 |
7 | public interface ITopicDao {
8 | /**
9 | * 添加题目
10 | */
11 | public int addTopic (String subject,String title,String optiona,String optionb,String optionc,String optiond,String answer,String difficulty,int u_id);
12 |
13 | /**
14 | * 删除题目
15 | */
16 | public int delTopic(int t_id);
17 |
18 |
19 | /**
20 | * 修改题目
21 | */
22 | public int updateTopic(int t_id,String subject,String title,String optiona,String optionb,String optionc,String optiond,String answer,String difficulty);
23 |
24 | /**
25 | * 查询题目
26 | */
27 | public List selTopic(String sql,String title) ;
28 | /**
29 | * 查询所有题目
30 | */
31 | public List selTopic(String sql,int u_id,int pageIndex,int pageSize) ;
32 | /**
33 | * 查询题目个数
34 | */
35 | public int countTopic(String sql) ;
36 | /**
37 | * 按查询单个题目
38 | */
39 | public Topic selOneTopic(String sql,int t_id) ;
40 | }
--------------------------------------------------------------------------------
/src/dao/IUpDownDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Upload;
6 |
7 | public interface IUpDownDao {
8 | /**
9 | * 上传文件
10 | *
11 | * @return
12 | */
13 | public int upFile(String subject, String title, String path, String ext,
14 | int u_id, String size);
15 |
16 | /**
17 | * 查询所有文件
18 | *
19 | * @return
20 | */
21 | public List selUpload(String sql);
22 |
23 | /**
24 | * 删除文件
25 | */
26 | public int delUpload(int upload_id);
27 |
28 | /**
29 | * 查询文件个数
30 | */
31 | public int countUpload(String sql);
32 | }
33 |
--------------------------------------------------------------------------------
/src/dao/IUserDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import model.User;
4 |
5 | public interface IUserDao {
6 | /**
7 | * 注册
8 | */
9 | public int register(String userName,String password,String name,String school);
10 |
11 | /**
12 | * 根据帐号密码查询用户,返回用户(判断登录)
13 | */
14 | public User login(String sql);
15 | /**
16 | * 添加教师用户
17 | */
18 | public int addTeacher(String username,String password,String name,String school,String subject);
19 | /**
20 | * 根据查询单个用户
21 | */
22 | public User selUser(String sql);
23 | /**
24 | * 冻结用户
25 | */
26 | public int delUser(String userName,int d);
27 | /**
28 | * 初始化密码
29 | */
30 | public int cshPassword(String userName);
31 | /**
32 | * 查询此帐号
33 | */
34 | public int cxzh(String userName);
35 | /**
36 | * 修改密码
37 | */
38 | public int updatepsw(String userName ,String yuanpsw,String xinpsw);
39 | }
--------------------------------------------------------------------------------
/src/dao/impl/BbsDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 | import dao.IBbsDao;
7 |
8 | import model.Bbs;
9 | import model.Reply;
10 | import util.DBUtils;
11 |
12 | public class BbsDaoImpl implements IBbsDao {
13 | /**
14 | * 创建新帖
15 | */
16 | public int createBbs(String title, String subject, String content, int u_id) {
17 | String sql = "insert into bbs (title,subject,content,u_id,create_time) values(?,?,?,?,CURDATE())";
18 | int a = DBUtils.update(sql, title, subject, content, u_id);
19 | return a;
20 | }
21 |
22 | /**
23 | * 添加回复
24 | */
25 | public int addReply(int u_id, int bbs_id, String content) {
26 | String sql = "insert into reply (u_id,bbs_id,content,create_time) values(?,?,?,now())";
27 | int a = DBUtils.update(sql, u_id, bbs_id, content);
28 | return a;
29 | }
30 |
31 | /**
32 | * 搜索帖子
33 | */
34 | public List selBbs(String sql) {
35 | List list = DBUtils.queryList(sql, Bbs.class);
36 | return list;
37 | }
38 |
39 | /**
40 | * 查询单条内容
41 | */
42 | public Bbs selDanBbs(String sql) {
43 | Bbs bbs = DBUtils.query(sql, Bbs.class);
44 | return bbs;
45 | }
46 | /**
47 | * 查询帖子个数
48 | */
49 | public int countBbs(String sql){
50 | return DBUtils.count(sql);
51 | }
52 | /**
53 | * 查询贴下所有回复
54 | */
55 | public List selReply(int bbs_id) {
56 | String sql = "select r.*,u.name from reply r,user u where r.u_id=u.u_id and bbs_id=?";
57 | List list = DBUtils.queryList(sql, Reply.class, bbs_id);
58 | return list;
59 | }
60 | }
--------------------------------------------------------------------------------
/src/dao/impl/HomeWorkDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 | import dao.IHomeWorkDao;
7 |
8 | import util.DBUtils;
9 |
10 | import model.HomeWork;
11 | import model.User;
12 |
13 | public class HomeWorkDaoImpl implements IHomeWorkDao{
14 | /**
15 | * 查询作业
16 | */
17 | public List selHomeWork(String sql) {
18 | List list = DBUtils.queryList(sql, HomeWork.class);
19 | return list;
20 | }
21 |
22 | /**
23 | * 提交作业
24 | */
25 | public int addHomeWork(String subject,String give_time,int u_id,String consignee,String filename){
26 | String sql="insert into homework (subject,give_time,submit_time,u_id,consignee,filename) values(?,?,CURDATE(),?,?,?)";
27 | return DBUtils.update(sql, subject,give_time,u_id,consignee,filename);
28 | }
29 | /**
30 | * 提交人数
31 | */
32 | public int countCollect (String sql){
33 | return DBUtils.count(sql);
34 | }
35 | /**
36 | * 未交人
37 | */
38 | public List weiUsers(String sql){
39 | return DBUtils.queryList(sql, User.class);
40 | }
41 | // /**
42 | // *
43 | // */
44 | // public List selAll(String name){
45 | // String sql="select subject from user where name=?";
46 | // String subjects=DBUtils.selOne(sql, name).toString();
47 | // String subject[]=subjects.split(",");//该教师所教的科目
48 | // sql="select give_time from homework where consignee=? order by give_time desc limit 0,1";//最近的一次布置日期
49 | // String give_time=DBUtils.selOne(sql, name).toString();
50 | // String count="";//用来装每个科目的未交人数,用逗号隔开
51 | // for(int i=0;i weiUsers= DBUtils.queryList(sql, User.class,name,subject[i],give_time);
56 | //
57 | // }
58 | //
59 | //
60 | // return null;
61 | //
62 | // }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/src/dao/impl/PostDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.util.List;
4 |
5 | import dao.IPostDao;
6 |
7 | import model.Post;
8 | import util.DBUtils;
9 |
10 | public class PostDaoImpl implements IPostDao {
11 |
12 | /**
13 | * 发布公告
14 | *
15 | * @param title
16 | * @param content
17 | * @return
18 | */
19 | public int fbPost(String title, String content) {
20 | String sql = "insert into post (title,content,create_time) values(?,?,now())";
21 | int a = DBUtils.update(sql, title, content);
22 | return a;
23 | }
24 |
25 | /**
26 | * 删除公告
27 | */
28 | public int delPost(int post_id) {
29 | String sql = "delete from post where post_id=?";
30 | int a = DBUtils.update(sql, post_id);
31 | return a;
32 | }
33 |
34 | /**
35 | * 公告列表
36 | */
37 | public List selPost(String sql) {
38 |
39 | List list = DBUtils.queryList(sql, Post.class);
40 | return list;
41 | }
42 |
43 | /**
44 | * 查询单个公告详情
45 | */
46 | public Post selPost(int post_id) {
47 | String sql = "select * from post where post_id=?";
48 | return DBUtils.query(sql, Post.class, post_id);
49 |
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/dao/impl/TestDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.util.List;
4 |
5 |
6 | import dao.ITestDao;
7 |
8 | import util.DBUtils;
9 |
10 | import model.Test;
11 | import model.Topic;
12 |
13 | public class TestDaoImpl implements ITestDao {
14 | /**
15 | * 查询试卷科目 如:c语言
16 | */
17 | public List selTopic(String sql) {
18 | List list=DBUtils.queryList(sql,Topic.class);
19 | return list;
20 | }
21 |
22 | /**
23 | * 生成试卷,存入试卷表
24 | * @return
25 | */
26 | public int createTest( String test_id,String alltopic,String allanswer,int u_id,String subject,String difficulty ){
27 | String sql="insert into test (test_id,alltopic,allanswer,u_id,subject,difficulty,create_time)value(?,?,?,?,?,?,now())";
28 | return DBUtils.update(sql, test_id,alltopic,allanswer,u_id,subject,difficulty);
29 | }
30 |
31 | /**
32 | * 将我的答案插入答案表
33 | */
34 | public int addAnswer( String test_id,String myanswer,int u_id){
35 | String sql="insert into answer (test_id,u_id,myanswer,create_time)value(?,?,?,now())";
36 | return DBUtils.update(sql, test_id,u_id,myanswer);
37 | }
38 | /**
39 | * 查找单个试卷对象
40 | */
41 | public Test selDanTest(String sql){
42 | return DBUtils.query(sql, Test.class);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/dao/impl/TopicDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.util.List;
4 |
5 | import dao.ITopicDao;
6 |
7 |
8 | import model.Topic;
9 |
10 | import util.DBUtils;
11 |
12 | public class TopicDaoImpl implements ITopicDao {
13 | /**
14 | * 添加题目
15 | */
16 | public int addTopic (String subject,String title,String optiona,String optionb,String optionc,String optiond,String answer,String difficulty,int u_id){
17 | String sql="insert into topic (subject,title,optiona,optionb,optionc,optiond,answer,difficulty,update_time,u_id) values(?,?,?,?,?,?,?,?,CURDATE(),?)";
18 | int a=DBUtils.update(sql, subject,title,optiona,optionb,optionc,optiond,answer,difficulty,u_id);
19 | return a;
20 | }
21 |
22 | /**
23 | * 删除题目
24 | */
25 | public int delTopic(int t_id){
26 | String sql="delete from topic where t_id=?";
27 | int a=DBUtils.update(sql, t_id);
28 | return a;
29 | }
30 |
31 |
32 | /**
33 | * 修改题目
34 | */
35 | public int updateTopic(int t_id,String subject,String title,String optiona,String optionb,String optionc,String optiond,String answer,String difficulty){
36 | String sql="update topic set subject=?,title=?,optiona=?,optionb=?,optionc=?,optiond=?,answer=?,difficulty=?,update_time=CURDATE() where t_id=?";
37 | int a=DBUtils.update(sql, subject,title,optiona,optionb,optionc,optiond,answer,difficulty,t_id);
38 | return a;
39 | }
40 |
41 | /**
42 | * 查询题目
43 | */
44 | public List selTopic(String sql,String title) {
45 | List topicLists=DBUtils.queryList(sql,Topic.class, title);
46 | return topicLists;
47 | }
48 | /**
49 | * 查询所有题目
50 | */
51 | public List selTopic(String sql,int u_id,int pageIndex,int pageSize) {
52 | List topicLists=DBUtils.queryList(sql, Topic.class,u_id, pageIndex,pageSize);
53 |
54 | return topicLists;
55 | }
56 | /**
57 | * 查询题目个数
58 | */
59 | public int countTopic(String sql) {
60 | int a=DBUtils.count(sql);
61 | return a;
62 | }
63 | /**
64 | * 按查询单个题目
65 | */
66 | public Topic selOneTopic(String sql,int t_id) {
67 | Topic t=DBUtils.query(sql,Topic.class, t_id);
68 | return t;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/dao/impl/UpDownDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.util.List;
4 |
5 | import dao.IUpDownDao;
6 |
7 | import model.Upload;
8 |
9 | import util.DBUtils;
10 |
11 | /**
12 | * 上传下载
13 | *
14 | * @author Administrator
15 | *
16 | */
17 | public class UpDownDaoImpl implements IUpDownDao {
18 | /**
19 | * 上传文件
20 | *
21 | * @return
22 | */
23 | public int upFile(String subject, String title, String path, String ext,
24 | int u_id, String size) {
25 | String sql = "insert into upload (subject,title,path,ext,u_id,size,upload_time) values(?,?,?,?,?,?,CURDATE())";
26 | return DBUtils.update(sql, subject, title, path, ext, u_id, size);
27 | }
28 |
29 | /**
30 | * 查询所有文件
31 | *
32 | * @return
33 | */
34 | public List selUpload(String sql) {
35 | return DBUtils.queryList(sql, Upload.class);
36 | }
37 | /**
38 | * 删除文件
39 | */
40 | public int delUpload(int upload_id){
41 | String sql="update upload set del=0 where upload_id=?";
42 | return DBUtils.update(sql, upload_id);
43 | }
44 | /**
45 | * 查询文件个数
46 | */
47 | public int countUpload(String sql){
48 | int a=DBUtils.count(sql);
49 | return a;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/dao/impl/UserDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 |
4 | import dao.IUserDao;
5 | import model.User;
6 | import util.DBUtils;
7 |
8 | public class UserDaoImpl implements IUserDao{
9 | /**
10 | * 注册
11 | */
12 | public int register(String userName,String password,String name,String school){
13 | String sql="insert into user(userName,password,name,school,role,create_time) values(?,?,?,?,3,now())";
14 | int a=DBUtils.update(sql, userName,password,name,school);
15 | return a;
16 | }
17 |
18 | /**
19 | * 根据帐号密码查询用户,返回用户(判断登录)
20 | */
21 | public User login(String sql){
22 |
23 | User u=DBUtils.query(sql, User.class);
24 | return u;
25 | }
26 | /**
27 | * 添加教师用户
28 | */
29 | public int addTeacher(String username,String password,String name,String school,String subject){
30 | String sql="insert into user (username,password,name,school,subject,role,create_time) values(?,?,?,?,?,2,now())";
31 | return DBUtils.update(sql, username,password,name,school,subject);
32 | }
33 | /**
34 | * 根据查询单个用户
35 | */
36 | public User selUser(String sql){
37 | User user=DBUtils.query(sql,User.class);
38 | return user;
39 | }
40 | /**
41 | * 冻结用户
42 | */
43 | public int delUser(String userName,int d){
44 | String sql="update user set del=? where userName=?";
45 | return DBUtils.update(sql, d,userName);
46 | }
47 | /**
48 | * 初始化密码
49 | */
50 | public int cshPassword(String userName){
51 | String sql="update user set password =? where userName=?";
52 | return DBUtils.update(sql, "000000",userName);
53 | }
54 | /**
55 | * 查询此帐号
56 | */
57 | public int cxzh(String userName){
58 | String sql="select count(1) from user where userName=?";
59 | return DBUtils.count(sql, userName);//返回条数
60 | }
61 | /**
62 | * 修改密码
63 | */
64 | public int updatepsw(String userName ,String yuanpsw,String xinpsw){
65 | String sql="update user set password=? where userName=? and password=?";
66 | return DBUtils.update(sql, xinpsw,userName,yuanpsw);
67 |
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/database.properties:
--------------------------------------------------------------------------------
1 | ip=localhost
2 | dbname=course
3 | port=3306
4 | account=root
5 | password=root
--------------------------------------------------------------------------------
/src/filter/BackFilter.java:
--------------------------------------------------------------------------------
1 | package filter;
2 |
3 | import java.io.IOException;
4 | import java.util.ArrayList;
5 | import java.util.List;
6 |
7 | import javax.servlet.Filter;
8 | import javax.servlet.FilterChain;
9 | import javax.servlet.FilterConfig;
10 | import javax.servlet.ServletException;
11 | import javax.servlet.ServletRequest;
12 | import javax.servlet.ServletResponse;
13 | import javax.servlet.http.HttpServlet;
14 | import javax.servlet.http.HttpServletRequest;
15 | import javax.servlet.http.HttpServletResponse;
16 | import javax.servlet.http.HttpSession;
17 |
18 | import model.User;
19 |
20 |
21 | public class BackFilter extends HttpServlet implements Filter {
22 |
23 |
24 | private static List list=new ArrayList();
25 |
26 | static{
27 | list.add("/course/backstage/backlogin.jsp");
28 | }
29 | /**
30 | *
31 | */
32 | private static final long serialVersionUID = 1L;
33 |
34 |
35 | public void init(FilterConfig arg0) throws ServletException {
36 |
37 | }
38 | public void doFilter(ServletRequest request, ServletResponse response,
39 | FilterChain filterChain) throws IOException, ServletException {
40 | response.setCharacterEncoding("utf-8");
41 | //获得下面代码中request,response,session对象
42 | HttpServletRequest req = (HttpServletRequest) request;
43 | HttpServletResponse resp=(HttpServletResponse) response;
44 | HttpSession session = req.getSession();
45 | // 获取访问的url
46 | String requestUrl = req.getRequestURI();
47 | //从session里面取用户的用户名
48 | User user=(User)session.getAttribute("user");
49 | //登陆页面无需过滤
50 | String ctxPath = req.getContextPath();
51 | // String[] split = requestUrl.split("/");
52 | if(list.contains(requestUrl)||requestUrl.indexOf(".jpg")>0||requestUrl.indexOf(".png")>0||requestUrl.indexOf(".gif")>0){
53 | filterChain.doFilter(req,resp);
54 | return;
55 | }
56 | //判断如果没有取到用户信息,就跳转到登陆页面
57 | if(user==null||"".equals(user)){
58 | //跳转到登陆页面
59 | resp.sendRedirect(ctxPath+"/backstage/backlogin.jsp");
60 | }else{
61 | //已经登录,继续此次请求
62 | filterChain.doFilter(request,response);
63 | }
64 |
65 |
66 | }
67 | public void destroy(){
68 |
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/src/filter/LoginFilter.java:
--------------------------------------------------------------------------------
1 | package filter;
2 |
3 | import java.io.IOException;
4 | import java.util.ArrayList;
5 | import java.util.List;
6 |
7 | import javax.servlet.Filter;
8 | import javax.servlet.FilterChain;
9 | import javax.servlet.FilterConfig;
10 | import javax.servlet.ServletException;
11 | import javax.servlet.ServletRequest;
12 | import javax.servlet.ServletResponse;
13 | import javax.servlet.http.HttpServlet;
14 | import javax.servlet.http.HttpServletRequest;
15 | import javax.servlet.http.HttpServletResponse;
16 | import javax.servlet.http.HttpSession;
17 |
18 | import model.User;
19 |
20 |
21 | public class LoginFilter extends HttpServlet implements Filter {
22 |
23 |
24 | private static List list=new ArrayList();
25 |
26 | static{
27 | list.add("/course/jsp/coursevideo.jsp");
28 | list.add("/course/index.jsp");
29 | list.add("/course/jsp/coursecenter.jsp");
30 | list.add("/course/jsp/wenxue.jsp");
31 | }
32 | /**
33 | *
34 | */
35 | private static final long serialVersionUID = 1L;
36 |
37 |
38 | public void init(FilterConfig arg0) throws ServletException {
39 |
40 | }
41 | public void doFilter(ServletRequest request, ServletResponse response,
42 | FilterChain filterChain) throws IOException, ServletException {
43 | response.setCharacterEncoding("utf-8");
44 | //获得下面代码中request,response,session对象
45 | HttpServletRequest req = (HttpServletRequest) request;
46 | HttpServletResponse resp=(HttpServletResponse) response;
47 | HttpSession session = req.getSession();
48 | // 获取访问的url
49 | String requestUrl = req.getRequestURI();
50 | //从session里面取用户的用户名
51 | User user=(User)session.getAttribute("user");
52 | //登陆页面无需过滤
53 | String ctxPath = req.getContextPath();
54 | // String[] split = requestUrl.split("/");
55 | if(list.contains(requestUrl)||requestUrl.indexOf(".jpg")>0||requestUrl.indexOf(".png")>0||requestUrl.indexOf(".gif")>0){
56 | filterChain.doFilter(req,resp);
57 | return;
58 | }
59 | //判断如果没有取到用户信息,就跳转到登陆页面
60 | if(user==null||"".equals(user)){
61 | //跳转到登陆页面
62 | resp.sendRedirect(ctxPath+"/index.jsp");
63 | }else{
64 | //已经登录,继续此次请求
65 | filterChain.doFilter(request,response);
66 | }
67 |
68 |
69 | }
70 | public void destroy(){
71 |
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/src/model/Answer.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | /**
4 | * 答案
5 | *
6 | * @author Administrator
7 | *
8 | */
9 | public class Answer {
10 | private int a_id;
11 | private int u_id;
12 | private int test_id;
13 | private String myanswer;
14 | private String create_time;
15 |
16 | public int getA_id() {
17 | return a_id;
18 | }
19 |
20 | public void setA_id(int a_id) {
21 | this.a_id = a_id;
22 | }
23 |
24 | public int getU_id() {
25 | return u_id;
26 | }
27 |
28 | public void setU_id(int u_id) {
29 | this.u_id = u_id;
30 | }
31 |
32 | public int getTest_id() {
33 | return test_id;
34 | }
35 |
36 | public void setTest_id(int test_id) {
37 | this.test_id = test_id;
38 | }
39 |
40 | public String getMyanswer() {
41 | return myanswer;
42 | }
43 |
44 | public void setMyanswer(String myanswer) {
45 | this.myanswer = myanswer;
46 | }
47 |
48 | public String getCreate_time() {
49 | return create_time;
50 | }
51 |
52 | public void setCreate_time(String create_time) {
53 | this.create_time = create_time;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/model/Bbs.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | /**
4 | * 论坛新帖
5 | *
6 | * @author Administrator
7 | *
8 | */
9 | public class Bbs {
10 | private int bbs_id;
11 | private String title;
12 | public String getName() {
13 | return name;
14 | }
15 |
16 | public void setName(String name) {
17 | this.name = name;
18 | }
19 |
20 | private String subject;
21 | private String content;
22 | private int u_id;
23 | private String create_time;
24 | private String name;
25 |
26 | public int getBbs_id() {
27 | return bbs_id;
28 | }
29 |
30 | public void setBbs_id(int bbs_id) {
31 | this.bbs_id = bbs_id;
32 | }
33 |
34 | public String getTitle() {
35 | return title;
36 | }
37 |
38 | public void setTitle(String title) {
39 | this.title = title;
40 | }
41 |
42 | public String getSubject() {
43 | return subject;
44 | }
45 |
46 | public void setSubject(String subject) {
47 | this.subject = subject;
48 | }
49 |
50 | public String getContent() {
51 | return content;
52 | }
53 |
54 | public void setContent(String content) {
55 | this.content = content;
56 | }
57 |
58 | public int getU_id() {
59 | return u_id;
60 | }
61 |
62 | public void setU_id(int u_id) {
63 | this.u_id = u_id;
64 | }
65 |
66 | public String getCreate_time() {
67 | return create_time;
68 | }
69 |
70 | public void setCreate_time(String create_time) {
71 | this.create_time = create_time;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/model/HomeWork.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | public class HomeWork {
4 | private int h_id;
5 | private String subject;
6 | private String give_time;
7 | private String submit_time;
8 | private int u_id;
9 | private String consignee;
10 | private String name;
11 | private String filename;
12 |
13 | public String getName() {
14 | return name;
15 | }
16 |
17 | public void setName(String name) {
18 | this.name = name;
19 | }
20 |
21 | public int getH_id() {
22 | return h_id;
23 | }
24 |
25 | public void setH_id(int h_id) {
26 | this.h_id = h_id;
27 | }
28 |
29 | public String getSubject() {
30 | return subject;
31 | }
32 |
33 | public void setSubject(String subject) {
34 | this.subject = subject;
35 | }
36 |
37 | public String getGive_time() {
38 | return give_time;
39 | }
40 |
41 | public void setGive_time(String give_time) {
42 | this.give_time = give_time;
43 | }
44 |
45 | public String getSubmit_time() {
46 | return submit_time;
47 | }
48 |
49 | public void setSubmit_time(String submit_time) {
50 | this.submit_time = submit_time;
51 | }
52 |
53 | public int getU_id() {
54 | return u_id;
55 | }
56 |
57 | public void setU_id(int u_id) {
58 | this.u_id = u_id;
59 | }
60 |
61 | public String getConsignee() {
62 | return consignee;
63 | }
64 |
65 | public void setConsignee(String consignee) {
66 | this.consignee = consignee;
67 | }
68 |
69 | public String getFilename() {
70 | return filename;
71 | }
72 |
73 | public void setFilename(String filename) {
74 | this.filename = filename;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/model/Post.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | public class Post {
4 | private int post_id;
5 | private String title;
6 | private String content;
7 | private String create_time;
8 |
9 | public int getPost_id() {
10 | return post_id;
11 | }
12 |
13 | public void setPost_id(int post_id) {
14 | this.post_id = post_id;
15 | }
16 |
17 | public String getTitle() {
18 | return title;
19 | }
20 |
21 | public void setTitle(String title) {
22 | this.title = title;
23 | }
24 |
25 | public String getContent() {
26 | return content;
27 | }
28 |
29 | public void setContent(String content) {
30 | this.content = content;
31 | }
32 |
33 | public String getCreate_time() {
34 | return create_time;
35 | }
36 |
37 | public void setCreate_time(String create_time) {
38 | this.create_time = create_time;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/model/Reply.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | /**
4 | * 回复
5 | *
6 | * @author Administrator
7 | *
8 | */
9 | public class Reply {
10 | private int reply_id;
11 | private int u_id;
12 | private int bbs_id;
13 | private String content;
14 | private String create_time;
15 | private String name;
16 |
17 | public String getName() {
18 | return name;
19 | }
20 |
21 | public void setName(String name) {
22 | this.name = name;
23 | }
24 |
25 | public int getReply_id() {
26 | return reply_id;
27 | }
28 |
29 | public void setReply_id(int reply_id) {
30 | this.reply_id = reply_id;
31 | }
32 |
33 | public int getU_id() {
34 | return u_id;
35 | }
36 |
37 | public void setU_id(int u_id) {
38 | this.u_id = u_id;
39 | }
40 |
41 | public int getBbs_id() {
42 | return bbs_id;
43 | }
44 |
45 | public void setBbs_id(int bbs_id) {
46 | this.bbs_id = bbs_id;
47 | }
48 |
49 | public String getContent() {
50 | return content;
51 | }
52 |
53 | public void setContent(String content) {
54 | this.content = content;
55 | }
56 |
57 | public String getCreate_time() {
58 | return create_time;
59 | }
60 |
61 | public void setCreate_time(String create_time) {
62 | this.create_time = create_time;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/model/Test.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | /**
4 | * 试卷
5 | *
6 | * @author Administrator
7 | *
8 | */
9 | public class Test {
10 | private String test_id;
11 | private String alltopic;
12 | public String getTest_id() {
13 | return test_id;
14 | }
15 | public void setTest_id(String test_id) {
16 | this.test_id = test_id;
17 | }
18 | public String getAlltopic() {
19 | return alltopic;
20 | }
21 | public void setAlltopic(String alltopic) {
22 | this.alltopic = alltopic;
23 | }
24 | public String getAllanswer() {
25 | return allanswer;
26 | }
27 | public void setAllanswer(String allanswer) {
28 | this.allanswer = allanswer;
29 | }
30 | public int getU_id() {
31 | return u_id;
32 | }
33 | public void setU_id(int u_id) {
34 | this.u_id = u_id;
35 | }
36 | public String getSubject() {
37 | return subject;
38 | }
39 | public void setSubject(String subject) {
40 | this.subject = subject;
41 | }
42 | public String getDifficulty() {
43 | return difficulty;
44 | }
45 | public void setDifficulty(String difficulty) {
46 | this.difficulty = difficulty;
47 | }
48 | public String getCreate_time() {
49 | return create_time;
50 | }
51 | public void setCreate_time(String create_time) {
52 | this.create_time = create_time;
53 | }
54 | private String allanswer;
55 | private int u_id;
56 | private String subject;
57 | private String difficulty;
58 | private String create_time;
59 | }
60 |
--------------------------------------------------------------------------------
/src/model/Topic.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | /**
4 | * 试题
5 | *
6 | * @author Administrator
7 | *
8 | */
9 | public class Topic {
10 | private int t_id;
11 | private String subject;
12 | private String title;
13 | private String optiona;
14 | private String optionb;
15 | private String optionc;
16 | private String optiond;
17 | private String answer;
18 | private String difficulty;
19 | private String update_time;
20 | private int u_id;
21 |
22 | public int getT_id() {
23 | return t_id;
24 | }
25 |
26 | public void setT_id(int t_id) {
27 | this.t_id = t_id;
28 | }
29 |
30 | public String getSubject() {
31 | return subject;
32 | }
33 |
34 | public void setSubject(String subject) {
35 | this.subject = subject;
36 | }
37 |
38 | public String getTitle() {
39 | return title;
40 | }
41 |
42 | public void setTitle(String title) {
43 | this.title = title;
44 | }
45 |
46 | public String getOptiona() {
47 | return optiona;
48 | }
49 |
50 | public void setOptiona(String optiona) {
51 | this.optiona = optiona;
52 | }
53 |
54 | public String getOptionb() {
55 | return optionb;
56 | }
57 |
58 | public void setOptionb(String optionb) {
59 | this.optionb = optionb;
60 | }
61 |
62 | public String getOptionc() {
63 | return optionc;
64 | }
65 |
66 | public void setOptionc(String optionc) {
67 | this.optionc = optionc;
68 | }
69 |
70 | public String getOptiond() {
71 | return optiond;
72 | }
73 |
74 | public void setOptiond(String optiond) {
75 | this.optiond = optiond;
76 | }
77 |
78 | public String getAnswer() {
79 | return answer;
80 | }
81 |
82 | public void setAnswer(String answer) {
83 | this.answer = answer;
84 | }
85 |
86 | public String getDifficulty() {
87 | return difficulty;
88 | }
89 |
90 | public void setDifficulty(String difficulty) {
91 | this.difficulty = difficulty;
92 | }
93 |
94 | public String getUpdate_time() {
95 | return update_time;
96 | }
97 |
98 | public void setUpdate_time(String update_time) {
99 | this.update_time = update_time;
100 | }
101 |
102 | public int getU_id() {
103 | return u_id;
104 | }
105 |
106 | public void setU_id(int u_id) {
107 | this.u_id = u_id;
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/src/model/Upload.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | /**
4 | * 上传对象
5 | *
6 | * @author Administrator
7 | *
8 | */
9 | public class Upload {
10 | private int upload_id;
11 | private String subject;
12 | private String title;
13 | private String path;
14 | private String upload_time;
15 | private String size;
16 | private String ext;
17 | private int del;
18 | private int u_id;
19 | private String name;
20 |
21 | public String getName() {
22 | return name;
23 | }
24 |
25 | public void setName(String name) {
26 | this.name = name;
27 | }
28 |
29 | public int getUpload_id() {
30 | return upload_id;
31 | }
32 |
33 | public void setUpload_id(int upload_id) {
34 | this.upload_id = upload_id;
35 | }
36 |
37 | public String getSubject() {
38 | return subject;
39 | }
40 |
41 | public void setSubject(String subject) {
42 | this.subject = subject;
43 | }
44 |
45 | public String getTitle() {
46 | return title;
47 | }
48 |
49 | public void setTitle(String title) {
50 | this.title = title;
51 | }
52 |
53 | public String getPath() {
54 | return path;
55 | }
56 |
57 | public void setPath(String path) {
58 | this.path = path;
59 | }
60 |
61 | public String getUpload_time() {
62 | return upload_time;
63 | }
64 |
65 | public void setUpload_time(String upload_time) {
66 | this.upload_time = upload_time;
67 | }
68 |
69 | public String getSize() {
70 | return size;
71 | }
72 |
73 | public void setSize(String size) {
74 | this.size = size;
75 | }
76 |
77 | public String getExt() {
78 | return ext;
79 | }
80 |
81 | public void setExt(String ext) {
82 | this.ext = ext;
83 | }
84 |
85 | public int getDel() {
86 | return del;
87 | }
88 |
89 | public void setDel(int del) {
90 | this.del = del;
91 | }
92 |
93 | public int getU_id() {
94 | return u_id;
95 | }
96 |
97 | public void setU_id(int u_id) {
98 | this.u_id = u_id;
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/src/model/User.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | public class User {
4 | private int u_id;
5 | private String userName;
6 | private String password;
7 | private String name;
8 | private String school;
9 | private String subject;
10 | private int role;
11 | private String create_time;
12 | private int del;
13 |
14 | public int getDel() {
15 | return del;
16 | }
17 |
18 | public void setDel(int del) {
19 | this.del = del;
20 | }
21 |
22 | public int getU_id() {
23 | return u_id;
24 | }
25 |
26 | public void setU_id(int u_id) {
27 | this.u_id = u_id;
28 | }
29 |
30 | public String getUserName() {
31 | return userName;
32 | }
33 |
34 | public void setUserName(String userName) {
35 | this.userName = userName;
36 | }
37 |
38 | public String getPassword() {
39 | return password;
40 | }
41 |
42 | public void setPassword(String password) {
43 | this.password = password;
44 | }
45 |
46 | public String getName() {
47 | return name;
48 | }
49 |
50 | public void setName(String name) {
51 | this.name = name;
52 | }
53 |
54 | public String getSchool() {
55 | return school;
56 | }
57 |
58 | public void setSchool(String school) {
59 | this.school = school;
60 | }
61 |
62 | public String getSubject() {
63 | return subject;
64 | }
65 |
66 | public void setSubject(String subject) {
67 | this.subject = subject;
68 | }
69 |
70 | public int getRole() {
71 | return role;
72 | }
73 |
74 | public void setRole(int role) {
75 | this.role = role;
76 | }
77 |
78 | public String getCreate_time() {
79 | return create_time;
80 | }
81 |
82 | public void setCreate_time(String create_time) {
83 | this.create_time = create_time;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/servlet/DownServlet.java:
--------------------------------------------------------------------------------
1 | package servlet;
2 |
3 |
4 |
5 | import java.io.File;
6 | import java.io.IOException;
7 | import java.io.OutputStream;
8 |
9 |
10 | import javax.servlet.ServletException;
11 | import javax.servlet.http.HttpServlet;
12 | import javax.servlet.http.HttpServletRequest;
13 | import javax.servlet.http.HttpServletResponse;
14 |
15 | import util.DownFile;
16 |
17 | public class DownServlet extends HttpServlet {
18 |
19 | public DownServlet() {
20 | super();
21 | }
22 |
23 | public void destroy() {
24 | super.destroy();
25 | }
26 |
27 | public void doGet(HttpServletRequest request, HttpServletResponse response)
28 | throws ServletException, IOException {
29 | this.doPost(request, response);
30 | }
31 |
32 | public void doPost(HttpServletRequest request, HttpServletResponse response)
33 | throws ServletException, IOException {
34 |
35 | response.setContentType("text/html charset=utf-8");
36 |
37 | //解决中文乱码问题
38 | String title=new String(request.getParameter("title").getBytes("iso-8859-1"),"utf-8");
39 | String ext=request.getParameter("ext");
40 | String filename=title+"."+ext;
41 | //创建file对象
42 | String path=this.getServletConfig().getServletContext().getRealPath("/");
43 | File file=new File(path+"//upload//"+filename);
44 | //从response对象中得到输出流,准备下载
45 | OutputStream out=response.getOutputStream();
46 |
47 | DownFile.downFile(file, response, filename, out);//下载文件
48 | //将写入到客户端的内存的数据,刷新到磁盘
49 | out.flush();
50 | out.close();
51 |
52 | }
53 |
54 | public void init() throws ServletException {
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/src/servlet/HomeWorkServlet.java:
--------------------------------------------------------------------------------
1 | package servlet;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.io.PrintWriter;
6 | import java.util.HashMap;
7 | import java.util.List;
8 |
9 | import javax.servlet.ServletException;
10 | import javax.servlet.http.HttpServlet;
11 | import javax.servlet.http.HttpServletRequest;
12 | import javax.servlet.http.HttpServletResponse;
13 | import javax.servlet.http.HttpSession;
14 |
15 | import org.apache.commons.fileupload.FileItem;
16 | import org.apache.commons.fileupload.disk.DiskFileItemFactory;
17 | import org.apache.commons.fileupload.servlet.ServletFileUpload;
18 |
19 | import biz.IHomeWorkBiz;
20 | import biz.impl.HomeWorkBizImpl;
21 |
22 | import model.HomeWork;
23 | import model.User;
24 | /**
25 | * 学生提交作业,查询作业
26 | * @author Administrator
27 | *
28 | */
29 | public class HomeWorkServlet extends HttpServlet {
30 | IHomeWorkBiz hb=new HomeWorkBizImpl();
31 | public HomeWorkServlet() {
32 | super();
33 | }
34 |
35 | public void destroy() {
36 | super.destroy();
37 | }
38 |
39 | public void doGet(HttpServletRequest request, HttpServletResponse response)
40 | throws ServletException, IOException {
41 | response.setContentType("text/html;charset=utf-8");
42 | request.setCharacterEncoding("utf-8");
43 | response.setCharacterEncoding("utf-8");
44 | HttpSession session = request.getSession();
45 | User user = (User) session.getAttribute("user");
46 | String user_name=user.getName();
47 | int u_id=user.getU_id();
48 | //int u_id = 1;// 默认
49 | String type = request.getParameter("type");
50 | String sql=null;
51 | if("all".equals(type)){
52 | sql="select * from homework where u_id="+u_id+" order by submit_time desc";
53 |
54 | }else if("search".equals(type)){
55 | String subject = new String(request.getParameter("subject").getBytes("iso8859-1"), "utf-8");
56 | String start_time=request.getParameter("start_time");
57 | String end_time=request.getParameter("end_time");
58 | sql="select * from homework where u_id="+u_id+" and subject ='"+subject+"' and give_time between '"+start_time+"' and '"+end_time+"' order by give_time desc ";
59 | }
60 | List homeWorkList=hb.selHomeWork(sql);
61 | request.setAttribute("homeWorkList", homeWorkList);
62 | request.getRequestDispatcher("/jsp/tijiaohomework.jsp").forward(request, response);
63 | }
64 |
65 | public void doPost(HttpServletRequest request, HttpServletResponse response)
66 | throws ServletException, IOException {
67 | response.setContentType("text/html;charset=utf-8");
68 | request.setCharacterEncoding("utf-8");
69 | response.setCharacterEncoding("utf-8");
70 | PrintWriter out = response.getWriter();
71 | HttpSession session = request.getSession();
72 | User user = (User) session.getAttribute("user");
73 | String user_name=user.getName();
74 | int u_id=user.getU_id();
75 | // String user_name="欧阳";
76 | // int u_id = 1;// 默认
77 | String newname=null;
78 | try {
79 | // 创建文件项工厂
80 | DiskFileItemFactory factory = new DiskFileItemFactory();
81 | // 创建解析请求数据的ServletFileUpload对象
82 | ServletFileUpload upload = new ServletFileUpload(factory);
83 | // 解析request请求把流装入到list中
84 | List list = upload.parseRequest(request);
85 | HashMap map = new HashMap();
86 | for (int i = 0; i < list.size(); i++) {
87 | // 把各个流装入到item中
88 | FileItem item = list.get(i);
89 | if (item.isFormField()) {// 判断当前fileitem是否是表单中的字段
90 | String key = item.getFieldName();
91 | map.put(key,
92 | new String(item.getString().getBytes("iso-8859-1"),
93 | "utf-8"));
94 | } else {// 当fileitem是文件流时
95 | // 文件后缀
96 | String filename = item.getName();
97 | String ext =filename.substring(filename.lastIndexOf(".")+1);
98 | newname="【"+map.get("subject")+"】"+user_name+"("+map.get("give_time")+")."+ext;
99 | String newpath = request.getRealPath("/upload") + "/" +newname;
100 | // System.out.println("--newpath----" + newpath);
101 | item.write(new File(newpath));
102 | }
103 | }
104 | //存储信息
105 | if(hb.addHomeWork(map.get("subject"), map.get("give_time"), u_id, map.get("consignee"),newname)){
106 | request.getRequestDispatcher("/jsp/success.jsp").forward(request, response);
107 | }
108 | } catch (Exception e) {
109 | e.printStackTrace();
110 | }
111 | }
112 |
113 | public void init() throws ServletException {
114 | }
115 |
116 | }
117 |
--------------------------------------------------------------------------------
/src/servlet/LoginServlet.java:
--------------------------------------------------------------------------------
1 | package servlet;
2 |
3 | import java.io.IOException;
4 | import java.io.PrintWriter;
5 | import java.util.List;
6 |
7 | import javax.servlet.ServletException;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 | import javax.servlet.http.HttpSession;
12 | import javax.xml.ws.Response;
13 |
14 | import model.Post;
15 | import model.User;
16 |
17 | import biz.IPostBiz;
18 | import biz.IUserBiz;
19 | import biz.impl.PostBizImpl;
20 | import biz.impl.UserBizImpl;
21 |
22 | import util.DBUtils;
23 |
24 | public class LoginServlet extends HttpServlet {
25 |
26 | IUserBiz ub=new UserBizImpl();
27 | IPostBiz pb=new PostBizImpl();
28 | public LoginServlet() {
29 | super();
30 | }
31 |
32 | public void destroy() {
33 | super.destroy();
34 | }
35 |
36 | public void doGet(HttpServletRequest request, HttpServletResponse response)
37 | throws ServletException, IOException {
38 | this.doPost(request, response);
39 |
40 | }
41 | /**
42 | * 登录与注册
43 | */
44 | public void doPost(HttpServletRequest request, HttpServletResponse response)
45 | throws ServletException, IOException {
46 | response.setContentType("text/html;charset=utf-8");
47 | request.setCharacterEncoding("utf-8");
48 | response.setCharacterEncoding("utf-8");
49 | HttpSession session= request.getSession();
50 | PrintWriter out=response.getWriter();
51 |
52 | String p=request.getParameter("p");//register:注册 login:登录
53 | User u=new User();
54 | //---------------------------------注册------------------------
55 | if("register".equals(p)){
56 | String userName=request.getParameter("userName");
57 | String school=request.getParameter("school");
58 | String name=request.getParameter("name");
59 | String password=request.getParameter("psd");
60 | if(ub.register(userName, password, name, school)){//将数据插入user表,注册成功
61 | u.setUserName(userName);
62 | u.setPassword(password);
63 | u.setSchool(school);
64 | u.setName(name);
65 | u.setRole(3);
66 | session.setAttribute("user", u);//把名字存入session
67 | response.sendRedirect("/course/index.jsp");
68 | }
69 | }
70 | //--------------------------------登录------------------------
71 | else if("login".equals(p)){
72 | int role=Integer.parseInt(request.getParameter("role"));
73 | String userName=request.getParameter("userName");
74 | String password=request.getParameter("password");
75 | if(role==1){//管理员登录
76 | String sql="select * from user where userName='"+userName+"' and password='"+password+"' and role=1";
77 | u =ub.login(sql);//查找用户,返回用户信息
78 | if(u!=null){//存在此用户
79 | session.setAttribute("user", u);//用户信息存于session
80 | response.sendRedirect("/course/backindex.jsp");
81 | }else{
82 | response.sendRedirect("/course/backstage/backlogin.jsp");
83 | }
84 | }else{//不是管理源
85 | String sql="select * from user where userName='"+userName+"' and password='"+password+"' and role!=1 and del=1";
86 | u =ub.login(sql);//查找用户,返回用户信息
87 | if(u!=null){//存在此用户
88 | session.setAttribute("user", u);//用户信息存于session
89 | }
90 | response.sendRedirect("/course/index.jsp");
91 | }
92 |
93 | }
94 | //-------------用户注销
95 | else if("logout".equals(p)){
96 | session.removeAttribute("user");
97 | out.flush();
98 | out.close();
99 | }else if("zh".equals(p)){//检测帐号是否可用
100 | String userName=request.getParameter("userName");
101 | if(ub.cxzh(userName)){//帐号可用
102 | out.print(1);
103 | }else{
104 | out.print(0);
105 | }
106 | out.flush();
107 | out.close();
108 | }else if("cslogin".equals(p)){//超时后登录
109 | String userName=request.getParameter("userName");
110 | String password=request.getParameter("password");
111 | String sql="select * from user where userName='"+userName+"' and password ='"+password+"'";
112 | u=ub.login(sql);
113 | if(u!=null){
114 | session.setAttribute("user", u);//用户信息存于session
115 | }
116 | out.flush();
117 | out.close();
118 | }
119 |
120 | }
121 |
122 | public void init() throws ServletException {
123 | }
124 |
125 | }
126 |
--------------------------------------------------------------------------------
/src/servlet/PostServlet.java:
--------------------------------------------------------------------------------
1 | package servlet;
2 |
3 | import java.io.IOException;
4 | import java.io.PrintWriter;
5 | import java.util.List;
6 |
7 | import javax.servlet.ServletException;
8 | import javax.servlet.http.HttpServlet;
9 | import javax.servlet.http.HttpServletRequest;
10 | import javax.servlet.http.HttpServletResponse;
11 | import javax.servlet.http.HttpSession;
12 |
13 | import net.sf.json.JSONArray;
14 |
15 | import model.Post;
16 |
17 | import biz.IPostBiz;
18 | import biz.impl.PostBizImpl;
19 |
20 | public class PostServlet extends HttpServlet {
21 | IPostBiz postBiz = new PostBizImpl();
22 |
23 | public PostServlet() {
24 | super();
25 | }
26 |
27 | public void destroy() {
28 | super.destroy();
29 | }
30 |
31 | /**
32 | * 后台公告管理
33 | */
34 | public void doGet(HttpServletRequest request, HttpServletResponse response)
35 | throws ServletException, IOException {
36 | response.setContentType("text/html;charset=utf-8");
37 | request.setCharacterEncoding("utf-8");
38 | response.setCharacterEncoding("utf-8");
39 | PrintWriter out = response.getWriter();
40 | String b = request.getParameter("b");// 页面传来的标记
41 | if ("lie".equals(b)) {// 获取公告列表
42 | String sql = "select * from post order by create_time desc";
43 | List plist = postBiz.selPost(sql);
44 | request.setAttribute("plist", plist);
45 | request.getRequestDispatcher("/backstage/post.jsp").forward(
46 | request, response);
47 |
48 | }else if("dan".equals(b)){
49 | int post_id=Integer.parseInt(request.getParameter("id"));
50 | Post post=postBiz.selPost(post_id);
51 | request.setAttribute("post", post);
52 | request.getRequestDispatcher("/jsp/postdetail.jsp").forward(
53 | request, response);
54 | }
55 | }
56 |
57 | /**
58 | * 首页的公告栏
59 | */
60 | public void doPost(HttpServletRequest request, HttpServletResponse response)
61 | throws ServletException, IOException {
62 |
63 | response.setContentType("text/html;charset=utf-8");
64 | request.setCharacterEncoding("utf-8");
65 | response.setCharacterEncoding("utf-8");
66 | PrintWriter out = response.getWriter();
67 | String type = request.getParameter("type");
68 | if ("fb".equals(type)) {// 发布公告
69 | String title = request.getParameter("title");
70 | String content = request.getParameter("content");
71 | System.out.println(title + "-----" + content);
72 | System.out.println(postBiz.fbPost(title, content));
73 |
74 | } else if ("all".equals(type)) {
75 | String sql = "select * from post order by create_time desc limit 0,5";
76 | List plist = postBiz.selPost(sql);
77 | String json = null;
78 | if (plist != null) {
79 | json = JSONArray.fromObject(plist).toString();
80 | }
81 | out.write(json);
82 | }else if ("del".equals(type)) {// 删除公告
83 | int post_id = Integer.parseInt(request.getParameter("id"));
84 | if(postBiz.delPost(post_id)){
85 | out.print(1);
86 | }else{
87 | out.print(0);
88 | }
89 | }
90 | out.flush();
91 | out.close();
92 | }
93 |
94 | public void init() throws ServletException {
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/src/servlet/UserServlet.java:
--------------------------------------------------------------------------------
1 | package servlet;
2 |
3 | import java.io.File;
4 | import java.io.FileInputStream;
5 | import java.io.FileOutputStream;
6 | import java.io.IOException;
7 | import java.io.PrintWriter;
8 | import java.util.zip.ZipEntry;
9 | import java.util.zip.ZipOutputStream;
10 |
11 | import javax.servlet.ServletException;
12 | import javax.servlet.http.HttpServlet;
13 | import javax.servlet.http.HttpServletRequest;
14 | import javax.servlet.http.HttpServletResponse;
15 | import javax.servlet.http.HttpSession;
16 |
17 | import biz.IUserBiz;
18 | import biz.impl.UserBizImpl;
19 |
20 | import model.User;
21 |
22 | public class UserServlet extends HttpServlet {
23 | IUserBiz ub=new UserBizImpl();
24 | public UserServlet() {
25 | super();
26 | }
27 |
28 | public void destroy() {
29 | super.destroy();
30 |
31 | }
32 | public void doGet(HttpServletRequest request, HttpServletResponse response)
33 | throws ServletException, IOException {
34 | response.setContentType("text/html;charset=utf-8");
35 | request.setCharacterEncoding("utf-8");
36 | response.setCharacterEncoding("utf-8");
37 | HttpSession session= request.getSession();
38 | PrintWriter out=response.getWriter();
39 | String type=request.getParameter("type");
40 | if("search".equals(type)){
41 | String userName=request.getParameter("userName");
42 | System.out.println(userName);
43 | String sql="select * from user where userName='"+userName+"'";
44 | User seluser=ub.selUser(sql);
45 | request.setAttribute("seluser", seluser);
46 | request.getRequestDispatcher("/backstage/usermanager.jsp").forward(request, response);
47 | }
48 | }
49 |
50 | public void doPost(HttpServletRequest request, HttpServletResponse response)
51 | throws ServletException, IOException {
52 | response.setContentType("text/html;charset=utf-8");
53 | request.setCharacterEncoding("utf-8");
54 | response.setCharacterEncoding("utf-8");
55 | HttpSession session= request.getSession();
56 | PrintWriter out=response.getWriter();
57 | String type=request.getParameter("type");
58 | if("del".equals(type)||"csh".equals(type)){
59 | String userName=request.getParameter("userName");
60 | if("del".equals(type)){
61 | int d=Integer.parseInt(request.getParameter("d"));//解冻:1 冻结 0
62 | if(ub.delUser(userName,d))
63 | out.print(1);
64 | }else if("csh".equals(type)){
65 | if(ub.cshPassword(userName))
66 | out.print(1);
67 | }
68 |
69 | out.flush();
70 | out.close();
71 | }else if("add".equals(type)){
72 | String userName=request.getParameter("userName");
73 | String name=request.getParameter("name");
74 | String school=request.getParameter("school");
75 | String[] subjects=request.getParameterValues("subject");
76 | String subject="";
77 | for(int i=0;i