?? addstudent_confirm.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="errorpage.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>確認新增學生</title>
</head>
<jsp:useBean id="student" scope="request" class="stu.student">
<jsp:setProperty name="student" property="*"/>
</jsp:useBean>
<body bgcolor="#0099FF" text="#FFFFFF" link="#66FF00">
<p align="center">
<%
String admin_id = (String)session.getAttribute("id");
if(admin_id==null){response.sendRedirect("login.jsp");}
boolean f=true;
try{
String id=student.getId();
String name=student.getName();
String password=student.getPassword();
if(id==null || id.equals("")) throw new Exception("錯誤,學生號不能為空!!");
if(name==null || name.equals("")) throw new Exception("錯誤,學生姓名不能為空!!");
if(password==null || password.equals("")) throw new Exception("錯誤,密碼不能為空!!");
f=student.hasLogin();
if(f==false)
throw new Exception ("學生號有重復!!!!!!!!!!!!!!!!!");
out.print("新增學生成功!!"+"<br>");
out.print("學生號: "+id+"<br>");
out.print("學生姓名: "+name+"<br>");
String dep=student.getSex();
out.print("學生所在系: "+dep+"<br>");
String sex=student.getDep();
out.print("學生性別: "+sex+"<br>");
String jiguan=student.getJiguan();
out.print("學生籍貫: "+jiguan +"<br>");
student.addStudent();
}catch(Exception e){
out.print(e.toString());
}
%>
</p>
<p> </p>
<p><a href="admin.jsp"><<Back</a></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -