You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
test/userDetail.jsp

92 lines
4.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <!-- 引入JSTL核心标签库 -->
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <!-- 引入JSTL格式化标签库 -->
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath(); // 获取当前Web应用的根路径
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" /> <!-- 禁用页面缓存 -->
<meta http-equiv="cache-control" content="no-cache" /> <!-- 禁用页面缓存 -->
<meta http-equiv="expires" content="0" /> <!-- 禁用页面缓存 -->
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" /> <!-- 页面关键字 -->
<meta http-equiv="description" content="This is my page" /> <!-- 页面描述 -->
<!-- 引入CSS文件 -->
<link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
<!-- 引入公共JavaScript文件 -->
<script language="JavaScript" src="<%=path %>/js/public.js" type="text/javascript"></script>
<script language="javascript">
// 添加用户信用评价的功能
function xinyongAdd(user_id) {
var url="<%=path %>/admin/xinyong/xinyongAdd.jsp?user_id="+user_id; // 构造跳转链接包含用户ID
window.location.href=url; // 跳转到用户信用评价页面
}
</script>
</head>
<body leftmargin="2" topmargin="2" background='<%=path %>/img/allbg.gif'>
<!-- 用户列表表格 -->
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7">
<td height="14" colspan="14" background="<%=path %>/img/tbg.gif">&nbsp;&nbsp;</td> <!-- 页眉 -->
</tr>
<tr align="center" bgcolor="#FAFAF1" height="22">
<td width="4%">序号</td> <!-- 序号列 -->
<td width="10%">账号</td> <!-- 账号列 -->
<td width="10%">密 码</td> <!-- 密码列 -->
<td width="10%">姓名</td> <!-- 姓名列 -->
<td width="10%">操作</td> <!-- 操作列 -->
</tr>
<!-- 遍历用户列表,显示用户信息 -->
<c:forEach items="${requestScope.userList}" var="user" varStatus="ss">
<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
<td bgcolor="#FFFFFF" align="center">
${ss.index+1} <!-- 设置序号索引从1开始 -->
</td>
<td bgcolor="#FFFFFF" align="center">
${user.loginname} <!-- 显示用户账号 -->
</td>
<td bgcolor="#FFFFFF" align="center">
${user.loginpw} <!-- 显示用户密码 -->
</td>
<td bgcolor="#FFFFFF" align="center">
${user.name} <!-- 显示用户姓名 -->
</td>
<td bgcolor="#FFFFFF" align="center">
<!-- 点击按钮跳转到添加信用评价页面 -->
<input type="button" value="添加信用评价" onclick="xinyongAdd(${user.id})"/>
</td>
</tr>
</c:forEach>
</table>
<!-- 遍历信用评价列表,显示评价内容 -->
<c:forEach items="${requestScope.xinyongList}" var="xinyong" varStatus="sta">
&nbsp;&nbsp;&nbsp;
<!-- 使用fieldset为每条信用评价加上框 -->
<fieldset style="width:60%; margin-left:5px;"><legend class="fieldtitle"></legend>
<table class="bill" width="97%" cellpadding="4" cellspacing="4" border="0">
<tr>
<td style="width: 100">属性:${xinyong.shuxing}</td> <!-- 显示信用评价属性 -->
</tr>
<tr>
<td style="width: 100">评价内容:${xinyong.neirong}</td> <!-- 显示评价内容 -->
</tr>
<tr>
<td style="width: 100">评价时间:${xinyong.shijian}</td> <!-- 显示评价时间 -->
</tr>
</table>
</fieldset>
<br/>
</c:forEach>
</body>
</html>