show_line.jsp
<%@ page contentType="text/html; charset=GBK" %>
<%@ page language="java" import="tour_lines.line"%>
<%@ page language="java" import="java.util.*"%>
<%@ page language="java" import="java.io.*"%>
<jsp:useBean id="j" scope="application" class="jdbc.jdbc"/>
<jsp:useBean id="s" scope="application" class="tour_lines.show_line"/>
<body>
<form name="form1" method="post" action="d_line.jsp">
<table width="90%" border="1" cellspacing="0" bordercolor="#CCCCFF">
<tr>
<td colspan="2"><img src="../image/biaoti.jpg" width="760" height="150"></td>
</tr>
<tr>
<td><div align="center">已开通旅游线路名称</div></td>
<td>删除</td>
</tr>
<%
s.tour_line_name="";
s.con=j.getConnection();
Collection tcol=s.show();
Iterator it=tcol.iterator();
while(it.hasNext())
{
line li=(line)it.next();
%>
<tr>
<td width="86%"><div align="left"><a href="line_amend.jsp?title=<%=li.getTour_line_name()%>" target="_blank">
<%out.print(li.getTour_line_name());%>
</a> </div></td>
<td width="14%"><input type="radio" name="tour_line_name" value=<%=li.getTour_line_name()%>></td>
</tr>
<%
it.remove();
}
j.releaseConnection(s.con);
%>
</table>
<p align="right">
<input type="submit" name="Submit" value="删除所选旅游线路">
</p>
</form>
</body>
line_amend.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=GBK" %>
<%@ page language="java" import="tour_lines.line"%>
<%@ page language="java" import="java.util.*"%>
<%@ page language="java" import="java.io.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>五十里旅行社</title>
<script language="javascript">
function guanbi() {
window.close('line_amend.jsp')
}
</script>
</head>
<jsp:useBean id="j" scope="application" class="jdbc.jdbc"/>
<jsp:useBean id="i" scope="application" class="tour_lines.line_intro"/>
<%
String l_n=new String(request.getParameter("title").getBytes("ISO8859_1"), "GBK");
String line_name=l_n.trim();
i.con=j.getConnection();
i.tour_line_name=line_name;
Collection tcol=i.intro();
Iterator it=tcol.iterator();
request.getSession(true);
session.putValue("image",line_name);
%>
<body topmargin="0">
<%
while(it.hasNext())
{
line li=(line)it.next();
%>
<form name="form1" method="post" action="amend_exe.jsp">
<table width="90%" border="1" cellspacing="0" bordercolor="#CCCCFF">
<tr>
<td colspan="2"><img src="../image/biaoti.jpg" width="760" height="150"></td>
</tr>
<tr>
<td width="79%">旅游线路名称:
<input name="tour_line_name" type="text" value=<%=li.getTour_line_name()%> size="50"></td>
<td width="21%">热点线路:
<input name="hot_tour_line" type="text" value=<%=li.getHot_tour_line()%> size="4">
</td>
</tr>
<tr>
<td colspan="2"><textarea name="tour_line_intro" cols="100" rows="15"><%=li.getTour_line_intro()%></textarea></td>
</tr>
</table>
<div align="right">
<input name="old_line_name" type="hidden" value=<%=line_name%>>
<input type="submit" name="Submit" value="提交">
</div>
</form>
<%
it.remove();
}
j.releaseConnection(i.con);
%>
<p> </p>
</body>
</html>