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

📄 jiangchengguanligengxin.jsp

📁 教师管理系统
💻 JSP
字号:

<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>奖惩更新</title>
<script LANGUAGE="javascript">
<!--
function hehong_onsubmit() {
if (document.hehong.jmingdan.value=="")
	{
	  alert("Sorry,奖惩名称没有输入!")
	  document.hehong.jmingdan.focus()
	  return false
	 }
else if(document.hehong.jriqi.value=="")  
	{
	  alert("Sorry,奖惩时间没有输入!")
	  document.hehong.jriqi.focus()
	  return false
	 }


else if (document.hehong.jwenhao.value=="")
	{
	  alert("Sorry,奖惩文号没有输入!")
	  document.hehong.jwenhao.focus()
	  return false
	 }
else if(document.hehong.jleixing.value=="")
	{
	  alert("Sorry,请输入奖惩类型!")
	  document.hehong.jleixing.focus()
	  return false
	 }
else if(document.hehong.jfangshi.value=="")
	{
	  alert("Sorry,请输入奖惩方式!")
	  document.hehong.jfangshi.focus()
	  return false
	 }
	else if(document.hehong.jyuanyin.value=="")
	{
	  alert("Sorry,请输入奖惩原因!")
	  document.hehong.jyuanyin.focus()
	  return false
	 } 
}
-->
</script>
<style type="text/css">
<!--
.style2 {font-size: 9pt}
-->
</style>
</head>

<body>
<%! //处理字符串的常用方法
   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;
          }
%>
<% //获取session值,以及防止非法访问本页面
 String tname= (String)session.getAttribute("tname");
      tname=getString(tname);
     String jxingming1= (String)session.getAttribute("jxingming1");
      jxingming1=getString(jxingming1);
      String tt=(String)session.getAttribute("jwenhao1"); 		
	 tt=getString(tt);   
 
   session.setAttribute("ttt",tt);
   
%>
   <%
   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();
	
	     rs =sql.executeQuery("select * from jiangcheng where jxingming="+"'"+jxingming1+"'"+"and jwenhao="+"'"+tt+"'");	
   while(rs.next())
   { 
   String jmingdan=rs.getString(3);
	
	String jriqi=rs.getString(4);
	String jleixing=rs.getString(6);
	String jfangshi=rs.getString(7);
	String jyuanyin=rs.getString(8);
	
	%>

<form  name="hehong"  LANGUAGE="javascript" onsubmit="return hehong_onsubmit()" method="post"  action="jiangchengguanligengxin2.jsp">
  <table width="75%"  border="1" align="center" cellspacing="1" bordercolor="#009900">
    <tr bordercolor="#EEEEEE">
      <td width="19%" scope="row">教工姓名</td>
      <td width="31%"><%=tname%></td>
      <td width="19%">奖惩名单</td>
      <td width="31%"><input type="text" name="jmingdan" value="<%=jmingdan%>"></td>
    </tr>
    <tr bordercolor="#EEEEEE" bgcolor="#EEEEEE">
      <td scope="row">奖惩日期</td>
      <td><input type="text" name="jriqi" value="<%=jriqi%>"></td>
      <td>奖惩文号</td>
      <td><%=tt%></td>
    </tr>
    <tr bordercolor="#EEEEEE">
      <td scope="row">奖惩类型</td>
      <td><input type="text" name="jleixing" value="<%=jleixing%>"></td>
      <td>奖惩方式</td>
      <td><input type="text" name="jfangshi" value="<%=jfangshi%>"></td>
    </tr>
    <tr bordercolor="#EEEEEE" bgcolor="#EEEEEE">
      <td scope="row">奖惩说明</th>
      <td colspan="3"><textarea name="jyuanyin" cols="50"><%=jyuanyin%></textarea></td>
    </tr>
    <tr bordercolor="#EEEEEE">
      <td colspan="4" scope="row"><div align="center">
        <input type="submit" name="Submit" value="提交">&nbsp;&nbsp;&nbsp;
        <input type="reset" name="Submit2" value="重置">
      </div></td>
    </tr>
  </table>
  <div align="center"></div>
</form>
<p align="center">
  <% con.close();}
   }
   catch(SQLException e) { }
%><form name="form1" method="post" action="jiangchengxiangxi.jsp">
    <div align="center">
    <input type="submit" name="Submit" value="返回">
    </p>
    </div>
  </form>
</body>
</html>

⌨️ 快捷键说明

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