<!--#include file="../inc/Secure.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>
<script src="../Document/Popup.js"></script>
<BODY BGCOLOR="#FFFFFF" leftmargin=20><BR><BR>

<%
LoginID=trim(session("LoginID"))
if LoginID="" then LoginID=0
ID=trim(request("ID"))	

if ID<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from tblBulletin where ID="& ID
rs.open sql,oConn
if not rs.eof then
	toName=trim(rs("toName"))
	ToID=trim(rs("toID"))
	ToAll=trim(rs("ToAll"))
	if ToAll="" then ToAll=0
	ToDepartment=trim(rs("ToDepartment"))
	ClassID=trim(rs("ClassID"))
	Title=trim(rs("Title"))
	KeyWords=trim(rs("KeyWords"))
	Body=rtrim(rs("Body"))
	FromID=trim(rs("FromID"))
	FromName=trim(rs("FromName"))
	Times=trim(rs("Times"))
end if
rs.close
set rs=nothing
end if
%>

<div align=center>
<table border=1 cellpadding=3 cellspacing=1 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999">
<tr width="100%" bgcolor=#FFCC99>
	<td colspan=4 align=center>公告详细信息！
	</td>	
</tr>

<tr width="100%">
	<td align=right width=80><b>标题</b></td>
	<td><%=title%>&nbsp;</td>
	<td width="15%" align=right nowrap><b>主题词</b></td>
	<td><%=keywords%>&nbsp;</td>
</tr>

<tr>
	<td align=right><b>分类</b></td>
	<td><%=GetTableValue ("tblBulletinClass","Name","ID",ClassID)%>&nbsp;</td>
	<td align=right colspan=2>&nbsp;</td>
</tr>
<tr>
	<td align=right><b>内容</b></td>
	<td colspan=3><%=replace(replace(server.htmlencode(body&" ")," ","&nbsp;"),chr(13),"<BR>")%></td>
</tr>

<tr>
	<td align=right><b>发布人</b></td>
	<td colspan=3 valign=top><%=FromName%></td>
</tr>
<tr>
	<td align=right><b>发布时间</b></td>
	<td colspan=3 valign=top><%=Times%></td>
</tr>

<tr>
<td align=right><b>公告对象</b></td>
<td colspan=3>
<%
if ToAll="1" then
	response.write "所有人"
elseif toDepartment<>"0" then
	strDepartment = GetTableValue ("tblDepartment","Name","ID",toDepartment)
	response.write strDepartment
else
	response.write toName
end if
%>
&nbsp;
</td>
</tr>
<tr>
	<td align=right>&nbsp;</td>
	<td colspan=3 valign=top align=right>
	<input type="button" value="返  回" onclick="javascript:history.back(-1);"></td>
</tr>
</table>
</div>
<BR><BR>
</BODY>
</HTML>
<!--#include file="../inc/conn_close.htm"-->
<script language=javascript>

function OpenWindow(url,windowname)
{
window.open(url,windowname,'left=100,top=50,height=350,width=650,toolbar=no,menubar=no,scrollbars=yes')
}

function CheckData()
{
	if (jtrim(document.UserForm.Title.value)=="")
	{
		alert("标题不能为空！");
		return false;
	}

	if ((jtrim(document.UserForm.ToName.value)=="") && (document.UserForm.ToAll.checked==false) && (jtrim(document.UserForm.ToDepartment.value)=="0"))
	{
		alert ("请指定传阅人！");
		return false;
	}
	return true;
}
</script>
<script language="javascript" src="../inc/jtrim.js"></script>
<%
sub DeleteOneDir (PathName)
	PathName=Server.Mappath(PathName)
	dim fsfl
	Set fsfl = server.CreateObject("Scripting.FileSystemObject")
	if trim(PathName)<>"" and fsfl.FolderExists(PathName) then 
		fsfl.DeleteFolder PathName
	end if
	set fsfl=nothing	
end sub
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


%>