📄 usageinfo.asp
字号:
<!--#include file="..\pub\ChkDriver.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","申请阶段","批准未执行阶段","被驳回的申请","执行阶段","已完成")
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=UsageInfo.asp?"&QueryString&">0. 全部用车事件</a></td>"
UsgStr=UsgStr&"<td><a href=UsageInfo.asp?UsageType=1&"&QueryString&">1. 申请阶段</a></td>"
UsgStr=UsgStr&"<td><a href=UsageInfo.asp?UsageType=2&"&QueryString&">2. 批准未执行阶段</a></td>"
UsgStr=UsgStr&"<td><a href=UsageInfo.asp?UsageType=3&"&QueryString&">3. 被驳回的申请</a></td>"
UsgStr=UsgStr&"<td><a href=UsageInfo.asp?UsageType=4&"&QueryString&">4. 执行阶段</a></td>"
UsgStr=UsgStr&"<td><a href=UsageInfo.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>相关司机</td><td>使用者</td><td>类型</td><td>执行时间</td><td>结束时间</td><td>出发地</td><td>目的地</td><td>事件说明</td><td>批准人</td><td>功能</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="未得到批准"
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="未得到批准"
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>"
UsgStr=UsgStr&"<td>"
if trim(UsgRs("EventType"))="2" then
UsgStr=UsgStr&"<a href=UsgUpdate.asp?ID="&UsgRS("EventID")&">开始执行</a></td>"
end if
if trim(UsgRS("EventType"))="4" then
UsgStr=UsgStr&"<a href=UsgUpdate.asp?ID="&UsgRS("EventID")&">完成</a></td>"
else
UsgStr=UsgStr&" </td>"
end if
UsgRs.MoveNext
wend
UsgStr=UsgStr&"</table>"
Set UsgRs=nothing
response.write UsgStr
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -