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

📄 station_show.asp

📁 佛山的公交车查询系统
💻 ASP
字号:
<!-- #include file="inc/config.asp" -->
<%
station_name=request.QueryString("q")
if station_name="" then
  call ShowErr("请输入站点!","1")
end if
response.Write("<html>")
response.Write("<link type='text/css' href='css/index.css' rel='stylesheet'>")
response.Write("<script language='javascript' type='text/javascript' src='js/qm.js'></script>")
response.Write("<head>")
response.Write("<title>"& station_name &"</title>")
response.Write("</head>")
response.Write("<body>")
%>
<!-- #include file="top.asp" -->
<%
response.Write("<div id='div_1'>所有与公交站点""<span style='color:#FF0000'>"&station_name&"</span>""有关的信息</div>")
sql="select * from [Station] where qmstation_name='"& station_name &"'"
rs.open sql,conn,1,3
if rs.eof then
  response.Redirect("station_suggestion.asp?q="& station_name &"")
else
  station_bus=rs("qmstation_bus")
  station_bus_old_1=split(station_bus,"-")
  Num_1=ubound(station_bus_old_1)
end if
rs.close
response.Write("<div id='div_2'>")
if Num_1=0 then   '当该站点只有一条线路经过的时候
  sql="select * from [Bus] where qmbus_name='"& station_bus &"'"  '打开该公交线路信息列表【Bus】取出相应的信息
  rs.open sql,conn,1,3
  if not rs.eof then
    bus_rate=rs("qmbus_rate")
	bus_ratebz=rs("qmbus_ratebz")
    if hour(rs("qmbus_starttime"))>0 and hour(rs("qmbus_starttime"))<10 then
      bus_starttime=left(rs("qmbus_starttime"),4)
    else
      bus_starttime=left(rs("qmbus_starttime"),5)
    end if
    if hour(rs("qmbus_endtime"))>0 and hour(rs("qmbus_endtime"))<10 then
      bus_endtime=left(rs("qmbus_endtime"),4)
    else
      bus_endtime=left(rs("qmbus_endtime"),5)
    end if
  end if
  rs.close
  response.Write("<div id='div_2_1'>"& station_bus &"</div>")
  response.Write("<div id='div_2_2'>运营时间:"& bus_starttime &"--"& bus_endtime &"&nbsp;&nbsp;&nbsp;&nbsp;单程票价:"& bus_rate &"</div>")
  response.Write("<div id='div_2_2'>票价说明:<br>&nbsp;&nbsp;&nbsp;&nbsp;"&bus_ratebz&"</div><hr style='height:1px; width:750px; color:#ECEEF5;'>")
  response.Write("<div id='div_2_3'>")
  sqlstr="select * from [Route] where qmroute_name='"& station_bus &"'"  '打开线路表【Route】取出相关信息
  rs.open sqlstr,conn,1,3
  if not rs.eof then
    qmroute_name=rs("qmroute_name")
    qmroute_addupdate=year(rs("qmroute_addupdate"))&"-"&month(rs("qmroute_addupdate"))&"-"&day(rs("qmroute_addupdate"))
    qmroute_address=rs("qmroute_address")
    qmroute_address_old_1=split(qmroute_address,"-")
    Num_2=ubound(qmroute_address_old_1)
    if qmroute_address_old_1(0)=station_name then
    response.Write("<a href='station_show.asp?q="& qmroute_address_old_1(0) &"'><font color=#FF0000><strong>"& qmroute_address_old_1(0) &"</strong></font></a>")
    else
    response.Write("<a href='station_show.asp?q="& qmroute_address_old_1(0) &"'>"& qmroute_address_old_1(0) &"</a>")
    end if
    for i=1 to Num_2
      if qmroute_address_old_1(i)=station_name then
      response.Write(" - <a href='station_show.asp?q="& qmroute_address_old_1(i) &"'><font color=#FF0000><strong>"& qmroute_address_old_1(i) &"</strong></font></a>")
	  else	
      response.Write(" - <a href='station_show.asp?q="& qmroute_address_old_1(i) &"'>"& qmroute_address_old_1(i) &"</a>")
	  end if
    next
	response.Write("<span style=""font-size:12px"">(共"& Num_2+1 &"站)</span>")
  end if
  rs.close
    response.Write("</div>")
	call Suggestion(qmroute_name,qmroute_addupdate)
