<% @ LANGUAGE=VBSCRIPT CODEPAGE = 1252 %>
<!--#include file="..\constant.inc"-->
<!--#include file="../lib/session.inc"-->
<% SendHeader 0, 1 %>
<!--#include file="../lib/jsutil.inc"-->
<!--#include file="../lib/getrend.inc"-->
<!--#include file="../forms/ipm/schedule/meeting/Request/mrutil.inc"-->
<%
'<!--Microsoft Outlook Web Access-->
'<!--set.asp : User Options-->
'<!--Copyright (c) Microsoft Corporation 1993-1997. All rights reserved.-->
On Error Resume Next
CheckSession
szCommand = Request.Form("cmd")
szOOFText = Request.Form("reply")
If szOOFText <> "" then
If isMSIE then
If isMAC then
If getVersion() < 4 then
szOOFText = Replace(szOOFText,vbCRLF + chr(10), vbCRLF)
End If
End If
End If
End If
szOOF = Request.Form("rad")
iFirstDOW = CInt(Request.Form("firstdow"))
iTimezone = CInt(Request.Form("timezone"))
szSOB = Request.Form("startofbusiness")
szCOB = Request.Form("closeofbusiness")
iBusinessDays = 0
If Ucase(Request.Form("chkSunday")) <> "" Then
iBusinessDays = iBusinessDays + ActMsgSunday
End If
If Ucase(Request.Form("chkMonday")) <> "" Then
iBusinessDays = iBusinessDays + ActMsgMonday
End If
If Ucase(Request.Form("chkTuesday")) <> "" Then
iBusinessDays = iBusinessDays + ActMsgTuesday
End If
If Ucase(Request.Form("chkWednesday")) <> "" Then
iBusinessDays = iBusinessDays + ActMsgWednesday
End If
If Ucase(Request.Form("chkThursday")) <> "" Then
iBusinessDays = iBusinessDays + ActMsgThursday
End If
If Ucase(Request.Form("chkFriday")) <> "" Then
iBusinessDays = iBusinessDays + ActMsgFriday
End If
If Ucase(Request.Form("chkSaturday")) <> "" Then
iBusinessDays = iBusinessDays + ActMsgSaturday
End If
If Ucase(Request.Form("militarytime")) <> "" Then
bMilTime = CBool(True)
Else
bMilTime = CBool(False)
End If
If Ucase(Request.Form("calstore")) <> "" Then
szCalendarStore = "SchedulePlus"
Else
szCalendarStore = "Outlook"
End If
If szOOF = "inoffice" Then
objOMSession.OutOfOffice = False
OOFFalseFlag = "Checked"
OOFTrueFlag = ""
BindData
ElseIf szOOF = "outoffice" Then
objOMSession.OutOfOffice = True
OOFTrueFlag = "Checked"
OOFFalseFlag = ""
BindData
Else
Err.Clear
Set objRenderer = GetObjectRenderer
If objOMSession.OutOfOffice = True Then
OOFTrueFlag = "Checked"
OOFFalseFlag = ""
Else
OOFFalseFlag = "Checked"
OOFTrueFlag = ""
End If
szOOFText = objOMSession.OutOfOfficeText
iFirstDOW = objOMSession.GetOption("FirstDayOfWeek")
iTimezone = objOMSession.GetOption("TimeZone")
bMilTime = CBool(objOMSession.GetOption("Is24HourClock"))
szCalendarStore = objOMSession.GetOption("CalendarStore")
szSOB = FormatDateTime(objOMSession.GetOption("BusinessDayStartTime"), vbShortTime)
szCOB = FormatDateTime(objOMSession.GetOption("BusinessDayEndTime"), vbShortTime)
iBusinessDays = objOMSession.GetOption("WorkingDays")
End If
Sub BindData
On Error Resume Next
objOMSession.OutOfOfficeText = szOOFText
If Err.Number <> 0 then
ReportError1 L_errFailOOFSettings_ErrorMessage
End If
objOMSession.SetOption "FirstDayOfWeek", iFirstDOW
objOMSession.SetOption "TimeZone", iTimezone
objOMSession.SetOption "Is24HourClock", bMilTime
objOMSession.SetOption "CalendarStore", szCalendarStore
objOMSession.SetOption "WorkingDays", iBusinessDays
If szSOB <> "" Then
nStartTime = ParseTime (szSOB)
nStartHour = nStartTime \ 60
nStartMinute = nStartTime Mod 60
objOMSession.SetOption "BusinessDayStartTime", TimeSerial(nStartHour, nStartMinute, 0)
End If
If szCOB <> "" Then
nEndTime = ParseTime (szCOB)
nEndHour = nEndTime \ 60
nEndMinute = nEndTime Mod 60
objOMSession.SetOption "BusinessDayEndTime", TimeSerial(nEndHour, nEndMinute, 0)
End If
If Not IsEmpty(Session(bstrRenderCalendar)) Then
Set objRC = Session(bstrRenderCalendar)
If Not objRC Is Nothing Then
objRC.TimeZone = iTimeZone
objRC.FirstDayOfWeek = iFirstDOW
objRC.Is24HourClock = bMilTime
If szSOB <> "" Then
objRC.BusinessDayStartTime = TimeSerial(nStartHour, nStartMinute, 0)
End If
If szCOB <> "" Then
objRC.BusinessDayEndTime = TimeSerial(nEndHour, nEndMinute, 0)
End If
objRC.BusinessDays = iBusinessDays
End If
Set objRC = Nothing
End If
End Sub
Function AmToIdx(n)
Dim A '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
A = Array(-1, 20, 24, 23, 22, 28, 25, 26, 16, 13, 11, 7, 6, 4, 3, 2, 1, 50, 45, 43, 42, 41, 39, 37, 34, 33, 31, 30, 15, 19, 18, 21, 17, 14, 12, 10, 9, 8, 5, 0, 49, 48, 47, 46, 44, 40, 38, 36, 35, 27, 29, 32)
AmToIdx = A(n)
End Function
L_CalOptLeftCol_TABLE_Width_Number = 200 'Controls the width of the left column in calendar options
L_CalOptRightCol_TABLE_Width_Number = 350 'Controls the width of the right column in calendar options
if fEnablePasswordMenu then
' Get the Server name. This is required for calling the password
' change form using https.
thisServersName = Request.ServerVariables("SERVER_NAME")
' Get the IIS Version Number. Password changing is only supported
' in version 4 or greater.
soft = Request.ServerVariables("SERVER_SOFTWARE")
posver = Instr(soft, "/")
serverVersion = CInt(right(soft, len(soft)-posver))
end if
%>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<SCRIPT language=javascript>
var L_InvalidTime_Text = "You must specify a valid time.";
var L_EndTimeOccursBeforeStartDate_Text = "The end time you entered occurs before the start time";
function intToBool(n){
if (n == 0)
return false;
else
return true;
}
function optionsSet(){
<% If szCommand="setOptions" Then %>
self.close()
<% End If %>
}
function sendForm(){
this.document.optionForm.cmd.value='setOptions'
this.document.optionForm.submit()
}
function ParseTime(str)
{
var n = 0;
var un = 0;
var hr, mn;
var L_AMlowercaseAbbreviation_Text = "a";
var L_PMlowercaseAbbreviation_Text = "p";
var L_AMuppercaseAbbreviation_Text = "A";
var L_PMuppercaseAbbreviation_Text = "P";
for(i = 0; i < str.length; i++)
if (('0' <= str.charAt(i)) && (str.charAt(i) <= '9'))
{
un++;
n *= 10;
n += parseInt(str.charAt(i));
}
if (un == 0)
{
return -1;
}
else if ((n < 100) && (un < 3))
{
hr = n;
mn = 0;
}
else if ((n < 10000) && (un < 5))
{
hr = Math.floor(n / 100);
mn = n % 100;
}
else
{
return -1
}
if (mn > 59)
return -1;
if (hr > 24)
return -1;
if ((str.indexOf(L_AMlowercaseAbbreviation_Text) != -1) ||
(str.indexOf(L_PMlowercaseAbbreviation_Text) != -1) ||
(str.indexOf(L_AMuppercaseAbbreviation_Text) != -1) ||
(str.indexOf(L_PMuppercaseAbbreviation_Text) != -1) )
{
if (hr == 12)
hr = 0;
}
if ((str.indexOf(L_PMlowercaseAbbreviation_Text) != -1) ||
(str.indexOf(L_PMuppercaseAbbreviation_Text) != -1) )
{
hr += 12;
}
return hr * 60 + mn;
}
function TimeToStr(n)
{
L_AMPMFormat_Number = 1; // 1 = 10:00 PM / 0 = PM 10:00
L_AM_Text = "AM";
L_PM_Text = "PM";
min = new Number(100 + n % 60);
m = min.toString();
hr = Math.floor(n / 60);
if (!document.optionForm.militarytime.checked)
{
if (hr < 12)
{
ampm = L_AM_Text
}
else
{
hr -= 12;
ampm = L_PM_Text
}
if (hr % 12 == 0)
hr = 12;
h = new Number(hr);
if(L_AMPMFormat_Number)
str = h.toString() + ":" + m.substring(1,3) + " " + ampm;
else
str = ampm + " " + h.toString() + ":" + m.substring(1,3);
}
else
{
h = new Number(hr);
str = h.toString() + ":" + m.substring(1,3);
}
return str;
}
var start, end;
function UpdateTime(SF)
{
tm = ParseTime(SF.value)
if (tm == -1)
{
alert(L_InvalidTime_Text);
if (SF == document.optionForm.startofbusiness)
SF.value = TimeToStr(ParseTime(start));
else
SF.value = TimeToStr(ParseTime(end));
}
else if (ParseTime(document.optionForm.startofbusiness.value) > ParseTime(document.optionForm.closeofbusiness.value))
{
alert(L_EndTimeOccursBeforeStartDate_Text)
if (SF == document.optionForm.startofbusiness)
SF.value = TimeToStr(ParseTime(start));
else
SF.value = TimeToStr(ParseTime(end));
}
else
{
SF.value = TimeToStr(tm);
if (SF == document.optionForm.startofbusiness)
start = TimeToStr(ParseTime(SF.value));
else
end = TimeToStr(ParseTime(SF.value));
}
}
function TimeChange()
{
document.optionForm.startofbusiness.value = TimeToStr(ParseTime(document.optionForm.startofbusiness.value))
document.optionForm.closeofbusiness.value = TimeToStr(ParseTime(document.optionForm.closeofbusiness.value))
}
<% if fEnablePasswordMenu and serverVersion >= 4 then %>
// changePassword()
//
// A javascript fucntion for pulling up the change password dialog.
//
function changePassword(){
openNewWindow("https://<%=thisServersName%>/iisadmpwd/aexp2b.htr","newMessageWindow",355,350);
}
<% end if %>
</SCRIPT>
<TITLE>Options</TITLE>
</HEAD>
<body bgcolor=c0c0c0 text=000000 link=white vlink=white alink=white leftmargin=8 topmargin=8 onLoad="optionsSet()">
<form name="optionForm" ACTION="set.asp" METHOD=POST onSubmit="return(false)">
<input type="hidden" name=cmd value="">
<table border=0 cellpadding=5 cellspacing=0 width="100%">
<tr bgcolor="#707070"> <td align="left" colspan=2><font size=6
color="white"><b>Options</b></font></td> </tr>
<tr bgcolor="c0c0c0"> <td align="left" colspan=2><b>Out of Office
Assistant</b></td> </tr>
<tr> <td align="left" nowrap> <INPUT TYPE="radio" name="rad"
value="inoffice" <%=OOFFalseFlag%> >I am currently In the Office </td>
<td></td> </tr>
<tr> <td align="left" nowrap> <INPUT TYPE="radio" name="rad"
value="outoffice" <%=OOFTrueFlag%> >I am currently Out of the Office
</td></tr>
<tr> <td colspan=2 align="left" nowrap>AutoReply only once to each
sender with the following text: </td> </tr>
<tr> <td colspan=2 align="left"> <font size=<%=iFontSize%>><TEXTAREA rows=8 cols=60 wrap="virtual"
name="reply"><% objRenderer.Write szOOFText, Response%></TEXTAREA></font> </td>
</tr>
<tr><td width="100%"><hr width="100%"></td></tr>
<% if serverVersion >= 4 then %>
<tr><td width="100%">
<b>New password:</b>
<input type=button value="Change Password..." onclick="changePassword()">
</td></tr>
<tr><td width="100%"><hr width="100%"></td></tr>
<%end if%>
<tr bgcolor="c0c0c0"> <td align="left" colspan=2><b>Current time zone</b></td></tr>
<tr><td><font size=<%=iFontSize%>>
<SELECT NAME=timezone>
<!-- 0 --><OPTION VALUE="39">(GMT-12:00) Eniwetok, Kwajalein
<!-- 1 --><OPTION VALUE="16">(GMT-11:00) Midway Island, Samoa
<!-- 2 --><OPTION VALUE="15">(GMT-10:00) Hawaii
<!-- 3 --><OPTION VALUE="14">(GMT-09:00) Alaska
<!-- 4 --><OPTION VALUE="13">(GMT-08:00) Pacific Time (US & Canada); Tijuana
<!-- 5 --><OPTION VALUE="38">(GMT-07:00) Arizona
<!-- 6 --><OPTION VALUE="12">(GMT-07:00) Mountain Time (US & Canada)
<!-- 7 --><OPTION VALUE="11">(GMT-06:00) Central Time (US & Canada)
<!-- 8 --><OPTION VALUE="37">(GMT-06:00) Mexico City, Tegucigalpa
<!-- 9 --><OPTION VALUE="36">(GMT-06:00) Saskatchewan
<!-- 10 --><OPTION VALUE="35">(GMT-05:00) Bogota, Lima
<!-- 11 --><OPTION VALUE="10">(GMT-05:00) Eastern Time (US & Canada)
<!-- 12 --><OPTION VALUE="34">(GMT-05:00) Indiana (East)
<!-- 13 --><OPTION VALUE="09">(GMT-04:00) Atlantic Time (Canada)
<!-- 14 --><OPTION VALUE="33">(GMT-04:00) Caracas, La Paz
<!-- 15 --><OPTION VALUE="28">(GMT-03:30) Newfoundland
<!-- 16 --><OPTION VALUE="08">(GMT-03:00) Rio de Janeiro
<!-- 17 --><OPTION VALUE="32">(GMT-03:00) Buenos Aires, Georgetown
<!-- 18 --><OPTION VALUE="30">(GMT-02:00) Mid-Atlantic
<!-- 19 --><OPTION VALUE="29">(GMT-01:00) Azores, Cape Verde Is.
<!-- 20 --><OPTION VALUE="01">(GMT) Greenwich Mean Time; Dublin, Edinburgh, London
<!-- 21 --><OPTION VALUE="31">(GMT) Monrovia, Casablanca
<!-- 22 --><OPTION VALUE="04">(GMT+01:00) Berlin, Stockholm, Rome, Bern, Brussels, Vienna
<!-- 23 --><OPTION VALUE="03">(GMT+01:00) Paris, Madrid
<!-- 24 --><OPTION VALUE="02">(GMT+01:00) Lisbon, Warsaw
<!-- 25 --><OPTION VALUE="06">(GMT+01:00) Prague
<!-- 26 --><OPTION VALUE="07">(GMT+02:00) Athens, Helsinki, Istanbul
<!-- 27 --><OPTION VALUE="49">(GMT+02:00) Cairo
<!-- 28 --><OPTION VALUE="05">(GMT+02:00) Eastern Europe
<!-- 29 --><OPTION VALUE="50">(GMT+02:00) Harare, Pretoria
<!-- 30 --><OPTION VALUE="27">(GMT+02:00) Israel
<!-- 31 --><OPTION VALUE="26">(GMT+03:00) Baghdad, Kuwait, Nairobi, Riyadh
<!-- 32 --><OPTION VALUE="51">(GMT+03:00) Moscow, St. Petersburg
<!-- 33 --><OPTION VALUE="25">(GMT+03:30) Tehran
<!-- 34 --><OPTION VALUE="24">(GMT+04:00) Abu Dhabi, Muscat, Tbilisi, Kazan, Volgograd
<!-- 35 --><OPTION VALUE="48">(GMT+04:30) Kabul
<!-- 36 --><OPTION VALUE="47">(GMT+05:00) Islamabad, Karachi, Sverdlovsk, Tashkent
<!-- 37 --><OPTION VALUE="23">(GMT+05:30) Bombay, Calcutta, Madras, New Delhi, Colombo
<!-- 38 --><OPTION VALUE="46">(GMT+06:00) Almaty, Dhaka
<!-- 39 --><OPTION VALUE="22">(GMT+07:00) Bangkok, Jakarta, Hanoi
<!-- 40 --><OPTION VALUE="45">(GMT+08:00) Beijing, Chongqing, Urumqi
<!-- 41 --><OPTION VALUE="21">(GMT+08:00) Hong Kong, Perth, Singapore, Taipei
<!-- 42 --><OPTION VALUE="20">(GMT+09:00) Tokyo, Osaka, Sapporo, Seoul, Yakutsk
<!-- 43 --><OPTION VALUE="19">(GMT+09:30) Adelaide
<!-- 44 --><OPTION VALUE="44">(GMT+09:30) Darwin
<!-- 45 --><OPTION VALUE="18">(GMT+10:00) Brisbane, Melbourne, Sydney
<!-- 46 --><OPTION VALUE="43">(GMT+10:00) Guam, Port Moresby, Vladivostok
<!-- 47 --><OPTION VALUE="42">(GMT+10:00) Hobart
<!-- 48 --><OPTION VALUE="41">(GMT+11:00) Magadan, Soloman Is., New Caledonia
<!-- 49 --><OPTION VALUE="40">(GMT+12:00) Fiji, Kamchatka, Marshall Is.
<!-- 50 --><OPTION VALUE="17">(GMT+12:00) Wellington, Auckland
</SELECT>
</font>
</td></tr>
<tr><td width="100%"><hr width="100%"></td></tr>
<tr><td width="100%" colspan=2><b>Calendar Options</b></td></tr>
<tr> <td colspan=2>
<table cols=2 border=0 bordercolor=000000 cellpadding=0 cellspacing=4 width="100%">
<th align=right width=<%=L_CalOptLeftCol_TABLE_Width_Number%>></th><th align=left width=<%=L_CalOptRightCol_TABLE_Width_Number%>>
<tr>
<td align=right>Display 24-hour clock:</td>
<td align=left><INPUT TYPE=CHECKBOX NAME=militarytime onClick='TimeChange()'></td>
</tr>
<tr>
<td align=right>Week begins on:</td>
<td align=left><font size=<%=iFontSize%>>
<SELECT NAME=firstdow>
<OPTION VALUE="7">Sunday
<OPTION VALUE="1">Monday
<OPTION VALUE="2">Tuesday
<OPTION VALUE="3">Wednesday
<OPTION VALUE="4">Thursday
<OPTION VALUE="5">Friday
<OPTION VALUE="6">Saturday
</SELECT></font>
</td>
</tr>
<tr>
<td align=right>Business day begins at:</td>
<td align=left><font size=<%=iFontSize%>><INPUT TYPE=TEXT SIZE=12 NAME=startofbusiness onChange='UpdateTime(document.optionForm.startofbusiness)'></font>
ends at:
<font size=<%=iFontSize%>><INPUT TYPE=TEXT SIZE=12 NAME=closeofbusiness onChange='UpdateTime(document.optionForm.closeofbusiness)'>
</font>
</td>
</tr>
<tr><td align=right>Business days:</td>
<td align=left>
<INPUT TYPE=CHECKBOX NAME=chkSunday> S
<INPUT TYPE=CHECKBOX NAME=chkMonday> M
<INPUT TYPE=CHECKBOX NAME=chkTuesday> T
<INPUT TYPE=CHECKBOX NAME=chkWednesday> W
<INPUT TYPE=CHECKBOX NAME=chkThursday> T
<INPUT TYPE=CHECKBOX NAME=chkFriday> F
<INPUT TYPE=CHECKBOX NAME=chkSaturday> S
</td></tr>
<tr><td align=right>Use Microsoft Schedule+<br> as my primary calendar:</td>
<td align=left>
<INPUT TYPE=CHECKBOX NAME=calstore>
</td></tr>
</table>
</td></tr>
<tr> <td colspan=2 align="middle"> <input type="button" value="OK"
onClick="sendForm()"> <input type="button" value="Cancel"
onClick="self.close()"> <input type="button" value="Help"
onClick="openNewWindow('../help/USEROPTS.HTM','inlineHelpWindow',600, 400)"> </td> </tr>
</table>
</form>
<SCRIPT LANGUAGE="JavaScript">
<% if iFirstDOW = 7 then %>
document.optionForm.firstdow.selectedIndex = 0;
<% else %>
document.optionForm.firstdow.selectedIndex = <% =iFirstDOW %>;
<% end if %>
document.optionForm.timezone.selectedIndex = <% = AmToIdx(iTimezone) %>;
document.optionForm.militarytime.checked = <% if bMilTime then %> true <% else %> false <% end if %>;
document.optionForm.startofbusiness.value = TimeToStr(ParseTime("<% =szSOB %>"));
document.optionForm.closeofbusiness.value = TimeToStr(ParseTime("<% =szCOB %>"));
<% if szCalendarStore = "Outlook" then %>
document.optionForm.calstore.checked = false
<% else %>
document.optionForm.calstore.checked = true
<% end if %>
document.optionForm.chkSunday.checked = intToBool(<%=(iBusinessDays And ActMsgSunday) %>)?true:false;
document.optionForm.chkMonday.checked = intToBool(<%=(iBusinessDays And ActMsgMonday) %>)?true:false;
document.optionForm.chkTuesday.checked = intToBool(<%=(iBusinessDays And ActMsgTuesday) %>)?true:false;
document.optionForm.chkWednesday.checked = intToBool(<%=(iBusinessDays And ActMsgWednesday) %>)?true:false;
document.optionForm.chkThursday.checked = intToBool(<%=(iBusinessDays And ActMsgThursday) %>)?true:false;
document.optionForm.chkFriday.checked = intToBool(<%=(iBusinessDays And ActMsgFriday) %>)?true:false;
document.optionForm.chkSaturday.checked = intToBool(<%=(iBusinessDays And ActMsgSaturday) %>)?true:false;
start = TimeToStr(ParseTime("<% =szSOB %>"));
end = TimeToStr(ParseTime("<% =szCOB %>"));
</SCRIPT>
</body>
</html>