<%@ Language=VBScript %> 天津公车查询系统 <% if request("company")<>"" then mySQL="Select * from company where company_name like '%"&sql(request("company"))&"%' and ifshow='Y' order by id" else response.Write("请输入您要去的公司!") response.End() end if set rs = server.createobject("adodb.recordset") rs.Open mySQL,conn,3,1 if rs.eof then response.Write("
对不起,没有找到您要去的公司,请简化您的公司名称,
例如您输入的是天津市酷天津信息技术公司,请改成酷天津再重新搜索一次!") response.Write("

返回重新搜索") response.End() end if do while not rs.eof %>
您要去的公司:  <%=rs("company_name")%>
公司的详细地址:  <%=rs("company_address")%>
公司的附近的公车站点:  <%=rs("company_bus_station")%>
路过公司的公车路线:  <%=rs("company_bus_num")%>
具体更详细的路线看下面的搜索结果

返回重新搜索

 以下为详细搜索结果

<% station=rs("company_bus_station") station=replace(station,",",",") if right(station,1)="," then station=left(station,len(station)-1) stations=split(station,",") num=ubound(stations) 'response.write(num) for i=0 to num set rs2=server.createobject("adodb.recordset") mySQL="Select * from bus where address like'%"&stations(i)&"%' order by id" rs2.open mySQL,conn,3,1 response.write("  经过"&stations(i)&"站的公车路线")%>

<% while not rs2.eof %> <% rs2.movenext wend rs2.close set rs2=nothing %>
路线 详细站点
  <%Response.Write rs2("busid")&"路"%> <%Response.Write replace(replace(replace(replace(rs2("address"),"、","—"),stations(i),""&stations(i)&""),stations(i),""&stations(i)&""),stations(i),""&stations(i)&"")%>

<% next rs.movenext loop%>