else   '如果经过这个站点的线路大于或等于1条  则通过循环把他一一列出来
  for j=0 to Num_1
    sql="select * from [Bus] where qmbus_name='"& station_bus_old_1(j) &"'"   '打开该公交线路信息列表【Bus】取出相应的信息
    rs.open sql,conn,1,3
    if rs.eof then
      response.Redirect("#")
    else
      bus_rate=rs("qmbus_rate")
      if hour(rs("qmbus_starttime"))>0 and hour(rs("qmbus_starttime"))<10 then
        bus_starttime=left(rs("qmbus_starttime"),4)
      else
        bus_starttime=left(rs("qmbus_starttime"),5)
      end if
      if hour(rs("qmbus_endtime"))>0 and hour(rs("qmbus_endtime"))<10 then
        bus_endtime=left(rs("qmbus_endtime"),4)
      else
        bus_endtime=left(rs("qmbus_endtime"),5)
      end if
    end if
    rs.close
    response.Write("<div id='div_2_1'>"& station_bus_old_1(j) &"</div>")
    response.Write("<div id='div_2_2'>运营时间:"& bus_starttime &"--"& bus_endtime &"&nbsp;&nbsp;&nbsp;&nbsp;票价:"& bus_rate &"</div>")
    response.Write("<div id='div_2_3'>")
    sqlstr="select * from [Route] where qmroute_name='"& station_bus_old_1(j) &"'"  '打开线路表【Route】取出相关信息
    rs.open sqlstr,conn,1,3
    if rs.eof then
      response.Redirect("#")
    else
      qmroute_name=rs("qmroute_name")
	  qmroute_addupdate=year(rs("qmroute_addupdate"))&"-"&month(rs("qmroute_addupdate"))&"-"&day(rs("qmroute_addupdate"))
      qmroute_address=rs("qmroute_address")
      qmroute_address_old_1=split(qmroute_address,"-")
      Num_2=ubound(qmroute_address_old_1)
      if qmroute_address_old_1(0)=station_name then
      response.Write("<a href='station_show.asp?q="& qmroute_address_old_1(0) &"'><font color=#FF0000><strong>"& qmroute_address_old_1(0) &"</strong></font></a>")
      else
      response.Write("<a href='station_show.asp?q="& qmroute_address_old_1(0) &"'>"& qmroute_address_old_1(0) &"</a>")
      end if
      for i=1 to Num_2
        if qmroute_address_old_1(i)=station_name then
        response.Write(" - <a href='station_show.asp?q="& qmroute_address_old_1(i) &"'><font color=#FF0000><strong>"& qmroute_address_old_1(i) &"</strong></font></a>")
	    else	
        response.Write(" - <a href='station_show.asp?q="& qmroute_address_old_1(i) &"'>"& qmroute_address_old_1(i) &"</a>")
	    end if
      next
	  response.Write("<span style=""font-size: 12px;"">(共"& Num_2+1 &"站)</span>")
    end if
    rs.close
    response.Write("</div>")
	response.Write("<div id='div_2_4'>")
    response.Write("<a href='callwe.asp'>如果您发现与<font color='#FF0000'><strong>"&qmroute_name&"</strong></font>有出入的地方,请联系我们,数据需要大家共同维护</a> 最后更新日期为:"&qmroute_addupdate)
    response.Write("<hr style='height:1px; color:#999'>")
    response.Write("</div>")
  next
end if
response.Write("</div>")
response.Write("</body>")
response.Write("</html>")
%>
<!-- #include file="bottom.asp" -->

⌨️ 快捷键说明

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