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

📄 model.jsp

📁 ftp管理。构造网络路径部分比较好。内部有数据库截图。。
💻 JSP
字号:
<%@ page language="java"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.sql.*,common.*"%>

<html>
	<head>
		<title>软件下载索引</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
    </style>
	</head>
	<body>
		<%
			int id = 0;
			String typeid = request.getParameter("typeid");
			if (typeid != null) {
				id = Integer.parseInt(typeid);
			} else {
				id = 0;
			}
		%>
		<%@include file="top.htm"%>
		<table width="100%" height="380" border="1">
			<tr>
				<td height="24" colspan="2" align="left" valign="top">
					<table width="100%" height="20" border="0">
						<tr>
							<td width="80%">
								当前路径:
								<%
							out.print(GetUrl.geturl(id));
							%>
							</td>
							<td width="20%">

							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td width="30%" height="348" align="left" valign="top">
					<%
						Connection conn = null;
						Statement stmt = null;
						ResultSet rs = null;

						String sql = "select c_type_name,c_id,c_fid,c_describe from t_type where c_isdel=1 and c_fid="
								+ id;
						try {
							conn = DAO.getConnection();
							stmt = conn.createStatement();
							rs = stmt.executeQuery(sql);
					%>
					<table width="100%" height="" border="1">
						<tr>
							<td width="100%" height="25" align="center">
								<strong> 分类(文件夹) </strong>
							</td>
						</tr>
						<%
						while (rs.next()) {
						%>
						<tr>
							<td height="25">
								<a href="model.jsp?typeid=<%=rs.getInt("c_id")%>" target="_self"><%=rs.getString("c_type_name")%>
								</a>
							</td>
						</tr>
						<%
							}
							} catch (Exception ex) {
								ex.printStackTrace();
							} finally {
								DAO.closeResource(rs);
								DAO.closeResource(stmt);
								DAO.closeResource(conn);
							}
						%>
					</table>
				</td>
				<td width="70%" align="left" valign="top">
					<%
								sql = "select c_id,c_name,c_describe,c_typeid,c_hits,c_lasttime,c_jointime from t_file where  c_isdel=1 and c_typeid="
								+ id;
						try {
							conn = DAO.getConnection();
							stmt = conn.createStatement();
							rs = stmt.executeQuery(sql);
					%>
					<table width="100%" height="" border="1">
						<tr>
							<td height="25" colspan="2" align="center">
								<strong> 此分类下的软件(文件) </strong>
							</td>
						</tr>
						<%
						while (rs.next()) {
						%>
						<tr>
							<td width="30%" height="25">
								<a href="detail.jsp?fileid=<%=rs.getString("c_id")%>"><%=rs.getString("c_name")%>
								</a> | [
								<%=rs.getInt("c_hits")%>
								次] | [
								<%=rs.getString("c_jointime").substring(0, 10)%>
								]
							</td>
							<td width="360" height="25">
								所在目录:
								<%
							out.print(GetUrl.geturl(id));
							%>
							
						</tr>
						<tr>
							<td height="25" colspan="2">
								描述:
								<span style="font-size:11px; color:#999999"><%=rs.getString("c_describe")%>
								</span>
							</td>
						</tr>
						<%
							}
							} catch (Exception ex) {
								ex.printStackTrace();
							} finally {
								DAO.closeResource(rs);
								DAO.closeResource(stmt);
								DAO.closeResource(conn);
							}
						%>
					</table>
				</td>
			</tr>
		</table>
		<%@include file="footer.jsp"%>
	</body>
</html>

⌨️ 快捷键说明

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