<!--#include file="../inc/Secure.htm"-->
<!--#include file="../inc/conn.htm"-->
<%
LoginID=trim(session("LoginID"))
if LoginID="" then LoginID=0

ID=trim(request("ID"))
if ID="" then response.redirect "NewDoc.htm"


set rs=server.createobject("adodb.recordset")
sql="select * from tblDoc where ID="& ID
rs.open sql,oConn
if not rs.eof then
	FromID=trim(rs("FromID"))
	title=trim(rs("title"))
	title2=trim(rs("title2"))
	nClass=trim(rs("Class"))
	if nClass="" then nClass=0
	body=trim(rs("body"))
	remark=trim(rs("remark"))
	body2=trim(rs("body2"))
	remark2=trim(rs("remark2"))
	confirmer=trim(rs("confirmer"))
	collate=trim(rs("collate"))
	CheckName=trim(rs("CheckName"))
	CheckStatus=trim(rs("CheckStatus"))
	CheckID=TRIM(rs("CheckID"))
	AttachFile=trim(rs("AttachFile"))
	Times=trim(rs("Times"))
end if
rs.close
set rs=nothing

%>
<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="Popup.js"></script>

<BODY BGCOLOR="#FFFFFF">
<div align=center>
<table border=1 cellpadding=3 cellspacing=1 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999">
<%if instr(CheckStatus,"0")<=0 and cint(FromID)=cint(LoginID) then%>
<tr width="100%" bgcolor=#CCFFCC>
	<td colspan=4 align=center>该文档是您拟搞发出去的，经过审批后重新传给你以供修改！</td>
	
</tr>
<%end if%>
<tr width="100%">
	<td align=right width=80>标题</td>
	<td><%=Title&"&nbsp;"%></td>
	<td align=right width="15%" nowrap>主题词</td>
	<td><%=Title2&"&nbsp;"%></td>
</tr>

<tr>
	<td align=right>分类</td>
	<td><%=getTableValue ("tblDocClass","Name","ID",nClass)%></td>
	<td align=right>审批路径</td>
	<td><%=CheckName&"&nbsp;"%></td>
</tr>
<tr>
	<td align=right>内容</td>
	<td colspan=3><textarea name="body" rows=5 cols=55 readonly><%=body%></textarea></td>
</tr>
<tr>
	<td align=right>备注</td>
	<td colspan=3><textarea name="Remark" rows=5 cols=55 readonly><%=remark%></textarea></td>
</tr>
<tr>
	<td align=right>附件</td>
	<td colspan=3>
		<%if AttachFile<>"" then%>
		<a target="_blank" href="../File_Up/Doc/<%=ID%>/<%=AttachFile%>"><%=AttachFile%></a>
		<%else
		response.write "&nbsp;"
		end if%>
	</td>
</tr>
<tr>
	<td align=right>核搞人</td>
	<td colspan=3 valign=top><%=confirmer&"&nbsp;"%></td>
</tr>
<tr>
	<td align=right>校对人</td>
	<td colspan=3><%=collate&"&nbsp;"%></td>
</tr>
<tr bgcolor=#CCCCFF>
	<td align=right></td>
	<td colspan=3>批复过的意见</td>
</tr>
<tr>
	<td align=right></td>
	<td colspan=3>
	<%
	set rs=server.createobject("adodb.recordset")
	sql="select * from tblDocsuggest where DocID="& ID
	rs.open sql,oConn
	while not rs.eof
		response.write "<table border=0 width='100%' bgcolor=#CCCC66><tr bgcolor=#ffffff><td>"
		response.write trim(rs("FromName"))&" 在 "&trim(rs("Times"))&" 的审核："
		response.write "</td></tr><tr><td>"
		response.write replace(replace(trim(rs("body")),chr(13),"<br>")," ","&nbsp;")
		response.write "</td></tr></table>"
	rs.movenext
	wend
	rs.close
	set rs=nothing
	%>
	
	</td>
</tr>
<%if instr(CheckStatus,"0")<=0 and cint(FromID)=cint(LoginID) then%>
<tr bgcolor=#CCCCFF>
	<td align=right></td>
	<td colspan=3>您可以根据审批意见修改您的公文内容，您还可以重新指定核稿人和校对人。</td>
</tr>
<form name="DocForm" method="post" action="SaveDoc.htm">
<tr>
	<td align=right valign=top>内容</td>
	<td colspan=3><textarea name="Body" rows=8 cols=55><%=body%></textarea></td>
</tr>
<tr>
	<td align=right valign=top>备注</td>
	<td colspan=3><textarea name="Remark" rows=8 cols=55><%=remark%></textarea></td>
</tr>
<tr>
	<td align=right>核搞人</td>
	<td colspan=3 valign=top><input type="text" name="Confirmer" value="<%=confirmer%>" size=20 class="input"><a href=# onClick="fPopUpDlg('../office/SelectUsers.htm', document.DocForm.Confirmer, 'winpop', 250, 280);return false"><img src="../images/down2.gif" border=0></a>
	</td>
</tr>
<tr>
	<td align=right>校对人</td>
	<td colspan=3><input type="text" name="Collate" value="<%=collate%>" size=20 class="input"><a href=# onClick="fPopUpDlg('../office/SelectUsers.htm', document.DocForm.Collate, 'winpop', 250, 280);return false"><img src="../images/down2.gif" border=0></a>
	</td>
</tr>
<tr>
	<td align=right>&nbsp;</td>
	<td colspan=3>
	<INPUT TYPE="submit" name="cmdUp" value="提  交">
	<INPUT TYPE="reset" value="重  写">
	</td>
</tr>
<INPUT TYPE="hidden" name="ID" value="<%=ID%>">
</form>
<%else%>
<tr bgcolor=#CCCCFF>
	<td align=right></td>
	<td colspan=3>这里填写您的审批意见</td>
</tr>
<form name="SuggestForm" method="post" action="SaveSuggest.htm">
<tr>
	<td align=right valign=top>审批意见</td>
	<td colspan=3><textarea name="Suggest" rows=5 cols=55></textarea></td>
</tr>
<tr>
	<td align=right>&nbsp;</td>
	<td colspan=3>
	<INPUT TYPE="submit" name="cmdUp" value="提  交">
	<INPUT TYPE="reset" value="重  写">
	</td>
</tr>
<INPUT TYPE="hidden" name="ID" value="<%=ID%>">
</form>
<%end if%>
</table>
</div>
<BR><BR>
</BODY>
</HTML>
<!--#include file="../inc/conn_close.htm"-->
<script language=javascript>
function CheckDelete()
{
	return confirm("确实删除吗？");
}
function OpenWindow(url,windowname)
{
window.open(url,windowname,'left=100,top=50,height=350,width=650,toolbar=no,menubar=no,scrollbars=yes')
}
function OpenWindow1(url,windowname)
{
window.open(url,windowname,'left=150,top=100,height=80,width=420,toolbar=no,menubar=no,scrollbars=yes')
}
</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
%>