⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 studentloginsvlt.java

📁 一个管理系统
💻 JAVA
字号:
package stuman;

import java.io.*;
import java.sql.ResultSet;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class StudentLoginSvlt extends HttpServlet {

    public void doGet(HttpServletRequest req, HttpServletResponse res)
            throws ServletException, IOException {

        String stu_id = req.getParameter("id");
        String cour_id = req.getParameter("cour_id");
        String class_id = req.getParameter("class_id");
        String prepare = req.getParameter("prepare");
        String pw1 = null;
        String pw2 = null;
        String e_mail = null;
        String tel = null;
        String action = req.getParameter("action");

        ResultSet rs = null;

        if ("update".equalsIgnoreCase(action)) {

            stu_id = req.getParameter("id");
            pw1 = req.getParameter("password1");
            pw2 = req.getParameter("password2");
            if (pw1.equals("") || pw2.equals("") || pw1 == null || pw2 == null) {
                doError(req, res, "锟斤拷锟诫不锟斤拷为锟秸o拷");
            }
            e_mail = req.getParameter("e_mail");
            tel = req.getParameter("tel");
            doUpdate(req, res, pw1, pw2, e_mail, tel, stu_id);
            res.sendRedirect("/test/student.jsp");
        }


        if ("checkmark".equalsIgnoreCase(action)) {
            rs = getScore(stu_id);
            sendResultSet(req, res, rs, "/checkmark.jsp");
        }

        if ("enrol".equalsIgnoreCase(action)) {

            doEnrol(req,res,stu_id,cour_id,class_id,prepare);	
            res.sendRedirect("/test/DisplayCourse.jsp");
        }

    }

    public void doEnrol(HttpServletRequest req, HttpServletResponse res,
            String stu_id, String cour_id, String class_id, String prepare)
            throws ServletException, IOException {

        int num = 0;
        checkEnrol check = new checkEnrol();

        if (prepare.equals("0")) {
           // doError(req, res, "注锟斤拷纬锟绞э拷埽锟斤拷锟

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -