📄 view.asp
字号:
<%option explicit%>
<%
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"
%>
<!-- #include virtual ="Include/DataEnvi.asp"-->
<!-- #include virtual ="Include/Page.asp" -->
<!-- #include virtual ="Include/ShowAttachs.asp" -->
<%
Dim ObjDB,ObjRS,StrSQL
Dim IntID
Dim C
IntID = Request.QueryString("ID")
Set ObjDB = Server.CreateObject("Adodb.Connection")
OpenDB ObjDB
StrSQL = "Select ID,IsHTML,Title,Body,CreateTime,Attachs,TrueName From v_OA_Work_ComMessage_TrueName where ID=" & IntID
Set C = Server.CreateObject ("CMS2003.DBHandle")
C.Init (ObjDB)
Set ObjRS = C.View (StrSQL)
ObjDB.Close
Set ObjDB = Nothing
%>
<%'==================================================================%>
<%Sub Main%>
<%'------------------------------------------------------------------%>
<%
Set ObjDB = Server.CreateObject("Adodb.Connection")
OpenDB ObjDB
%>
<%If ObjRS.Count > 0 then %>
<script language=javascript>
function setIsHTML(t){
TBody1.style.display = "none"
TBody2.style.display = "none"
if(t==0)TBody1.style.display = ""
if(t==1)TBody2.style.display = ""
}
function GetHTML(){
var tmpHTML = frameEdit.getHTML()
document.forms[0].BodyHTML.value = tmpHTML;
}
var isSetOK = false
function CheckIsLoadOK(){
<%
If ObjRS("IsHTML") Then
%>
if(frameEdit.IsLoadOK&&(!isSetOK)){
frameEdit.setHTML("<%=Replace(ObjRS("Body"),Chr(34),"\"&Chr(34))%>")
//isSetOK = true
}
setTimeout("CheckIsLoadOK()",500)
<%
End If
%>
}
</script>
<table class=Ltable cellspacing=1 cellpadding=3 height=100%>
<tr class=LHtr>
<td width=15%>查看文档</td>
<td width=85%></td>
</tr>
<tr class=Ltr>
<td>文档标题:</td>
<td><input type="text" readonly class=Input Check=1 Show="文档标题" name="_Title" value="<%=ObjRS("Title")%>"></td>
</tr>
<tr class=Ltr>
<td>文档附件:</td>
<td><%=ShowAttachs(ObjDB,ObjRS("Attachs"))%></td>
</tr>
<%
If Not ObjRS("IsHTML") Then
%>
<tr class=Ltr id=TBody1 height=100%>
<td colspan=2><textarea style="width=100%;height=100%" name="Body" class=textbody readonly><%=ObjRS("Body")%></textarea></td>
</tr>
<%
Else
%>
<tr class=Ltr id=TBody2 height=100%>
<td colspan=2><iframe style="width=100%;height=100%" src="../View_Content.asp?ID=<%=Request.QueryString("ID")%>" class=textbody1 readonly frameborder=0 id=frameEdit></iframe></td>
</tr>
<%
End If
%>
<tr class=Ltr>
<td colspan=2><input type="button" class=Button value="返 回"onclick="doBack()" id=button1 name=button1></td>
</tr>
</table>
</table>
<script language=javascript>
CheckIsLoadOK()
</script>
<%end if%>
<%'------------------------------------------------------------------%>
<%End Sub%>
<%'==================================================================%>
<!-- #include file="Templet.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -