home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 March
/
CHIPCD_3_98.iso
/
software
/
testsoft
/
exchange
/
webdata
/
usa
/
forms
/
report
/
ipnrn
/
frmroot.asp
Wrap
Text File
|
1997-08-25
|
10KB
|
300 lines
<!--#include file="../../../constant.inc"-->
<!--#include file="../../../lib/Store.inc"-->
<!--#include file="../../../lib/Render.inc"-->
<!--#include file="../../../lib/session.inc"-->
<!--#include file="../../../lib/jsutil.inc"-->
<%
'<!--Microsoft Outlook Web Access-->
'<!--frmRoot.asp : Root frame for IPM.Note
'<!--Copyright (c) Microsoft Corporation 1993-1997. All rights reserved.-->
On Error Resume Next
CheckSession2 bstrVirtRoot + "/forms/report/ipnrn/frmroot.asp?timedout=1"
'''do own checkindex (avoid pageutil (15k))
strIndex = Request.QueryString("index")
If Len(strIndex) > 0 Then
iIndex = CInt(strIndex)
Session(CURRENT_INDEX) = iIndex
End If
urlcommand = Request.QueryString("command")
url = Request.QueryString()
bstrObj = Request.QueryString("obj")
Set objRenderer = GetObjectRenderer
bstrError = ""
fHasAttach=false
If Request.QueryString("timedout") <> "" Then
bstrError = "<b>" + L_Error_ErrorMessage + "<br><br>" _
+ L_errFailOpenMessage_ErrorMessage + "</b><br>" _
+ L_errMessageTimedOut2_ErrorMessage
Else
'Get the message from the cache
Set objOneMsg = Session(bstrObj)
If objOneMsg Is Nothing Then
'If the message was not in the cache then try and get it from the database
Set objOneMsg = OpenMessage(bstrObj)
If objOneMsg.ID = "" Then
If Request.QueryString("timedout")<>"" Then 'session timedout - lost message
bstrError = "<b>" + L_Error_ErrorMessage + "<br><br>" _
+ L_errFailOpenMessage_ErrorMessage + "</b><br>" _
+ L_errMessageTimedOut_ErrorMessage
Else
bstrError = "<b>" + L_Error_ErrorMessage + "<br><br>" _
+ L_errFailOpenMessage_ErrorMessage + "</b><br>" _
+ L_errMessageDeleted_ErrorMessage
End If
Else
Set Session(bstrObj) = objOneMsg
AddIDToCache(bstrObj)
End If
End If
End If
bcMsgBdy = "#c0c0c0" 'gray
bcMsgHdr = "#a0a0a0"
bcToolbar = "#707070"
fcToolbar = "#cccc99"
CheckSession
bAuthenticated = Session(bstrAuthenticated)
'validate underlying message structure
Set objMessages = Session(CURRENT_CONTENTS)
If objMessages Is Nothing Or Err.Number <> 0 Then fHaveContent = False Else fHaveContent = True
%>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<% If objOneMsg.ID="" Then
ReportErrorClose L_errMessageDeleted_ErrorMessage
Else
Set objRenderMsg = GetMessageRenderer
objRenderMsg.DataSource = objOneMsg
%>
<HEAD>
<TITLE><%objRenderMsg.RenderProperty ActMsgPR_SUBJECT, 0, Response%></TITLE>
</HEAD>
<SCRIPT language=javascript>
function DoCommand(szCommand) {
if (szCommand == "delete"){
self.location="<%=bstrVirtRoot%>/forms/report/commands.asp?command=delete&obj=<%=bstrObj%>";
}
else if (szCommand == "forward"){
self.location="<%=bstrVirtRoot%>/forms/report/commands.asp?command=forward&obj=<%=bstrObj%>";
}
else if (szCommand == "close"){
self.close();
}
else if (szCommand == "next"){
self.location="<%=bstrVirtRoot%>/item.asp?action=next";
}
else if (szCommand == "previous"){
self.location="<%=bstrVirtRoot%>/item.asp?action=prev";
}
}
</Script>
<BODY TEXT=000000 BGCOLOR=<%=bcMsgBdy%> TOPMARGIN=4 LEFTMARGIN=4 text=000000 link=000000 vlink=000000 alink=000000>
<!--- begin toolbar --------->
<form>
<TABLE BORDER=0 bgcolor=<%=bcMsgBdy%> CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<tr>
<td width=100%>
<img src="<%=bstrVirtRoot%>/images/divider.gif" width=4 height=24 align="middle">
<% If fHaveContent Then 'validate underlying message structure %>
<% If bAuthenticated Then 'Anon can't reply/fwd (no inbox) %>
<A href="JavaScript:DoCommand('forward')">
<IMG SRC="<%=bstrVirtRoot%>/forms/forward.gif" Alt="<%=L_Forward_ToolTip%>" align="middle" border=0 height=24 width=24></a>
<img src="<%=bstrVirtRoot%>/images/divider.gif" width=4 height=24 align="middle">
<a href="JavaScript:openNewWindow('<%=bstrVirtRoot%>/movcpy/root.asp?msgID=<%=bstrObj%>&fldID=<%=objOneMsg.FolderID%>&process=1','newMessageWindow',440,500)">
<IMG SRC="<%=bstrVirtRoot%>/forms/movcpy.gif" align="middle" Alt="<%=L_MoveCopy_ToolTip%>" border=0 height=24 width=24></a>
<img src="<%=bstrVirtRoot%>/images/divider.gif" width=4 height=24 align="middle">
<% End If %>
<% End If %>
<A href="JavaScript:DoCommand('delete')">
<IMG SRC="<%=bstrVirtRoot%>/forms/delmark.gif" Alt='<%=L_Delete_ToolTip%>' align="middle" border=0 height=24 width=24></a>
<img src="<%=bstrVirtRoot%>/images/divider.gif" width=4 height=24 align="middle">
<A href="JavaScript:DoCommand('previous')">
<IMG SRC="<%=bstrVirtRoot%>/forms/prevmsg.gif" Alt="<%=L_PrevMsg_ToolTip%>" align="middle" border=0 width=24 height=24></a>
<A href="JavaScript:DoCommand('next')">
<IMG SRC="<%=bstrVirtRoot%>/forms/nextmsg.gif" Alt='<%=L_NextMsg_ToolTip%>' align="middle" border=0 width=24 height=24></a>
<img src="<%=bstrVirtRoot%>/images/divider.gif" width=4 height=24 align="middle">
<A href="JAVASCRIPT:openNewWindow('<%=bstrVirtRoot%>/help/READMSG.HTM','inlineHelpWindow',600,400)">
<IMG SRC="<%=bstrVirtRoot%>/images/help.gif" alt="<%=L_Help_ToolTip%>" align="middle" border=0 height=20 width=20></a>
<img src="<%=bstrVirtRoot%>/images/divider.gif" width=4 height=24 align="middle">
</td>
<td align="right">
<input type="button" value="Close" onClick="DoCommand('close')">
</td>
</tr>
</table>
</form>
<!--<br>-->
<!--- begin header --->
<TABLE border=0 cellpadding=3 cellspacing=0 width="100%" bgcolor=<%=bcMsgBdy%>>
<TR>
<TD width=10%>
<font size=2><b><%=L_From_StaticText%></b></font>
</TD>
<TD>
<font size=2>
<%
AddrType = objOneMsg.Fields(ActMsgPR_SENT_REPRESENTING_ADDRTYPE)
Address = objOneMsg.Fields(ActMsgPR_SENT_REPRESENTING_EMAIL_ADDRESS)
objRenderMsg.RenderProperty ActMsgPR_SENT_REPRESENTING_NAME, 0, Response %>
<% If AddrType <> "" And AddrType <> "EX" And Address <> "" Then %>
[<% objRenderMsg.RenderProperty ActMsgPR_SENT_REPRESENTING_ADDRTYPE, 0, Response %>:<% objRenderMsg.RenderProperty ActMsgPR_SENT_REPRESENTING_EMAIL_ADDRESS, 0, Response %>]
<% End If %>
</font>
</TD>
</TR>
<TR>
<TD>
<font size=2><b><%=L_TO_StaticText%></b></font>
</TD>
<TD>
<font size=2>
<% objRenderMsg.RenderProperty ActMsgPR_DISPLAY_TO, 0, Response %>
</font>
</TD>
</TR>
<TR>
<TD><font size=2><b><%=L_CC_StaticText%></b></font>
</TD>
<TD><font size=2>
<% objRenderMsg.RenderProperty ActMsgPR_DISPLAY_CC, 0, Response %>
</font>
</TD>
</TR>
<TR>
<TD> </TD>
</TR>
</TABLE>
<!---begin subject bar --->
<TABLE width="100%" border=0 cellspacing=0 cellpadding=3>
<TR bgcolor=<%=bcMsgBdy%> width=100% valign=baseline>
<TD width=10%>
<font color=000000 size=2><b><%=L_Subject_StaticText%></b></font>
</TD>
<TD colspan=3>
<font color=000000 size=2>
<% objRenderMsg.RenderProperty ActMsgPR_SUBJECT, 0, Response %>
</font>
</TD>
</tr><tr>
<TD>
<font size=2><nobr><b><%=L_Sent_StaticText%></b>
</td><td width=62%><font size=2>
<% objRenderMsg.RenderProperty ActMsgPR_CLIENT_SUBMIT_TIME, 0, Response %> </nobr><br>
</TD>
<TD align=right>
<font size=2><nobr><b><%=L_Importance_StaticText%></b>
</td><td align=right><font size=2>
<% objRenderMsg.RenderProperty ActMsgPR_IMPORTANCE, 0, Response %> </nobr>
</font>
</TD>
</TR>
</TABLE>
<!--- message text ----->
<TABLE width="100%" border=1 cellspacing=2 cellpadding=6>
<TR>
<TD bgcolor=white width=100% height=300 valign=top colspan=2 >
<%
strMsgData = L_YourMessage_Text & vbCrLf & vbCrLf
strMsgData= strMsgData & L_TO_StaticText
If objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_DISPLAY_TO) <> "" then
strMsgData = strMsgData & " " & objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_DISPLAY_TO)
End If
strMsgData=strMsgData & vbCrLf
If objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_DISPLAY_CC) Is Nothing then
Else
strMsgData= strMsgData & L_CC_StaticText
strMsgData = strMsgData & " " & objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_DISPLAY_CC)
strMsgData=strMsgData & vbCrLf
End If
If objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_DISPLAY_BCC) Is Nothing then
Else
strMsgData= strMsgData & L_BCC_StaticText
strMsgData = strMsgData & " " & objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_DISPLAY_BCC)
strMsgData=strMsgData & vbCrLf
End If
strMsgData=strMsgData & L_Subject_StaticText
If objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_SUBJECT) <> "" Then
strMsgData = strMsgData & " " & objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_SUBJECT)
End If
strMsgData=strMsgData & vbCrLf
strMsgData=strMsgData & L_Sent_StaticText & " " & objOneMsg.Fields.Item(ActMsgPR_ORIGINAL_SUBMIT_TIME) & vbCrLf & vbCrLf
strMsgData = strMsgData & " " & L_IPNRNread_Text & " " & objOneMsg.Fields.Item(ActMsgPR_CREATION_TIME)
objOneMsg.Text=strMsgData
'Do all the things that we would normally do at the end to prevent two calls to
'msg.update. We have to call update() here because message does not have any text
'body yet. In order to call RenderProperty, we must call Update to give our
'message a body!!!
If bAuthenticated Then
objOneMsg.Unread = False
End If
objOneMsg.Update
Err.Clear
objRenderMsg.RenderProperty ActMsgPR_RTF_COMPRESSED, 0, Response
Set Session(bstrObj) = Nothing
%>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<%End If%>