WebRoot/kechengxinxi_list.jsp
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ page language="java" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="connDbBean" scope="page" class="db.db"/>
<html>
<head>
<base href="<%=basePath%>">
<title>课程信息</title><LINK href="CSS.css" type=text/css rel=stylesheet><script language="javascript" src="js/Calendar.js"></script>
</head>
<%
String sql;
ResultSet RS_result;
%>
<body >
<p>已有课程信息列表:</p>
<form name="form1" id="form1" method="post" action="">
搜索: 课程名称:<input name="kechengmingcheng" type="text" id="kechengmingcheng" />类型:<select name='leixing' id='leixing'><option value="">所有</option><option value="选修">选修</option>
<option value="必修">必修</option></select>
<input type="submit" name="Submit" value="查找" />
</form>
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="00FFFF" style="border-collapse:collapse">
<tr>
<td width="30" align="center" bgcolor="CCFFFF">序号</td>
<td bgcolor='#CCFFFF'>课程名称</td><td bgcolor='#CCFFFF'>学时</td><td bgcolor='#CCFFFF'>学分</td><td bgcolor='#CCFFFF'>类型</td><td bgcolor='#CCFFFF'>备注</td>
<td width="138" align="center" bgcolor="CCFFFF">添加时间</td>
<td width="60" align="center" bgcolor="CCFFFF">操作</td>
</tr>
<%
int curpage=1;//当前页
int page_record=10;//每页显示的记录数
int zgs=0;
int zys=0;
//用下面的方法(sql查询完成,速度快)
String hsgnpage=request.getParameter("page");
String fysql="select count(id) as ss from kechengxinxi";
ResultSet RS_resultfy=connDbBean.executeQuery(fysql);
while(RS_resultfy.next()){
zgs=Integer.parseInt(RS_resultfy.getString("ss"));
zys=zgs/page_record+1;
}
if (hsgnpage!=null)
{
curpage=Integer.parseInt(request.getParameter("page"));//获取传递的值,需要显示的页
}
else
{
curpage=1;
}
if (curpage==0)
{
curpage=1;
后面还有 44 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。