<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查询</title>
</head>
<%
Set con=Server.CreateObject("ADODB.Connection")
con.Open "DSN=TravelDSN;UID=admin;Database=Travel"
Set rs=Server.CreateObject("ADODB.Recordset")
msgErr=""
ServiceType=trim(Request("ServiceType")+"")
AreaName=trim(Request("AreaName")+"")

strsql="select a.* as workname "
strsql=strsql+" from ServiceArea a  "
strsql=strsql+" where  "
if len(Code)>=1 then 
strsql=strsql+"  a.service_type like '%" +ServiceType +"%'  "
end if
if len(CompanyName)>=1 then 
strsql=strsql+" and  a.area_name like '%" +AreaName +"%'  "
end if
rs.Open strsql,con

Set service_rs=Server.CreateObject("ADODB.Recordset")
strsql="select * from ServiceArea  "
service_rs.Open  strsql,con
%>
<body>
<form name="form1" method="post" action="">
<input name="IsPostBack" type="hidden" value="PostBack">
  <table width="60%" border="0" align="center">
 <tr>
<td width="30%">服务类型:<input name="ServiceType" type="text"  width="70%"   value="<%=ServiceType%>"></td>
    <td colspan="2" >地区:
    <select name="地区" >
   <option value="" >--请选择--</option>
<% do while not (work_rs.EOF) %>
<option value="<%=trim(service_rs("keyid")) %>" 
<%if trim(service_rs("keyid"))= Workid then %> selected <%end if%>>
<%=service_rs("area_name")%></option>
<%service_rs.MoveNext
loop 
service_rs.Close %>
      </select></td>
</tr>
<tr>
  <td ><font color="red" ><%=msgErr %></font></td>
      <td align="right" >
   <input type="submit" name="SubmitQuery" value="查询">
  </td>
    </tr>
  </table>
  <table width="63%" border="1"align="center">
    <tr>
      <td align="center" width="25%">服务类型</td>
      <td align="center" width="20%">地区</td>
      <td align="center" width="40%">简介</td>
    </tr>
<%do while not rs.EOF %>
    <tr>
  <td height="30"><%=trim(rs("service_type")) %></td>
  <td><%=trim(rs("area_name")) %></td>
      <td><%=trim(rs("re")) %></td>
  <td width="15%"><a href="SearchJob.asp?id=<%=trim(rs("keyid")) %>">检索网页</a></td>
    </tr>
<% rs.MoveNext
loop 
rs.Close
con.Close%>
  </table>
</form>
</body>
</html>