📄 name_list.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.ijipin.tool.*" %>
<%@ page import="com.ijipin.database.*" %>
<%@ page import="com.ijipin.property.*" %>
<%@ include file="/userinfor.jsp" %>
<%@ include file="/share/page/page_request.jsp"%>
<%@ page import="com.ijipin.flow.*" %>
<%
////////////////////////////列表页面所必须有的公共变量
final String strSkin = "../../" + userInfor_session.getPFLJ(); //皮肤路径
final String strLevel = Name.strLevel; //本页所在的层次
final String strLink = Name.strLink_list ; //本页的地址
final int iModuleID = Name.iModuleID;
///iSecond_barid/////////记录本栏目ID,为了寻找事物类别ID
//查询条件,在包含页面中使用
String str_search[][] = null;
int i_search = 0;
int iCurrentPage = 1;
int iRecordCount = 0;
int iPageCount = 0;
int i=0;
PageInfor pageInfor = null;
//设置查询参数
String sTable = "";
String sField = "";
String sCond = "";
String sSortField = "" ;
int iOrder = 0;
//新建一个连接
DataConn dataConn = new DataConn();
Statement stmt = null;
ResultSet rs = null;
DataList dataList = null;
DataConn dataConn_read = null; //需要判断是否有“新”标志才需要
////////////////获得事物类别
SWLB SWLBclass = new SWLB(dataConn);
String strSWLB = "";
strSWLB = SWLBclass.getSWLB(iSecond_barid);
%>
<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="Content-Type" content="text/html; charset=gb2312">
<title><%=Message.COMPANY_NAME%></title>
<link href="<%=strSkin%>css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
try {
stmt = dataConn.getConnection().createStatement();
dataList = new DataList(stmt);
//获取本模块信息
Module module = new Module(dataConn);
moduleInfor_session = (ModuleInfor)module.getInfor(iModuleID);
//如果需要管理员可以看,而又不是管理人员
if (1 == moduleInfor_session.getSXGLBJ() && !isManager) {
out.println("<Script language='JavaScript'>");
out.println("alert('您不是管理人员,不能访问本页面');");
out.println("document.location.href='" + strLevel + "logout.jsp'");
out.println("</Script>");
return ;
}
//关联表及其他关联信息
String relateTable = "";
String relateField = "";
String relateValue = "0";
String relateName = "";
String relateCond = " and 1=1 ";
%>
<%@ include file="/share/page/share_bar_top.jsp"%>
<%@ include file="/share/property/list_property.jsp" %>
<%
//////////////////获取事物类别
/////////本页数据获取
//查询条件
sCond = " 1= 1";
if (!searchKey.equalsIgnoreCase("")){
sCond = searchField + " like '%" + searchKey + "%'";
}
//分页
try {
iCurrentPage = Integer.parseInt(strPage);
}
catch(Exception e) {}
//排序条件
sSortField = moduleInfor_session.getSXPX();
if (!sortField.equals("")) {
sSortField = sortField;
}
if (sortOrder.equals("")) {
iOrder = 1;
}
else {
iOrder = 1 - Integer.parseInt(sortOrder);
}
//组合查询条件
sTable = moduleInfor_session.getSXBM() + relateTable;
sField = sField.substring(1, sField.length());
sCond += relateCond;
/////////////////////有事物类别
sCond += " AND SWLB='" + strSWLB + "'";
rs = dataList.getResultSet(sTable, sField, sCond, sSortField, iOrder, iCurrentPage);
//分页信息
pageInfor = dataList.getPageInfor();
iRecordCount = pageInfor.getRecordCount();
iPageCount = pageInfor.getPageCount();
iCurrentPage = pageInfor.getCurrentPage();
%>
<!-- 列表工具条上 2004-04-28 -->
<%@ include file="/share/property/list_tool_top.jsp" %>
<!-- 列表数据区 2004-04-28 -->
<%@ include file="/share/property/list_data.jsp" %>
<!-- 列表工具条下 2004-04-28 -->
<%@ include file="/share/property/list_tool_bottom.jsp" %>
<%
}
catch(Exception e) {
System.out.println("异常="+e);
}
finally {
if (stmt != null) {
stmt.close();
}
if (dataConn != null) {
dataConn.close();
}
if (dataConn_read != null) {
dataConn_read.close();
}
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -