📄 jiangchengxiangxi.jsp
字号:
<%@ page import="java.util.*, java.sql.*",errorPage="error.jsp",
contentType="text/html;charset=gb2312" %>
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
.style4 {font-size: 9pt}
-->
</style><title>奖惩详细信息查询</title></head>
<script language="javascript">
function confirmDel(jwenhao2)
{
if ( confirm("你确定要删除吗?")) {
window.location.href="jiangchengxiangxi.jsp?isOK=ok&jwenhao="+jwenhao
}
}
</script>
<body onload='self.status="辽宁工程技术大学"'>
<%! //处理字符串的常用方法
public String getString(String s) {
if(s == null) s = "";
try{
byte a[] = s.getBytes("ISO-8859-1");
s = new String(a);
}
catch(Exception e) {}
return s;
}
%>
<%
String isPass=request.getParameter("isOK");
isPass=getString(isPass);
String jwenhao2=request.getParameter("jwenhao2");
jwenhao2=getString(jwenhao2);
String ty=request.getParameter("jxingming");
byte b[]=ty.getBytes("ISO-8859-1");
ty=new String(b);
String tt=request.getParameter("jwenhao");
byte c[]=tt.getBytes("ISO-8859-1");
tt=new String(c);
session.setAttribute("jwenhao1",tt);
session.setAttribute("jxingming1",ty);
Connection con=null;
Statement sql=null;
ResultSet rs=null;
try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); }
catch(ClassNotFoundException event) { }
try {
con=DriverManager.getConnection("jdbc:odbc:sun","sa","hehong");
sql=con.createStatement();
if(isPass.equals("ok"))
{
sql = con.createStatement();
String deleteAll = "DELETE FROM jiangcheng WHERE jxingming="+"'"+ty+"'"+"and jwenhao="+"'"+tt+"'";
sql.executeUpdate(deleteAll);
}
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
String condition="select * from jiangcheng,teacher where teacher.tcode=jiangcheng.jxingming and jxingming="+"'"+ty+"'and jwenhao="+"'"+tt+"'";
rs =sql.executeQuery(condition);
while(rs.next()){
String jxingming=rs.getString("jxingming");
String jmingdan=rs.getString("jmingdan");
String jriqi=rs.getString("jriqi");
String jwenhao=rs.getString("jwenhao");
String jleixing=rs.getString("jleixing");
String jfangshi=rs.getString("jfangshi");
String jyuanyin=rs.getString("jyuanyin");
String tname=rs.getString("tname");
%>
<table width="80%" border="1" align="center" cellpadding="0" cellspacing="1" bordercolor="#009900">
<tr bordercolor="#EEEEEE" bgcolor="#EEEEEE">
<td width="16%" height="25" class="style4">员工姓名</td>
<td width="32%"><%=tname%></td>
<td width="15%" class="style4">奖惩名称</td>
<td width="37%"><%=jmingdan%></td>
</tr>
<tr bordercolor="#EEEEEE">
<td height="24" class="style4">奖惩文号</td>
<td><%=jwenhao%></td>
<td class="style4">奖惩类型</td>
<td><%=jleixing%></td>
</tr>
<tr bordercolor="#EEEEEE" bgcolor="#EEEEEE">
<td height="24" class="style4">奖惩日期</td>
<td colspan="3"><%=jriqi%></td>
</tr>
<tr bordercolor="#EEEEEE">
<td height="39" class="style4">奖惩方式</td>
<td colspan="3"><%=jfangshi%></td>
</tr>
<tr bordercolor="#EEEEEE" bgcolor="#EEEEEE">
<td height="61" class="style4">奖惩原因</td>
<td colspan="3"><%=jyuanyin%></td>
</tr>
</table>
<div align="center"><a href=javascript:confirmDel(('<%=jwenhao2%>'))>删 除</A>
<A Href="jiangchengguanligengxin.jsp">修 改</A> 你可以在这里给<%=tname%>留言
<a href="javascript:history.back();">返回</a>
</div>
<% String pp=rs.getString("tname");
session.setAttribute("tname",pp);%>
<form action="jiangchengliuyan.jsp" method="post">
<div align="center">
<input name="biaoti" type="text" value="无标题" size="40" >
<br>
<br>
<textarea name="message" cols="40" rows="4"></textarea>
<br>
<input name="tijiao" type="submit" value="提交">
<input name="reset" type="reset" value="重写">
</div>
</form>
<div align="center">
<%con.close();}}
catch(SQLException e) { }
%>
</div>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -