%@ Language=VBScript %> <% Option Explicit %> <% '------------------------------------------------------------------------- ' quota_quota.asp: manage default quotas on the volume ' ' Copyright (c) Microsoft Corporation. All rights reserved. ' ' Date Description ' 17-Jan-01 Creation date ' 15-Mar-01 Ported to 2.0 '------------------------------------------------------------------------- %> <% '------------------------------------------------------------------------- ' Global Variables '------------------------------------------------------------------------- Dim G_nRadioChecked ' to set radioButton values - contains 1 or 2 only Dim SOURCE_FILE ' the source file name used while Tracing SOURCE_FILE = SA_GetScriptFileName() '------------------------------------------------------------------------- ' Global Constants '------------------------------------------------------------------------- Const CONST_ENABLE_QUOTA_MGMT = 1 ' Enable quota management Const CONST_DISABLE_QUOTA_MGMT = 0 ' Disable quota management Const CONST_ENFORCE_QUOTA_LIMIT = 2 ' Deny DiskSpace if user exceeds limit '------------------------------------------------------------------------- ' Global Form Variables '------------------------------------------------------------------------- Dim F_strVolName ' Volume Name Dim F_nChkEnableQuotaMgmt ' set disk management state checkBox Dim F_blnChkDenyDiskSpace ' Enable deny disk space checkBox Dim F_blnChkEnableLogEventExceedQuotaLimit ' Log if user exceeds quota limit checkBox Dim F_blnChkEnableLogEventExceedWarningLimit ' Log if user exceeds warning limit checkBox Dim F_LimitSize ' Disk limit size - textBox value Dim F_LimitUnits ' Disk limit size units - comboBox value Dim F_ThresholdSize ' Warning level set for the user - textBox value Dim F_ThresholdUnits ' WarningLimit Uunits for the warning level set - comboBox Value '====================================================== ' Entry point '====================================================== Dim page DIM L_PAGETITLE_QUOTA_QUOTA_TEXT ' get the volumename to append to title Call getVolumeName() ' append the volume name to the title Dim arrVarReplacementStrings(2) arrVarReplacementStrings(0) = getVolumeLabelForDrive(F_strVolName) arrVarReplacementStrings(1) = F_strVolName ' append the volume name to the title L_PAGETITLE_QUOTA_QUOTA_TEXT = SA_GetLocString("diskmsg.dll", "403E0047", arrVarReplacementStrings) Dim aPageTitle(2) aPageTitle(0) = L_BROWSERCAPTION_DEFAULTQUOTA_TEXT aPageTitle(1) = L_PAGETITLE_QUOTA_QUOTA_TEXT ' ' Create a Property Page Call SA_CreatePage( aPageTitle, "", PT_PROPERTY, page ) ' ' Serve the page Call SA_ShowPage( page ) '====================================================== ' Web Framework Event Handlers '====================================================== '--------------------------------------------------------------------- ' Function name: OnInitPage ' Description: Called to signal first time processing for this page ' Input Variables: Out: PageIn ' Out: EventArg ' Output Variables: None ' Return Values: TRUE to indicate initialization was successful. ' FALSE to indicate errors. Returning FALSE will ' cause the page to be abandoned. ' Global Variables: None ' Functions Called: getValuesForDefault ' ' Get ALL the initial form field settings '--------------------------------------------------------------------- Public Function OnInitPage(ByRef PageIn, ByRef EventArg) Call SA_TraceOut(SOURCE_FILE, "OnInitPage") ' Call the function to get the default values OnInitPage = getValuesForDefault ' True /False End Function '--------------------------------------------------------------------- ' Function name: OnServePropertyPage ' Description: Called when the page needs to be served ' Input Variables: Out: PageIn ' Out: EventArg ' Output Variables: None ' Return Values: TRUE to indicate no problems occured. FALSE to ' indicate errors. Returning FALSE will cause the ' page to be abandoned. ' Global Variables: In: F_(*) - Form field values ' In: L_(*) - Text display strings ' In: G_nRadioChecked - radio to be selected ' Functions Called: (i)ServeCommonJavaScript, (ii)setUnits ' ' The UI is served here. '--------------------------------------------------------------------- Public Function OnServePropertyPage(ByRef PageIn, ByRef EventArg) Call SA_TraceOut(SOURCE_FILE, "OnServePropertyPage") ' ' Emit Javascript functions required by Web Framework Call ServeCommonJavaScript() %>
CONST_DISABLE_QUOTA_MGMT Then Response.write "CHECKED" Else Response.Write "UNCHECKED" End If %> > <%=L_ENABLE_QUOTA_MGMT_TEXT %> | |
> <%=L_DENY_DISK_SPACE_TEXT %> | |
<%=L_SELECT_DEFAULT_QUOTA_TEXT %> | |
onClick="JavaScript:DisableWarnLevel(warndisksize, warndisksizeunits); DisableLimitLevel(limitdisksize, limitdisksizeunits)"> <% =L_DONOTLIMITDISKUSAGE_TEXT %> |
|
onClick="JavaScript:EnableWarnDiskSpace(warndisksize,warndisksizeunits); EnableLimitDiskSpace(limitdisksize, limitdisksizeunits) "> <% =L_SETLIMITDISKSPACE_TEXT %> | |
<% =L_SETWARNINGLEVEL_TEXT %> | |
<%=L_SELECT_QUOTA_LOGGING_TEXT %> | |
> <%=L_ENABLE_QUOTA_LOGGING_TEXT %> | |
> <%=L_ENABLE_WARNING_LOGGING_TEXT %> |