<!--#include file="Header.asp"-->
<%
Dim Rs, Sql, iData, theData, I
	Sql = "select c1.OrderNum,c1.sTitle,c1.eTime,c1.sTime,c1.Mileage,c1.Days from " & TablePre & "traininfo as c1 where (c1.theNum='" & theNum & "')  order by OrderNum;"
	Sql = "select c1.OrderNum,c1.sTitle,c1.eTime,c1.sTime,c1.Mileage,c1.Days,c1.theNum from " & TablePre & "traininfo as c1 where Instr('/'+c1.theNum+'/','/" & theNum & "/') > 0 order by OrderNum;"
	Set Rs = Db.ExeCute(Sql)
	If Not(Rs.Eof And Rs.Bof) Then theData = Rs.getRows(-1):theNum = theData(6,0)
	Rs.Close:Set Rs = Nothing
	
%>
<div id="maintable">
	<h2>
		<div class="left">您查询的是&nbsp;<b><a href="TrainInfo.asp?tId=2&amp;theNum=<%= theNum %>"><%= theNum %></a></b>&nbsp;次列车的详细停靠站时刻信息。</div>
		<div class="right">共有&nbsp;<b><% If IsArray(theData) Then Write Ubound(theData,2)+1 Else Write "0" %></b>&nbsp;个停靠站</div>
	</h2>
</div>
<div id="maintable">
	<div id="NavTabTop">
		<div class="left" style="width: 30px;">站序</div>
		<div class="left" style="width: 80px;">停靠站</div>
		<div class="left" style="width: 80px;">到达时间</div>
		<div class="left" style="width: 80px;">发车时间</div>
		<div class="left" style="width: 80px;">里程</div>
	</div>
	<% If IsArray(theData) Then %>
	<% For I = 0 To Ubound(theData,2) %>
	<div id="NavTabMid" onMouseOver="this.style.background='#ffffff';" onMouseOut="this.style.background='#eff3f9';">
		<div class="left" style="width: 30px;"><%= theData(0,I) %></div>
		<div class="left" style="width: 80px;"><a href="TrainList.asp?tId=3&amp;sTitle=<%= theData(1,I) %>"><%= theData(1,I) %></a></div>
		<% If CStr(theData(2,I)) = CStr(theData(3,I)) And CStr(theData(4,I)) = "0" Then %>
		<div class="left" style="width: 80px;">---</div>
		<div class="left" style="width: 80px;"><%= theData(3,I) %></div>
		<% ElseIf CStr(theData(0,I)) = CStr(Ubound(theData,2) + 1) Then %>
		<div class="left" style="width: 80px;"><%= Days(theData(5,I)) & theData(2,I) %></div>
		<div class="left" style="width: 80px;">---</div>
		<% Else  %>
		<div class="left" style="width: 80px;"><%= Days(theData(5,I)) & theData(2,I) %></div>
		<div class="left" style="width: 80px;"><%= theData(3,I) %></div>
		<% End If %>
		<div class="left" style="width: 80px;"><%= theData(4,I) %></div>
	</div>
	<% Next %>
	<% Else %>
	<div id="NavTabMid" onMouseOver="this.style.background='#ffffff';" onMouseOut="this.style.background='#eff3f9';">
		暂无数据(请准确输入您所查询的信息)
	</div>
	<% End If %>
	<div id="NavTabBottom"></div>
</div>
<!--#include file="Footer.asp"-->
