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

📄 list.jsp

📁 中应用程序的访问权限对Java Web Console 中应用程序的访问权限 成功登录 Web 控制台后,可能无法自动访问在该控制台中注册的所有应用程序。通常,必须安装应用程序,才能让所有的用户在控制
💻 JSP
字号:
<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<jsp:directive.page import="java.util.ArrayList"/>
<jsp:directive.page import="java.util.Iterator"/>
<jsp:directive.page import="edu.yinhe.mis.vo.TeacherVO"/>
<jsp:directive.page import="edu.yinhe.mis.vo.DictionaryVO"/>
<jsp:directive.page import="edu.yinhe.mis.dto.TeacherDTO"/>
<jsp:directive.page import="edu.yinhe.system.vo.PaginationVO"/>
<jsp:directive.page import="edu.yinhe.mis.vo.DepartmentVO"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	ArrayList list = (ArrayList)request.getAttribute("list");
	PaginationVO paginationVO = (PaginationVO)request.getAttribute("pagevo");
	TeacherDTO sdto = (TeacherDTO)request.getAttribute("sdto");

	HashMap dmap = (HashMap)request.getAttribute("dmap");
	ArrayList genderlist = (ArrayList)dmap.get("gender");
	ArrayList nationlist = (ArrayList)dmap.get("nation");
	ArrayList postlist = (ArrayList)dmap.get("post");
	ArrayList stateslist = (ArrayList)dmap.get("states");
	ArrayList abilitylist = (ArrayList)dmap.get("ability");
	ArrayList gradelist = (ArrayList)dmap.get("grade");
	ArrayList politylist = (ArrayList)dmap.get("polity");
	ArrayList marriagelist = (ArrayList)dmap.get("marriage");
	ArrayList department = (ArrayList)dmap.get("department");
	ArrayList superNO = (ArrayList)dmap.get("superNO");
 %>

<html>
  <head>  
    <title>老师列表</title>
	<LINK href="../css/CSS.css" type=text/css rel=stylesheet>
	<LINK href="<%=path %>/admins/css/general.css" type=text/css rel=stylesheet>
	<LINK href="<%=path %>/admins/css/main.css" type=text/css rel=stylesheet>
	<script type="text/javascript">
	 	function clearAll(){
	 		var element = document.teacherForm.elements;
	 		for(var i=0; i<(element.length-2); i++){
	 			element[i].value="";
	 		}
 		}
		function checkbox(checked)
		{
			var a = document.getElementsByName("checkbox");
			for(var i = 0; i<a.length; i++){
				a[i].checked = checked;
			}
		}
		function deleteAll(){
		 	var dest = document.all.checkbox;
		 	var did = "";
		 	var flag = false;
			for(var i = 0;i<dest.length;i++){
				if(dest[i].checked==true){
		     	did = did+"_"+dest(i).value;
		     	flag = true;
		     	}
		    }
		    if(flag==true){
		    	var flag = confirm("你确定要删除吗?");
		    	if(flag){
		    	document.location.href="<%=path %>/admins/core/teacher.html?method=delAll&idStr="+did;
		    	}
		    }else{
		   	 	alert("没有选择删除对象!!");
		    	return false;
		    }
		}
	    function confirmDel(id){
	    	var flag=confirm("你确定要删除吗?");
	    	if(flag){
	    		document.location.href="<%=path %>/admins/core/teacher.html?method=del&id="+id;
	    	}
	    }
	</script>
  </head>
  
  <body>
  <h1><span>银河管理中心 - 老师列表 </span> </h1>
	
<DIV class=form-div>
<form name="teacherForm" action="<%=path %>/admins/core/teacher.html?method=search" method="post" >
<table width="94%" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td width="5%">
		<img height=22 alt=SEARCH src="<%=path%>/admins/images/icon_search.gif" width=26 border=0>
	</td>
	<td width="15%">
		编号:&nbsp;<input type=text size=8 name=teacher_no
		<%if(sdto!=null && sdto.getTeacher_no()!=null && !sdto.getTeacher_no().equals("")){ %>
        value=<%=sdto.getTeacher_no() %>
       <%} %> value="" maxlength="6">
	</td>
	<td width="15%">
		姓名:&nbsp;<input type=text size=8 name=teacher_name
		<%if(sdto!=null && sdto.getTeacher_name()!=null && !sdto.getTeacher_name().equals("")){ %>
        value=<%=sdto.getTeacher_name() %>
       <%} %> value="" maxlength="12">
	</td>
	<td width="15%"> 
		职务:&nbsp;<select name=teacher_post id="teacher_post">
							<option value="">------</option>
							<%
							Iterator itpost = postlist.iterator();
							while(itpost.hasNext()){
								DictionaryVO pvo = null;
								pvo = (DictionaryVO)itpost.next();
							%>
							<option value=<%=pvo.getName() %>
							<%
  if(sdto!=null && sdto.getTeacher_post()!=null && !sdto.getTeacher_post().equals("") && sdto.getTeacher_post().trim().equals(String.valueOf(pvo.getName()))){ %>
       selected="selected"
       <%} %>
							><%=pvo.getName() %></option>
							<%
							}
							%>
			</select>
	</td>
	<td width="15%">
		状态:&nbsp;<select name=teacher_states id="teastate">
								<option value="">------</option>
								<%
								Iterator itstates = stateslist.iterator();
								while(itstates.hasNext()){
									DictionaryVO svo = null;
								    svo = (DictionaryVO)itstates.next();
								%>
									<option value=<%=svo.getName() %>
									<%
	 if(sdto!=null && sdto.getTeacher_states()!=null && !sdto.getTeacher_states().equals("") && sdto.getTeacher_states().trim().equals(String.valueOf(svo.getName()))){ %>
       selected="selected"
       <%} %>		
									><%=svo.getName() %></option>
								<%
								}
								%>
			</select>
	</td>
	<td width="15%">部门:&nbsp;<select name=department_no id="department_no">
								<option value="">------</option>
							<%
							Iterator itdepa = department.iterator();
							while(itdepa.hasNext()){
								DepartmentVO depvo = null;
								depvo = (DepartmentVO)itdepa.next();
							%>
								<option value=<%=depvo.getDepartmentNo() %>
								<%
	if(sdto !=null && sdto.getDepartment_no()!=null && !sdto.getDepartment_no().equals("") && sdto.getDepartment_no().trim().equals(String.valueOf(depvo.getDepartmentNo()))){ %>
       selected="selected"
       <%} %>
								><%=depvo.getDepartmentNo() %></option>
							<%
							}
							%>
							</select>
	</td>
	<td width="10%">
		<input name="submit" type=submit class=button value=" 搜索 ">
	</td>
	<td width="10%">
		&nbsp;&nbsp;<input type=button class=button value=" 清空 " onclick="clearAll()">
	</td>
	</tr>
</table>
</form>
</DIV>

<!-- 老师列表 -->
<DIV class=list-div id=listDiv>
      <table border="0" align="center" width="90%" cellpadding=3 cellspacing=1 >
      <tbody>
        <tr>
          <th width="14%" align="center">
          <input type="checkbox" name="checkbox1" onclick="checkbox(this.checked)"/>编号</th>
          <th width="14%" align="center">姓名</th>
          <th width="14%" align="center">姓别</th>
          <th width="14%" align="center">职称</th>
          <th width="14%" align="center">状态</th>
          <th width="14%" align="center">部门</th>
          <th width="16%" align="center">删除&nbsp;&nbsp;&nbsp;&nbsp;编辑</th>
        </tr>
  <%
  	Iterator it = list.iterator();
  	TeacherVO tvo = null;
  	while(it.hasNext()){
  		tvo = new TeacherVO();
  		tvo = (TeacherVO)it.next();
  	%>
        <tr>
          <td width="14%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="checkbox" value=<%=tvo.getId().toString() %>>
          <a href="<%=path %>/admins/core/teacher.html?method=query&id=<%=tvo.getId() %>"><%=tvo.getTeacher_no() %></a></td>
          <td width="14%" align="center"><%=tvo.getTeacher_name() %></td>
          <td width="14%" align="center"><%=tvo.getGender() %></td>
          <td width="14%" align="center"><%=tvo.getTeacher_post() %></td>
          <td width="14%" align="center"><%=tvo.getTeacher_states() %></td>
          <td width="14%" align="center"><%=tvo.getDepartment_no() %></td>
          <td width="16%" align="center">
          		<a href="javascript:confirmDel(<%=tvo.getId()%>)">
          		<img alt="删除老师信息" border="0" src="<%=path%>/admins/images/icon_trash.gif"></a>&nbsp;&nbsp;&nbsp;&nbsp;
          		<a href="<%=path %>/admins/core/teacher.html?method=toedit&id=<%=tvo.getId() %>">
          		<img alt="编辑老师信息" border="0" src="<%=path%>/admins/images/icon_edit.gif"></a></td>
        </tr>
  <%
  	}
  %>
	</tbody>
  </table>
  <input type="button" class=button value=" 批量删除 " onclick="deleteAll()">
   <%
	if (paginationVO != null) {
		out.print("<tr class=''>");
		out.print("<TD height='30'");
		out.print(" colspan='5'>");
		out.print("<div align='CENTER'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
				+ "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共&nbsp;"
				+ paginationVO.getResultsNumber()
				+ "&nbsp;条记录&nbsp;|&nbsp;共&nbsp;"
				+ paginationVO.getAllPages()
				+ "&nbsp;页&nbsp;|&nbsp;当前第&nbsp;"
				+ paginationVO.getCurrentPage()
				+ "&nbsp;页&nbsp;");
			if (paginationVO.getCurrentPage() > 1) {
				out.print("|&nbsp;&lt;<a href=\"" + path);
					//请求服务器的URL
				out.print("/admins/core/teacher.html?method=list");
				out.print("&currentPage=1\">首页</a>&gt;&nbsp;|&nbsp;&lt;<a href=\""+ path);
					//请求服务器的URL
				out.print("/admins/core/teacher.html?method=list");
				out.print("&currentPage="+ (paginationVO.getCurrentPage() - 1)+ "\">上一页</a>&gt;&nbsp;");
			} else {
				out.print("| <font color='#999999'>&lt;首页&gt;</font> | <font color='#999999'>&lt;上一页&gt;</font>&nbsp;");
				}
			if (paginationVO.getCurrentPage() < paginationVO.getAllPages()) {
				out.print("|&nbsp;&lt;<a href=\"" + path);
					//请求服务器的URL
				out.print("/admins/core/teacher.html?method=list");
				out.print("&currentPage="+ (paginationVO.getCurrentPage() + 1)
							+ "\">下一页</a>&gt;&nbsp;|&nbsp;&lt;<a href=\""+ path);
					//请求服务器的URL
				out.print("/admins/core/teacher.html?method=list");
				out.print("&currentPage=" + paginationVO.getAllPages()+ "\">尾页</a>&gt;");
			} else {
				out.print("| <font color='#999999'>&lt;下一页&gt;</font> | <font color='#999999'>&lt;尾页&gt;</font>");
				}
				out.println();
				out.print("&nbsp;&nbsp;</div></TD>");
				out.print("</tr>");
		}
 %>
 </DIV>
    <DIV id=footer>
	<BR>
		版权所有 @2005-2007 湖北银河软件开发有限公司,并保留所有权利。
	</DIV>
  </body>	
</html>	

⌨️ 快捷键说明

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