% '------------------------------------------------------------------------- ' share_Appletalknew.asp: Serves to create Appletalk share ' ' Copyright (c) Microsoft Corporation. All rights reserved. ' ' Date Description ' 09-03-2001 Creation date ' 25-03-2001 Modified date '------------------------------------------------------------------------- '------------------------------------------------------------------------- 'Form Variables '------------------------------------------------------------------------- Dim F_txtUsersAllowed 'Number of Users given permission Dim F_txtPWD 'Password for the appletalk share Dim F_txtConfirmPWD 'Confirm password for the appletalk share Dim F_chkRead 'Read only access Dim F_strAllowUsersDisable 'Disable the text box for Maximum Users selected '------------------------------------------------------------------------- 'Global Variables '----------------------------------------------------------------------------------------- Dim G_chkReadOnly 'Checked or Unchecked status of "Readonly" checkbox Dim G_radNoOfUserAllowedAppleTalk 'Access to specified number of users Dim G_radMaxUserAllowedAppleTalk 'Access to unlimited users '------------------------------------------------------------------------- ' Function name: ServeAppleTalkPage ' Description: Holds the Javascript and HTML code ' Input Variables: None ' Output Variables: None ' Return Values: True/False ' Global Variables: F_*,G_*,L_* '------------------------------------------------------------------------- Public Function ServeAppleTalkPage() Call SA_TraceOut("share_AppleTalkNew.asp","ServeAppleTalkPage") 'Emits common javascript functions Call ServeAppletalkCommonJavascript() 'Emits page UI for this page Call ServePageUI() ServeAppleTalkPage = true End Function '------------------------------------------------------------------------- ' Function name: AppleTalkOnPostBackPage ' Description: Serves in getting the values from previous form ' Input Variables: None ' Output Variables: None ' Return Values: None ' Global Variables: Out: G_radMaxUserAllowedAppleTalk ' Out: G_radNoOfUserAllowedAppleTalk ' Out: F_txtUsersAllowed ' Out: F_txtPWD ' Out: G_chkReadOnly '------------------------------------------------------------------------- Function AppleTalkOnPostBackPage() Call SA_TraceOut("share_AppleTalkNew.asp","AppleTalkOnPostBackPage") G_radMaxUserAllowedAppleTalk = Request.Form("hdnradMaxAllowedAppleTalk") G_radNoOfUserAllowedAppleTalk = Request.Form("hdnradNoOfUserAllowedAppleTalk") F_txtUsersAllowed = Request.Form("txtUsersAllowed") F_txtPWD = Request.Form("txtSetPwd") F_txtConfirmPWD = Request.Form("txtConfirmPwd") G_chkReadOnly = Request.Form("hdnchkReadOnly") End Function '------------------------------------------------------------------------- ' Function name: AppleTalkOnInitPage ' Description: Serves in getting the values from system ' Input Variables: None ' Output Variables: None ' Return Values: True/False ' Global Variables: None '------------------------------------------------------------------------- Function AppleTalkOnInitPage() Call SA_TraceOut("share_AppleTalkNew.asp","AppleTalkOnInitPage") G_radMaxUserAllowedAppleTalk = CONST_CHECKED G_radNoOfUserAllowedAppleTalk = CONST_UNCHECKED AppleTalkOnInitPage = True End Function '---------------------------------------------------------------------------- 'Function name: SetShareforAppleTalk 'Description: Serves in updating existing Appletalk share 'Input Variables: strShareName holds appletalk share name ' strSharePath holds appletalk share path 'Output Variables: None 'Returns: True/False 'GlobalVariables: In : G_(*), F_* ' Out : L_(*) '---------------------------------------------------------------------------- Function SetShareforAppleTalk(strShareName, strSharePath) Err.Clear On Error Resume Next Dim strQueryForCmd 'holds query to be executed at command Dim nReturnValue 'holds return value Call SA_TraceOut("share_AppleTalkNew.asp","SetShareforAppleTalk") SetShareforAppleTalk = False 'Forming the Command line Query strQueryForCmd = "VOLUME /SET /NAME:" & chr(34) & strShareName & chr(34) 'Check whether "Readonly" checkbox is checked and append the query with the READONLY switch If (UCase(G_chkReadOnly) = UCase("CHECKED")) Then strQueryForCmd = strQueryForCmd & " /READONLY:TRUE" Else strQueryForCmd = strQueryForCmd & " /READONLY:FALSE" End If 'Check whether password is entered and append the query with the PASSWORD switch strQueryForCmd = strQueryForCmd & " /PASSWORD:" & F_txtPWD 'Check whether Maxusers Option button is checked and append the query with the MAXUSERS switch If UCase(G_radMaxUserAllowedAppleTalk) = UCase("CHECKED") Then strQueryForCmd = strQueryForCmd & " /MAXUSERS:UNLIMITED" Else strQueryForCmd = strQueryForCmd & " /MAXUSERS:" & F_txtUsersAllowed End If 'Calling the UpdateAppleTalkShare present in inc_shares.asp to launch the 'command line Query nReturnValue = UpdateAppleTalkShare(strQueryForCmd) If nReturnValue = True Then SetShareforAppleTalk = True End If End Function '------------------------------------------------------------------------- 'Function: ServePageUI 'Description: Serves User Interface for the page 'Input Variables: None 'Output Variables: None 'Returns: None 'Global Variables: F_*,G_*,L_* '------------------------------------------------------------------------- Function ServePageUI() %>
<%=L_USERLIMIT_TEXT%> | |
OnClick ="MaximumAllowed()" > <%=L_MAXIMUMALLOWED_TEXT%> | |
OnClick ="UsersAllowed()"> <%=L_ALLOW_TEXT%> tabindex="2" OnKeypress="OnlyNumbers()" ><%=L_USERS_TEXT%> | |
<%=L_APPLETALK_SECURITY_TXT%> | |
<%=L_SETPWD_TXT%> | |
<%=L_CONFIRMPWD_TXT%> | |
onClick="ReadOnlyStatus()"><%=L_READ_TXT%> |