<!--#include file="../inc/conn.htm"-->
<%
ID=trim(request("ID"))
LoginID=session("LoginID")
if LoginID="" then response.end
UserName= trim(session("RealName"))

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"))

	OutWord=trim(rs("OutWord"))
	OutSerial=trim(rs("OutSerial"))
	SecureClass=trim(rs("SecureClass"))
	JinjiClass=trim(rs("JinjiClass"))

	title=replace(trim(rs("title")),"'","''")
	Mainto=replace(trim(rs("Mainto")),"'","''")
	Copyto=replace(trim(rs("Copyto")),"'","''")
	Copyto2=trim(rs("Copyto2"))
	body=replace(rtrim(rs("body")),"'","''")
	body2=replace(rtrim(rs("body2")),"'","''")
	Title2=trim(rs("Title2"))
	OutGoing=trim(rs("OutGoing"))
end if
rs.close
set rs=nothing

if trim(body)<>trim(body2) and trim(body2)<>"" then body=body2
%>
<html>
<head>
<title>公文打印</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/print.css">
</head>
<script src="Popup.js"></script>
<body bgcolor="#FFFFFF" leftmargin=20>
<form name="printform" method="post" action="Doc_Print.htm">
<table border=0 width="100%">
<tr>
	<td align=right valign=bottom>
	秘级：<input type=text class="doc_txt" name="txt1" size=6 value="<%=GetSecureClass(SecureClass)%>"></td>
</tr>
<tr>
	<td align=right valign=bottom>
	缓急：<input type=text class="doc_txt" name="txt2" size=6 value="<%=GetJinjiClass(JinjiClass)%>"></td>
</tr>

<tr height=150>
	<td height=150 valign=center>
	<BR><div id="Hidden1" align=center style="font-size:40pt;color:#FF0000;letter-spacing:6pt"><b>敦卫科技文件</b></div>
	</td>
</tr>
<tr height=70>
	<td align=center valign=bottom>
	<table border=0 width="100%"><tr>
	<td align=left>
	<input type=text class="doc_txt" name="txt3" size=24 value="<%=OutWord&" [ "&OutSerial&" ] 号"%>"></td>
	<td align=right>
	签发人：<input type=text class="doc_txt" name="txt4" size=6 value="">
	</td>
	</tr></table>
	</td>
</tr>
<tr height="40">
	<td align=center height=40>
	<div id="Hidden2"><hr size=3 color=red width="100%"></div>
	</td>
</tr>

</table>


<table border=0 cellpadding=1 cellspacing=3 width="100%">
<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P align=center><%=replace(replace(server.htmlencode(Title&" ")," ","&nbsp;"),chr(13),"<BR>")%></P>
	</td></tr></table><BR>
	</td>
</tr>
<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P><%=replace(replace(server.htmlencode(Mainto&" ")," ","&nbsp;"),chr(13),"<BR>")%>：</P>
	</td></tr></table>
	</td>
</tr>

<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P><%=replace(replace(server.htmlencode(body&" ")," ","&nbsp;"),chr(13),"<BR>")%></P>
	</td></tr></table>
	</td>
</tr>
<%if title2<>"" then%>
<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P><input type="text" class="doc_txt" name="txt5" size=60 value="主题词：<%=Title2%>"></P>
	</td></tr></table>
	</td>
</tr>
<%end if%>

<%if copyto<>"" then%>
<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P><input type="text" class="doc_txt" size=60 name="txt6" value="抄送：<%=copyto%>"></P>
	</td></tr></table>
	</td>
</tr>
<%end if%>
<%if copyto2<>"" then%>
<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P><input type="text" class="doc_txt" size=60 name="txt7" value="抄报：<%=copyto2%>"></P>
	</td></tr></table>
	</td>
</tr>
<%end if%>

<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P><input type="text" class="doc_txt" size=60 name="txt8" value="发文机关：<%=OutGoing%>                        &nbsp;<%=year(now())%> 年 <%=month(now())%> 月 <%=day(now())%> 日 印发&nbsp;&nbsp;"></P>
	</td></tr></table>
	</td>
</tr>

<tr bgcolor=#FFFFFF>
	<td valign=top>
	<P><input type="text" class="doc_txt" size=60 name="txt9" value="敦卫科技第65号"></P>
	</td></tr></table>
	</td>
</tr>

</table>
</div>

<table border=0 width="100%">
<tr id="PrintM">
<td align=right><input type="submit" value="打印预揽" class="font9boldwhite"></td></tr>
</table>
<BR><BR>
<INPUT TYPE="hidden" name="ID" value="<%=ID%>">
</form>
</body>
</html>
<script language="javascript">
function SetPrint(){
document.all('PrintM').style.display="none";
document.all('Hidden1').style.display="none";
document.all('Hidden2').style.display="none";
print();
}
</script>
<!--#include file="../inc/conn_close.htm"-->

<%
Private function GetSecureClass(byval nClass)
select case trim(nClass)
	case "0"
	GetSecureClass="未定义"
	case "1"
	GetSecureClass="普通"
	case "2"
	GetSecureClass="秘密"
	case "3"
	GetSecureClass="机密"
	case "4"
	GetSecureClass="绝密"
	case else
	GetSecureClass="未定义"
end select
end function

Private function GetJinjiClass(byval nClass)
select case trim(nClass)
	case "0"
	GetJinjiClass=""
	case "1"
	GetJinjiClass="缓"
	case "2"
	GetJinjiClass="急"
	case "3"
	GetJinjiClass="加急"
	case else
	GetJinjiClass=""
end select
end function
%>