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

📄 client_index.jsp

📁 《JSP数据库系统开发完全手册》配套关盘
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%>
<%@ page import="com.zh.conpool.Condata"%>
<%@ page import="com.zh.util.*"%>
<%@ page import="com.bwm.string.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>客户管理页面</title>
<link href="../css/style1.css" rel="stylesheet">
</head>
<body>
<jsp:useBean id="pagi" scope="page" class="com.zh.util.page" />
<form action="Client_Index.jsp" method="post" name="form1">
<br><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="60%" height="24">&nbsp;&nbsp;&nbsp;&nbsp;<img src="../images/ico/icon_group.gif" width="15" height="15"> <a href="Client_Add.jsp" target="mainName">客户添加</a>&nbsp;&nbsp;&nbsp; </td>
    <td width="14%" align="center">公司名称</td>
    <td width="26%"><input name="clientname" type="text" class="wenbenkuang">
    <input name="Submit" type="submit" class="btn_grey" value="查询"></td>
  </tr>
</table>
<hr color="#006699" size="1">
<table width="100%"  border="1" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" bordercolordark="#ffffff" bordercolorlight="#EEF2F9">
  <tr align="center" bgcolor="#EEF2F9">
    <td width="15%" height="24">公司名称</td>
    <td width="28%" bgcolor="#EEF2F9">地址</td>
    <td width="14%">电话</td>
    <td width="13%">传真</td>
    <td width="16%">网址</td>
    <td width="14%">操作</td>
  </tr>
 <%
	Str str=new Str();
	boolean falg=false;
	String client2" height="16" bse(request.getParameter("clientname"));
	String id1;
	 String nowPage="";
	 String str_where="";//设置查询条件,默认值为空
	 try{
	 	if(!clientname.equals("")){
	 		str_where="where ClientName='"+clientname+"'";
	 	}else{
	 		str_where="";
	 	}
	}catch(Exception e){
	}
	 String footer="";
	 String id="";
	 String cuclass="";
	 String parentclass="";
	 int title=0;
	
	 nowPage=request.getParameter("pages");//获取地址栏传过来的pages参数
	 if (nowPage==null||nowPage.equals("null"))
		nowPage="0";    //将当前页的具体页号置为0
		pagi.setPages(5);   //设置分页的每页条数
		ResultSet rs = pagi.setQuerysql("tb_Client",str_where,"Client_Index.jsp",nowPage);
		footer = pagi.PageFooter(); //读分页栏
	try{
		if (pagi.intPageCount>0)
		{int i=0;
		while (rs.next())
		{i++;
		if (i>((pagi.intPage-1)*pagi.intPageSize) &&(i<=pagi.intPage*pagi.intPageSize)){
		id1=rs.getString(1);
 %>
  <tr align="center">
    <td height="24"><a href="Client_Index_Sql.jsp?id=<%=id1%>&&tag=1&&name=<%String name1=rs.getString(2);out.println(name1);%>" target="bottomFrame"><%=name1%></a></td>
    <td height="24"><%=rs.getString(3)%></td>
    <td height="24"><%=rs.getString(4)%></td>
    <td height="24"><%=rs.getString(5)%></td>
    <td height="24"><%=rs.getString(6)%></td>
    <td height="24"><a href="Client_Add.jsp?id=<%=id1%>" target="mainName"><img src="../images/edit.gif" width="47" height="18" border="0"></a>/<a href="Client_Del.jsp?id=<%=id1%>"><img src="../images/ico/a_delete.gif" width="52" height="16" border="0"></a></td>
  </tr>
  <%
		}
		} 
		} 
		rs.close();
		} catch(Exception e){
		out.println(e.getMessage());
		}
		finally
			 {}
	out.print("</table>");
	out.println("<table border=0 width='70%' cellspacing='0' cellpadding='0' align='center' bordercolorlight='#000000'    bordercolordark='#FFFFFF'><tr><td colspan=4 align=center>"+footer+"</td></tr>");
	try{
		pagi.closeConn();
		
	}catch(Exception e){
	
	}
%>

</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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