📄 personpage.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="person.*,java.util.*,DIC.*" %>
<% request.setCharacterEncoding("gb2312"); %>
<html>
<head>
<title>
personpage
</title>
</head>
<body bgcolor="#ffffff">
<h3>从业人员信息查看修改及删除:</h3>
<%
String SUBAREA=request.getParameter("SUBAREA");
String FUNSERVERID=request.getParameter("FUNSERVERID");
String PERSONNELNAME=request.getParameter("PERSONNELNAME");
String IDCARD=request.getParameter("IDCARD");
String PTYPE=request.getParameter("PTYPE");
String sqlstr="select * from FUNSERVER_PERSONNEL where 1=1";
if((SUBAREA!=null)&&(!SUBAREA.equals("")))sqlstr=sqlstr+" and SUBAREA='"+SUBAREA+"'";
if((FUNSERVERID!=null)&&(!FUNSERVERID.equals("")))sqlstr=sqlstr+" and FUNSERVERID='"+FUNSERVERID+"'";
if((PERSONNELNAME!=null)&&(!PERSONNELNAME.equals("")))sqlstr=sqlstr+" and PERSONNELNAME like '%"+PERSONNELNAME+"%'";
if((IDCARD!=null)&&(!IDCARD.equals("")))sqlstr=sqlstr+" and IDCARD='"+IDCARD+"'";
if((PTYPE!=null)&&(!PTYPE.equals("")))sqlstr=sqlstr+" and PTYPE='"+PTYPE+"'";
//out.print(sqlstr);
PersonBean pb = new PersonBean();
PersonPage ppage= new PersonPage(10,sqlstr);
int PageCount=ppage.getpagecount();
int rowcount =ppage.QryRcdCount(sqlstr);
int showpage=1;
String Page =request.getParameter("page");
if (Page != null) {
showpage = Integer.parseInt(Page);
if (showpage > PageCount)
showpage = PageCount;
else if (showpage < 0)
showpage = 1;
}else showpage = 1;
List lt=ppage.QryAll(showpage,sqlstr);
if(lt.size()==0)out.print("无");else{
%>
<form method="post" action="personpage.jsp">
<table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#000000">
<tr bgcolor="#CCCCCC">
<td width="12%"><font color="#000099"><strong>姓名</strong></font></td>
<td width="27%"><font color="#000099"><strong>所在场所</strong></font></td>
<td width="14%"><font color="#000099"><strong>所在分区</strong></font></td>
<td width="14%"><font color="#000099"><strong>身份证号</strong></font></td>
<td width="8%"><font color="#000099"><strong>性别</strong></font></td>
<td colspan="2"><font color="#000099"><strong>人员类别</strong></font></td>
<td width="6%"><font color="#000099"><strong>修改</strong></font></td>
<td width="6%"><font color="#000099"><strong>删除</strong></font></td>
</tr>
<%
for(int i=0;i<lt.size();i++){
pb=(PersonBean)lt.get(i);
%>
<tr>
<td><font size="2"><%=pb.getPERSONNELNAME()%></font></td>
<td> <font size="2">
<%
String sql="select * from FUNSERVER_LIST where FUNSERVERID='"+pb.getFUNSERVERID()+"'";
PERSON person = new PERSON();
PersonBean pbean = new PersonBean();
pbean=person.GetBeanBySql(sql);
%>
<%=pbean.getFUNSERVERNAME()%></font></td>
<td> <font size="2">
<%
DICBean db= new DICBean();
DicOperate dic = new DicOperate();
dic.setTableName("DIC_SUBAREA");
db=dic.QryRcdByPK(pb.getSUBAREA());
%>
<%=db.getDIC_TEXT()%></font></td>
<td><font size="2"><%=pb.getIDCARD()%></font></td>
<td> <font size="2">
<%
DicOperate dic1 = new DicOperate();
dic1.setTableName("DIC_SEX");
db=dic1.QryRcdByPK(pb.getPTYPE());
%>
<%=db.getDIC_TEXT()%></font></td>
<td colspan="2"> <font size="2">
<%
DicOperate dic2 = new DicOperate();
dic2.setTableName("DIC_PTYPE");
db=dic2.QryRcdByPK(pb.getPTYPE());
%>
<%=db.getDIC_TEXT()%></font></td>
<td><input type="button" onclick="javascript:window.open('personupdate.jsp?IDCARD=<%=pb.getIDCARD()%>&FUNSERVERID=<%=pb.getFUNSERVERID()%>')" value="修改"></td>
<td> <input type="button" onclick="javascript:if(confirm('确定要删除!')) window.location='persondelete.jsp?personid=<%=pb.getPERSONID()%>'" value="删除" ></td>
</tr>
<%}%>
<tr bgcolor="#CCCCCC">
<td colspan="9"><font color="#000099">共<%=rowcount%>条记录</font> <font color="#FF0000" size=2>注:修改或删除后,刷新后得到最新信息</font></td>
</tr>
</table>
<%
if(PageCount>1){
String toPage=response.encodeRedirectURL("personpage.jsp");
%>
<table width="750" align="center" cellpadding="1">
<tr>
<td width="127" height="34">
<%if(showpage>1){%>
<a href="<%=toPage%>?page=1&SUBAREA=<%=SUBAREA%>&FUNSERVERID=<%=FUNSERVERID%>&FUNSERVERID=<%=FUNSERVERID%>&IDCARD=<%=IDCARD%>&PTYPE=<%=PTYPE%>">
<%}%>首页
<%if(showpage>1){%></a>
<%}%>
</td>
<td width="100">
<%if(showpage<PageCount){%>
<a href="<%=toPage%>?page=<%=(showpage+1)%>&SUBAREA=<%=SUBAREA%>&FUNSERVERID=<%=FUNSERVERID%>&FUNSERVERID=<%=FUNSERVERID%>&IDCARD=<%=IDCARD%>&PTYPE=<%=PTYPE%>">
<%}%>下一页
<%if(showpage<PageCount){%></a>
<%}%>
</td>
<td width="118">
<%if(showpage>1){%>
<a href="<%=toPage%>?page=<%=(showpage-1)%>&SUBAREA=<%=SUBAREA%>&FUNSERVERID=<%=FUNSERVERID%>&FUNSERVERID=<%=FUNSERVERID%>&IDCARD=<%=IDCARD%>&PTYPE=<%=PTYPE%>">
<%}%>上一页
<%if(showpage>1){%>
</a>
<%}%>
</td>
<td width="112">
<%if(showpage<PageCount){%>
<a href="<%=toPage%>?page=<%=PageCount%>&SUBAREA=<%=SUBAREA%>&FUNSERVERID=<%=FUNSERVERID%>&FUNSERVERID=<%=FUNSERVERID%>&IDCARD=<%=IDCARD%>&PTYPE=<%=PTYPE%>">
<%}%>
末页
<%if(showpage<PageCount){%></a>
<%}%>
</td>
<td width="117">当前第<%=showpage%>页</td>
<td width="148"> </td>
</tr>
</table>
<%}%>
</form>
<%} %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -