├── .classpath ├── .project ├── .settings ├── .jsdtscope ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.wst.common.component ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.jsdt.ui.superType.container └── org.eclipse.wst.jsdt.ui.superType.name ├── README.md ├── WebContent ├── CSS │ ├── EntryStudents.css │ ├── admin_frame.css │ ├── index.css │ ├── student_frame.css │ └── teacher_frame.css ├── JSP │ ├── admin │ │ ├── AddClass.jsp │ │ ├── AddCourse.jsp │ │ ├── AddDid.jsp │ │ ├── AddNotes.jsp │ │ ├── Admin_Mainframe.jsp │ │ ├── DeleteNotes.jsp │ │ ├── DeleteStudents.jsp │ │ ├── DeleteTeacher.jsp │ │ ├── EnterStudents.jsp │ │ ├── EnterTeachers.jsp │ │ ├── LookNote.jsp │ │ ├── LookStudent.jsp │ │ ├── LookTeacher.jsp │ │ ├── PasswordUpdate.jsp │ │ ├── UpdateNotes.jsp │ │ ├── checkAddClass.jsp │ │ ├── checkAddCourse.jsp │ │ ├── checkAddDid.jsp │ │ ├── checkAddNotes.jsp │ │ ├── checkDeleteNotes.jsp │ │ ├── checkDeleteStudent.jsp │ │ ├── checkDeleteTeacher.jsp │ │ ├── checkEnterStudents.jsp │ │ ├── checkEnterTeacher.jsp │ │ ├── checkPasswordUpdate.jsp │ │ └── checkUpdateNotesjsp.jsp │ ├── index │ │ ├── checkindex.jsp │ │ └── index.jsp │ ├── student │ │ ├── LookCourse.jsp │ │ ├── LookGrade.jsp │ │ ├── LookSelectCourse.jsp │ │ ├── Password_Update.jsp │ │ ├── QuitCourse.jsp │ │ ├── SelectCourse.jsp │ │ ├── SortGrade.jsp │ │ ├── checkPassword_Update.jsp │ │ ├── checkQuitCourse.jsp │ │ ├── checkSelectCourse.jsp │ │ ├── checkSortGrade.jsp │ │ ├── checkpersonal_information.jsp │ │ ├── personal_information.jsp │ │ └── student_Mainframe.jsp │ └── teacher │ │ ├── CourseInfo.jsp │ │ ├── EnterGradejsp.jsp │ │ ├── LookCourse.jsp │ │ ├── LookSelectStudent_Course.jsp │ │ ├── Password_Update.jsp │ │ ├── RoomInfo.jsp │ │ ├── SortGrade.jsp │ │ ├── checkEnterGrade.jsp │ │ ├── checkPassword_Update.jsp │ │ ├── checkpersonal_information.jsp │ │ ├── nojige.jsp │ │ ├── personal_information.jsp │ │ └── teacher_Mainframe.jsp ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── lib │ │ └── mysql-connector-java-8.0.19.jar │ └── web.xml └── images │ ├── 3.ico │ ├── admin_bj.png │ ├── cp.png │ ├── del.png │ ├── mess.png │ ├── miama.jpg │ ├── mmexport1577618776569.png │ ├── set.png │ ├── toux.jpg │ └── users.png ├── build └── classes │ ├── c3p0-config.xml │ └── com │ ├── admin │ ├── dao │ │ ├── checkAddClassDao.class │ │ ├── checkAddCourseDao.class │ │ ├── checkAddDidDao.class │ │ ├── checkAddNotesDao.class │ │ ├── checkDeleteStudentDao.class │ │ ├── checkDeleteTeacherDao.class │ │ ├── checkEnterStudentsDao.class │ │ └── checkEnterTeacherDao.class │ └── util │ │ └── DBUtil.class │ ├── login │ └── dao │ │ ├── AdminDao.class │ │ ├── StudentDao.class │ │ └── TeacherDao.class │ ├── southwind │ ├── controller │ │ └── LoginServlet.class │ ├── entity │ │ └── Student.class │ ├── repository │ │ ├── StudentRepository.class │ │ └── impl │ │ │ └── StudentRepositoryImpl.class │ ├── service │ │ ├── LoginService.class │ │ └── impl │ │ │ └── LoginServiceImpl.class │ └── utils │ │ └── JDBCTools.class │ └── student │ └── dao │ ├── checkQuitCourseDao.class │ ├── checkSelectCourseDao.class │ └── checkpersonalinformationDao.class └── src ├── c3p0-config.xml └── com ├── admin ├── dao │ ├── checkAddClassDao.java │ ├── checkAddCourseDao.java │ ├── checkAddDidDao.java │ ├── checkAddNotesDao.java │ ├── checkDeleteStudentDao.java │ ├── checkDeleteTeacherDao.java │ ├── checkEnterStudentsDao.java │ └── checkEnterTeacherDao.java └── util │ └── DBUtil.java ├── login └── dao │ ├── AdminDao.java │ ├── StudentDao.java │ └── TeacherDao.java ├── southwind ├── controller │ └── LoginServlet.java ├── entity │ └── Student.java ├── repository │ ├── StudentRepository.java │ └── impl │ │ └── StudentRepositoryImpl.java ├── service │ ├── LoginService.java │ └── impl │ │ └── LoginServiceImpl.java └── utils │ └── JDBCTools.java └── student └── dao ├── checkQuitCourseDao.java ├── checkSelectCourseDao.java └── checkpersonalinformationDao.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Online_course_selection_system 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.validation.validationbuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jem.workbench.JavaEMFNature 26 | org.eclipse.wst.common.modulecore.ModuleCoreNature 27 | org.eclipse.wst.common.project.facet.core.nature 28 | org.eclipse.jdt.core.javanature 29 | org.eclipse.wst.jsdt.core.jsNature 30 | 31 | 32 | -------------------------------------------------------------------------------- /.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//WebContent/JSP/admin/EnterStudents.jsp=UTF-8 3 | encoding//WebContent/JSP/index/index.jsp=UTF-8 4 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Online_Course_Selection_System 2 | 这是在大二时做的一个简单的JavaWeb项目,是一个网上选课系统,采用的是MVC设计模式,用Java Servlet及jsp做的,开发工具是Eclipse,数据库是MySQL。 3 | -------------------------------------------------------------------------------- /WebContent/CSS/EntryStudents.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | h1{ 4 | text-align:center; 5 | 6 | } 7 | 8 | 9 | form table{ 10 | 11 | align-center:center; 12 | margin:0px auto; 13 | 14 | } -------------------------------------------------------------------------------- /WebContent/CSS/admin_frame.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | .head{ 4 | 5 | background-color:rgb(197,222,251); 6 | 7 | } 8 | 9 | .s1{ 10 | 11 | font-size:32px; 12 | } 13 | 14 | 15 | 16 | ul { 17 | padding: 0; 18 | margin: 0; 19 | } 20 | 21 | li { 22 | list-style-type: none; 23 | } 24 | 25 | input[type='radio'] { 26 | display: none; 27 | } 28 | 29 | label { 30 | cursor: pointer; 31 | } 32 | 33 | ::-webkit-scrollbar { 34 | display: none; 35 | } 36 | 37 | body { 38 | height: 100vh; 39 | font-weight: 500; 40 | font-family: 'Roboto', sans-serif; 41 | 42 | -webkit-font-smoothing: antialiased; 43 | font-size: 12px; 44 | } 45 | 46 | .swanky_wrapper { 47 | width: 225px; 48 | height: auto; 49 | overflow: hidden; 50 | border-radius: 4px; 51 | background: #2a394f; 52 | float: left; 53 | } 54 | .swanky_wrapper label { 55 | padding: 25px; 56 | float: left; 57 | height: 72px; 58 | border-bottom: 1px solid #293649; 59 | position: relative; 60 | width: 100%; 61 | color: #eff4fa; 62 | transition: text-indent 0.15s, height 0.3s; 63 | box-sizing: border-box; 64 | } 65 | .swanky_wrapper label img { 66 | margin-right: 10px; 67 | position: relative; 68 | top: 2px; 69 | width: 16px; 70 | } 71 | .swanky_wrapper label span { 72 | position: relative; 73 | top: -3px; 74 | } 75 | .swanky_wrapper label:hover { 76 | background: #212e41; 77 | border-bottom: 1px solid #2a394f; 78 | text-indent: 4px; 79 | } 80 | .swanky_wrapper label:hover .bar { 81 | width: 100%; 82 | } 83 | .swanky_wrapper label .bar { 84 | width: 0px; 85 | transition: width 0.15s; 86 | height: 2px; 87 | position: absolute; 88 | display: block; 89 | background: #355789; 90 | bottom: 0; 91 | left: 0; 92 | } 93 | .swanky_wrapper label .lil_arrow { 94 | width: 5px; 95 | height: 5px; 96 | transition: -webkit-transform 0.8s; 97 | transition: transform 0.8s; 98 | transition: transform 0.8s, -webkit-transform 0.8s; 99 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 100 | border-top: 2px solid white; 101 | border-right: 2px solid white; 102 | float: right; 103 | position: relative; 104 | top: 6px; 105 | right: 2px; 106 | -webkit-transform: rotate(45deg); 107 | transform: rotate(45deg); 108 | } 109 | .swanky_wrapper__content { 110 | position: absolute; 111 | display: none; 112 | overflow: hidden; 113 | left: 0; 114 | width: 100%; 115 | } 116 | .swanky_wrapper__content li { 117 | width: 100%; 118 | opacity: 0; 119 | left: -100%; 120 | background: #15a4fa; 121 | height: 64px; 122 | line-height: 64px; 123 | text-indent: 25px; 124 | box-shadow: 0px 0px #126ca1 inset; 125 | transition: box-shadow 0.3s, text-indent 0.3s; 126 | position: relative; 127 | } 128 | .swanky_wrapper__content li:hover { 129 | background: #0c93e4; 130 | box-shadow: 3px 0px #126ca1 inset; 131 | transition: box-shadow 0.3s linear, text-indent 0.3s linear; 132 | text-indent: 31px; 133 | } 134 | .swanky_wrapper__content .clear { 135 | clear: both; 136 | } 137 | 138 | input[type='radio']:checked + label .swanky_wrapper__content { 139 | display: block; 140 | top: 68px; 141 | border-bottom: 1px solid #212e41; 142 | } 143 | 144 | input[type='radio']:checked + label > .lil_arrow { 145 | transition: -webkit-transform 0.8s; 146 | transition: transform 0.8s; 147 | transition: transform 0.8s, -webkit-transform 0.8s; 148 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 149 | -webkit-transform: rotate(135deg); 150 | transform: rotate(135deg); 151 | border-top: 2px solid #14a3f9; 152 | border-right: 2px solid #14a3f9; 153 | } 154 | 155 | input[type='radio']:checked + label { 156 | height: 325px; 157 | background: #212e41; 158 | text-indent: 4px; 159 | transition-property: height; 160 | transition-duration: 0.6s; 161 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 162 | } 163 | 164 | input[type='radio']:checked + label .bar { 165 | width: 0; 166 | } 167 | 168 | input[type='radio']:checked + label li:nth-of-type(1) { 169 | -webkit-animation: in 0.15s 0.575s forwards; 170 | animation: in 0.15s 0.575s forwards; 171 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 172 | -moz-animation: in 0.15s 0.575s forwards; 173 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 174 | } 175 | input[type='radio']:checked + label li:nth-of-type(2) { 176 | -webkit-animation: in 0.15s 0.7s forwards; 177 | animation: in 0.15s 0.7s forwards; 178 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 179 | -moz-animation: in 0.15s 0.7s forwards; 180 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 181 | } 182 | input[type='radio']:checked + label li:nth-of-type(3) { 183 | -webkit-animation: in 0.15s 0.825s forwards; 184 | animation: in 0.15s 0.825s forwards; 185 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 186 | -moz-animation: in 0.15s 0.825s forwards; 187 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 188 | } 189 | input[type='radio']:checked + label li:nth-of-type(4) { 190 | -webkit-animation: in 0.15s 0.95s forwards; 191 | animation: in 0.15s 0.95s forwards; 192 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 193 | -moz-animation: in 0.15s 0.95s forwards; 194 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 195 | } 196 | 197 | @-webkit-keyframes in { 198 | from { 199 | left: -100%; 200 | opacity: 0; 201 | } 202 | to { 203 | left: 0; 204 | opacity: 1; 205 | } 206 | } 207 | 208 | @keyframes in { 209 | from { 210 | left: -100%; 211 | opacity: 0; 212 | } 213 | to { 214 | left: 0; 215 | opacity: 1; 216 | } 217 | } 218 | 219 | 220 | .iframe{ 221 | width: 900px; 222 | height: 500px; 223 | align-content: center; 224 | margin: 0 auto; 225 | } 226 | 227 | .banq{width: 100%; background-color: rgb(72,204,243);text-align: center; margin: 0 auto;padding-top: 30px;padding-bottom: 30px;clear: both;} 228 | 229 | .wrapper{float: left;} -------------------------------------------------------------------------------- /WebContent/CSS/index.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | 4 | body { 5 | background-image: url(../images/admin_bj.png); 6 | background-repeat: no-repeat; 7 | background-size: 100%; 8 | } 9 | 10 | h1{ 11 | 12 | text-align:center; 13 | } 14 | 15 | form table{ 16 | align-center:center; 17 | margin:0px auto; 18 | 19 | } 20 | 21 | 22 | .banq{background-color: rgb(213,184,186); 23 | text-align: center; 24 | margin: 0 auto; 25 | position:absolute; 26 | bottom:0px; 27 | width:100%; 28 | /* margin-top: 30px; 29 | padding-top: 30px; 30 | padding-bottom: 30px; */ 31 | font-size: 15px;clear: both;} 32 | -------------------------------------------------------------------------------- /WebContent/CSS/student_frame.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | .head{ 4 | 5 | background-color:rgb(197,222,251); 6 | 7 | } 8 | 9 | .s1{ 10 | 11 | font-size:32px; 12 | } 13 | 14 | 15 | ul { 16 | padding: 0; 17 | margin: 0; 18 | } 19 | 20 | li { 21 | list-style-type: none; 22 | } 23 | 24 | input[type='radio'] { 25 | display: none; 26 | } 27 | 28 | label { 29 | cursor: pointer; 30 | } 31 | 32 | ::-webkit-scrollbar { 33 | display: none; 34 | } 35 | 36 | body { 37 | height: 100vh; 38 | font-weight: 500; 39 | font-family: 'Roboto', sans-serif; 40 | 41 | -webkit-font-smoothing: antialiased; 42 | font-size: 12px; 43 | } 44 | 45 | .swanky_wrapper { 46 | width: 225px; 47 | height: auto; 48 | overflow: hidden; 49 | border-radius: 4px; 50 | background: #2a394f; 51 | float: left; 52 | } 53 | .swanky_wrapper label { 54 | padding: 25px; 55 | float: left; 56 | height: 72px; 57 | border-bottom: 1px solid #293649; 58 | position: relative; 59 | width: 100%; 60 | color: #eff4fa; 61 | transition: text-indent 0.15s, height 0.3s; 62 | box-sizing: border-box; 63 | } 64 | .swanky_wrapper label img { 65 | margin-right: 10px; 66 | position: relative; 67 | top: 2px; 68 | width: 16px; 69 | } 70 | .swanky_wrapper label span { 71 | position: relative; 72 | top: -3px; 73 | } 74 | .swanky_wrapper label:hover { 75 | background: #212e41; 76 | border-bottom: 1px solid #2a394f; 77 | text-indent: 4px; 78 | } 79 | .swanky_wrapper label:hover .bar { 80 | width: 100%; 81 | } 82 | .swanky_wrapper label .bar { 83 | width: 0px; 84 | transition: width 0.15s; 85 | height: 2px; 86 | position: absolute; 87 | display: block; 88 | background: #355789; 89 | bottom: 0; 90 | left: 0; 91 | } 92 | .swanky_wrapper label .lil_arrow { 93 | width: 5px; 94 | height: 5px; 95 | transition: -webkit-transform 0.8s; 96 | transition: transform 0.8s; 97 | transition: transform 0.8s, -webkit-transform 0.8s; 98 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 99 | border-top: 2px solid white; 100 | border-right: 2px solid white; 101 | float: right; 102 | position: relative; 103 | top: 6px; 104 | right: 2px; 105 | -webkit-transform: rotate(45deg); 106 | transform: rotate(45deg); 107 | } 108 | .swanky_wrapper__content { 109 | position: absolute; 110 | display: none; 111 | overflow: hidden; 112 | left: 0; 113 | width: 100%; 114 | } 115 | .swanky_wrapper__content li { 116 | width: 100%; 117 | opacity: 0; 118 | left: -100%; 119 | background: #15a4fa; 120 | height: 64px; 121 | line-height: 64px; 122 | text-indent: 25px; 123 | box-shadow: 0px 0px #126ca1 inset; 124 | transition: box-shadow 0.3s, text-indent 0.3s; 125 | position: relative; 126 | } 127 | .swanky_wrapper__content li:hover { 128 | background: #0c93e4; 129 | box-shadow: 3px 0px #126ca1 inset; 130 | transition: box-shadow 0.3s linear, text-indent 0.3s linear; 131 | text-indent: 31px; 132 | } 133 | .swanky_wrapper__content .clear { 134 | clear: both; 135 | } 136 | 137 | input[type='radio']:checked + label .swanky_wrapper__content { 138 | display: block; 139 | top: 68px; 140 | border-bottom: 1px solid #212e41; 141 | } 142 | 143 | input[type='radio']:checked + label > .lil_arrow { 144 | transition: -webkit-transform 0.8s; 145 | transition: transform 0.8s; 146 | transition: transform 0.8s, -webkit-transform 0.8s; 147 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 148 | -webkit-transform: rotate(135deg); 149 | transform: rotate(135deg); 150 | border-top: 2px solid #14a3f9; 151 | border-right: 2px solid #14a3f9; 152 | } 153 | 154 | input[type='radio']:checked + label { 155 | height: 325px; 156 | background: #212e41; 157 | text-indent: 4px; 158 | transition-property: height; 159 | transition-duration: 0.6s; 160 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 161 | } 162 | 163 | input[type='radio']:checked + label .bar { 164 | width: 0; 165 | } 166 | 167 | input[type='radio']:checked + label li:nth-of-type(1) { 168 | -webkit-animation: in 0.15s 0.575s forwards; 169 | animation: in 0.15s 0.575s forwards; 170 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 171 | -moz-animation: in 0.15s 0.575s forwards; 172 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 173 | } 174 | input[type='radio']:checked + label li:nth-of-type(2) { 175 | -webkit-animation: in 0.15s 0.7s forwards; 176 | animation: in 0.15s 0.7s forwards; 177 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 178 | -moz-animation: in 0.15s 0.7s forwards; 179 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 180 | } 181 | input[type='radio']:checked + label li:nth-of-type(3) { 182 | -webkit-animation: in 0.15s 0.825s forwards; 183 | animation: in 0.15s 0.825s forwards; 184 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 185 | -moz-animation: in 0.15s 0.825s forwards; 186 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 187 | } 188 | input[type='radio']:checked + label li:nth-of-type(4) { 189 | -webkit-animation: in 0.15s 0.95s forwards; 190 | animation: in 0.15s 0.95s forwards; 191 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 192 | -moz-animation: in 0.15s 0.95s forwards; 193 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 194 | } 195 | 196 | @-webkit-keyframes in { 197 | from { 198 | left: -100%; 199 | opacity: 0; 200 | } 201 | to { 202 | left: 0; 203 | opacity: 1; 204 | } 205 | } 206 | 207 | @keyframes in { 208 | from { 209 | left: -100%; 210 | opacity: 0; 211 | } 212 | to { 213 | left: 0; 214 | opacity: 1; 215 | } 216 | } 217 | 218 | 219 | .iframe{ 220 | width: 900px; 221 | height: 500px; 222 | align-content: center; 223 | margin: 0 auto; 224 | } 225 | 226 | .banq{width: 100%; background-color: rgb(72,204,243);text-align: center; margin: 0 auto;padding-top: 30px;padding-bottom: 30px;clear: both;} 227 | 228 | .wrapper{float: left;} -------------------------------------------------------------------------------- /WebContent/CSS/teacher_frame.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | 4 | .head{ 5 | 6 | background-color:rgb(197,222,251); 7 | 8 | } 9 | 10 | .s1{ 11 | 12 | font-size:32px; 13 | } 14 | 15 | 16 | ul { 17 | padding: 0; 18 | margin: 0; 19 | } 20 | 21 | li { 22 | list-style-type: none; 23 | } 24 | 25 | input[type='radio'] { 26 | display: none; 27 | } 28 | 29 | label { 30 | cursor: pointer; 31 | } 32 | 33 | ::-webkit-scrollbar { 34 | display: none; 35 | } 36 | 37 | body { 38 | height: 100vh; 39 | font-weight: 500; 40 | font-family: 'Roboto', sans-serif; 41 | 42 | -webkit-font-smoothing: antialiased; 43 | font-size: 12px; 44 | } 45 | 46 | .swanky_wrapper { 47 | width: 225px; 48 | height: auto; 49 | overflow: hidden; 50 | border-radius: 4px; 51 | background: #2a394f; 52 | float: left; 53 | } 54 | .swanky_wrapper label { 55 | padding: 25px; 56 | float: left; 57 | height: 72px; 58 | border-bottom: 1px solid #293649; 59 | position: relative; 60 | width: 100%; 61 | color: #eff4fa; 62 | transition: text-indent 0.15s, height 0.3s; 63 | box-sizing: border-box; 64 | } 65 | .swanky_wrapper label img { 66 | margin-right: 10px; 67 | position: relative; 68 | top: 2px; 69 | width: 16px; 70 | } 71 | .swanky_wrapper label span { 72 | position: relative; 73 | top: -3px; 74 | } 75 | .swanky_wrapper label:hover { 76 | background: #212e41; 77 | border-bottom: 1px solid #2a394f; 78 | text-indent: 4px; 79 | } 80 | .swanky_wrapper label:hover .bar { 81 | width: 100%; 82 | } 83 | .swanky_wrapper label .bar { 84 | width: 0px; 85 | transition: width 0.15s; 86 | height: 2px; 87 | position: absolute; 88 | display: block; 89 | background: #355789; 90 | bottom: 0; 91 | left: 0; 92 | } 93 | .swanky_wrapper label .lil_arrow { 94 | width: 5px; 95 | height: 5px; 96 | transition: -webkit-transform 0.8s; 97 | transition: transform 0.8s; 98 | transition: transform 0.8s, -webkit-transform 0.8s; 99 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 100 | border-top: 2px solid white; 101 | border-right: 2px solid white; 102 | float: right; 103 | position: relative; 104 | top: 6px; 105 | right: 2px; 106 | -webkit-transform: rotate(45deg); 107 | transform: rotate(45deg); 108 | } 109 | .swanky_wrapper__content { 110 | position: absolute; 111 | display: none; 112 | overflow: hidden; 113 | left: 0; 114 | width: 100%; 115 | } 116 | .swanky_wrapper__content li { 117 | width: 100%; 118 | opacity: 0; 119 | left: -100%; 120 | background: #15a4fa; 121 | height: 64px; 122 | line-height: 64px; 123 | text-indent: 25px; 124 | box-shadow: 0px 0px #126ca1 inset; 125 | transition: box-shadow 0.3s, text-indent 0.3s; 126 | position: relative; 127 | } 128 | .swanky_wrapper__content li:hover { 129 | background: #0c93e4; 130 | box-shadow: 3px 0px #126ca1 inset; 131 | transition: box-shadow 0.3s linear, text-indent 0.3s linear; 132 | text-indent: 31px; 133 | } 134 | .swanky_wrapper__content .clear { 135 | clear: both; 136 | } 137 | 138 | input[type='radio']:checked + label .swanky_wrapper__content { 139 | display: block; 140 | top: 68px; 141 | border-bottom: 1px solid #212e41; 142 | } 143 | 144 | input[type='radio']:checked + label > .lil_arrow { 145 | transition: -webkit-transform 0.8s; 146 | transition: transform 0.8s; 147 | transition: transform 0.8s, -webkit-transform 0.8s; 148 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 149 | -webkit-transform: rotate(135deg); 150 | transform: rotate(135deg); 151 | border-top: 2px solid #14a3f9; 152 | border-right: 2px solid #14a3f9; 153 | } 154 | 155 | input[type='radio']:checked + label { 156 | height: 325px; 157 | background: #212e41; 158 | text-indent: 4px; 159 | transition-property: height; 160 | transition-duration: 0.6s; 161 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 162 | } 163 | 164 | input[type='radio']:checked + label .bar { 165 | width: 0; 166 | } 167 | 168 | input[type='radio']:checked + label li:nth-of-type(1) { 169 | -webkit-animation: in 0.15s 0.575s forwards; 170 | animation: in 0.15s 0.575s forwards; 171 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 172 | -moz-animation: in 0.15s 0.575s forwards; 173 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 174 | } 175 | input[type='radio']:checked + label li:nth-of-type(2) { 176 | -webkit-animation: in 0.15s 0.7s forwards; 177 | animation: in 0.15s 0.7s forwards; 178 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 179 | -moz-animation: in 0.15s 0.7s forwards; 180 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 181 | } 182 | input[type='radio']:checked + label li:nth-of-type(3) { 183 | -webkit-animation: in 0.15s 0.825s forwards; 184 | animation: in 0.15s 0.825s forwards; 185 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 186 | -moz-animation: in 0.15s 0.825s forwards; 187 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 188 | } 189 | input[type='radio']:checked + label li:nth-of-type(4) { 190 | -webkit-animation: in 0.15s 0.95s forwards; 191 | animation: in 0.15s 0.95s forwards; 192 | -webkit-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 193 | -moz-animation: in 0.15s 0.95s forwards; 194 | -moz-transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); 195 | } 196 | 197 | @-webkit-keyframes in { 198 | from { 199 | left: -100%; 200 | opacity: 0; 201 | } 202 | to { 203 | left: 0; 204 | opacity: 1; 205 | } 206 | } 207 | 208 | @keyframes in { 209 | from { 210 | left: -100%; 211 | opacity: 0; 212 | } 213 | to { 214 | left: 0; 215 | opacity: 1; 216 | } 217 | } 218 | 219 | 220 | .iframe{ 221 | width: 900px; 222 | height: 500px; 223 | align-content: center; 224 | margin: 0 auto; 225 | } 226 | 227 | .banq{width: 100%; background-color: rgb(72,204,243);text-align: center; margin: 0 auto;padding-top: 30px;padding-bottom: 30px;clear: both;} 228 | 229 | .wrapper{float: left;} -------------------------------------------------------------------------------- /WebContent/JSP/admin/AddClass.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 网上选课系统-添加教室 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 |

添加教室界面

12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |   23 | 24 | 27 | 30 | 31 | 32 |
班级名: 系部号:
25 | 26 | 28 | 29 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/AddCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 网上选课系统-添加课程 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 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 | 40 | 41 | 42 |   43 | 44 | 47 | 50 | 51 |
课程号: 课程名称: 教师号:
学分: 学时: 上课地点:
总人数: 已选人数: 院系号:
45 | 46 | 48 | 49 |
52 |
53 | 54 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/AddDid.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 网上选课系统-添加系部界面 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 |

添加系部界面

12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |   23 | 24 | 27 | 30 | 31 | 32 |
系部号: 系部名:
25 | 26 | 28 | 29 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/AddNotes.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 |

添加课程界面

12 | <% 13 | String aId = (String)request.getParameter("aId"); 14 | request.setAttribute("aId", aId); 15 | %> 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |   29 | 30 | 33 | 36 | 37 |
 日志: 
31 | 32 | 34 | 35 |
38 |
39 | 40 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/Admin_Mainframe.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 网上选课系统-管理员主页 9 | 10 | 11 | 12 | <% 13 | String aId = (String)request.getParameter("aId"); 14 | %> 15 | 16 |
17 | 18 |

管理员操作界面 19 | 20 |       <%=aId %>您好,欢迎进入管理员操作界面

21 |
22 | 23 |
24 | 25 | 26 | 38 | 39 | 40 | 41 | 56 | 57 | 71 | 72 | 84 | 85 | 98 | 99 | 100 | 101 | 118 | 119 | 120 | 132 | 133 |
134 | 135 | 136 |
137 | 138 |
139 | 140 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/DeleteNotes.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |   20 | 21 | 24 | 27 | 28 |
日志名: 
22 | 23 | 25 | 26 |
29 |
30 | 31 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/DeleteStudents.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 网上选课系统-删除学生 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |   21 | 22 | 25 | 28 | 29 |
学号: 姓名(可不填):
23 | 24 | 26 | 27 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/DeleteTeacher.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 网上选课系统-删除教师 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |   21 | 22 | 25 | 28 | 29 |
教师号: 姓名(可不填):
23 | 24 | 26 | 27 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/EnterStudents.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 网上选课系统-录入学生信息界面 9 | 10 | 11 | 12 | 13 | <%request.setCharacterEncoding("utf-8");%> 14 |

录入学生信息界面

15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |   26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |   35 | 36 | 39 | 42 | 43 |
学号: 姓名: 性别:
密码: 系部: 班级:
37 | 38 | 40 | 41 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/EnterTeachers.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 网上选课系统-录入教师信息界面 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 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 | 40 | 41 | 42 | 43 | 44 |   45 | 46 | 49 | 52 | 53 |
教师号: 姓名: 性别:
年龄: 学历: 职称:
毕业院校: 健康状况: 密码:
所在系号: 
47 | 48 | 50 | 51 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/LookNote.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

查看日志界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | Class.forName(sDBDriver); 30 | connection = DriverManager.getConnection(sConnStr,username,password); 31 | stmt = connection.createStatement(); 32 | 33 | 34 | //String id=request.getParameter("uname"); 35 | 36 | //String pwd=request.getParameter("upwd"); 37 | 38 | 39 | String sql="select * from notes"; 40 | 41 | rs=stmt.executeQuery(sql); 42 | %> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | <% 58 | while(rs.next()){ 59 | 60 | 61 | %> 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | <% 74 | 75 | 76 | 77 | } 78 | 79 | 80 | }catch(SQLException e){ 81 | e.printStackTrace(); 82 | 83 | } 84 | finally{ 85 | 86 | 87 | } 88 | 89 | %> 90 |
学号:姓名:性别:手机号:地址:密码:系部:班级:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %>
91 | 92 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/LookStudent.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | 网上选课系统-查看学生 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

查看学生界面

