?? mobileview.asp
字號:
<!--#include file="..\pub\ChkUser.asp"-->
<!--#include file="..\CONN.INC"-->
<html>
<head>
<title>Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="..." type="text/css">
<link rel="stylesheet" href="..." type="text/css">
</head>
<body bgcolor="#FFFFFF" topmargin="8">
<%
UsgInfo=Array("All","申請階段","批準(zhǔn)未執(zhí)行階段","被駁回的申請","執(zhí)行階段","已完成")
if Request("MobileID")<>"" then
if WhereStr="" then WhereStr="MobileID="&Request("MobileID") else WhereStr=WhereStr&" and MobileID="&Request("MobileID")
if QueryString="" then QueryString="MobileID="&Request("MobileID") else QueryString=QueryString&" &MobileID="&Request("MobileID")
end if
if Request("DriverID")<>"" then
if WhereStr="" then WhereStr="DriverID="&Request("DriverID") else WhereStr=WhereStr&" and DriverID="&Request("DriverID")
if QueryString="" then QueryString="DriverID="&Request("DriverID") else QueryString=QueryString&"&DriverID="&Request("DriverID")
end if
if Request("UserID")<>"" then
if WhereStr="" then WhereStr="UserID="&Request("UserID") else WhereStr=WhereStr&" and UserID="&Request("UserID")
if QueryString="" then QueryString="UserID="&Request("UserID") else QueryString=QueryString&"&UserID="&Request("UserID")
end if
if Request("UsageType")<>"" then
if WhereStr="" then WhereStr="EventType="&Request("UsageType") else WhereStr=WhereStr&" and EventType="&Request("UsageType")
end if
if WhereStr<>"" then WhereStr="where "&WhereStr
SqlString="select u.* from UsageInfo u "&WhereStr
set UsgRs=Conn.execute(Sqlstring)
UsgStr="<table width=700 border=0><tr>"
UsgStr=UsgStr&"<td><a href=MobileView.asp?"&QueryString&">0. 全部用車事件</a></td>"
UsgStr=UsgStr&"<td><a href=MobileView.asp?UsageType=1&"&QueryString&">1. 申請階段</a></td>"
UsgStr=UsgStr&"<td><a href=MobileView.asp?UsageType=2&"&QueryString&">2. 批準(zhǔn)未執(zhí)行階段</a></td>"
UsgStr=UsgStr&"<td><a href=MobileView.asp?UsageType=3&"&QueryString&">3. 被駁回的申請</a></td>"
UsgStr=UsgStr&"<td><a href=MobileView.asp?UsageType=4&"&QueryString&">4. 執(zhí)行階段</a></td>"
UsgStr=UsgStr&"<td><a href=MobileView.asp?UsageType=5&"&QueryString&">5. 已完成</a></td>"
UsgStr=UsgStr&"</tr>"
UsgStr=UsgStr&"<table width=700 border=1>"
UsgStr=UsgStr&"<tr>"
UsgStr=UsgStr&"<td>車輛名稱</td><td>相關(guān)司機(jī)</td><td>使用者</td><td>類型</td><td>執(zhí)行時(shí)間</td><td>結(jié)束時(shí)間</td><td>出發(fā)地</td><td>目的地</td><td>事件說明</td><td>批準(zhǔn)人</td></tr>"
while not UsgRs.eof
if not UsgRS.eof then
set MobRs=Conn.Execute("select m.MobileModel from MobileInfo m where MobileID="&UsgRS("MobileID"))
set DriRs=Conn.Execute("select d.DriverName from DriverInfo d where DriverID="&UsgRS("DriverID"))
set UsrRs=Conn.Execute("select u.Realname from UserInfo u where UserID="&UsgRS("UserID"))
Approver="未得到批準(zhǔn)"
if UsgRS("ApproverID")<>"" then
set AppRs=Conn.Execute("select u.Realname from UserInfo u where UserID="&UsgRS("ApproverID"))
if not AppRs.Eof then Approver=AppRS("RealName") else Approver="未得到批準(zhǔn)"
end if
end if
UsgStr=UsgStr&"<tr><td>"&MobRs("MobileModel")&"</td>"
UsgStr=UsgStr&"<td>"&DriRs("DriverName")&"</td>"
UsgStr=UsgStr&"<td>"&UsrRs("RealName")&"</td>"
UsgStr=UsgStr&"<td>"&UsgInfo(CINT(UsgRs("EventType")))&"</td>"
UsgStr=UsgStr&"<td>"&UsgRs("EventBDate")&"</td>"
UsgStr=UsgStr&"<td>"&UsgRs("EventEDate")&"</td>"
UsgStr=UsgStr&"<td>"&UsgRs("FromWhere")&"</td>"
UsgStr=UsgStr&"<td>"&UsgRs("ToWhere")&"</td>"
UsgStr=UsgStr&"<td>"&UsgRs("ForWhat")&"</td>"
UsgStr=UsgStr&"<td>"&Approver&"</td>"
UsgRs.MoveNext
wend
UsgStr=UsgStr&"</table>"
UsgStr=UsgStr&"<table width=700><tr><td><center><a href=..\Event\AddUsage.asp?MobileID="&Request("MobileID")&">預(yù)約該車</a></center></td></tr></table>"
Set UsgRs=nothing
response.write UsgStr
%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -