customer_list.jsp
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:6k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- <%@ page contentType="text/html;charset=gb2312"%>
- <%@include file="../include/checkadmin.jsp"%>
- <%@page import="java.sql.*"%>
- <%@include file="../include/db_conn.jsp"%>
- <%@include file="../include/const.jsp"%>
- <%@include file="../include/isNotInteger.jsp"%>
- <%!String keyword;%>
- <%
- keyword=request.getParameter("keyword");
- if(keyword==null){
- keyword="";
- }else{
- keyword=getGBString(keyword);
- }
- %>
- <HTML>
- <HEAD>
- <TITLE>+ + 翔鹭石化 + +</TITLE>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
- <link href="../style.css" rel="stylesheet" type="text/css">
- </HEAD>
- <BODY BGCOLOR=#CFE7F3 vlink="#666666" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
- <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
- <tr>
- <img src="../images/in1p_CRM1.gif" width="778" height="90"></td>
- </tr>
- <tr>
- <td width="26" height="26"><img src="../images/indl1.gif" width="26" height="26"></td>
- <td width="165" height="26"><img src="../images/in1t2.gif" width="165" height="26"></td>
- <td height="26" align="right"><img src="../images/in1tblk.gif" width="585" height="26"></td>
- </tr>
- </table>
- <table width="778" height="300" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
- <tr>
- <td> </td>
- <td align="right" valign="top" bgcolor="f0f0f0">
- <!--子目录-->
- <%@include file="s2menu_admin.jsp"%>
- <!--子目录-->
- <table width="100%" cellspacing="0" cellpadding="0" >
- <tr>
- <td><img src="../images/in1left.gif" width="165" height="100">
- </tr>
- </table>
- </td>
- <td align="center" valign="top">
- <table width="80%">
- <tr>
- <td >
- <p align="right"><strong><font size="+1"><font color="#0000FF">客 户 列 表</font></font></strong></p>
- </td>
- </tr>
- <form name="frm_search" action="customer_list.jsp" method="post">
- <tr>
- <td align="left" bgcolor="#ffffff" height=20>请输入客户信息(名称或编号):<input type="text" name="keyword"> <input type="submit" name="s1" value="搜 索" style="width:60px;height:22px;"></td>
- </tr>
- </form>
- </table>
- <!--新闻列表-->
- <% String column_id="3";
- String column_title;
- int intPageSize; //一页显示的记录数
- int intRowCount; //记录总数
- int intPageCount; //总页数
- int intPage; //待显示页码
- String strPage;
- int i;
- //版本控制
- intPageSize = 12; //设置一页显示的记录数
- strPage = request.getParameter("page"); //取得待显示页码
- if(isNotInteger(strPage)){//表明在QueryString中没有page这一个参数,此时显示第一页数据
- intPage = 1;
- }
- else{//将字符串转换成整型
- intPage = java.lang.Integer.parseInt(strPage);
- if(intPage<1) intPage = 1;
- }
- sql = "select c_id,KUNNR,NAME1,ERDAT,ERZET from ZSD_KNA1 ";
- sql = sql + " where me_ver='cn' order by KUNNR ";
- if(keyword.length()!=0)
- {
- sql = "select c_id,KUNNR,NAME1,ERDAT,ERZET from ZSD_KNA1 ";
- sql = sql + " where((KUNNR LIKE '%"+keyword+"%')OR(NAME1 LIKE '%"+keyword+"%'))and(me_ver='cn')order by KUNNR ";
- }
- // out.print(sql);
- rs=smt.executeQuery(sql);
- rs.last();
- intRowCount = rs.getRow(); //获取记录总数
- intPageCount = (intRowCount+intPageSize-1) / intPageSize; //记算总页数
- if(intPage>intPageCount) intPage = intPageCount; //调整待显示的页码
- %>
- <table width="95%" cellspacing="0" cellpadding="0">
- <%
- if(intPageCount>0){
- //将记录指针定位到待显示页的第一条记录上
- rs.absolute((intPage-1) * intPageSize + 1);
- //显示数据
- i = 0;
- while(i<intPageSize && !rs.isAfterLast()){
- %>
- <tr>
- <td height="25">
- <img src="../images/dot01.gif" width="5" height="5">
- <a href="x_customer_detail.jsp?c_id=<%=rs.getInt("c_id")%>" target="_blank">
- <font color="#0033FF"><%=rs.getString("NAME1").trim()%>(客户编号:<%=rs.getString("KUNNR")%>)</font>
- </a>
- --最后更新时间:<%=rs.getDate("ERDAT")%> <%=rs.getTime("ERZET")%>
- </td>
- </tr>
- <tr>
- <td height="1" bgcolor="f0f0f0"><img src="../images/spacer.gif" width="1" height="1"></td>
- </tr>
- <%
- rs.next();
- i++;
- }
- }
- rs.close();
- %>
- <!--新闻列表-->
- </table>
- <br>
- <table width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td align="right">
- <div align="center"> <strong>分页显示:</strong> <FONT color=red>第<%=intPage%>页
- 共<%=intPageCount%>页 | 总<%=intRowCount%>条</FONT>
- <%@include file="../include/showpage.jsp"%>
- 转到第
- <input type="text" name="goto_page1" value=<%=intPage%> class=box1 size=3 maxlength=3>
- 页
- <input style="height:19;WIDTH: 42px;" class="s02" hideFocus type="button" value="Go" name="cmd_goto" onclick="javascript:viewPage(document.all.goto_page1.value);">
- </div>
- </span> <form action="customer_list.jsp" method=post name="frm_page">
- <input type="hidden" name="page">
- <input type="hidden" name="column_id" value=<%=column_id%>>
- <input type="hidden" name="keyword" value=<%=keyword%>>
- </form>
- </td>
- </tr>
- </table></td>
- </tr>
- </table>
- <table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
- <tr>
- <td><img src="../images/spacer.gif" width="1" height="1"></td>
- </tr>
- </table>
- <%@include file="../include/bottom02.jsp"%>
- </BODY>
- </HTML>