[这个贴子最后由abel 81在 2007/04/05 10:53am 第 1 次编辑]
<% Terminal=Request.Form("terminal")
year1=cstr(year(date))
if month(date) < 10 then month1="0"+cstr(month(date)) else
month1=cstr(month(date))
if day(date) < 10 then day1="0"+cstr(day(date)) else day1=cstr(day(date))
date1=year1+"."+month1+"."+day1
add_days=request.form("Search_Days")
dateend=DateAdd("d",add_days,date)
year2=cstr(year(dateend))
if month(dateend) < 10 then month2="0"+cstr(month(dateend)) else
month2=cstr(month(dateend))
if day(dateend) < 10 then day2="0"+cstr(day(dateend)) else
day2=cstr(day(dateend))
date2=year2+"."+month2+"."+day2
Source_Idx=cstr(Request.form("Search_Source"))
Set DelphiASPObj = Server.CreateObject("TSDCOM.TransData")
DelphiASPObj.ShowCopyRight
rowcol=DelphiASPObj.ExecFunction("FUNC_000",Source_Idx+"`"+Terminal+"`"+date1+"`"+date2)
i= INSTR(rowcol,"*")
j=len(rowcol)-i
row=left(rowcol,i-1)
col=right(rowcol,j)
if Source_Idx="0" then
name=cstr("武汉客运总站")
else if Source_Idx="1" then
name=cstr("新华路客运站")
else if Source_Idx="2" then
name=cstr("宏基车站")
else
name=cstr("付家坡客运站")
end if
end if
end if
response.write("
"+ name+" "+date1+"至
"+date2+"发往 "+Terminal+"的班次表
"
)
Response.Write("
")
for i=0 to row-1
Response.Write("")
if row=1 then
Response.Write("| 暂无班次 | ")
else
for j=0 to col-3
Response.Write("")
if (j=8) then
if (i=0) then
Response.Write("预计时间(小时)")
else
if DelphiASPObj.getvalue(i,5)=0 then
Response.Write("待定")
else
if DelphiASPObj.getvalue(i,5)<200
then
Response.Write(int(DelphiASPObj.getvalue(i,5) / 70+0.5))
else
Response.Write(int(DelphiASPObj.getvalue(i,5) / 80+0.5))
end if
end if
end if
else
if (j=6 and i<>0) then
'; 取已卖票数量
if (DelphiASPObj.getValue(i,6)>0)
then
Response.Write("有")
else Response.Write("无")
end if
else
Response.Write(DelphiASPObj.getValue(i,j))
end if
end if
Response.Write(" | ")
next
end if
Response.Write("
")
next
Response.Write("
")
%>