<!--#include file="../inc/Secure.htm"-->
<%dim ThisKey
ThisKey = "u"
%>
<!--#include file="../inc/permission.htm"-->
<!--#include file="../inc/conn.htm"-->
<!--#include file="../inc/dbtools.htm"-->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" leftmargin=20 topmargin=5>
<form name="SearchForm" method="post" action="">
<div align=center>
<table border=0 width="90%" bgcolor=#53A9FF cellspacing=1>
<tr bgcolor=#FFFFFF><td>
	<table border=0 width="100%" bgcolor=#FFFFFF cellspacing=1>
	<tr bgcolor=#FFFFFF>
	<td width="15%">复合检索：</td>
	<td width="30%">车  辆：<%options "CarID","tblCar","Name",CarID%></td>
	<td width="40%">预约人：<input type="text" name="Title" class="input" size=20></td>
	<td></td>
	</tr>
	<tr bgcolor=#FFFFFF>
	<td width="15%"></td>
	<td width="30%">时间段：<input type="text" name="StartTime" class="input" size=10></td>
	<td width="40%">截止：<input type="text" name="EndTime" class="input" size=10>(yyyy-mm-dd)</td>
	<td><input type="submit" name="cmdUp" value="检  索" class="font9boldwhite"></td>
	</tr>
	</table>
</td></tr></table>
</div>
</form>
<div align=center>
<table border=0 width="90%"><tr>
      <td> 上页　　 下页 </td>
    </tr></table></div>

<div align="center">
<table border=1 cellpadding=3 cellspacing=1 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999">
	<tr bgcolor=#CCCCCC><td colspan=4 align=center>
	<font color=red><b><%=gettableValue("tblCar","name","id",trim(msgarr(1,i)))%></b></font>
	<%if cdate(trim(msgarr(7,i)))>=now() then%>
		<font color=red><b><%=trim(msgarr(6,i))&"——"&trim(msgarr(7,i))%></b></font>
	<%else%>
		<b><%=trim(msgarr(6,i))&"——"&trim(msgarr(7,i))%></b>
	<%end if%>
	&nbsp;&nbsp;&nbsp;&nbsp;<a href="car_manage.htm?todo=delete&selectID=<%=trim(msgarr(0,i))%>" onclick="return CheckDelete();"><img src="../images/delete.gif" border=0></a>
	</td></tr>

	<tr>
	<td width="15%">使用部门:</td>
	<td width="35%">
	<%if trim(msgarr(5,i))<>"" then%>
	<%=GetTableValue("tblDepartment","Name","ID",trim(msgarr(5,i)))%>
	<%end if%>
	&nbsp;</td>
	<td nowrap width="15%">使用人:</td>
	<td width="35%">
	<%if trim(msgarr(11,i))<>"" then%>
	<%=trim(msgarr(11,i))%>
	<%end if%>
	&nbsp;</td>
	</tr>

	<tr>
	<td width=60>预约人:</td>
	<td>
	<%if trim(msgarr(2,i))<>"" then%>
	<%=trim(msgarr(2,i))%>
	<%end if%>
	&nbsp;</td>
	<td nowrap width=60>填写时间:</td>
	<td>
	<%if trim(msgarr(3,i))<>"" then%>
	<%=trim(msgarr(3,i))%>
	<%end if%>
	&nbsp;</td>
	</tr>

	<tr>
	<td nowrap>用途:</td>
	<td>
	<%if trim(msgarr(4,i))<>"" then%>
	<%=trim(msgarr(4,i))%>
	<%end if%>
	&nbsp;</td>
	<td nowrap>行车路线:</td>
	<td>
	<%if trim(msgarr(8,i))<>"" then%>
	<%=trim(msgarr(8,i))%>
	<%end if%>
	&nbsp;</td>
	</tr>

	<tr>
	<td nowrap>司机:</td>
	<td>
	<%if trim(msgarr(9,i))<>"" then%>
	<%=trim(msgarr(9,i))%>
	<%end if%>
	&nbsp;</td>
	<td nowrap>详细说明：</td>
	<td><%=replace(replace(server.htmlencode(trim(msgarr(10,i))&""),chr(13),"<br>")," ","&nbsp;")%>&nbsp;</td>
	</tr>
			
</table>
</div><BR>
</BODY>
</HTML>
<script language=javascript>
function CheckDelete()
{
//	document.NewsForm.cmdDelete.value !=""
	return confirm("确实删除吗？");
}
</script>
<%
Function GetTableValue(TableName,Field,ValueField,Value)
	if TableName<>"" and Value<>"" then
		Set RsTmp = Server.Createobject("Adodb.recordset")
		strSql = "Select "& Field &" from "& TableName &" where "& ValueField &"='"& Value &"'"
		Rstmp.open strSql,oConn,1,1
		If not Rstmp.eof then
			GetTableValue=trim(Rstmp(Field))
		else
			GetTableValue=""
		end if
		Rstmp.close
		'set RsTmp = Nothing
	else
		GetTableValue=""
	end if
End Function

%>
<!--#include file="../inc/conn_close.htm"-->
<script language=javascript>
function CheckDelete()
{
	return confirm("确实删除吗？");
}
</script>