?? usercar_list_all.asp
字號:
<!--#include file="../inc/NoCatch.asp"-->
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'response.buffer=false
'------------------------------------------------設置參數
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '當前用戶ID
maxmessage=15 '每頁顯示記錄數
currentpage=request("page") '當前頁碼
Search=request("Search") '上次查詢條件
status=Request("status") : if status="" then status=0 '排序字段
'------------------------------------------------
'分頁取記錄 (返回rs對象)
'rs.recordcount 為記錄總數
'rs.PageSize 為本頁記錄數
'
set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT tbioa_UserCar.*, tbioaUser.Name AS User_Name, tbioaDepartment.Name AS Department_Name FROM tbioa_UserCar INNER JOIN tbioaUser ON tbioa_UserCar.User_ID = tbioaUser.ID INNER JOIN tbioaDepartment ON tbioa_UserCar.Use_Depar_ID = tbioaDepartment.ID Order By Stau_IsOK"
'response.write sql
rs.open sql,oConn,1,1
Showpage=Paging(rs,maxmessage,currentpage,"status="&status&"&Search="&Server.URLEncode(Search))
'------------------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>用車申請</title>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="UserCar_menu.html"-->
<hr width="100%" size=1 color="#000000">
<%=Showpage%>
<%if rs.eof then%>
<center>暫無相關信息!</center>
<%else%>
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class="tdTop" nowrap>申請人</td>
<td class="tdTop" nowrap>申請時間</td>
<td class="tdTop" nowrap>用車時間</td>
<td class="tdTop" nowrap>用車聯系人</td>
<td class="tdTop" nowrap>當前狀態</td>
<td class="tdTop" nowrap>操作</td>
</tr>
<%for i = 0 to rs.PageSize-1
If rs.EOF Then Exit For
if i mod 2 = 0 then td_class="td1" else td_class="td2"
' if status="qxe" then td_class="td6"
' if status="qxe" and rs("qxe")>date then td_class="td5"
%>
<tr>
<td class="<%=td_class%>"><CENTER><%=HtmlOut(rs("User_Name"))%></CENTER></td>
<td class="<%=td_class%>"><CENTER><%=HtmlOut(rs("GetFr_Date"))%></CENTER></td>
<td class="<%=td_class%>"><CENTER><%=HtmlOut(rs("Use_Date"))%></CENTER></td>
<td class="<%=td_class%>"><CENTER><%=HtmlOut(rs("Use_Man"))%></CENTER></td>
<td class="<%=td_class%>"><CENTER><%
Select Case Rs("Stau_IsOK")
Case 0
Response.Write "<font color=orange>等待部門審批</font>"
Case 1
If Rs("PartMan_OK") = 0 Then
Response.Write "<font color=green>等待駕駛員確認</font>"
Else
Response.Write "<font color=red>審批未通過</font>"
End If
Case 2
If Rs("Driver_OK") = 0 Then
Response.Write "<font color=green>駕駛員已確認</font>"
Else
Response.Write "<font color=red>駕駛員不確認</font>"
End If
End Select
%></CENTER></td>
<td class="<%=td_class%>"><CENTER>
<a href="UserCar_View.asp?ID=<%=Rs("ID")%>">查看</a>
</CENTER></td>
</tr>
<%
rs.MoveNext
next
%>
</table>
<%end if%>
</body>
</html>
<%'釋放對象變量
rs.close
oConn.close
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -