<!--#include file="../inc/Secure.htm"-->
<!--#include file="../inc/conn.htm"-->
<!--#include file="../inc/dbtools.htm"-->
<HTML>
<HEAD>
<TITLE>  </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
</HEAD>

<BODY BGCOLOR="#FFFFFF">
<div align=center>
<table border=1 cellpadding=3 cellspacing=0 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999">
<tr>
	<td colspan=5><INPUT TYPE="button" name="cmdreturn" value="返  回" class="font9boldwhite" onclick="javascript:history.back(-1);"></td>
</tr>
<tr bgcolor=#CCCCCC>
	<td>车辆</td>
	<td>型号</td>
	<td>责任负责人</td>
	<td>可使用人数</td>
	<td>备注</td>
</tr>
<tr>
	<td><%=name%></td>
	<td><%=model%></td>
	<td><%=owner%></td>
	<td><%=contain%>&nbsp;</td>
	<td><%=body%>&nbsp;</td>
</tr>
</table>
<form name="OrderForm" method="post" action="">
<table border=1 cellpadding=3 cellspacing=0 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999">
<tr>
<td width=80>登陆用户：</td>
<td width=50><input type="text" name="OrderName" size=12 readonly class="input"></td>
<td colspan=2>使用部门：<%options "Department","tblDepartment","name",0%></td>
</tr>
<tr>
	<td width=80>开始时间：</td>
	<td width=60><input type="text" name="StartTime_y" size=10 class="input"></td>
	<td width=50>
	<select name="StartTime_h">
	<option value="8:">8时</option>
	<option value="9:">9时</option>
	<option value="10:">10时</option>
	<option value="11:">11时</option>
	<option value="12:">12时</option>
	<option value="13:">13时</option>
	<option value="14:">14时</option>
	<option value="15:">15时</option>
	<option value="16:">16时</option>
	<option value="17:">17时</option>
	<option value="18:">18时</option>
	</select>
	</td>
	<td>
	<select name="StartTime_m">
	<option value="00">00分</option>
	<option value="30">30分</option>
	</select>
	</td>
</tr>
<tr>
	<td width=80>终了时间：</td>
	<td width=60><input type="text" name="EndTime_y" size=10 class="input"></td>
	<td width=50>
	<select name="endTime_h">
	<option value="8:">8时</option>
	<option value="9:">9时</option>
	<option value="10:">10时</option>
	<option value="11:">11时</option>
	<option value="12:">12时</option>
	<option value="13:">13时</option>
	<option value="14:">14时</option>
	<option value="15:">15时</option>
	<option value="16:">16时</option>
	<option value="17:">17时</option>
	<option value="18:">18时</option>
	</select>
	</td>
	<td>
	<select name="endTime_m">
	<option value="00">00分</option>
	<option value="30">30分</option>
	</select>
	</td>
</tr>
<tr>
<td>使用目的</td>
<td colspan=3><input type="text" name="Used" value="" size=40 class="input"> <font color=red>*</font></td>
</tr>
<tr>
<td>行车路线</td>
<td colspan=3><input type="text" name="Line" value="" size=40 class="input"></td>
</tr>
<tr>
<td>使用人</td>
<td colspan=3><input type="text" name="UserName" size=20 class="input"> <font color=red>*</font></td>
</tr>
<tr>
<td>司机</td>
<td colspan=3><input type="text" name="Driver" value="" size=20 class="input"></td>
</tr>
<tr>
<td>内容</td>
<td colspan=3>
<textarea name="body" cols=50 rows=5>
</textarea>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan=3 align=center>
<INPUT TYPE="submit" name="cmdUp" value="确  定" class="font9boldwhite">
<INPUT TYPE="button" name="cmdreturn" value="返  回" class="font9boldwhite" onclick="javascript:history.back(-1);">
</td>
</tr>
</table>
<INPUT TYPE="hidden" name="OrderID" value="<%=LoginID%>">
<INPUT TYPE="hidden" name="CARID" value="<%=carID%>">
</form>
</div><BR><BR>
</BODY>
</HTML>
<!--#include file="../inc/conn_close.htm"-->
<%
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

Sub AddData()
	sql=" INSERT INTO tblCarOrder(OrderID,CarID,Department,OrderName,OrderTime,UserName,StartTime,EndTime,Line,Used,Driver,body) VALUES(" & OrderID & _
		","& CarId & _
		","& Department & _
		",'"& OrderName & _
		"','"& OrderTime & _
		"','"& UserName & _
		"','"& StartTime & _
		"','"& EndTime & _
		"','"& Line & _
		"','"& Used & _
		"','"& Driver & _
		"','"& body & _
		"');"
	oConn.execute (sql)
end sub
%>