13 | 14 | <% 15 | 16 | 17 | String sId=null; 18 | String sName=null; 19 | String sSex=null; 20 | String sMobil=null; 21 | String sAddress=null; 22 | String sPass=null; 23 | String dId=null; 24 | String sClass=null; 25 | 26 | String sDBDriver="com.mysql.jdbc.Driver"; 27 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 28 | String username="root"; 29 | String password="123456"; 30 | 31 | 32 | Connection connection =null; 33 | Statement stmt = null; 34 | ResultSet rs=null; 35 | try{ 36 | 37 | Class.forName(sDBDriver); 38 | connection = DriverManager.getConnection(sConnStr,username,password); 39 | stmt = connection.createStatement(); 40 | 41 | 42 | //String id=request.getParameter("uname"); 43 | 44 | //String pwd=request.getParameter("upwd"); 45 | 46 | 47 | String sql="select * from student"; 48 | 49 | rs=stmt.executeQuery(sql); 50 | %> 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | <% 66 | while(rs.next()){ 67 | 68 | 69 | %> 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | <% 86 | 87 | 88 | 89 | } 90 | 91 | 92 | }catch(SQLException e){ 93 | e.printStackTrace(); 94 | 95 | } 96 | finally{ 97 | 98 | 99 | } 100 | 101 | %> 102 |
学号:姓名:性别:手机号:地址:密码:系部:班级:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %><%=rs.getString(4) %><%=rs.getString(5) %><%=rs.getString(6) %><%=rs.getString(7) %><%=rs.getString(8) %>
103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/LookTeacher.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | 网上选课系统-查看教师 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

查看教师界面

13 | 14 | <% 15 | 16 | 17 | 18 | 19 | String sDBDriver="com.mysql.jdbc.Driver"; 20 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 21 | String username="root"; 22 | String password="123456"; 23 | 24 | 25 | Connection connection =null; 26 | Statement stmt = null; 27 | ResultSet rs=null; 28 | try{ 29 | 30 | Class.forName(sDBDriver); 31 | connection = DriverManager.getConnection(sConnStr,username,password); 32 | stmt = connection.createStatement(); 33 | 34 | 35 | //String id=request.getParameter("uname"); 36 | 37 | //String pwd=request.getParameter("upwd"); 38 | 39 | 40 | String sql="select * from teadetail"; 41 | 42 | rs=stmt.executeQuery(sql); 43 | %> 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | <% 63 | while(rs.next()){ 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 | 90 | } 91 | 92 | 93 | }catch(SQLException e){ 94 | e.printStackTrace(); 95 | 96 | } 97 | finally{ 98 | 99 | 100 | } 101 | 102 | %> 103 |
教师号:姓名:性别:年龄:手机号:地址:学历:职称:毕业院校:健康状况:密码:系部:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %><%=rs.getString(4) %><%=rs.getString(5) %><%=rs.getString(6) %><%=rs.getString(7) %><%=rs.getString(8) %><%=rs.getString(9) %><%=rs.getString(10) %><%=rs.getString(11) %><%=rs.getString(12) %>
104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/PasswordUpdate.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String aid=request.getParameter("aid"); 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | String aPass=null; 25 | 26 | 27 | Connection connection =null; 28 | Statement stmt = null; 29 | ResultSet rs=null; 30 | 31 | 32 | 33 | 34 | try{ 35 | 36 | Class.forName(sDBDriver); 37 | connection = DriverManager.getConnection(sConnStr,username,password); 38 | stmt = connection.createStatement(); 39 | 40 | 41 | 42 | 43 | 44 | String sql="select * from admin_login where aId='"+aid+"'"; 45 | 46 | rs =stmt.executeQuery(sql); 47 | 48 | if(rs==null){ 49 | 50 | return; 51 | } 52 | 53 | while(rs.next()){ 54 | request.setAttribute("rs", rs); 55 | 56 | request.setAttribute("aid", aid); 57 | 58 | 59 | 60 | aPass=rs.getString(2); 61 | request.setAttribute("aPass", aPass); 62 | 63 | 64 | } 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | }catch(ClassNotFoundException e){ 73 | e.printStackTrace(); 74 | 75 | }catch(SQLException e){ 76 | e.printStackTrace(); 77 | 78 | }catch(Exception e){ 79 | e.printStackTrace(); 80 | 81 | } 82 | finally{ 83 | try{ 84 | if(rs!=null) rs.close(); 85 | if(stmt!=null) stmt.close(); 86 | if(connection!=null) connection.close(); 87 | }catch(SQLException e){ 88 | e.printStackTrace(); 89 | } 90 | } 91 | 92 | 93 | 94 | %> 95 | 96 | 97 | 98 | 99 |

录入学生信息界面

100 | 101 |
102 | 103 | 104 | 105 | 106 | 107 | 108 |   109 | 110 | 111 | 114 | 117 | 118 |
管理员号: />密码: />
112 | 113 | 115 | 116 |
119 |
120 | 121 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/UpdateNotes.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String aid=request.getParameter("aid"); 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | String Notes=null; 25 | 26 | 27 | Connection connection =null; 28 | Statement stmt = null; 29 | ResultSet rs=null; 30 | 31 | 32 | 33 | 34 | try{ 35 | 36 | Class.forName(sDBDriver); 37 | connection = DriverManager.getConnection(sConnStr,username,password); 38 | stmt = connection.createStatement(); 39 | 40 | 41 | 42 | 43 | 44 | String sql="select * from notes where aId='"+aid+"'"; 45 | 46 | rs =stmt.executeQuery(sql); 47 | 48 | if(rs==null){ 49 | 50 | return; 51 | } 52 | 53 | while(rs.next()){ 54 | request.setAttribute("rs", rs); 55 | 56 | request.setAttribute("aid", aid); 57 | 58 | 59 | 60 | Notes=rs.getString(1); 61 | request.setAttribute("Notes", Notes); 62 | 63 | 64 | } 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | }catch(ClassNotFoundException e){ 73 | e.printStackTrace(); 74 | 75 | }catch(SQLException e){ 76 | e.printStackTrace(); 77 | 78 | }catch(Exception e){ 79 | e.printStackTrace(); 80 | 81 | } 82 | finally{ 83 | try{ 84 | if(rs!=null) rs.close(); 85 | if(stmt!=null) stmt.close(); 86 | if(connection!=null) connection.close(); 87 | }catch(SQLException e){ 88 | e.printStackTrace(); 89 | } 90 | } 91 | 92 | 93 | 94 | %> 95 | 96 | 97 | 98 | 99 |

录入学生信息界面

100 | 101 |
102 | 103 | 104 | 105 | 106 | 107 | 108 |   109 | 110 | 111 | 114 | 117 | 118 |
管理员号: />日志: />
112 | 113 | 115 | 116 |
119 |
120 | 121 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkAddClass.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | <% 13 | 14 | 15 | 16 | 17 | String Class= request.getParameter("Class"); 18 | String dId = request.getParameter("dId"); 19 | 20 | 21 | 22 | int result=checkAddClassDao.login(Class, dId); 23 | if(result >0){ 24 | out.print("插入成功!"); 25 | 26 | 27 | }else if(result == 0){ 28 | out.print("插入失败!"); 29 | }else{ 30 | out.print("系统异常!!!"); 31 | } 32 | %> 33 | 34 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkAddCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | <% 13 | 14 | String cId = request.getParameter("cId"); 15 | String cName = request.getParameter("cName"); 16 | String tId=request.getParameter("tId"); 17 | String credit=request.getParameter("credit"); 18 | String period=request.getParameter("period"); 19 | String cPlace=request.getParameter("cPlace"); 20 | String cNumAll=request.getParameter("cNumAll"); 21 | String cNum=request.getParameter("cNum"); 22 | String dId=request.getParameter("dId"); 23 | 24 | 25 | int result=checkAddCourseDao.login(cId, cName,tId,credit,period,cPlace,cNumAll,cNum,dId); 26 | if(result >0){ 27 | out.print("插入成功!"); 28 | 29 | 30 | }else if(result == 0){ 31 | out.print("插入失败!"); 32 | }else{ 33 | out.print("系统异常!!!"); 34 | } 35 | %> 36 | 37 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkAddDid.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | <% 13 | 14 | 15 | 16 | 17 | String dId= request.getParameter("dId"); 18 | String dName = request.getParameter("dName"); 19 | 20 | 21 | 22 | int result=checkAddDidDao.login(dId, dName); 23 | if(result >0){ 24 | out.print("插入成功!"); 25 | 26 | 27 | }else if(result == 0){ 28 | out.print("插入失败!"); 29 | }else{ 30 | out.print("系统异常!!!"); 31 | } 32 | %> 33 | 34 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkAddNotes.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | <%@ page import="java.util.Date" %> 5 | <%@ page import="java.text.SimpleDateFormat" %> 6 | <%@ page import="java.text.DateFormat" %> 7 | 8 | 9 | 10 | 11 | Insert title here 12 | 13 | 14 | <%request.setCharacterEncoding("utf-8");%> 15 | 16 | 17 | <% 18 | 19 | String aId = (String)request.getParameter("aId"); 20 | 21 | 22 | 23 | String Notes= (String)request.getParameter("editor1"); 24 | 25 | 26 | Date date=new Date(); 27 | DateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 28 | String time=format.format(date); 29 | 30 | int result=checkAddNotesDao.login(Notes,aId,time); 31 | if(result >0){ 32 | out.print("插入成功!"); 33 | 34 | 35 | }else if(result == 0){ 36 | out.print("插入失败!"); 37 | }else{ 38 | out.print("系统异常!!!"); 39 | } 40 | %> 41 | 42 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkDeleteNotes.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkDeleteStudent.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | 13 | <% 14 | 15 | String sId = (String)request.getParameter("sId"); 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | int result=checkDeleteStudentDao.login(sId); 24 | if(result >0){ 25 | out.print("删除成功!"); 26 | 27 | 28 | }else if(result == 0){ 29 | out.print("删除失败!"); 30 | }else{ 31 | out.print("系统异常!!!"); 32 | } 33 | %> 34 | 35 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkDeleteTeacher.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | 13 | <% 14 | 15 | String tId = (String)request.getParameter("teaId"); 16 | 17 | int result=checkDeleteTeacherDao.login(tId); 18 | if(result >0){ 19 | out.print("删除成功!"); 20 | 21 | 22 | }else if(result == 0){ 23 | out.print("删除失败!"); 24 | }else{ 25 | out.print("系统异常!!!"); 26 | } 27 | %> 28 | 29 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkEnterStudents.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | <% 13 | 14 | String sId = request.getParameter("sId"); 15 | String sName = request.getParameter("sName"); 16 | String sSex=request.getParameter("sSex"); 17 | String sPass=request.getParameter("sPass"); 18 | String sdId=request.getParameter("sdId"); 19 | String sClass=request.getParameter("sClass"); 20 | 21 | 22 | int result=checkEnterStudentsDao.login(sId,sName,sSex,sPass,sdId,sClass); 23 | if(result >0){ 24 | out.print("插入成功!"); 25 | 26 | 27 | }else if(result == 0){ 28 | out.print("插入失败!"); 29 | }else{ 30 | out.print("系统异常!!!"); 31 | } 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | %> 41 | 42 | 43 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkEnterTeacher.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | <% 13 | 14 | String teaID = request.getParameter("teaID"); 15 | String teaName = request.getParameter("teaName"); 16 | String teaSex=request.getParameter("teaSex"); 17 | String teaAge=request.getParameter("teaAge"); 18 | String teaedu=request.getParameter("teaedu"); 19 | String teatitle=request.getParameter("teatitle"); 20 | String teaSchool=request.getParameter("teaSchool"); 21 | String teaHealth=request.getParameter("teaHealth"); 22 | String teaPass=request.getParameter("teaPass"); 23 | String teaDid=request.getParameter("teaDid"); 24 | 25 | int result=checkEnterStudentsDao.login(teaID, teaName,teaSex,teaAge,teaedu,teatitle,teaSchool,teaHealth,teaPass,teaDid); 26 | if(result >0){ 27 | out.print("插入成功!"); 28 | 29 | 30 | }else if(result == 0){ 31 | out.print("插入失败!"); 32 | }else{ 33 | out.print("系统异常!!!"); 34 | } 35 | %> 36 | 37 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkPasswordUpdate.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String aId=request.getParameter("aId"); 17 | 18 | 19 | 20 | String aPass=request.getParameter("aPass"); 21 | 22 | 23 | 24 | String sDBDriver="com.mysql.jdbc.Driver"; 25 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 26 | String username="root"; 27 | String password="123456"; 28 | 29 | 30 | Connection connection =null; 31 | Statement stmt = null; 32 | ResultSet rs=null; 33 | try{ 34 | 35 | Class.forName(sDBDriver); 36 | connection = DriverManager.getConnection(sConnStr,username,password); 37 | stmt = connection.createStatement(); 38 | 39 | 40 | 41 | 42 | 43 | String sql="update admin_login set aPass='"+aPass+"' where aId='"+aId+"'"; 44 | 45 | stmt.execute(sql); 46 | %> 47 | 51 | 52 | <% 53 | 54 | }catch(ClassNotFoundException e){ 55 | e.printStackTrace(); 56 | 57 | }catch(SQLException e){ 58 | e.printStackTrace(); 59 | 60 | }catch(Exception e){ 61 | e.printStackTrace(); 62 | 63 | } 64 | finally{ 65 | try{ 66 | if(rs!=null) rs.close(); 67 | if(stmt!=null) stmt.close(); 68 | if(connection!=null) connection.close(); 69 | }catch(SQLException e){ 70 | e.printStackTrace(); 71 | } 72 | } 73 | 74 | 75 | %> 76 | 77 | -------------------------------------------------------------------------------- /WebContent/JSP/admin/checkUpdateNotesjsp.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" 2 | pageEncoding="ISO-8859-1"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /WebContent/JSP/index/checkindex.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@page import="javax.print.attribute.standard.MediaSize.Other"%> 3 | <%@ page language="java" contentType="text/html; charset=UTF-8" 4 | pageEncoding="UTF-8"%> 5 | 6 | 7 | <%@page import="java.sql.*"%> 8 | <%@page import="java.util.Scanner"%> 9 | 10 | 11 | 12 | 13 | 14 | 15 | Insert title here 16 | 17 | 18 | <%-- <% 19 | String sDBDriver="com.mysql.jdbc.Driver"; 20 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 21 | String username="root"; 22 | String password="123456"; 23 | 24 | 25 | Connection connection =null; 26 | Statement stmt = null; 27 | ResultSet rs=null; 28 | try{ 29 | 30 | Class.forName(sDBDriver); 31 | connection = DriverManager.getConnection(sConnStr,username,password); 32 | stmt = connection.createStatement(); 33 | 34 | 35 | String id=request.getParameter("uname"); 36 | 37 | String pwd=request.getParameter("upwd"); 38 | 39 | String sql="select count(*) from admin_login where aId='"+id+"' and aPass='"+pwd+"'"; 40 | rs=stmt.executeQuery(sql); 41 | 42 | int count = -1; 43 | if(rs.next()){ 44 | count = rs.getInt(1); 45 | } 46 | 47 | if(count>0){ 48 | System.out.println("登录成功!"); 49 | }else{ 50 | System.out.println("登录失败!"); 51 | } 52 | }catch(ClassNotFoundException e){ 53 | e.printStackTrace(); 54 | 55 | }catch(SQLException e){ 56 | e.printStackTrace(); 57 | }catch(Exception e){ 58 | e.printStackTrace(); 59 | } 60 | finally{ 61 | try{ 62 | if(rs!=null) rs.close(); 63 | if(stmt!=null) stmt.close(); 64 | if(connection!=null) connection.close(); 65 | }catch(SQLException e){ 66 | e.printStackTrace(); 67 | } 68 | } 69 | 70 | 71 | %>--%> 72 | 73 | 74 | 76 | 77 | 79 | 80 | <% 81 | String id = request.getParameter("uname"); 82 | String pwd = request.getParameter("upwd"); 83 | String identity = request.getParameter("login-identity"); 84 | 85 | switch (identity) { 86 | case "student": 87 | int result = studentDao.login(id, pwd); 88 | if (result > 0) { 89 | out.print("登录成功!"); 90 | 91 | //request.setAttribute("sId", id); 92 | response.sendRedirect("../student/student_Mainframe.jsp?sId=" + id); 93 | 94 | } else if (result == 0) { 95 | out.print("用户名或密码有误!"); 96 | } else { 97 | out.print("系统异常!!!"); 98 | } 99 | break; 100 | 101 | case "teacher": 102 | int result1 = teacherDao.login(id, pwd); 103 | if (result1 > 0) { 104 | out.print("登录成功!"); 105 | response.sendRedirect("../teacher/teacher_Mainframe.jsp?teaId=" + id); 106 | 107 | } else if (result1 == 0) { 108 | out.print("用户名或密码有误!"); 109 | } else { 110 | out.print("系统异常!!!"); 111 | } 112 | 113 | break; 114 | 115 | case "admin": 116 | int result2 = adminDao.login(id, pwd); 117 | if (result2 > 0) { 118 | out.print("登录成功!"); 119 | response.sendRedirect("../admin/Admin_Mainframe.jsp?aId=" + id); 120 | 121 | } else if (result2 == 0) { 122 | out.print("用户名或密码有误!"); 123 | } else { 124 | out.print("系统异常!!!"); 125 | } 126 | break; 127 | 128 | default: 129 | 130 | out.print("请选择具体身份!"); 131 | break; 132 | 133 | } 134 | %> 135 | 136 | 137 | -------------------------------------------------------------------------------- /WebContent/JSP/index/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 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 | 36 | 37 | 38 | 40 | 41 |
用户名:
密码:
用户类型:
42 |
43 | 44 |
45 | 版权©a-cper-cpu
46 | https://github.com/a-cper-cpu 47 |
48 | 49 | 50 | -------------------------------------------------------------------------------- /WebContent/JSP/student/LookCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

查看课程界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | Class.forName(sDBDriver); 30 | connection = DriverManager.getConnection(sConnStr,username,password); 31 | stmt = connection.createStatement(); 32 | 33 | 34 | //String id=request.getParameter("uname"); 35 | 36 | //String pwd=request.getParameter("upwd"); 37 | 38 | 39 | String sql="select * from course"; 40 | 41 | rs=stmt.executeQuery(sql); 42 | %> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | <% 59 | while(rs.next()){ 60 | 61 | 62 | %> 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | <% 80 | 81 | 82 | 83 | } 84 | 85 | 86 | }catch(SQLException e){ 87 | e.printStackTrace(); 88 | 89 | } 90 | finally{ 91 | 92 | 93 | } 94 | 95 | %> 96 |
课程编号:课程名:教师编号:学分:学时:地点:总人数:已选人数:系部号
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %><%=rs.getString(4) %><%=rs.getString(5) %><%=rs.getString(6) %><%=rs.getString(7) %><%=rs.getString(8) %><%=rs.getString(9) %>
97 | 98 | 99 | -------------------------------------------------------------------------------- /WebContent/JSP/student/LookGrade.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

查看成绩界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | Class.forName(sDBDriver); 30 | connection = DriverManager.getConnection(sConnStr,username,password); 31 | stmt = connection.createStatement(); 32 | 33 | 34 | String sId=request.getParameter("sId"); 35 | 36 | 37 | 38 | String sql="select * from choosecourse where sId='"+sId+"'"; 39 | 40 | rs=stmt.executeQuery(sql); 41 | %> 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | <% 52 | while(rs.next()){ 53 | 54 | %> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | <% 63 | 64 | 65 | 66 | } 67 | 68 | 69 | }catch(SQLException e){ 70 | e.printStackTrace(); 71 | 72 | } 73 | finally{ 74 | 75 | 76 | } 77 | 78 | %> 79 |
课程编号:学号:成绩:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %>
80 | 81 | -------------------------------------------------------------------------------- /WebContent/JSP/student/LookSelectCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

查看选课界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | String sId=request.getParameter("sId"); 30 | 31 | Class.forName(sDBDriver); 32 | connection = DriverManager.getConnection(sConnStr,username,password); 33 | stmt = connection.createStatement(); 34 | 35 | 36 | //String id=request.getParameter("uname"); 37 | 38 | //String pwd=request.getParameter("upwd"); 39 | 40 | 41 | String sql="select * from choosecourse where sId='"+sId+"'"; 42 | 43 | rs=stmt.executeQuery(sql); 44 | %> 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | <% 56 | while(rs.next()){ 57 | 58 | 59 | %> 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | <% 72 | 73 | 74 | 75 | } 76 | 77 | 78 | }catch(SQLException e){ 79 | e.printStackTrace(); 80 | 81 | } 82 | finally{ 83 | 84 | 85 | } 86 | 87 | %> 88 |
课程编号:学号:成绩:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %>
89 | 90 | -------------------------------------------------------------------------------- /WebContent/JSP/student/Password_Update.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | 12 | <%request.setCharacterEncoding("utf-8");%> 13 | 14 | <% 15 | 16 | 17 | String sId=request.getParameter("sId"); 18 | 19 | String sDBDriver="com.mysql.jdbc.Driver"; 20 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 21 | String username="root"; 22 | String password="123456"; 23 | 24 | 25 | String sPass=null; 26 | 27 | 28 | Connection connection =null; 29 | Statement stmt = null; 30 | ResultSet rs=null; 31 | 32 | 33 | 34 | 35 | try{ 36 | 37 | Class.forName(sDBDriver); 38 | connection = DriverManager.getConnection(sConnStr,username,password); 39 | stmt = connection.createStatement(); 40 | 41 | 42 | 43 | 44 | 45 | String sql="select * from student where sId='"+sId+"'"; 46 | 47 | rs =stmt.executeQuery(sql); 48 | 49 | if(rs==null){ 50 | 51 | return; 52 | } 53 | 54 | while(rs.next()){ 55 | request.setAttribute("rs", rs); 56 | 57 | request.setAttribute("sId", sId); 58 | 59 | 60 | 61 | sPass=rs.getString(6); 62 | request.setAttribute("sPass", sPass); 63 | 64 | 65 | } 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | }catch(ClassNotFoundException e){ 74 | e.printStackTrace(); 75 | 76 | }catch(SQLException e){ 77 | e.printStackTrace(); 78 | 79 | }catch(Exception e){ 80 | e.printStackTrace(); 81 | 82 | } 83 | finally{ 84 | try{ 85 | if(rs!=null) rs.close(); 86 | if(stmt!=null) stmt.close(); 87 | if(connection!=null) connection.close(); 88 | }catch(SQLException e){ 89 | e.printStackTrace(); 90 | } 91 | } 92 | 93 | 94 | 95 | %> 96 | 97 | 98 | 109 | 110 | 111 |

录入学生信息界面

112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 | 120 |   121 | 122 | 123 | 126 | 129 | 130 |
学号: />密码: />
124 | 125 | 127 | 128 |
131 |
132 | 133 | 134 | -------------------------------------------------------------------------------- /WebContent/JSP/student/QuitCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 |

退课界面

12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |   22 | 23 | 24 | 27 | 30 | 31 |
课程编号: 学号:
25 | 26 | 28 | 29 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /WebContent/JSP/student/SelectCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 |

选课界面

12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |   23 | 24 | 25 | 28 | 31 | 32 |
课程编号: 学号: 分数:
26 | 27 | 29 | 30 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /WebContent/JSP/student/SortGrade.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 |

排名界面

12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |   21 | 22 | 23 | 26 | 29 | 30 |
课程编号: 学号:
24 | 25 | 27 | 28 |
31 |
32 | 33 | -------------------------------------------------------------------------------- /WebContent/JSP/student/checkPassword_Update.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String sId=request.getParameter("sId"); 17 | 18 | 19 | 20 | String sPass=request.getParameter("sPass"); 21 | 22 | 23 | 24 | String sDBDriver="com.mysql.jdbc.Driver"; 25 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 26 | String username="root"; 27 | String password="123456"; 28 | 29 | 30 | Connection connection =null; 31 | Statement stmt = null; 32 | ResultSet rs=null; 33 | try{ 34 | 35 | Class.forName(sDBDriver); 36 | connection = DriverManager.getConnection(sConnStr,username,password); 37 | stmt = connection.createStatement(); 38 | 39 | 40 | 41 | 42 | 43 | String sql="update student set sPass='"+sPass+"' where sId='"+sId+"'"; 44 | 45 | stmt.execute(sql); 46 | %> 47 | 51 | 52 | <% 53 | 54 | }catch(ClassNotFoundException e){ 55 | e.printStackTrace(); 56 | 57 | }catch(SQLException e){ 58 | e.printStackTrace(); 59 | 60 | }catch(Exception e){ 61 | e.printStackTrace(); 62 | 63 | } 64 | finally{ 65 | try{ 66 | if(rs!=null) rs.close(); 67 | if(stmt!=null) stmt.close(); 68 | if(connection!=null) connection.close(); 69 | }catch(SQLException e){ 70 | e.printStackTrace(); 71 | } 72 | } 73 | 74 | 75 | %> 76 | 77 | -------------------------------------------------------------------------------- /WebContent/JSP/student/checkQuitCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 | 12 | <% 13 | 14 | String cId = request.getParameter("cId"); 15 | String sId = request.getParameter("sId"); 16 | String grade =request.getParameter("grade"); 17 | 18 | 19 | int result=checkQuitCoursesDao.login(cId,sId); 20 | if(result >0){ 21 | out.print("退选成功!"); 22 | 23 | 24 | }else if(result == 0){ 25 | out.print("退选失败!"); 26 | }else{ 27 | out.print("系统异常!!!"); 28 | } 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | %> 38 | 39 | -------------------------------------------------------------------------------- /WebContent/JSP/student/checkSelectCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | String cId = request.getParameter("cId"); 16 | String sId = request.getParameter("sId"); 17 | String grade =request.getParameter("grade"); 18 | 19 | 20 | int result=checkSelectCoursesDao.login(cId,sId,null); 21 | if(result >0){ 22 | out.print("插入成功!"); 23 | 24 | 25 | }else if(result == 0){ 26 | out.print("插入失败!"); 27 | }else{ 28 | out.print("系统异常!!!"); 29 | } 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | %> 39 | 40 | -------------------------------------------------------------------------------- /WebContent/JSP/student/checkSortGrade.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <% 12 | request.setCharacterEncoding("utf-8"); 13 | %> 14 | 15 | <% 16 | String cId = request.getParameter("cId"); 17 | 18 | String sId = request.getParameter("sId"); 19 | 20 | String sDBDriver = "com.mysql.jdbc.Driver"; 21 | String sConnStr = "jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 22 | String username = "root"; 23 | String password = "123456"; 24 | 25 | Connection connection = null; 26 | Statement stmt = null; 27 | ResultSet rs = null; 28 | try { 29 | 30 | Class.forName(sDBDriver); 31 | connection = DriverManager.getConnection(sConnStr, username, password); 32 | stmt = connection.createStatement(); 33 | 34 | String sql = "select cId,sId,grade,(@rowNum:=@rowNum+1) " 35 | + "as rowNo from choosecourse,(select (@rowNum :=0) ) b where cId='" + cId + "' and sId='" + sId 36 | + "' order by choosecourse.grade desc "; 37 | 38 | rs = stmt.executeQuery(sql); 39 | 40 | while (rs.next()) { 41 | %> 42 | 43 | 49 | 50 | <% 51 | } 52 | %> 53 | 57 | 58 | <% 59 | } catch (ClassNotFoundException e) { 60 | e.printStackTrace(); 61 | 62 | } catch (SQLException e) { 63 | e.printStackTrace(); 64 | 65 | } catch (Exception e) { 66 | e.printStackTrace(); 67 | 68 | } finally { 69 | try { 70 | if (rs != null) 71 | rs.close(); 72 | if (stmt != null) 73 | stmt.close(); 74 | if (connection != null) 75 | connection.close(); 76 | } catch (SQLException e) { 77 | e.printStackTrace(); 78 | } 79 | } 80 | %> 81 | 82 | -------------------------------------------------------------------------------- /WebContent/JSP/student/checkpersonal_information.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | 9 | Insert title here 10 | 11 | 12 | <%request.setCharacterEncoding("utf-8");%> 13 | 14 | <% 15 | 16 | 17 | String sId=request.getParameter("sId"); 18 | 19 | 20 | String sName=request.getParameter("sName");; 21 | String sSex=request.getParameter("sSex");; 22 | String sMobil=request.getParameter("sMobil");; 23 | String sAddress=request.getParameter("sAddress");; 24 | String sPass=request.getParameter("sPass");; 25 | String sdId=request.getParameter("sdId");; 26 | String sClass=request.getParameter("sClass");; 27 | 28 | 29 | String sDBDriver="com.mysql.jdbc.Driver"; 30 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 31 | String username="root"; 32 | String password="123456"; 33 | 34 | 35 | Connection connection =null; 36 | Statement stmt = null; 37 | ResultSet rs=null; 38 | try{ 39 | 40 | Class.forName(sDBDriver); 41 | connection = DriverManager.getConnection(sConnStr,username,password); 42 | stmt = connection.createStatement(); 43 | 44 | 45 | 46 | 47 | 48 | String sql="update student set sMobil='"+sMobil+"',sAddress='"+sAddress+"' where sId='"+sId+"'"; 49 | 50 | stmt.execute(sql); 51 | %> 52 | 56 | 57 | <% 58 | 59 | }catch(ClassNotFoundException e){ 60 | e.printStackTrace(); 61 | 62 | }catch(SQLException e){ 63 | e.printStackTrace(); 64 | 65 | }catch(Exception e){ 66 | e.printStackTrace(); 67 | 68 | } 69 | finally{ 70 | try{ 71 | if(rs!=null) rs.close(); 72 | if(stmt!=null) stmt.close(); 73 | if(connection!=null) connection.close(); 74 | }catch(SQLException e){ 75 | e.printStackTrace(); 76 | } 77 | } 78 | 79 | 80 | %> 81 | 82 | -------------------------------------------------------------------------------- /WebContent/JSP/student/personal_information.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*"%> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | 12 | <% 13 | request.setCharacterEncoding("utf-8"); 14 | %> 15 | 16 | <% 17 | String sId = request.getParameter("sId"); 18 | 19 | String sDBDriver = "com.mysql.jdbc.Driver"; 20 | String sConnStr = "jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 21 | String username = "root"; 22 | String password = "123456"; 23 | 24 | String sName = null; 25 | String sSex = null; 26 | String sMobil = null; 27 | String sAddress = null; 28 | String sPass = null; 29 | String sdId = null; 30 | String sClass = null; 31 | 32 | Connection connection = null; 33 | Statement stmt = null; 34 | ResultSet rs = null; 35 | 36 | try { 37 | 38 | Class.forName(sDBDriver); 39 | connection = DriverManager.getConnection(sConnStr, username, password); 40 | stmt = connection.createStatement(); 41 | 42 | String sql = "select * from student where sId='" + sId + "'"; 43 | 44 | rs = stmt.executeQuery(sql); 45 | 46 | if (rs == null) { 47 | 48 | return; 49 | } 50 | 51 | while (rs.next()) { 52 | request.setAttribute("rs", rs); 53 | 54 | request.setAttribute("sId", sId); 55 | 56 | sName = rs.getString(2); 57 | request.setAttribute("sName", sName); 58 | 59 | sSex = rs.getString(3); 60 | request.setAttribute("sSex", sSex); 61 | 62 | sMobil = rs.getString(4); 63 | request.setAttribute("sMobil", sMobil); 64 | 65 | sAddress = rs.getString(5); 66 | request.setAttribute("sAddress", sAddress); 67 | 68 | sPass = rs.getString(6); 69 | request.setAttribute("sPass", sPass); 70 | 71 | sdId = rs.getString(7); 72 | request.setAttribute("sdId", sdId); 73 | 74 | sClass = rs.getString(8); 75 | request.setAttribute("sClass", sClass); 76 | } 77 | 78 | } catch (ClassNotFoundException e) { 79 | e.printStackTrace(); 80 | 81 | } catch (SQLException e) { 82 | e.printStackTrace(); 83 | 84 | } catch (Exception e) { 85 | e.printStackTrace(); 86 | 87 | } finally { 88 | try { 89 | if (rs != null) 90 | rs.close(); 91 | if (stmt != null) 92 | stmt.close(); 93 | if (connection != null) 94 | connection.close(); 95 | } catch (SQLException e) { 96 | e.printStackTrace(); 97 | } 98 | } 99 | %> 100 | 101 | 102 | 113 | 114 | 115 |

录入学生信息界面

116 | 117 |
118 | 119 | 120 | 122 | 123 | 125 | 126 | 128 | 129 |   130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 |   142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 |   151 | 152 | 153 | 154 | 155 | 156 | 158 | 160 | 161 |
学号: 121 | readonly="true" /> 姓名: 124 | readonly="true" /> 性别: 127 | readonly="true" />
手机号: /> 地址: /> 
系部: readonly="true" /> 班级: readonly="true" />
162 |
163 | 164 | 165 | -------------------------------------------------------------------------------- /WebContent/JSP/student/student_Mainframe.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 网上选课系统-学生主页 9 | 10 | 11 | 12 | <% 13 | 14 | String sId=request.getParameter("sId"); 15 | 16 | request.setAttribute("sId", sId); 17 | 18 | %> 19 | 20 |
21 | 22 |

学生操作界面 23 | 24 |       <%=sId%>您好,欢迎进入学生操作界面

25 | 26 |
27 | 28 |
29 | 30 | 45 | 46 | 58 | 59 | 73 | 74 | 90 | 91 | 92 | 93 | 106 | 107 |
108 | 109 | 110 |
111 | 112 |
113 | 114 | 115 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/CourseInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

课程信息界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | Class.forName(sDBDriver); 30 | connection = DriverManager.getConnection(sConnStr,username,password); 31 | stmt = connection.createStatement(); 32 | 33 | 34 | String teaId=request.getParameter("teaId"); 35 | 36 | 37 | String sql="select * from course where tId='"+teaId+"'"; 38 | 39 | rs=stmt.executeQuery(sql); 40 | %> 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | <% 56 | while(rs.next()){ 57 | 58 | 59 | %> 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | <% 76 | 77 | 78 | 79 | } 80 | 81 | 82 | }catch(SQLException e){ 83 | e.printStackTrace(); 84 | 85 | } 86 | finally{ 87 | 88 | 89 | } 90 | 91 | %> 92 |
课程编号:课程名称:学分:学时:地点:总人数:已选人数:系部:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(4) %><%=rs.getString(5) %><%=rs.getString(6) %><%=rs.getString(7) %><%=rs.getString(8) %><%=rs.getString(9) %>
93 | 94 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/EnterGradejsp.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <%request.setCharacterEncoding("utf-8");%> 11 |

录入界面

12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |   23 | 24 | 25 | 28 | 31 | 32 |
课程编号: 学号: 分数:
26 | 27 | 29 | 30 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/LookCourse.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

查看课程界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | Class.forName(sDBDriver); 30 | connection = DriverManager.getConnection(sConnStr,username,password); 31 | stmt = connection.createStatement(); 32 | 33 | 34 | String teaId=request.getParameter("teaId"); 35 | 36 | 37 | String sql="select * from course where tId='"+teaId+"'"; 38 | 39 | rs=stmt.executeQuery(sql); 40 | %> 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | <% 51 | while(rs.next()){ 52 | 53 | 54 | %> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | <% 66 | 67 | 68 | 69 | } 70 | 71 | 72 | }catch(SQLException e){ 73 | e.printStackTrace(); 74 | 75 | } 76 | finally{ 77 | 78 | 79 | } 80 | 81 | %> 82 |
课程编号:总人数:已选人数:
<%=rs.getString(1) %><%=rs.getString(7) %><%=rs.getString(8) %>
83 | 84 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/LookSelectStudent_Course.jsp: -------------------------------------------------------------------------------- 1 | <%@page import="com.admin.util.DBUtil"%> 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ page import="java.sql.*"%> 5 | <%@ page import="java.util.*"%> 6 | 7 | 8 | 9 | 10 | Insert title here 11 | 12 | 13 | 14 | <% 15 | List list = new ArrayList(); 16 | 17 | List list1 = new ArrayList(); 18 | Connection con = null; 19 | ResultSet rs = null; 20 | Statement stmt = null; 21 | int num =0; 22 | 23 | String sDBDriver = "com.mysql.jdbc.Driver"; 24 | String sConnStr = "jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 25 | String username = "root"; 26 | String password = "123456"; 27 | 28 | Class.forName(sDBDriver); 29 | con = DriverManager.getConnection(sConnStr, username, password); 30 | stmt = con.createStatement(); 31 | 32 | String teaId = request.getParameter("teaId"); 33 | 34 | String sql = "select * from course where tId='" + teaId + "'"; 35 | 36 | rs = stmt.executeQuery(sql); 37 | 38 | try { 39 | 40 | while (rs.next()) { 41 | 42 | list1.add(rs.getString(1)); 43 | list.add(rs.getString(2)); 44 | 45 | } 46 | } catch (SQLException ex) { 47 | System.out.println(ex.getMessage()); 48 | } 49 | %> 50 | 51 | 64 | 65 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | <% 86 | String sql1 = "select * from choosecourse where cId='" + list1.get(num) + "'"; 87 | 88 | rs = stmt.executeQuery(sql1); 89 | 90 | try { 91 | 92 | while (rs.next()) { 93 | %> 94 | 95 | 96 | 97 | <% 98 | } 99 | } catch (SQLException ex) { 100 | System.out.println(ex.getMessage()); 101 | } 102 | %> 103 |
学号:
<%=rs.getString(2)%>
104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/Password_Update.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String teaId=request.getParameter("teaId"); 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | String teaPass=null; 25 | 26 | 27 | Connection connection =null; 28 | Statement stmt = null; 29 | ResultSet rs=null; 30 | 31 | 32 | 33 | 34 | try{ 35 | 36 | Class.forName(sDBDriver); 37 | connection = DriverManager.getConnection(sConnStr,username,password); 38 | stmt = connection.createStatement(); 39 | 40 | 41 | 42 | 43 | 44 | String sql="select * from teadetail where teaId='"+teaId+"'"; 45 | 46 | rs =stmt.executeQuery(sql); 47 | 48 | if(rs==null){ 49 | 50 | return; 51 | } 52 | 53 | while(rs.next()){ 54 | request.setAttribute("rs", rs); 55 | 56 | request.setAttribute("teaId", teaId); 57 | 58 | 59 | 60 | teaPass=rs.getString(11); 61 | request.setAttribute("teaPass", teaPass); 62 | 63 | 64 | } 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | }catch(ClassNotFoundException e){ 73 | e.printStackTrace(); 74 | 75 | }catch(SQLException e){ 76 | e.printStackTrace(); 77 | 78 | }catch(Exception e){ 79 | e.printStackTrace(); 80 | 81 | } 82 | finally{ 83 | try{ 84 | if(rs!=null) rs.close(); 85 | if(stmt!=null) stmt.close(); 86 | if(connection!=null) connection.close(); 87 | }catch(SQLException e){ 88 | e.printStackTrace(); 89 | } 90 | } 91 | 92 | 93 | 94 | %> 95 | 96 | 97 | 108 | 109 | 110 |

录入学生信息界面

111 | 112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 |   120 | 121 | 122 | 125 | 128 | 129 |
教师号: />密码: />
123 | 124 | 126 | 127 |
130 |
131 | 132 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/RoomInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

教室信息界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | ResultSet rs1=null; 28 | try{ 29 | 30 | Class.forName(sDBDriver); 31 | connection = DriverManager.getConnection(sConnStr,username,password); 32 | stmt = connection.createStatement(); 33 | 34 | 35 | String teaId=request.getParameter("teaId"); 36 | 37 | int i=0; 38 | String sql="select * from course where tId='"+teaId+"'"; 39 | 40 | rs=stmt.executeQuery(sql); 41 | %> 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | <% 52 | while(rs.next()){ 53 | 54 | // } 55 | 56 | /// String sql1="select * from room where roomName='"+rs.getString(6)+"'"; 57 | 58 | // rs1=stmt.executeQuery(sql); 59 | 60 | // while(rs1.next()){ 61 | 62 | %> 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | <% 75 | 76 | //} 77 | 78 | } 79 | 80 | 81 | }catch(SQLException e){ 82 | e.printStackTrace(); 83 | 84 | } 85 | finally{ 86 | 87 | 88 | } 89 | 90 | %> 91 |
教室名称:教室容量(人数):上课时间:
<%=rs.getString(6) %><%=rs.getString(7) %><%=0 %>
92 | 93 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/SortGrade.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

成绩排名界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | Class.forName(sDBDriver); 30 | connection = DriverManager.getConnection(sConnStr,username,password); 31 | stmt = connection.createStatement(); 32 | 33 | 34 | 35 | 36 | 37 | String sql="select * from choosecourse ORDER BY grade"; 38 | 39 | rs=stmt.executeQuery(sql); 40 | %> 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | <% 51 | while(rs.next()){ 52 | 53 | 54 | %> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | <% 66 | 67 | 68 | 69 | } 70 | 71 | 72 | }catch(SQLException e){ 73 | e.printStackTrace(); 74 | 75 | } 76 | finally{ 77 | 78 | 79 | } 80 | 81 | %> 82 |
课程编号:学号:成绩:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %>
83 | 84 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/checkEnterGrade.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String cId=request.getParameter("cId"); 17 | 18 | 19 | 20 | String sId=request.getParameter("sId"); 21 | 22 | String grade=request.getParameter("grade"); 23 | 24 | String sDBDriver="com.mysql.jdbc.Driver"; 25 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 26 | String username="root"; 27 | String password="123456"; 28 | 29 | 30 | Connection connection =null; 31 | Statement stmt = null; 32 | ResultSet rs=null; 33 | try{ 34 | 35 | Class.forName(sDBDriver); 36 | connection = DriverManager.getConnection(sConnStr,username,password); 37 | stmt = connection.createStatement(); 38 | 39 | 40 | 41 | 42 | 43 | String sql="update choosecourse set grade='"+grade+"' where sId='"+sId+"' and cId='"+cId+"'"; 44 | 45 | stmt.execute(sql); 46 | %> 47 | 51 | 52 | <% 53 | 54 | }catch(ClassNotFoundException e){ 55 | e.printStackTrace(); 56 | 57 | }catch(SQLException e){ 58 | e.printStackTrace(); 59 | 60 | }catch(Exception e){ 61 | e.printStackTrace(); 62 | 63 | } 64 | finally{ 65 | try{ 66 | if(rs!=null) rs.close(); 67 | if(stmt!=null) stmt.close(); 68 | if(connection!=null) connection.close(); 69 | }catch(SQLException e){ 70 | e.printStackTrace(); 71 | } 72 | } 73 | 74 | 75 | %> 76 | 77 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/checkPassword_Update.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String teaId=request.getParameter("teaId"); 17 | 18 | 19 | 20 | String teaPass=request.getParameter("teaPass"); 21 | 22 | 23 | 24 | String sDBDriver="com.mysql.jdbc.Driver"; 25 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 26 | String username="root"; 27 | String password="123456"; 28 | 29 | 30 | Connection connection =null; 31 | Statement stmt = null; 32 | ResultSet rs=null; 33 | try{ 34 | 35 | Class.forName(sDBDriver); 36 | connection = DriverManager.getConnection(sConnStr,username,password); 37 | stmt = connection.createStatement(); 38 | 39 | 40 | 41 | 42 | 43 | String sql="update teadetail set teaPass='"+teaPass+"' where teaId='"+teaId+"'"; 44 | 45 | stmt.execute(sql); 46 | %> 47 | 51 | 52 | <% 53 | 54 | }catch(ClassNotFoundException e){ 55 | e.printStackTrace(); 56 | 57 | }catch(SQLException e){ 58 | e.printStackTrace(); 59 | 60 | }catch(Exception e){ 61 | e.printStackTrace(); 62 | 63 | } 64 | finally{ 65 | try{ 66 | if(rs!=null) rs.close(); 67 | if(stmt!=null) stmt.close(); 68 | if(connection!=null) connection.close(); 69 | }catch(SQLException e){ 70 | e.printStackTrace(); 71 | } 72 | } 73 | 74 | 75 | %> 76 | 77 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/checkpersonal_information.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | String teaName=null; 15 | String teaSex=null; 16 | String teaAge=null; 17 | String teaMobil=null; 18 | String teaAddress=null; 19 | String teaedu=null; 20 | String teatitle=null; 21 | String teaSchool=null; 22 | String teaHealth=null; 23 | String teaPass=null; 24 | String teaDid=null; 25 | 26 | String teaId=request.getParameter("teaId"); 27 | 28 | 29 | teaName=request.getParameter("teaName"); 30 | teaSex=request.getParameter("teaSex"); 31 | teaAge=request.getParameter("teaAge"); 32 | teaMobil=request.getParameter("teaMobil"); 33 | teaAddress=request.getParameter("teaAddress"); 34 | teaedu=request.getParameter("teaedu"); 35 | teatitle=request.getParameter("teatitle"); 36 | teaSchool=request.getParameter("teaSchool"); 37 | teaHealth=request.getParameter("teaHealth"); 38 | teaPass=request.getParameter("teaPass"); 39 | teaDid=request.getParameter("teaDid"); 40 | 41 | 42 | String sDBDriver="com.mysql.jdbc.Driver"; 43 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 44 | String username="root"; 45 | String password="123456"; 46 | 47 | 48 | Connection connection =null; 49 | Statement stmt = null; 50 | ResultSet rs=null; 51 | try{ 52 | 53 | Class.forName(sDBDriver); 54 | connection = DriverManager.getConnection(sConnStr,username,password); 55 | stmt = connection.createStatement(); 56 | 57 | 58 | 59 | 60 | 61 | String sql="update teadetail set teaMobil='"+teaMobil+"',teaAddress='"+teaAddress+"' where teaId='"+teaId+"'"; 62 | 63 | stmt.execute(sql); 64 | %> 65 | 69 | 70 | <% 71 | 72 | }catch(ClassNotFoundException e){ 73 | e.printStackTrace(); 74 | 75 | }catch(SQLException e){ 76 | e.printStackTrace(); 77 | 78 | }catch(Exception e){ 79 | e.printStackTrace(); 80 | 81 | } 82 | finally{ 83 | try{ 84 | if(rs!=null) rs.close(); 85 | if(stmt!=null) stmt.close(); 86 | if(connection!=null) connection.close(); 87 | }catch(SQLException e){ 88 | e.printStackTrace(); 89 | } 90 | } 91 | 92 | 93 | %> 94 | 95 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/nojige.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 |

不及格界面

13 | 14 | <% 15 | 16 | 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | Connection connection =null; 25 | Statement stmt = null; 26 | ResultSet rs=null; 27 | try{ 28 | 29 | Class.forName(sDBDriver); 30 | connection = DriverManager.getConnection(sConnStr,username,password); 31 | stmt = connection.createStatement(); 32 | 33 | 34 | 35 | 36 | 37 | String sql="select * from choosecourse where grade < 60"; 38 | 39 | rs=stmt.executeQuery(sql); 40 | %> 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | <% 51 | while(rs.next()){ 52 | 53 | 54 | %> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | <% 66 | 67 | 68 | 69 | } 70 | 71 | 72 | }catch(SQLException e){ 73 | e.printStackTrace(); 74 | 75 | } 76 | finally{ 77 | 78 | 79 | } 80 | 81 | %> 82 |
课程编号:学号:成绩:
<%=rs.getString(1) %><%=rs.getString(2) %><%=rs.getString(3) %>
83 | 84 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/personal_information.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ page import="java.sql.*" %> 4 | 5 | 6 | 7 | 8 | Insert title here 9 | 10 | 11 | <%request.setCharacterEncoding("utf-8");%> 12 | 13 | <% 14 | 15 | 16 | String teaId=request.getParameter("teaId"); 17 | 18 | String sDBDriver="com.mysql.jdbc.Driver"; 19 | String sConnStr="jdbc:mysql://localhost:3306/online course selection system?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true"; 20 | String username="root"; 21 | String password="123456"; 22 | 23 | 24 | String teaName=null; 25 | String teaSex=null; 26 | String teaAge=null; 27 | String teaMobil=null; 28 | String teaAddress=null; 29 | String teaedu=null; 30 | String teatitle=null; 31 | String teaSchool=null; 32 | String teaHealth=null; 33 | String teaPass=null; 34 | String teaDid=null; 35 | 36 | Connection connection =null; 37 | Statement stmt = null; 38 | ResultSet rs=null; 39 | 40 | 41 | 42 | 43 | try{ 44 | 45 | Class.forName(sDBDriver); 46 | connection = DriverManager.getConnection(sConnStr,username,password); 47 | stmt = connection.createStatement(); 48 | 49 | 50 | 51 | 52 | 53 | String sql="select * from teadetail where teaId='"+teaId+"'"; 54 | 55 | rs =stmt.executeQuery(sql); 56 | 57 | if(rs==null){ 58 | 59 | return; 60 | } 61 | 62 | while(rs.next()){ 63 | request.setAttribute("rs", rs); 64 | 65 | request.setAttribute("teaId", teaId); 66 | 67 | teaName=rs.getString(2); 68 | request.setAttribute("teaName", teaName); 69 | 70 | teaSex=rs.getString(3); 71 | request.setAttribute("teaSex", teaSex); 72 | 73 | teaAge=rs.getString(4); 74 | request.setAttribute("teaAge", teaAge); 75 | 76 | teaMobil=rs.getString(5); 77 | request.setAttribute("teaMobil", teaMobil); 78 | 79 | 80 | teaAddress=rs.getString(6); 81 | request.setAttribute("teaAddress", teaAddress); 82 | 83 | teaedu=rs.getString(7); 84 | request.setAttribute("teaedu", teaedu); 85 | 86 | teatitle=rs.getString(8); 87 | request.setAttribute("teatitle", teatitle); 88 | 89 | teaSchool=rs.getString(9); 90 | request.setAttribute("teaSchool", teaSchool); 91 | 92 | teaHealth=rs.getString(10); 93 | request.setAttribute("teaHealth", teaHealth); 94 | 95 | teaPass=rs.getString(11); 96 | request.setAttribute("teaPass", teaPass); 97 | 98 | teaDid=rs.getString(12); 99 | request.setAttribute("teaDid", teaDid); 100 | } 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | }catch(ClassNotFoundException e){ 109 | e.printStackTrace(); 110 | 111 | }catch(SQLException e){ 112 | e.printStackTrace(); 113 | 114 | }catch(Exception e){ 115 | e.printStackTrace(); 116 | 117 | } 118 | finally{ 119 | try{ 120 | if(rs!=null) rs.close(); 121 | if(stmt!=null) stmt.close(); 122 | if(connection!=null) connection.close(); 123 | }catch(SQLException e){ 124 | e.printStackTrace(); 125 | } 126 | } 127 | 128 | 129 | 130 | %> 131 | 132 | 133 | 144 | 145 | 146 |

录入学生信息界面

147 | 148 |
149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 |   159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 |   174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 |   187 | 188 | 189 | 192 | 195 | 196 |
教师号: readonly="true" /> 姓名: readonly="true" /> 性别: readonly="true" />
年龄: readonly="true" /> 手机号: /> 地址: />教育背景: readonly="true" />
职称: readonly="true" /> 毕业学校: readonly="true" readonly="true" /> 健康状况: readonly="true" />系院: readonly="true" readonly="true" />
190 | 191 | 193 | 194 |
197 |
198 | 199 | -------------------------------------------------------------------------------- /WebContent/JSP/teacher/teacher_Mainframe.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 8 | 网上选课系统-教师主页 9 | 10 | 11 | 12 | <% 13 | 14 | String teaId=request.getParameter("teaId"); 15 | 16 | request.setAttribute("teaId", teaId); 17 | 18 | %> 19 | 20 |
21 | 22 |

教师操作界面 23 | 24 |       <%=teaId%>您好,欢迎进入教师操作界面

25 |
26 | 27 |
28 | 29 | 42 | 43 | 55 | 56 | 73 | 74 | 88 | 89 | 90 | 91 | 104 | 105 | 106 | 117 | 118 |
119 | 120 | 121 |
122 | 123 |
124 | 125 | -------------------------------------------------------------------------------- /WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/mysql-connector-java-8.0.19.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/WEB-INF/lib/mysql-connector-java-8.0.19.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Online_course_selection_system 4 | 5 | index.html 6 | index.htm 7 | index.jsp 8 | default.html 9 | default.htm 10 | default.jsp 11 | 12 | 13 | 21 | 22 | 30 | 37 | 38 | -------------------------------------------------------------------------------- /WebContent/images/3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/3.ico -------------------------------------------------------------------------------- /WebContent/images/admin_bj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/admin_bj.png -------------------------------------------------------------------------------- /WebContent/images/cp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/cp.png -------------------------------------------------------------------------------- /WebContent/images/del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/del.png -------------------------------------------------------------------------------- /WebContent/images/mess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/mess.png -------------------------------------------------------------------------------- /WebContent/images/miama.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/miama.jpg -------------------------------------------------------------------------------- /WebContent/images/mmexport1577618776569.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/mmexport1577618776569.png -------------------------------------------------------------------------------- /WebContent/images/set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/set.png -------------------------------------------------------------------------------- /WebContent/images/toux.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/toux.jpg -------------------------------------------------------------------------------- /WebContent/images/users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/WebContent/images/users.png -------------------------------------------------------------------------------- /build/classes/c3p0-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | root 7 | 123456 8 | com.mysql.jdbc.Driver 9 | jdbc:mysql://localhost:3306 10 | /online course selection system?serverTimezone=CTT 11 | &useUnicode=true&characterEncoding=utf-8& 12 | allowMultiQueries=true 13 | 14 | 15 | 5 16 | 5 17 | 5 18 | 10 19 | 20 | 21 | -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkAddClassDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkAddClassDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkAddCourseDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkAddCourseDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkAddDidDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkAddDidDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkAddNotesDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkAddNotesDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkDeleteStudentDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkDeleteStudentDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkDeleteTeacherDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkDeleteTeacherDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkEnterStudentsDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkEnterStudentsDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/dao/checkEnterTeacherDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/dao/checkEnterTeacherDao.class -------------------------------------------------------------------------------- /build/classes/com/admin/util/DBUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/admin/util/DBUtil.class -------------------------------------------------------------------------------- /build/classes/com/login/dao/AdminDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/login/dao/AdminDao.class -------------------------------------------------------------------------------- /build/classes/com/login/dao/StudentDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/login/dao/StudentDao.class -------------------------------------------------------------------------------- /build/classes/com/login/dao/TeacherDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/login/dao/TeacherDao.class -------------------------------------------------------------------------------- /build/classes/com/southwind/controller/LoginServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/southwind/controller/LoginServlet.class -------------------------------------------------------------------------------- /build/classes/com/southwind/entity/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/southwind/entity/Student.class -------------------------------------------------------------------------------- /build/classes/com/southwind/repository/StudentRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/southwind/repository/StudentRepository.class -------------------------------------------------------------------------------- /build/classes/com/southwind/repository/impl/StudentRepositoryImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/southwind/repository/impl/StudentRepositoryImpl.class -------------------------------------------------------------------------------- /build/classes/com/southwind/service/LoginService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/southwind/service/LoginService.class -------------------------------------------------------------------------------- /build/classes/com/southwind/service/impl/LoginServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/southwind/service/impl/LoginServiceImpl.class -------------------------------------------------------------------------------- /build/classes/com/southwind/utils/JDBCTools.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/southwind/utils/JDBCTools.class -------------------------------------------------------------------------------- /build/classes/com/student/dao/checkQuitCourseDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/student/dao/checkQuitCourseDao.class -------------------------------------------------------------------------------- /build/classes/com/student/dao/checkSelectCourseDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/student/dao/checkSelectCourseDao.class -------------------------------------------------------------------------------- /build/classes/com/student/dao/checkpersonalinformationDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/build/classes/com/student/dao/checkpersonalinformationDao.class -------------------------------------------------------------------------------- /src/c3p0-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | root 7 | 123456 8 | com.mysql.jdbc.Driver 9 | jdbc:mysql://localhost:3306 10 | /online course selection system?serverTimezone=CTT 11 | &useUnicode=true&characterEncoding=utf-8& 12 | allowMultiQueries=true 13 | 14 | 15 | 5 16 | 5 17 | 5 18 | 10 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/com/admin/dao/checkAddClassDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkAddClassDao.java -------------------------------------------------------------------------------- /src/com/admin/dao/checkAddCourseDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkAddCourseDao.java -------------------------------------------------------------------------------- /src/com/admin/dao/checkAddDidDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkAddDidDao.java -------------------------------------------------------------------------------- /src/com/admin/dao/checkAddNotesDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkAddNotesDao.java -------------------------------------------------------------------------------- /src/com/admin/dao/checkDeleteStudentDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkDeleteStudentDao.java -------------------------------------------------------------------------------- /src/com/admin/dao/checkDeleteTeacherDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkDeleteTeacherDao.java -------------------------------------------------------------------------------- /src/com/admin/dao/checkEnterStudentsDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkEnterStudentsDao.java -------------------------------------------------------------------------------- /src/com/admin/dao/checkEnterTeacherDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/admin/dao/checkEnterTeacherDao.java -------------------------------------------------------------------------------- /src/com/admin/util/DBUtil.java: -------------------------------------------------------------------------------- 1 | package com.admin.util; 2 | 3 | public class DBUtil { 4 | 5 | 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/com/login/dao/AdminDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/login/dao/AdminDao.java -------------------------------------------------------------------------------- /src/com/login/dao/StudentDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/login/dao/StudentDao.java -------------------------------------------------------------------------------- /src/com/login/dao/TeacherDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/login/dao/TeacherDao.java -------------------------------------------------------------------------------- /src/com/southwind/controller/LoginServlet.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/southwind/controller/LoginServlet.java -------------------------------------------------------------------------------- /src/com/southwind/entity/Student.java: -------------------------------------------------------------------------------- 1 | package com.southwind.entity; 2 | 3 | public class Student { 4 | private String sId; 5 | private String sName; 6 | private String sSex; 7 | private String sMobil; 8 | private String sAddress; 9 | private String sPass; 10 | private String dId; 11 | private String sClass; 12 | public String getsId() { 13 | return sId; 14 | } 15 | public void setsId(String sId) { 16 | this.sId = sId; 17 | } 18 | public String getsName() { 19 | return sName; 20 | } 21 | public void setsName(String sName) { 22 | this.sName = sName; 23 | } 24 | public String getsSex() { 25 | return sSex; 26 | } 27 | public void setsSex(String sSex) { 28 | this.sSex = sSex; 29 | } 30 | public String getsMobil() { 31 | return sMobil; 32 | } 33 | public void setsMobil(String sMobil) { 34 | this.sMobil = sMobil; 35 | } 36 | public String getsAddress() { 37 | return sAddress; 38 | } 39 | public void setsAddress(String sAddress) { 40 | this.sAddress = sAddress; 41 | } 42 | public String getsPass() { 43 | return sPass; 44 | } 45 | public void setsPass(String sPass) { 46 | this.sPass = sPass; 47 | } 48 | public String getdId() { 49 | return dId; 50 | } 51 | public void setdId(String dId) { 52 | this.dId = dId; 53 | } 54 | public String getsClass() { 55 | return sClass; 56 | } 57 | public void setsClass(String sClass) { 58 | this.sClass = sClass; 59 | } 60 | public Student(String sId, String sName, String sSex, String sMobil, String sAddress, String sPass, String dId, 61 | String sClass) { 62 | super(); 63 | this.sId = sId; 64 | this.sName = sName; 65 | this.sSex = sSex; 66 | this.sMobil = sMobil; 67 | this.sAddress = sAddress; 68 | this.sPass = sPass; 69 | this.dId = dId; 70 | this.sClass = sClass; 71 | } 72 | 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/com/southwind/repository/StudentRepository.java: -------------------------------------------------------------------------------- 1 | package com.southwind.repository; 2 | 3 | import com.southwind.entity.Student; 4 | 5 | public interface StudentRepository { 6 | public Student login(String username,String password); 7 | } 8 | -------------------------------------------------------------------------------- /src/com/southwind/repository/impl/StudentRepositoryImpl.java: -------------------------------------------------------------------------------- 1 | package com.southwind.repository.impl; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.ResultSet; 6 | import java.sql.SQLException; 7 | 8 | import java.sql.PreparedStatement; 9 | import com.southwind.entity.Student; 10 | import com.southwind.repository.StudentRepository; 11 | import com.southwind.utils.JDBCTools; 12 | 13 | public class StudentRepositoryImpl implements StudentRepository{ 14 | 15 | @Override 16 | public Student login(String username, String password) { 17 | 18 | Connection connection = JDBCTools.getConnection(); 19 | String sql="select * from student where sId=? and sPass=? "; 20 | PreparedStatement stmt = null; 21 | ResultSet rs=null; 22 | Student student =null; 23 | try{ 24 | stmt = connection.prepareStatement(sql); 25 | stmt.setString(1, username); 26 | stmt.setString(2, password); 27 | rs=stmt.executeQuery(); 28 | 29 | if(rs.next()) { 30 | student=new Student(rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8)); 31 | } 32 | 33 | }catch(SQLException e){ 34 | e.printStackTrace(); 35 | } 36 | finally{ 37 | JDBCTools.release(connection, stmt, rs); 38 | } 39 | 40 | return student; 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/com/southwind/service/LoginService.java: -------------------------------------------------------------------------------- 1 | package com.southwind.service; 2 | 3 | import com.southwind.entity.Student; 4 | 5 | public interface LoginService { 6 | public Student login(String username,String password); 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/com/southwind/service/impl/LoginServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.southwind.service.impl; 2 | 3 | import com.southwind.entity.Student; 4 | import com.southwind.repository.StudentRepository; 5 | import com.southwind.repository.impl.StudentRepositoryImpl; 6 | import com.southwind.service.LoginService; 7 | 8 | public class LoginServiceImpl implements LoginService{ 9 | 10 | private StudentRepository studentrepository=new StudentRepositoryImpl(); 11 | 12 | @Override 13 | public Student login(String username, String password) { 14 | return studentrepository.login(username, password); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/com/southwind/utils/JDBCTools.java: -------------------------------------------------------------------------------- 1 | package com.southwind.utils; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.ResultSet; 6 | import java.sql.SQLException; 7 | import java.sql.Statement; 8 | 9 | import javax.sql.DataSource; 10 | 11 | import com.mchange.v2.c3p0.ComboPooledDataSource; 12 | 13 | public class JDBCTools { 14 | private static DataSource dataSource; 15 | static { 16 | 17 | dataSource = new ComboPooledDataSource("testc3p0"); 18 | 19 | } 20 | 21 | public static Connection getConnection() { 22 | Connection connection = null; 23 | try { 24 | connection = dataSource.getConnection(); 25 | } catch (SQLException e) { 26 | // TODO Auto-generated catch block 27 | e.printStackTrace(); 28 | } 29 | 30 | return connection; 31 | 32 | } 33 | 34 | public static void release(Connection connection, Statement statement, ResultSet resultSet) { 35 | try { 36 | if (connection != null) { 37 | connection.close(); 38 | } 39 | if (statement != null) { 40 | statement.close(); 41 | } 42 | if (resultSet != null) { 43 | resultSet.close(); 44 | } 45 | } catch (Exception e) { 46 | // TODO: handle exception 47 | e.printStackTrace(); 48 | } 49 | 50 | } 51 | 52 | /* 53 | * public static void main(String[] args) { 54 | * System.out.println(JDBCTools.getConnection()); } 55 | */ 56 | 57 | } -------------------------------------------------------------------------------- /src/com/student/dao/checkQuitCourseDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/student/dao/checkQuitCourseDao.java -------------------------------------------------------------------------------- /src/com/student/dao/checkSelectCourseDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/student/dao/checkSelectCourseDao.java -------------------------------------------------------------------------------- /src/com/student/dao/checkpersonalinformationDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a-cper-cpu/Online_Course_Selection_System/ce71f483bc26437318cf416683d24b3160dfbcc4/src/com/student/dao/checkpersonalinformationDao.java --------------------------------------------------------------------------------