<%@page import="com.zky.util.jdbc.JDBCUtils"%> <%@page import="com.zky.zhyw.smtj.Jdbc"%> <%@page import="com.zky.zhyw.smsj.WorkDB"%> <%@page import="com.zky.util.jdbc.HashFmlBufResultSetHandler"%> <%@page import="com.zky.util.PageQuery"%> <%@page import="java.sql.Connection"%> <%@ page import="com.zky.pub.*"%> <%@ page import="com.zky.manager.*"%> <%@ page import="java.util.*"%> <%@ page language="java" contentType="text/html;charset=utf-8"%> <% String ls_url1 = "",outstr1 = ""; Login login_obj = (Login)session.getAttribute("login"); //验证session是否过期 if(login_obj == null) { ls_url1 = "/error.jsp?errorinfo=" + "
"+Common.toGb("您尚未登录或已经过期!")+"
"+Common.toGb("重新登录")+"
"; //outstr1 = new String(ls_url1.getBytes("gb2312"),"iso8859-1"); outstr1 = Common.GbConvertIso(ls_url1); response.sendRedirect(outstr1); return; } //验证口令是否验证通过 if(login_obj.checkPasstag() == false) { ls_url1 = "/error.jsp?errorinfo=" + Common.toGb("您没有成功登录!")+"
"+Common.toGb("重新登录")+""; //outstr1 = new String(ls_url1.getBytes("gb2312"),"iso8859-1"); outstr1 = Common.GbConvertIso(ls_url1); response.sendRedirect(outstr1); return; } %> 管理页面 <% Connection conn = null; conn =DbConn.getConn(); String frameworkid = login_obj.frameworkid; String departid = login_obj.departid; String empid = login_obj.optrid; String sql3 = "select a.empid,e.empname,a.departid,b.jobcode,b.jobname from tab_employee e,tab_empdept a,tab_job b where e.empid=a.empid and a.jobcode=b.jobcode and e.empstate='1' and b.frameworkid="+frameworkid+" and a.departid="+departid+" and a.empid='"+empid+"' order by b.jobname,e.empname"; HashFmlBuf buf3=(HashFmlBuf)JDBCUtils.query(conn,sql3.toString(),new HashFmlBufResultSetHandler()); request.setAttribute("buf3",buf3); String jobcode=""; if (buf3 != null) { for (int i=0; i
<% for(int i=0;i

<%=buf.fget("menuname",i) %>

<% String tempEmpid = buf.fget("menuname",i); StringBuffer sql1 = new StringBuffer("SELECT t2.menuname,t4.web_workobject FROM tab_menu t1 LEFT JOIN tab_menuitem t2 ON t1.submenuid=t2.uplevel LEFT JOIN tab_jobmenu t3 ON t2.menuitem=t3.menuitem LEFT JOIN tab_funcmodu t4 ON t2.menuid=t4.funcmoducode WHERE t2.menulevel='2'") .append("and t1.submenuname="+"'"+tempEmpid+"' and t3.jobcode="+"'"+jobcode+"'"); HashFmlBuf buf1=(HashFmlBuf)JDBCUtils.query(conn,sql1.toString(),new HashFmlBufResultSetHandler()); request.setAttribute("buf1",buf1); %> <% for(int j=0;j <%} %>
<%} %>