<!--#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">
<%
LoginID=trim(session("LoginID"))
if LoginID="" then response.end
Meetingid=trim(request("MeetingID"))
selectdate=trim(request("SelectDate"))
if selectdate="" then selectdate=date()

set rs=server.createobject("adodb.recordset")
sql="select * from tblMeeting where ID="& Meetingid
rs.open sql,oConn
if not rs.eof then
	name=trim(rs("Name"))
	telcode=trim(rs("telcode"))
	owner=trim(rs("owner"))
	contain=trim(rs("contain"))
	body=trim(rs("body"))
	waiter=trim(rs("waiter"))
	board=trim(rs("board"))
	projection=trim(rs("projection"))
	speaker=trim(rs("speaker"))
	player=trim(rs("player"))
end if
rs.close
set rs=nothing
%>
<div align=center>
<table border=1 cellpadding=3 cellspacing=0 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999"><tr><td>
<INPUT TYPE="button" name="cmdreturn" value="返  回" class="font9boldwhite" onclick="javascript:history.back(-1);">
</td></tr></table>

<table border=1 cellpadding=3 cellspacing=0 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999">
<tr>
	<td bgcolor=#CCCCCC width=100>会议室名</td>
	<td><%=Name%></td>
	<td bgcolor=#CCCCCC width=100>联系电话</td>
	<td><%=telcode%></td>
</tr>
<tr>
	<td bgcolor=#CCCCCC>责任负责人</td>
	<td><%=owner%></td>
	<td bgcolor=#CCCCCC>可使用人数</td>
	<td><%=contain%></td>
</tr>
<tr>
	<td bgcolor=#CCCCCC>服务员</td>
	<td><%=waiter%></td>
	<td bgcolor=#CCCCCC>白板</td>
	<td><%=board%></td>
</tr>
<tr>
	<td bgcolor=#CCCCCC>投影仪</td>
	<td><%=projection%></td>
	<td bgcolor=#CCCCCC>音响设备</td>
	<td><%=speaker%></td>
</tr>
<tr>
	<td bgcolor=#CCCCCC>影像设备</td>
	<td colspan=3><%=player%></td>
</tr>
<tr>
	<td bgcolor=#CCCCCC>介绍</td>
	<td colspan=3>
	<%=replace(replace(server.htmlencode(body&""),chr(13),"<br>")," ","&nbsp;")%>&nbsp;
	</td>
</tr>
</table>

<p>会议室使用情况：</p>

<%
Set Rs = Server.Createobject("Adodb.recordset")
sql="select * from tblMeetingOrder where MeetingID="& MeetingID &" order by ID desc"
rs.open sql,oConn
while not rs.eof
%>
<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>
	<%if cdate(trim(rs("StartTime")))<=now() and cdate(trim(rs("EndTime")))>=now() then%>
		<font color=red><b><%=trim(rs("StartTime"))&"——"&trim(rs("EndTime"))%></b></font>
	<%else%>
		<b><%=trim(rs("StartTime"))&"——"&trim(rs("EndTime"))%></b>
	<%end if%>
	</td></tr>
	<tr>
	<td nowrap>主题:</td>
	<td>
	<%if trim(rs("Title"))<>"" then%>
	<%=trim(rs("Title"))%>
	<%end if%>
	&nbsp;</td>
	<td nowrap>会议主持人:</td>
	<td>
	<%if trim(rs("Manager"))<>"" then%>
	<%=trim(rs("manager"))%>
	<%end if%>
	&nbsp;</td>
	</tr>
	<tr>
	<td width="15%">使用部门:</td>
	<td width="35%">
	<%if trim(rs("Department"))<>"" then%>
	<%=GetTableValue("tblDepartment","Name","ID",trim(rs("Department")))%>
	<%end if%>
	&nbsp;</td>
	<td nowrap width="15%">预约人:</td>
	<td width="35%">
	<%if trim(rs("OrderName"))<>"" then%>
	<%=trim(rs("OrderName"))%>
	<%end if%>
	&nbsp;</td>
	</tr>

	<tr>
	
	<td nowrap width=60>填写时间:</td>
	<td colspan=3>
	<%if trim(rs("OrderTime"))<>"" then%>
	<%=trim(rs("OrderTime"))%>
	<%end if%>
	&nbsp;</td>
		</tr>

	

	<tr>
	<td nowrap>会议内容：</td>
	<td colspan=3><%=replace(replace(server.htmlencode(trim(rs("body"))&""),chr(13),"<br>")," ","&nbsp;")%>&nbsp;</td>
	</tr>
	<tr>
	<td nowrap>与会人员：</td>
	<td colspan=3><%=replace(replace(server.htmlencode(trim(rs("joinman"))&""),chr(13),"<br>")," ","&nbsp;")%>&nbsp;</td>
	</tr>
	<tr>
	<td nowrap>会议安排：</td>
	<td colspan=3><%=replace(replace(server.htmlencode(trim(rs("schedule"))&""),chr(13),"<br>")," ","&nbsp;")%>&nbsp;</td>
	</tr>
			
</table>
</div><BR>

<%
rs.movenext
wend
rs.close
set rs=nothing
%>
</table>
<INPUT TYPE="hidden" name="OrderID" value="<%=LoginID%>">
<INPUT TYPE="hidden" name="MeetingID" value="<%=MeetingID%>">
</form>
</div>
</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 tblMeetingOrder(OrderID,MeetingID,Department,OrderName,OrderTime,UserName,StartTime,EndTime,Line,Used,Driver) VALUES(" & OrderID & _
		","& MeetingId & _
		","& Department & _
		",'"& OrderName & _
		"','"& OrderTime & _
		"','"& UserName & _
		"','"& StartTime & _
		"','"& EndTime & _
		"','"& Line & _
		"','"& Used & _
		"','"& Driver & _
		"');"
	oConn.execute (sql)
end sub
%>