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

📄 serchgroup.jsp

📁 旅游自助管理系统 本系统基于struts1.2, tomcat5.5.17, mysql5.0, eclipse3.1, myeclipse5.1开发。 使用方法: 1、使用mys
💻 JSP
字号:
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="java.util.*"%>

<%
	Vector groupnames = (Vector) request.getAttribute("groupnames");
	Vector corpnames = (Vector) request.getAttribute("corpnames");
	Vector groupids = (Vector) request.getAttribute("groupids");
	List<Long> enteredids = null;
	Object obj = request.getAttribute("enteredid");
	if(obj!=null){
		enteredids = (List<Long>) obj;
	}
	//test
	// groupnames.add(new String("haha"));groupnames.add(new String("xixi"));
%>

<table align="center" width="92%" cellspacing="3" border="0">
<%
	if (groupnames != null && groupnames.size() != 0) {
%>
	<tr bgcolor="#6699CC">
		<th>
			<font size="2">旅 游 团</font>
		</th>
		<th width="50%">
			<font size="2">所 属 公 司</font>
		</th>
		<th width="20%" align="center" colspan="2">
			<font size="2">操 作</font>
		</th>
	</tr>
<%
	for (int i = 0; i < groupnames.size(); i++) {
%>
	<tr bgcolor="#6699CC">
		<td>
			<center>
				<%=groupnames.get(i)%>
			</center>
		</td>
		<td>
			<center>
				<%=corpnames.get(i)%>
			</center>
		</td>
		<td align="center">
			<!-- unique值有问题 -->
			<a
				href="<%=request.getContextPath()%>/display.do?type=group&unique=<%=groupids.get(i)%>">
				<font size="2">查看旅游团信息</font> </a>
		</td>
		<td align="center">
<%
			if(enteredids!=null){
				if(!enteredids.contains(groupids.get(i))){
%>
				<a
					href="<%=request.getContextPath()%>/entergroup.do?unique=<%=groupids.get(i)%>">
					<font size="2">加  入</font> </a>
<%
				}else{
%>
				<a
					href="<%=request.getContextPath()%>/cancelgroup.do?unique=<%=groupids.get(i)%>">
					<font size="2">退  订</font> </a>
<%
				}
			}
%>
		</td>
	</tr>
<%
		}
	} else {
		out.println("<font size='2'>对不起,暂时没有旅游团的信息。</font>");
	}
%>
</table>

⌨️ 快捷键说明

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