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

📄 customers.jsp

📁 某电子商品销售公司为了提升企业形象和商品销售量
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*" %>
<%@ page session="true" %>
<%@ page import="jdgl.op.*" %>
<%@ page language="java" import="java.sql.*, jdgl.util.*" %>
<jsp:useBean id="roomsinfo" scope="page" class="jdgl.run.op_roomsinfo" />
<jsp:useBean id="history" scope="page" class="jdgl.run.op_history" />
<jsp:useBean id="lx" scope="page" class="jdgl.run.op_lx" />
<jsp:useBean id="trun" scope="page" class="jdgl.util.Truncate" />   
<%@include file="../inc/session.inc"%>
<%
String mesg="";
mesg= request.getParameter("mesg");
if (mesg==null) {mesg="";}

int pages=1;
if (request.getParameter("page")!=null && !request.getParameter("page").equals("")) {
	String requestpage = request.getParameter("page");	
	try {
		pages = Integer.parseInt(requestpage);
	} catch(Exception e) {
		mesg = "你要找的页码错误!";
	}
}


String io = request.getParameter("io");
	if(io==null || io=="") {io="";}

if(io.equals("1"))
{String chkbx[]=request.getParameterValues("checkbox");
if(chkbx!=null){
for(int i = 0; i < chkbx.length; i++){
	if (history.delete(Integer.parseInt(chkbx[i]))){
			mesg = "删除成功!";
		} else {
			mesg = "删除出错!";
		}	
			}
}else{
%>
<script language="JavaScript">
  alert("请选中记录!");
 </script>
<%
}
}


String keyword = request.getParameter("keyword");
if (keyword==null) keyword="";
keyword = history.to_String(keyword);

