home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / CHIPCD_3_98.iso / software / testsoft / exchange / webdata / usa / inbox / main_fr.asp < prev    next >
Text File  |  1997-08-25  |  9KB  |  204 lines

  1. <%Response.Buffer=True%>
  2. <!--#include file="../constant.inc"-->
  3. <!--#include file="../lib/session.inc"-->
  4. <% SendHeader 0, 1 %>
  5. <!--#include file="../lib/getrend.inc"-->
  6. <!--#include file="../lib/pageutil.inc"-->
  7. <%
  8. on error resume next
  9.  
  10. L_Title_FRAME_Height_Number = 80 'adjusts height of title frame
  11. L_Folder_FRAME_Width_Number = 156 'adjusts width of folder frame
  12.  
  13. urlStore = Request.QueryString("store")
  14. szObj   = Request.QueryString("obj") 
  15. urlMode  = Request.QueryString("mode") 
  16. urlAcs   = Request.QueryString("acs") 
  17. urlQuery = Request.QueryString() 
  18.  
  19. if urlMode="" then iMode=0 else iMode=cint(urlMode)
  20.  
  21. if urlQuery<>"" then
  22.   urlQuery = "?" + urlQuery
  23. end if
  24. x = CheckSession3(bstrVirtRoot + "/inbox/main_fr.asp" + urlQuery, "self", urlStore)
  25.  
  26. bstrTitleFile = bstrVirtRoot+"/inbox/title.asp"
  27. iStore=0
  28. If Not Session(bstrAuthenticated) Then
  29.     Initpage 1
  30.     iStore = 1
  31.     bstrTitleFile = bstrVirtRoot+"/inbox/titlea.asp"
  32.     fIsAnon=true
  33. ElseIf urlStore<>"" Then
  34.     iStore=cint(urlStore)
  35.     Initpage iStore
  36.     fIsAnon=false
  37. end if
  38.  
  39. bstrPath = bstrVirtRoot+"/inbox"
  40. iPage          = Session(CURRENT_PAGE)
  41. Set objFolder  = Session(CURRENT_FOLDER)
  42. If IsSpecialFolder(objFolder.ID) Then 
  43.     fIsSpecialFolder = true
  44. Else
  45.     fIsSpecialFolder = false
  46. End If
  47. bstrFolderID   = objFolder.ID 
  48. bstrFolderType = objFolder.Fields.Item(ActMsgPR_CONTAINER_CLASS).Value
  49. If bstrFolderType = "IPF.Appointment" Then iStore=2
  50.  
  51. %>
  52. <!--#include file="../lib/jsroot.inc"-->
  53. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
  54. <HTML>
  55. <script language='javascript'>
  56.  
  57. var iCurStore     = eval(<%=iStore%>);
  58. var currentPage   = eval(<%=iPage%>);
  59. var iCurCompose   = eval(<%=iStore%>);
  60. var iFolderAccessFlag = 0;
  61. var fIsSpecialFolder = eval(<%=fIsSpecialFolder%>);
  62.  
  63. <% if fIsAnon Then %>
  64. var fIsAnon  = true;
  65. <% else %>
  66. var fIsAnon  = false;
  67. <% end if %>
  68.  
  69. var szCurPubFID   = "";
  70. var szCurPvtFID   = "";
  71. var szCurFolderID = "<%=objFolder.ID%>";
  72.  
  73. function MarkPage() {
  74. <% If Session(bstrAuthenticated) Then %>
  75.     parent.location="<%=bstrVirtRoot%>/root.asp?obj="+szCurFolderID+"&store="+iCurStore;
  76. <% Else 'anon %>
  77.     parent.location="<%=bstrVirtRoot%>/root.asp?obj="+szCurFolderID+"&store="+iCurStore+"&acs=anon";
  78. <% End If %>
  79. }
  80.  
  81. //could be comming in from calendar views
  82. if (parent.hold_szCurPubFID!="")
  83.     szCurPubFID = parent.hold_szCurPubFID;
  84. if (parent.hold_szCurPvtFID!="")
  85.     szCurPvtFID = parent.hold_szCurPvtFID;
  86.  
  87. function CheckNewMail() {
  88.     self.command_fr.location="<%=bstrVirtRoot%>/inbox/commands.asp?command=checkmessages&obj="+szCurFolderID+"&store="+iCurStore;
  89. }
  90.  
  91. function UpdateView(selection) {
  92.     self.command_fr.location="<%=bstrVirtRoot%>/inbox/commands.asp?command=updateview&view="+selection+"&obj="+szCurFolderID+"&store="+iCurStore;
  93. }
  94.  
  95. function DeleteAllMessages() {
  96.     if (confirm("<%=L_ConfirmEmptyDelItemFldr_Message%>")) {
  97.         self.command_fr.location="<%=bstrVirtRoot%>/inbox/commands.asp?action=deleteallmessages&obj="+szCurFolderID+"&store="+iCurStore;
  98.     }
  99. }
  100.  
  101. function DeleteCurFolder(){
  102.     if (fIsSpecialFolder!=false) {
  103.         var L_errUnableToDelSpecialFolder_Message = "Unable to delete this special folder.";
  104.         alert(L_errUnableToDelSpecialFolder_Message);
  105.     }
  106.     else if (confirm("<%=L_strDeleteFolder_Message%>")) {
  107.         self.command_fr.location="<%=bstrVirtRoot%>/inbox/commands.asp?action=deletefolder&obj="+szCurFolderID+"&store="+iCurStore;
  108.     }
  109. }
  110.  
  111. function CreateNewFolder(){
  112.     var iNameLen=0;
  113.     var x=0;
  114.     var fNameOK=false;
  115.     var szErr="";
  116.     
  117.     //since Nav on Unix can't have multiple alerts, the prompt is redisplayed with the error
  118.     while (!fNameOK) {  
  119.         folderName = prompt(szErr +" <%=L_strEnterFolderName_Message%>","<%=L_strDefaultFolderName_Text%>") 
  120.         if ( (folderName != null) && (folderName != "") ) {
  121.             iNameLen=folderName.length;
  122.             if (iNameLen > 256) {
  123.                     alert("<%=L_strFolderNameTooLong_Message%>")
  124.             }
  125.             else if(iNameLen > 0) {
  126.                 for(x=0;x < iNameLen;x++) {
  127.                     if (folderName.charAt(x)!=" ") {
  128.                         fNameOK=true;
  129.                         break;
  130.                     }    
  131.                 }
  132.                 if (fNameOK!=false) {
  133.                     window.command_fr.document.commandform.foldername.value = folderName;
  134.                     window.command_fr.document.commandform.action.value = "newfolder";
  135.                     window.command_fr.document.commandform.obj.value = szCurFolderID;
  136.                     window.command_fr.document.commandform.store.value = iCurStore;
  137.                     window.command_fr.document.commandform.submit();
  138.                 }    
  139.                 else {
  140.                     szErr = "<%=L_strFolderNameAllSpaces_Message%>";
  141.                 }
  142.             }
  143.         }
  144.         else {
  145.             break;
  146.         }
  147.     }
  148. }
  149.  
  150. function testMode(iMode) {
  151.     self.location="<%=bstrVirtRoot%>/inbox/main_fr.asp?mode="+iMode+"&store=<%=iStore%>&obj=<%=szObj%>";
  152. }
  153.  
  154. function composeNew(iCurSel) {
  155.     parent.iCurCompose=iCurSel;
  156.     if (iCurStore!=2) {//inbox
  157.         if (iCurSel == 0) openNewWindow("<%=bstrVirtRoot%>/forms/ipm/note/frmroot.asp?command=new&store=" + iCurStore,"newMessageWindow",640,500);
  158.         
  159.         else if (iCurSel==1) openNewWindow("<%=bstrVirtRoot%>/forms/ipm/post/frmroot.asp?command=new&ID="+szCurFolderID+"&store="+iCurStore,"newMessageWindow",640,500);
  160.         else if (iCurSel==2) openNewWindow("<%=bstrVirtRoot%>/forms/ipm/schedule/meeting/request/frmroot.asp?command=new&type=1&store="+iCurStore,"newMessageWindow",640,500);
  161.         else openNewWindow("<%=bstrVirtRoot%>/forms/ipm/schedule/meeting/request/frmroot.asp?command=new&type=0&store="+iCurStore,"newMessageWindow",640,500);
  162.     }
  163.     else if (iCurStore == 2) { // Calendar
  164.         if (iCurSel==1) openNewWindow("<%=bstrVirtRoot%>/forms/ipm/schedule/meeting/request/frmroot.asp?command=new&type=1&store="+iCurStore,"newMessageWindow",640,500);
  165.         else if (iCurSel==0) openNewWindow("<%=bstrVirtRoot%>/forms/ipm/schedule/meeting/request/frmroot.asp?command=new&type=0&store="+iCurStore,"newMessageWindow",640,500);
  166.         else openNewWindow("<%=bstrVirtRoot%>/forms/ipm/note/frmroot.asp?command=new&store="+iCurStore,"newMessageWindow",640,500);
  167.     }
  168. }
  169.  
  170.  
  171. <%if iStore = 2 Then%>
  172.     self.location="<%=bstrVirtRoot%>/calendar/main_fr.asp?store=2&obj=<%=bstrFolderID%>";
  173. <%end if%>
  174. </script>
  175. <%If iMode=0 Then %>
  176. <FRAMESET ROWS="<%=L_Title_FRAME_Height_Number%>,100%,*" frameborder=1 border=5> 
  177.     <FRAME SRC="<%=bstrTitleFile%>?obj=<%=bstrFolderID%>&acs=<%=urlAcs%>&compidx=<%=iStore%>&store=<%=urlStore%>" name="title_fr" noresize marginheight=2 marginwidth=0 scrolling=no>
  178.     <FRAMESET COLS="<%=L_Folder_FRAME_Width_Number%>,*" frameborder=1 border=5>
  179.         <FRAME SRC="<%=bstrPath%>/peerfldr.asp?obj=<%=bstrFolderID%>&store=<%=urlStore%>" name="peer_fr" marginheight=0 marginwidth=0>
  180.         <FRAME SRC="<%=bstrPath%>/messages.asp?obj=<%=bstrFolderID%>&store=<%=urlStore%>" name="msg_fr" marginheight=0 marginwidth=0> 
  181.     </FRAMESET>
  182.     <FRAME SRC="<%=bstrVirtRoot%>/inbox/commands.asp?command=nothing&store=<%=urlStore%>" name="command_fr" noresize scrolling=no>
  183. </FRAMESET>
  184. <%ElseIf iMode=1 Then%>
  185. <FRAMESET COLS="<%=L_Folder_FRAME_Width_Number%>,100%,*" frameborder=1 border=5>
  186.     <FRAME SRC="<%=bstrPath%>/peerfldr.asp?obj=<%=bstrFolderID%>&store=<%=urlStore%>" name="peer_fr" marginheight=0 marginwidth=0>
  187.     <FRAME SRC="<%=bstrPath%>/messages.asp?obj=<%=bstrFolderID%>&store=<%=urlStore%>" name="msg_fr" marginheight=0 marginwidth=0> 
  188.     <FRAME SRC="<%=bstrVirtRoot%>/inbox/commands.asp?command=nothing&store=<%=urlStore%>" name="command_fr" noresize scrolling=no>
  189. </FRAMESET>
  190. <%ElseIf iMode=2 Then%>
  191. <FRAMESET COLS="100%,*" frameborder=1 border=5>
  192.     <FRAME SRC="<%=bstrPath%>/messages.asp?obj=<%=bstrFolderID%>&store=<%=urlStore%>" name="msg_fr" marginheight=0 marginwidth=0> 
  193.     <FRAME SRC="<%=bstrVirtRoot%>/inbox/commands.asp?command=nothing&store=<%=urlStore%>" name="command_fr" noresize scrolling=no>
  194. </FRAMESET>
  195. <%ElseIf iMode=3 Then%>
  196. <FRAMESET ROWS="<%=L_Title_FRAME_Height_Number%>,100%,*" frameborder=1 border=5> 
  197.     <FRAME SRC="<%=bstrTitleFile%>?obj=<%=bstrFolderID%>&acs=<%=urlAcs%>&compidx=<%=iStore%>&store=<%=urlStore%>" name="title_fr" noresize marginheight=2 marginwidth=0 scrolling=no>
  198.     <FRAME SRC="<%=bstrPath%>/messages.asp?obj=<%=bstrFolderID%>&store=<%=urlStore%>" name="msg_fr" marginheight=0 marginwidth=0> 
  199.     <FRAME SRC="<%=bstrVirtRoot%>/inbox/commands.asp?command=nothing&store=<%=urlStore%>" name="command_fr" noresize scrolling=no>
  200. </FRAMESET>
  201. <%End If%>
  202.  
  203. </HTML>
  204.