home *** CD-ROM | disk | FTP | other *** search
/ DOKAN 21 / DOKAN21.iso / Extra / wmtools.exe / RCDATA / CABINET / showreg.asp < prev    next >
Text File  |  1998-11-20  |  13KB  |  355 lines

  1. <%@ LANGUAGE="javascript" %>
  2. <% Response.Expires = 0 %>
  3. <HTML>
  4. <HEAD>
  5. <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  6. <TITLE>
  7.     Windows Media Presenter
  8. </TITLE>
  9. </HEAD>
  10. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="checkeredTime();loadSlidesManual();">
  11. <SCRIPT Langauge="JavaScript">
  12. <!--
  13.     // Init values for browser detect.
  14.     bName = navigator.appName;
  15.     bVer = parseInt(navigator.appVersion);
  16.     if      (bName == "Netscape" && bVer >= 4) br = "n4";
  17.     else if (bName == "Netscape" && bVer == 3) br = "n3";
  18.     else if (bName == "Microsoft Internet Explorer" && bVer >= 4) br = "e4";
  19.     else if (bName == "Microsoft Internet Explorer") br = "e3";
  20.     else br = "n2";
  21. // -->
  22. </SCRIPT>
  23. <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000"><TR><TD ALIGN=LEFT VALIGN=TOP><IMG SRC="images/tbleft.gif" BORDER=0 WIDTH=291 HEIGHT=19 ALT="-"></TD></TR></TABLE>
  24. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%"><TR><TD ALIGN=LEFT VALIGN=TOP><IMG SRC="images/logo.gif" BORDER=0 ALT="Windows Media Presenter" WIDTH=270 HEIGHT=43></TD><TD ALIGN=RIGHT VALIGN=TOP><IMG SRC="images/topright.gif" BORDER=0 ALT="-" WIDTH=608 HEIGHT=57></TD></TR></TABLE>
  25. <BR>
  26. <BLOCKQUOTE>
  27.     <TABLE BORDER="0">
  28.         <TR>
  29.             <TD>
  30.                 <FONT FACE="verdana, arial, helvetica" SIZE="2">
  31.                     Today's Event:  
  32.                 </FONT>
  33.             </TD>
  34.             <TD>
  35.                 <FONT FACE="verdana, arial, helvetica" SIZE="2">
  36.                     <B><% = Application("EVENT_TITLE") %></B>
  37.                 </FONT>
  38.             </TD>
  39.         </TR>
  40.         <TR>
  41.             <TD>
  42.                 <FONT FACE="verdana, arial, helvetica" SIZE="2">
  43.                     Start Time:
  44.                 </FONT>
  45.             </TD>
  46.             <TD>
  47.                 <FONT FACE="verdana, arial, helvetica" SIZE="2">
  48.                     <B>
  49.                         <SCRIPT LANGUAGE="JavaScript">
  50.                         <!--
  51.                             // This script takes the UTC SHOW_TIME value and writes it to the screen in the users local time.  It supports all time zones.
  52.                             // Init display Date
  53.                             var showDisplayDate = new Date("<%= Application("SHOW_TIME") %>");
  54.                             
  55.                             // Find Time Zone Offset and adjust
  56.                             var offsetDate = new Date(0);
  57.                             var offset = (offsetDate.getTimezoneOffset() / 60);
  58.                             showDisplayDate.setHours(showDisplayDate.getHours() - offset);
  59.                         
  60.                             // Break down date values for display
  61.                             var year = showDisplayDate.getYear();
  62.                             var month = showDisplayDate.getMonth();
  63.                             var day = showDisplayDate.getDate();
  64.                             var hours = showDisplayDate.getHours();
  65.                             var minutes = showDisplayDate.getMinutes();
  66.                             var zerobuffer = "";
  67.                             var ntbuffer = "19";
  68.                             var nandd = "temp";
  69.                             
  70.                             // sets the zero buffer
  71.                             if (minutes <= "9")
  72.                                 {
  73.                                     zerobuffer = "0"
  74.                                 }
  75.                         
  76.                             // sets the ntbuffer
  77.                             var yearstring = year.toString();
  78.                             var ntbuffertemp = yearstring.indexOf("20", 0);
  79.                             if (ntbuffertemp != "-1")
  80.                                 {
  81.                                     ntbuffer = ""
  82.                                 }
  83.                         
  84.                             //sets am or pm
  85.                             if (hours <= 11)
  86.                                 {
  87.                                     nandd = "am"
  88.                                 }
  89.                                 else if (hours >= 12)
  90.                                 {
  91.                                     nandd = "pm"
  92.                                 }
  93.                         
  94.                             // gets rid of military time
  95.                             if (hours > 12)
  96.                                 {
  97.                                     hours = (hours - 12)
  98.                                 }
  99.                         
  100.                             // Writes final values to screen
  101.                             var monthname;
  102.                                 if (month == 0) monthname = "January";
  103.                                 if (month == 1) monthname = "February";
  104.                                 if (month == 2) monthname = "March";
  105.                                 if (month == 3) monthname = "April";
  106.                                 if (month == 4) monthname = "May";
  107.                                 if (month == 5) monthname = "June";
  108.                                 if (month == 6) monthname = "July";
  109.                                 if (month == 7) monthname = "August";
  110.                                 if (month == 8) monthname = "September";
  111.                                 if (month == 9) monthname = "October";
  112.                                 if (month == 10) monthname = "November";
  113.                                 if (month == 11) monthname = "December";
  114.                             document.write(hours + ":" + zerobuffer + minutes + " " + nandd + " on " + monthname + " " + day + ", " + ntbuffer +  year + "</font><BR>")
  115.                         // -->
  116.                         </SCRIPT>
  117.                     </B>
  118.                 </FONT>
  119.             </TD>
  120.         </TR>
  121.     </TABLE>
  122. </BLOCKQUOTE>
  123. <HR WIDTH="85%">
  124. <BLOCKQUOTE>
  125. <FONT FACE="verdana, arial, helvetica" SIZE="2">
  126. <SCRIPT Language="JavaScript">
  127. <!--
  128.     // Check Global Event Variables for common errors
  129.     // Check for invalid Dates
  130.     var sdate = new Date("<%= Application("SHOW_TIME") %>");
  131.     var edate = new Date("<%= Application("SHOW_END_TIME") %>");
  132.  
  133.     var errorDetect0
  134.     var errorDetect1
  135.  
  136.     var invalidDate
  137.     var conflictDate
  138.     var invalidMult
  139.     var errorNum = 0
  140.     
  141.     if ((sdate == "NaN") || (sdate == "Invalid Date") || (edate == "NaN") || (edate == "Invalid Date") || ("<%= Application("SHOW_TIME") %>" == "<%= Application("SHOW_END_TIME") %>"))
  142.         {
  143.             errorDetect0 = "True"
  144.             invalidDate = "True"
  145.         }
  146.     // Check for conflicting Begin and End Times
  147.     var startMilli = Date.parse("<%= Application("SHOW_TIME") %>");
  148.     var endMilli = Date.parse("<%= Application("SHOW_END_TIME") %>");
  149.     if (startMilli > endMilli) 
  150.         {
  151.             errorDetect1 = "True"
  152.             conflictDate = "True"
  153.         }
  154.         
  155.     if (errorDetect0 == "True")
  156.         {
  157.             errorNum++
  158.         }
  159.     if (errorDetect1 == "True")
  160.         {
  161.             errorNum++
  162.         }
  163. // -->
  164. </SCRIPT>
  165. <SCRIPT language="javascript">
  166. <!--
  167. // Write Out Any Error Messages
  168.     if(errorNum >= 1)
  169.         {
  170.             if (errorNum >=2)
  171.                 {
  172.                     document.write("Errors have been detected in the current configuration of Presenter.  The following errors need to be repaired before the Presenter will work correctly:");
  173.                 }
  174.             else
  175.                 {
  176.                     document.write("An error has been detected in the current configuration of Presenter.  The following error needs to be repaired before Presenter will work correctly:");
  177.                 }
  178.             document.write('<UL>');
  179.             if (errorDetect0 == "True")
  180.                 {
  181.                     document.write('<LI>The SHOW_TIME or SHOW_END_TIME for this event are not valid dates.');
  182.                 }
  183.             if (errorDetect1 == "True")
  184.                 {
  185.                     document.write('<LI>The SHOW_TIME and SHOW_END_TIME dates conflict.');
  186.                 }
  187.             document.write('</UL>');
  188.  
  189.             var adminName = "<%= Application("ADMIN_NAME") %>"
  190.             var adminEmail = "<%= Application("ADMIN_EMAIL") %>"
  191.             if (adminName == "" && adminEmail == "")
  192.                 {
  193.                     document.write('Please contact your event administrator for more information.')
  194.                 }
  195.             else if (adminName != "" && adminEmail != "")
  196.                 {
  197.                     document.write('Please contact <A href="mailto:' + adminEmail + '">' + adminName + '</A> for information on how to adjust these settings.')
  198.                 }
  199.             else if (adminEmail != "" && adminName == "")
  200.                 {
  201.                     document.write('Please contact <A href="mailto:' + adminEmail + '">the event administrator</A> for information on how to adjust these settings.')
  202.                 }
  203.             else if (adminEmail == "" && adminName != "")
  204.                 {
  205.                     document.write('Please contact ' + adminName + ' for information on how to adjust these settings.')
  206.                 }
  207.         }
  208. // End Write Out Any Error Messages
  209. // -->
  210. </SCRIPT>
  211. </FONT>
  212. </BLOCKQUOTE>
  213.  
  214. <SCRIPT Langauge="JavaScript">
  215. <!--
  216.     // Write out the appropriate messages on the screen depending on which browser the client is using and if Windows Media Player is installed.
  217.     if ((br == "e4") && (errorNum == 0))
  218.         {
  219.             document.write('<BLOCKQUOTE><FONT FACE="verdana, arial, helvetica" SIZE="2">As you wait for the presentation to start, Windows Media Player is automatically loading the required software components and presentation slides.<BR></FONT></BLOCKQUOTE>');
  220.             document.write('<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><IMG SRC="images/bfiller.gif" BORDER=0 WIDTH=266 HEIGHT=173 ALT="Graphic">    </TD><TD><OBJECT ID="lblClock" WIDTH=400 HEIGHT=50 CLASSID="CLSID:40F07A91-8E6F-11D0-8A0A-00A0C90C9B67" CODEBASE="<% = Application("MCSIControls") %>"><PARAM NAME="ForeColor" VALUE="0"><PARAM NAME="BackColor" VALUE="2385975"><PARAM NAME="Alignment" VALUE="3"><PARAM NAME="Appearance" VALUE="0"><PARAM NAME="BackStyle" VALUE="0"><PARAM NAME="Text" VALUE=""><PARAM NAME="Angle" VALUE="0"><PARAM NAME="BorderStyle" VALUE="2"><PARAM NAME="FontName" VALUE="Arial"><PARAM NAME="FontSize" VALUE="14"><PARAM NAME="FontBold" VALUE="0"><PARAM NAME="FontItalic" VALUE="0"><PARAM NAME="FontUnderline" VALUE="0"><PARAM NAME="FontStrikethrough" VALUE="0"><PARAM NAME="FontCharset" VALUE="0"></OBJECT></TD></TR></TABLE>');
  221.         }
  222.     else if ((br == "n4") && (errorNum == 0))
  223.         {
  224.             if (navigator.mimeTypes["application/asx"])
  225.                 {
  226.                     document.write('<BLOCKQUOTE>The Microsoft Media Player is already installed on this machine.<BR>  Thank you for using the Microsoft Media Player.  Enjoy the Presentation.')
  227.                 }
  228.             else
  229.                 {
  230.                     document.write('<BLOCKQUOTE>You currently do not have the Windows Media Player installed.  Please follow these steps:<BR><OL><LI>Download <A HREF="<%= Application("NS_PLAY") %>">Windows Media Player</A>.<LI>Exit from Netscape Navigator.<LI>Double click on the downloaded file to install the Windows Media Player.<LI>You may be asked to restart your computer.<LI>Restart Netscape Navigator and return to this page.</OL>')
  231.                 }
  232.             document.write('</BLOCKQUOTE><table border="0"><TR><TD><IMG SRC="images/bfiller.gif" BORDER=0 WIDTH=266 HEIGHT=173 ALT="Graphic"></TD><TD>');
  233.             document.write('<APPLET CODE="Clbl.class" NAME="ColorLabel" ALIGN="MIDDLE" HEIGHT="30" WIDTH="400" HSPACE="0" VSPACE="0">');
  234.             document.write('<param name=Caption value="">');
  235.             document.write('<param name=Foreground value="0">');
  236.             document.write('<param name=Background value="16777215">');
  237.             document.write('<param name=FontStyle value=1>');
  238.             document.write('<param name=FontSize value=16>');
  239.             document.write('<param name=XCoord value=10>');
  240.             document.write('<param name=YCoord value=20>');
  241.             document.write('</applet>');
  242.             document.write('</TD></TR></TABLE>');
  243.         }
  244. // -->
  245. </SCRIPT>
  246. <SCRIPT Langauge="JavaScript">
  247. <!--
  248. function errortrap(){
  249.     return true;
  250.     }
  251. // -->
  252. </SCRIPT>
  253. <SCRIPT Langauge="JavaScript">
  254. <!--
  255.     function TimeToShow()
  256.         {
  257.             // The current time, show time, and end time
  258.             var theCurrentTime = new Date();
  259.             var showTimeTimer = new Date("<%= Application("SHOW_TIME") %>");
  260.             var endTimeTimer = new Date("<%= Application("SHOW_END_TIME") %>");
  261.  
  262.             // offset times
  263.             showTimeTimer.setHours(showTimeTimer.getHours() - offset);
  264.             endTimeTimer.setHours(endTimeTimer.getHours() - offset);
  265.  
  266.             // The current time, show time, and end time in milliseconds
  267.             var currentMilli = Date.parse(theCurrentTime);
  268.             var startMilli = Date.parse("<%= Application("SHOW_TIME") %>");
  269.             var endMilli = Date.parse("<%= Application("SHOW_END_TIME") %>");
  270.             
  271.             // Time left before presentation
  272.             var timeLeft = (showTimeTimer.getTime() - theCurrentTime.getTime());
  273.             
  274.             var timer_killtimer = false
  275.  
  276.             //General Time Checking
  277.             if (timeLeft <= 0)  // The show has started or has ended
  278.                 {
  279.                     if (theCurrentTime.getTime() > endTimeTimer.getTime())
  280.                         {
  281.                             str = "The presentation has ended.";
  282.                             window.status = "The presentation has ended.";
  283.                             timer_killtimer = true;
  284.                         }
  285.                     if (theCurrentTime.getTime() < endTimeTimer.getTime())
  286.                         {
  287.                             str = "The presentation is in session.";
  288.                             top.location.href = "first/default.asp";
  289.                             timer_killtimer = true;
  290.                         }
  291.                 }
  292.                 else  //continue counting down the timer
  293.                 {
  294.                     varSecondMilli = 1000;
  295.                     varMinuteMilli = varSecondMilli * 60;
  296.                     varHourMilli = varMinuteMilli * 60;
  297.                     varDayMilli = varHourMilli * 24;
  298.                 
  299.                     varDays = Math.floor(timeLeft / varDayMilli);
  300.                     timeLeft -= varDays * varDayMilli;
  301.                     varHours = Math.floor(timeLeft / varHourMilli);
  302.                     timeLeft -= varHours * varHourMilli;
  303.                     varMins = Math.floor(timeLeft / varMinuteMilli);
  304.                     timeLeft -= varMins * varMinuteMilli;
  305.                     varSecs = Math.floor(timeLeft / varSecondMilli);
  306.                     str = "Presentation will begin in " +
  307.                             (varDays > 0 ? ("" + varDays + " days, ") : "") +
  308.                             (varHours < 10 ? "0" : "") + varHours +
  309.                             (varMins < 10 ? ":0" : ":") + varMins +
  310.                             (varSecs < 10 ? ":0" : ":") + varSecs;
  311.                 }
  312.                 // Rewrite timer label
  313.                 if ((br == "e4") || (br == "e3"))
  314.                     {
  315.                         lblClock.Text = str;
  316.                     }
  317.                 else if ((br == "n3") || (br == "n4"))
  318.                     {
  319.                         window.error=errortrap;
  320.                         document.ColorLabel.setCaption(str);
  321.                     }
  322.                 
  323.                 // check if the timer needs killed
  324.                 if (timer_killtimer == false)
  325.                     {
  326.                         timer_timerID = setTimeout('TimeToShow()',1000);
  327.                     }
  328.                 return true;
  329.             }
  330. // -->
  331. </SCRIPT>
  332. <SCRIPT Language="JavaScript">
  333. <!--
  334.     var endTimeTimerTemp = new Date("<%= Application("SHOW_END_TIME") %>");
  335.     var endMilliTemp = Date.parse(endTimeTimerTemp);
  336.     var theCurrentTimeTemp = new Date();
  337.     var currentMilliTemp = Date.parse(theCurrentTimeTemp);
  338.  
  339.     if (currentMilliTemp <= endMilliTemp)
  340.         {
  341.             document.write('<OBJECT ID="LoadNSPlayer" BORDER=0 WIDTH=0 HEIGHT=0 CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" CODEBASE="<%= Application("NS_CORE") %>"></OBJECT>');
  342.             document.write('<OBJECT ID="TimerCtl1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:1A12C811-9001-11D0-8A0B-00A0C90C9B67" CODEBASE="<% = Application("MCSIControls") %>"></OBJECT>');
  343.         }
  344.     function checkeredTime()
  345.         {
  346.             if (errorNum == 0)
  347.                 {
  348.                     TimeToShow();
  349.                 }
  350.         }
  351. // -->
  352. </script>
  353. <!--#include file="filelist.htm"-->
  354. </BODY>
  355. </HTML>