📄 addapc.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="errorpage.jsp" %>
<%@ page import="myBeans.SQLBean" %>
<html>
<head>
<link href="Inc/student_com.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加奖励、处罚和变动标准 </title>
</head>
<body>
<p>
<%String admin_id = (String)session.getAttribute("id");
if(admin_id==null){response.sendRedirect("login.jsp");}
String type = request.getParameter("f"),table = "";
if(type.equals("A")){table = "award_levels";}
else if(type.equals("P")){table = "punish_levels";}
else{table = "change_code";}
%>
</p>
<p align="center"><font color="#00FF00" size="+3" face="华文行楷">新增</font></p>
<form name="form1" method="post" action="APCSvlt">
<input type="hidden" name="action" value="new">
<p> </p>
<div align="center">
<table width="420" cellpadding="2" cellspacing="1" bgcolor="#DEDFDE">
<tr>
<td width="33%" bgcolor="#FFFFFF"><div align="right">添加标准的描述</div></td>
<td width="67%" bgcolor="#FFFFFF"><input name="description" type="text" id="description"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="right">标准代号</div></td>
<%
boolean f = true;int count = 0;
String sql="select count(*)+1 from " + table;
String query="";
ResultSet rs = null;
SQLBean db = new SQLBean();
try{
rs = db.executeQuery(sql);
if(rs!=null && rs.next()){
count = rs.getInt(1);
}
}catch(SQLException e){e.getMessage();}
while( f ){
query="select CODE from "+table+" where CODE='"+type+count+"'";
try{
rs = db.executeQuery(query);
if(rs!=null && rs.next()){
count = count+1;
}else{f=false;}
}catch(SQLException e){e.getMessage();}
}
%>
<td bgcolor="#FFFFFF"><input name="code" type="text" id="code" value="<%=type+count%>"></td>
</tr>
</table>
<p>
<input name="确定" type="submit" id="确定" value="提交">
</p>
</div>
</form>
<p> </p>
<p align="center"><a href="getAPC.jsp">返回</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -