forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManage_Enterprise.jsp
More file actions
144 lines (144 loc) · 6.41 KB
/
Copy pathManage_Enterprise.jsp
File metadata and controls
144 lines (144 loc) · 6.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<%@ page contentType="text/html; charset=gb2312" import="java.sql.*"%>
<%@ page import="java.io.*" %>
<% request.setCharacterEncoding("gb2312");%>
<html>
<head>
<title>华奥汽车销售集团网站</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<jsp:useBean id="data" scope="page" class="cars.Bean1" />
<jsp:useBean id="rst" scope="page" class="cars.Pages" />
<%!
String sql;
String vari;
String rla;
int i;
int pagecount;
int pages;
int nows;
ResultSet rs;
%>
<link rel="stylesheet" href="Css/style.css">
<Script src="Js/PopMenu.js"></script>
<SCRIPT src="Js/TextColor.js"></SCRIPT>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0">
<table width="744" height="60" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="f9f9f9">
<tr>
<td><div align="center"><img src="Image/Fla.jpg" width="740" height="200"> </div></td>
</tr>
</table>
<table width="744" height="526" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f9f9f9">
<tr>
<td width="164" height="526" valign="top"><%@ include file="Manage_Left.jsp" %> </td>
<td width="580" valign="top"><table width="580" height="564" border="1" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFCC99">
<td height="20" colspan="2"> <a href="Manage.jsp" style="color:#000000 ">管理中心</a></td>
</tr>
<tr>
<td height="544" colspan="2" valign="middle"><div align="center">
<table width="560" height="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="50"><div align="center">企 业 信 息 管 理</div></td>
</tr>
<tr>
<td height="25"><div align="right"><a href="#" onClick="javascript:window.open('Enterprise_Add.jsp','','width=380,height=235,toolbar=no,location=no,status=no,menubar=no')" style=" color:#000000 ">企业信息添加</a> </div></td>
</tr>
<tr>
<td height="25" valign="middle">
<table width="480" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="">
<tr>
<td width="68"><div align="right">关键字:</div></td>
<td width="150"><input name="keyword" type="text" class="wenbenkuang" size="20"></td>
<td width="92"><div align="right">关键字类别:</div></td>
<td width="106"><select name="Type" class="wenbenkuang">
<option value="Name" selected>企业名称</option>
<option value="Address">企业地址</option>
</select></td>
<td width="64"><input name="Submit" type="submit" class="buttons" value="查询确认"></td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td height="400" valign="top"><table width="555" height="70" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td height="10"> </td>
<td width="139" height="10"> </td>
<td width="155" height="10"> </td>
<td height="10"> </td>
</tr>
<tr bgcolor="#efefef">
<td width="68" height="20" class="br"><div align="center">类型</div></td>
<td height="20" colspan="2" class="br"><div align="center">企业名称</div></td>
<td width="98" class="br"><div align="center">联系电话</div></td>
<td width="85" height="20" class="br"><div align="center">操作</div></td>
</tr>
<%
if(request.getParameter("keyword")==null||request.getParameter("keyword").equals("")){
sql="select * from tb_Enterprise";
rla="";
}else{
sql="select * from tb_Enterprise where "+request.getParameter("Type")+" like '%"+request.getParameter("keyword")+"%'";
rla="Type="+request.getParameter("Type")+"&keyword="+request.getParameter("keyword")+"&";
}
rst.size=17;
vari=request.getParameter("pages");
if(vari==null){
pages=1;
}
else{
pages=Integer.parseInt(vari);
}
rst.page=pages;
rs=data.getrs(sql);
rs=rst.getrs(rs);
nows=0;
while(rs.next()&&(nows<rst.size)){
nows=nows+1;
%>
<tr>
<td height="20"><div align="center"><%=rs.getString("Style")%> </div></td>
<td height="20" colspan="2"><div align="center"><%=rs.getString("Name")%></div></td>
<td height="20"><div align="center"><%=rs.getString("Phone")%></div></td>
<td height="20"><div align="center">
<input name="Submit222" type="button" class="buttons" value="详细" onClick="javascript:window.open('Enterprise_Add.jsp?id=<%=rs.getInt("ID")%>','','width=380,height=235,toolbar=no,location=no,status=no,menubar=no')">
<input name="Submit22" type="button" class="buttons" value="删除" onClick="javascript:window.open('Enterprise_Delete.jsp?id=<%=rs.getInt("ID")%>','','width=380,height=235,toolbar=no,location=no,status=no,menubar=no')">
</div></td>
</tr>
<%}
data.close();
%>
<tr>
<td height="20" colspan="5">
<div align="right">
<%
pagecount=rst.getavg();
if(pagecount>1){
if(pages==1){
out.write("<a href='Manage_Enterprise.jsp?"+rla+"pages="+(pages+1)+"' style='color:#000000 '>下一页</a>");
}
else{
if(pages<pagecount){
out.write("<a href='Manage_Enterprise.jsp?"+rla+"pages="+(pages-1)+"' style='color:#000000 '>上一页</a>");
out.write("<a href='Manage_Enterprise.jsp?"+rla+"pages="+(pages+1)+"' style='color:#000000 '>下一页</a>");
}
else{
out.write("<a href='Manage_Enterprise.jsp?"+rla+"pages="+(pages-1)+"' style='color:#000000 '>上一页</a>");
}
}
}
%>
</div></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>
<%@ include file="Bottom.jsp" %>
</body>
</html>