%>
<html>
<head>
<script language="javascript">
function openScript(url,name, width, height){
	var Win = window.open(url,name,'width=' + width + ',height=' + height + ',top=100,left=250,resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
</script>
</head>
<%@ include file="../inc/gs.inc"%>
<body bgcolor="#DEF3CE">
<center>
<table width="800" border="0" cellspacing="0" bgcolor="#DEF3CE"  bordercolor="white" align="center">
<form name="a1" method="post" action="customers.jsp">
<tr>
<td width=20% align=left><font size=2 color=green><b>::客户信息查询::</b></font></td>
<td width=50% align=center><font size=2 color=green>姓名/联系电话:<INPUT TYPE="text" NAME="keyword" size=20 maxlength=40 value="<%= keyword %>">&nbsp;&nbsp;<a href="#" style="color:green;" onclick="javascript:a1.submit();">查询</a></font></td>
<td width=30% align=right><a href="#" style="color:red;" onclick="javascript:a2.submit();"><font size=2 color=green>删除</font></a>
</td>         
</tr>
</FORM>
</table>
<table width="800" border="0" cellspacing="0" bgcolor="#E4EDFB"  bordercolor="white" align="center">
<form name="a2" method="post" action="customers.jsp">
<tr height=23 align="center" bgcolor="#E4EDFB">
<input type=hidden name=io value=1>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green ; border-bottom:1 solid green">
<font size=2 color="green">编号</font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green ; border-bottom:1 solid green">
<font size=2 color="green">客房名称</font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green; border-bottom:1 solid green">
<font size=2 color="green">客房类型</font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green; border-bottom:1 solid green">
<font size=2 color="green">客户姓名</font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green; border-bottom:1 solid green">
<font size=2 color="green">入住时间</font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green; border-bottom:1 solid green">
<font size=2 color="green">退房时间</font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green; border-bottom:1 solid green">
<font size=2 color="green">联系电话</font></td>
<td width=20% align="left" style="border-left:none; border-right:none; border-top:2 solid green; border-bottom:1 solid green">
<font size=2 color="green">身份证</font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:2 solid green; border-bottom:1 solid green">
<font size=2 color=green>状态</font></td>
</tr>
<% if (history.customers_search(request)) {
	for (int i=0;i<history.gethistorylist().size();i++){
	     history bk = (history) history.gethistorylist().elementAt(i);
   if(history.getrecordCount()<1){
	   %>&nbsp;<%
   }else{
%>
<tr  bgcolor="#DEF3CE" onMouseOver=this.style.backgroundColor='#FFFFFF' onMouseOut=this.style.backgroundColor=''>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<%if(bk.getstatus().trim().equals("0")){%>
     <font size=2 color=green>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
<%}else{%>
<input name="checkbox" type="checkbox"  value=<%=bk.getId() %>>
<%}%>
<font size=2 color=green><%=(i+1)+(pages-1)*history.getPageSize()%></font>
</td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<font size=2 color=green><%if (roomsinfo.seachallroomsinfo()){for (int j=0;j<roomsinfo.getroomsinfolist().size();j++){
         roomsinfo ba = (roomsinfo) roomsinfo.getroomsinfolist().elementAt(j);
             if(bk.getroomid().trim().equals(ba.getroomid().trim()))
				 {%><%= ba.getname().trim()%><%}}}%></font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<font size=2 color=green><%if (lx.seachalllx()){for (int j=0;j<lx.getlxlist().size();j++){
         lx bc = (lx) lx.getlxlist().elementAt(j);
             if(bk.getrcategoryid().trim().equals(bc.getrcategoryid().trim()))
				 {%><%= bc.getname().trim()%><%}}}%></font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<font size=2 color=green><%=bk.getcname().trim() %></font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<font size=2 color=green><%=bk.getbegintime().trim() %></font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<font size=2 color=green><%=bk.getendtime().trim() %></font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<font size=2 color=green><%=bk.getcphone().trim() %></font></td>
<td width=20% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<font size=2 color=green><%=bk.getcidentityid().trim() %></font></td>
<td width=10% align="left" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid white">
<%if(bk.getstatus().trim().equals("0")){%><font size=2 color=green>入住中.....</font><%}else{%><font size=2 color=green>已退房!</font><%}%></td>
</tr>
<%}
}
} else {%>
<tr>
<td align="center" colspan=8>&nbsp;</td>
</tr>
<% } %>
 </form>
</table>
<br>
<!--分页跳页-->
<%if(history.getrecordCount()<1){%>
<table align="center" width="800" border="0" cellspacing="0" cellpadding="0"  bgcolor="#E4EDFB">
<tr bgcolor="#DEF3CE">
<td width="50%" align="left" ><font size=2 color=green>没有记录!</font></td>
<td width="50%" align="right">&nbsp;</td>
</tr>
</table>
<%}else{%>
<table align="center" width="800" border="0" cellspacing="0" cellpadding="0"  bgcolor="#E4EDFB">
<tr bgcolor="#DEF3CE">
 <td width="50%" align="left" ><font size=2 color=green>&nbsp提示:共<%= history.getrecordCount()%>条记录</font></td>
<td width="50%" align="right"><font size=2 color=green>共<%= history.getPageCount() %>页&nbsp;当前页第<%= history.getPage() %>页 
<a href="customers.jsp">首页</a>&nbsp;
<% if (history.getPage()>1) {%>
<a href="customers.jsp?page=<%= history.getPage()-1 %>&keyword=<%=keyword%>">上一页</a>&nbsp;<% }else{ %>上一页&nbsp;<%}%>
<% if (history.getPage()<history.getPageCount()-1) {%>
<a href="customers.jsp?page=<%= history.getPage()+1 %>&keyword=<%=keyword%>">下一页</a>&nbsp;<% }else{ %>下一页&nbsp;<%}%>
<a href="customers.jsp?page=<%= history.getPageCount() %>&keyword=<%=keyword%>">未页</a>&nbsp;</font></td>
</tr>
</table>
<%}%>
</div>
</body>
</html>

⌨️ 快捷键说明

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