login.jsp~7~
来自「《struts应用开发完全手册》中的源代码及安装指导」· JSP~7~ 代码 · 共 64 行
JSP~7~
64 行
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.actionForm.ManagerForm"%>
<%@ page import="com.actionForm.RightForm"%>
<jsp:useBean id="dao" scope="request" class="com.dao.RightDao"/>
<link href="css/style.css" rel="stylesheet">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>登录后首页</title>
<script Language="JavaScript">
function quit() {
if(confirm("确定要退出吗?")){
window.location.href="loginOut.jsp";
}
}
function right() {
alert('您有这个权利');
window.location.href="login.jsp";
}
</script>
</head>
<%
ManagerForm managerForm=(ManagerForm)session.getAttribute("manager");
RightForm rightForm=dao.selectAccountRight(managerForm.getAccount());
%>
<body>
<%if(managerForm==null){%><meta http-equiv="refresh" content="0;URL=connectionFail.jsp"><%}%>
<table width="640" border="0" align="center">
<tr>
<td width="80" height="30"><%=managerForm.getAccount()%></td>
<td width="80">
<%if(rightForm.getJcxx().equals(new Integer(1))){%>
<a href="#" onClick="right()">基础信息</a><%}else{%>没有权利
<%}%>
</td>
<td width="80">
<%if(rightForm.getJczl().equals(new Integer(1))){%>
<a href="#" onClick="right()">基础资料</a><%}else{%>没有权利
<%}%>
</td>
<td width="80">
<%if(rightForm.getYwgl().equals(new Integer(1))){%>
<a href="#" onClick="right()"> 业务管理</a><%}else{%>没有权利
<%}%>
</td>
<td width="80">
<%if(rightForm.getXxcx().equals(new Integer(1))){%>
<a href="#" onClick="right()">信息查询</a><%}else{%>没有权利
<%}%></td>
<td width="80">
<%if(rightForm.getFzgj().equals(new Integer(1))){%>
<a href="#" onClick="right()"> 辅助工具</a><%}else{%>没有权利
<%}%></td>
<td width="80">
<%if(rightForm.getXtsz().equals(new Integer(1))){%>
<a href="#" onClick="right()"> 系统设置</a><%}else{%>没有权利
<%}%></td>
<td width="80"> <a href="#" onClick="quit()">退出系统</a></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?