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

  1. <!--#include file="../constant.inc"-->
  2. <!--#include file="../lib/session.inc"-->
  3. <!--#include file="../lib/getrend.inc"-->
  4. <!--#include file="../lib/pageutil.inc"-->
  5. <!--#include file="../lib/jsroot.inc"-->
  6. <!--#include file="../lib/jsutil.inc"-->
  7. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
  8. <HTML>
  9. <%
  10. On Error Resume Next
  11.  
  12. urlFull = Request.QueryString()
  13. x = CheckSession3(bstrVirtRoot+"/calendar/main_fr.asp?"+urlFull,"self",1)
  14.  
  15. dtStart = Now
  16. fNew = False
  17.  
  18. ' Get the cached rendering object.
  19. Set objRenderer = GetFirstCalendarRenderer(fNew)
  20.  
  21. szObj=Request.QueryString("obj") 'Pass this to the child frame
  22.  
  23. ' Get the data source for the renderer.
  24. ' Only the default calendar folder is currently supported.
  25. Set objCal = objRenderer.DataSource
  26. If objCal Is Nothing Then
  27.     Set objCalFolder = objOMSession.GetDefaultFolder(0) ' ActMsgDefaultFolderCalendar
  28.     Set objCal = objCalFolder.Messages
  29.     objRenderer.DataSource = objCal
  30. End If
  31.  
  32. ' NOTE!! The standard formats include named properties, so they cannot
  33. ' be initialized until there is a data source.
  34. If fNew Then
  35.     SetCalendarRendererFormats(objRenderer)
  36. End If
  37.  
  38. ' Get the requested start date (defaults to today)
  39. szYear  = Request.QueryString("y")
  40. szMonth = Request.QueryString("m")
  41. szDay   = Request.QueryString("d")
  42. If szYear <> "" And szMonth <> "" And szDay <> "" Then
  43.     Err.Clear
  44.     dtStart = DateSerial(CInt(szYear), CInt(szMonth), CInt(szDay))
  45. End If
  46.  
  47. iView=1 'Default to daily since applet ALWAYS inititates to daily when it's loaded
  48. objRenderer.CurrentView = iView 'Set session to default in case it was changed
  49.  
  50. ' Set up the Denali session variables for calendar.
  51. ' The renderer is already stored in Session(bstrCalendarRenderer).
  52. Session(CURRENT_DATE) = dtStart
  53.  
  54. Function isGoodVM
  55.     If (GetVersion < 4) Then 
  56.         If isNav() Then
  57.             isGoodVM = False
  58.         Else
  59.             isGoodVM = True
  60.         End If
  61.     Else
  62.         isGoodVM = True
  63.     End If
  64. End Function
  65.  
  66. %>
  67.  
  68. <script language="Javascript">
  69. var javaEnabled = false;
  70. var done = false;
  71. var iCurStore=2; //needed for navbar
  72. var iCurCompose = 0;
  73.  
  74. //these are for the HTML date picker to track the current date
  75. //they are set in events.asp, and passed only when the Java is disabled
  76. //Prevents resetting of the date when changing the calendar views.
  77. var currentMonth="";
  78. var currentYear="";
  79. var currentDay="";
  80.  
  81. function MarkPage() {
  82.     parent.location="<%=bstrVirtRoot%>/root.asp?obj=<%=szObj%>";
  83. }
  84.  
  85. function composeNew(iCurSel) {
  86.     iCurCompose=iCurSel;
  87.     if (iCurSel==1) openNewWindow("<%=bstrVirtRoot%>/forms/ipm/schedule/meeting/request/frmroot.asp?command=new&type=1","newMessageWindow",640,500);
  88.     else if (iCurSel==0) openNewWindow("<%=bstrVirtRoot%>/forms/ipm/schedule/meeting/request/frmroot.asp?command=new&type=0","newMessageWindow",640,500);
  89.     else openNewWindow("<%=bstrVirtRoot%>/forms/ipm/note/frmroot.asp?command=new","newMessageWindow",640,500);
  90. }
  91.  
  92. function updateCalView(selection) 
  93. {
  94. <% If isGoodVM Then %>
  95.     //does the Java applet exist?
  96.     if (self.pick_fr.document.Calendar != null)
  97.     {
  98.         if (done == true)
  99.            {
  100.             if (selection == 1)
  101.                 self.pick_fr.document.Calendar.changeToDailySelection()
  102.             else
  103.                 self.pick_fr.document.Calendar.changeToWeeklySelection()
  104.         }
  105.     }
  106.     else
  107.     {
  108. <% End If %>
  109.         self.msg_fr.location   =  "appts.asp?view=" + selection+ "#start&m="+currentMonth+"&d="+currentDay+"&y="+currentYear;
  110.         self.event_fr.location = "events.asp?view=" + selection+"&m="+currentMonth+"&d="+currentDay+"&y="+currentYear;
  111. <% If isGoodVM Then %>
  112.     }
  113. <% End If %>
  114. }
  115. </script>
  116.  
  117. <FRAMESET ROWS="80,*" frameborder=1 border=5 > 
  118.     <FRAME SRC="../calendar/title.asp?session=1&obj=<%=szObj%>" name="title_fr" noresize scrolling="no" marginheight=2 marginwidth=0>
  119.     <FRAMESET COLS="*,200" frameborder=1 border=5>
  120.         <FRAMESET ROWS="70,*" frameborder=0 border=1> 
  121.             <FRAME SRC="../calendar/events.asp?session=1&caller=main_fr" name="event_fr" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto">
  122.             <FRAME SRC="../calendar/appts.asp?session=1#start" name="msg_fr" frameborder=0 marginheight=0 marginwidth=0 scrolling="auto">
  123.         </FRAMESET>
  124.         <FRAME SRC="../calendar/pick.asp?session=1" name="pick_fr" scrolling="no" marginheight=0 marginwidth=0>
  125.     </FRAMESET>
  126. </FRAMESET>
  127.  
  128. </HTML>
  129.