home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 April / VPR0004A.BIN / WMTECH / wmserver.exe / 1033 / RCDATA / CABINET / uniprof_src.inc < prev    next >
Text File  |  1999-11-15  |  42KB  |  1,332 lines

  1. '////////////////////////////////////////////////////////////////////
  2. '//
  3. '// Source File uniprof_src.htm
  4. '//
  5. '// Windows Media Administrator, ver 3.0
  6. '// Copyright 2/4/98 Microsoft Corporation
  7. '//
  8. '////////////////////////////////////////////////////////////////////
  9.  
  10. Dim L_TenAsterisks_Text
  11.     L_TenAsterisks_Text = "**********"
  12.  
  13. Dim L_CannotApplyLogDir_Text
  14.     L_CannotApplyLogDir_Text = "ログ ファイル ディレクトリを適用できません。"
  15.  
  16. Dim L_PathTooShort_Text 
  17. L_PathTooShort_Text = "パスが短すぎます。"
  18.  
  19.  
  20. Dim L_PathNotValid_Text 
  21. L_PathNotValid_Text = "ログ ファイル パスが無効です。"
  22.  
  23.  
  24. Dim L_PathInvalidChars1_Text
  25.    L_PathInvalidChars1_Text = "ログ ファイル パスに無効な文字が見つかりました。"
  26.  
  27. Dim L_PathInvalidChars2_Text
  28.    L_PathInvalidChars2_Text = "無効な文字には、(*)、(?)、(|)、(/)、(<)、(>)、および引用符が含まれています。 " 
  29.  
  30. Dim L_PathNotValid2_Text
  31.    L_PathNotValid2_Text = "パスを有効にするには、「\\」 で始めるか、「ドライブ名:\」 形式にしてください。ドライブ名には A から Z のアルファベットを適用します。"
  32. Dim L_WrongPassword_Text
  33.     L_WrongPassword_Text = "入力されたパスワードは間違っています。正しいパスワードを入力してください。"
  34. Dim L_ConfirmPassword_Text
  35.     L_ConfirmPassword_Text = "[配布認証] タブをクリックして指定したパスワードを確認してください。"
  36. Dim L_ProxyNameRequired_Text
  37.     L_ProxyNameRequired_Text = "プロキシ名が必要です。"
  38. Dim L_UserNameRequired_Text
  39.     L_UserNameRequired_Text = "ユーザー名が必要です。"
  40. Dim L_PasswordRequired_Text
  41.     L_PasswordRequired_Text = "パスワードが必要です。"        
  42. Dim L_PageHeader_Text
  43.     L_PageHeader_Text = "サーバーの設定 -  サーバー プロパティ"
  44. Dim L_CurrentValue_Text
  45.     L_CurrentValue_Text = "現在の値 :  "    
  46. Dim L_MaxClients_Text
  47.     L_MaxClients_Text = "最大クライアント数 :" 
  48. Dim L_Clients_Text
  49.     L_Clients_Text = "クライアント"
  50. Dim L_MaxBandWidth_Text
  51.     L_MaxBandWidth_Text = "最大帯域幅 : "
  52. Dim L_MaxBandUnit_Text
  53.     L_MaxBandUnit_Text = "kbps"
  54. Dim L_MaxFileBitrate_Text
  55.     L_MaxFileBitrate_Text = "最大ファイル転送率 : "
  56. Dim L_Apply_Text
  57.     L_Apply_Text = "適用"
  58. Dim L_PeriodTime_Text
  59.     L_PeriodTime_Text = "間隔 :"
  60. Dim L_Refresh_Text
  61.     L_Refresh_Text = "更新"
  62. Dim L_General_Text
  63.     L_General_Text = "全般"
  64. Dim L_PubPointSecurity_Text
  65.     L_PubPointSecurity_Text =  "公開ポイント セキュリティ"
  66. Dim L_DistAuthentication_Text
  67.     L_DistAuthentication_Text =  "配布認証"
  68. dim L_PubPointLogging_Text
  69.     L_PubPointLogging_Text = "公開ポイント ログ収集"
  70. Dim L_EnableACL_Text
  71.     L_EnableACL_Text = "Access Control List (ACL) による確認を行う"
  72. Dim L_EnableAuth_Text
  73.     L_EnableAuth_Text = "サーバー認証を使う"
  74. Dim L_Proxy_Text
  75.     L_Proxy_Text = "プロキシ : "
  76. Dim L_BandLessThanBitRate_Text 
  77.     L_BandLessThanBitRate_Text =   "最大ファイル転送率より低い値が最大帯域幅に指定されています。"
  78. Dim L_UserID_Text
  79.     L_UserID_Text = "ユーザー ID : "
  80. Dim L_NewPassword_Text
  81.     L_NewPassword_Text = "パスワード : "
  82.  
  83. Dim L_ChooseEnable_Text
  84.     L_ChooseEnable_Text = "ユニキャスト イベントのログをテキスト ファイルに記録するには、[ログを収集] を選択してください。新しいログ ファイルは、毎日、毎週、または毎月作成されるように設定したり、指定した大きさになったときに作成されるように設定することができます。ログ ディレクトリへのパスは、現在管理しているサーバー上のディレクトリに作成します。Windows Media ログ ファイルの内容については、"
  85. Dim L_ChooseEnable2_Text
  86.     L_ChooseEnable2_Text =  "ここをクリック"
  87. Dim L_EnableLog_Text
  88.     L_EnableLog_Text = "ログを収集"
  89. Dim L_Daily_Text
  90.     L_Daily_Text = "毎日"
  91. Dim L_Weekly_Text
  92.     L_Weekly_Text = "毎週"
  93. Dim L_Monthly_Text
  94.     L_Monthly_Text = "毎月"
  95. Dim L_Period_Text
  96.     L_Period_Text = "ファイルが次のサイズに達した時に保存 :"
  97. Dim L_LogUnit_Text
  98.     L_LogUnit_Text = "KB"
  99. Dim L_LogFileDir_Text
  100.     L_LogFileDir_Text = "ログ ファイル ディレクトリ"
  101. Dim L_DirNote_Text
  102.     L_DirNote_Text = "(ディレクトリは現在管理している Windows Media サーバーから参照されました)"
  103. Dim RestartUnicast
  104.     RestartUnicast=false
  105. 'Constants
  106. Dim    NSOADM_PLUGIN_ERROR
  107.     NSOADM_PLUGIN_ERROR=1
  108. Dim    NSOADM_PLUGIN_LOADED
  109.     NSOADM_PLUGIN_LOADED=2
  110. Dim    NSOADM_PLUGIN_ENABLED
  111.     NSOADM_PLUGIN_ENABLED=4
  112. Dim    NSOADM_PLUGIN_RUNNING
  113.     NSOADM_PLUGIN_RUNNING=8
  114. Dim    NSOADM_PLUGIN_LOAD_NEXT_RESTART
  115.     NSOADM_PLUGIN_LOAD_NEXT_RESTART=16
  116. Dim    NSOADM_PLUGIN_UNLOAD_NEXT_RESTART
  117.     NSOADM_PLUGIN_UNLOAD_NEXT_RESTART=32
  118. Dim Authenabled
  119. Dim AuthPending
  120. Dim SelPackCLSID
  121. Dim L_AuthenticationPkg_Text
  122.     L_AuthenticationPkg_Text = "認証パッケージ"
  123. Dim L_ChangeAuth1_Text
  124.     L_ChangeAuth1_Text ="このサーバーの認証設定を変更する選択がなされました。"
  125. Dim L_ChangeAuth2_Text
  126.     L_ChangeAuth2_Text =  "設定を変更してもよろしいですか。"
  127. Dim L_RequireMember1_Text
  128.     L_RequireMember1_Text = "このオプションが正常に動作するには、Microsoft Membership サービスをこのサーバーに"
  129. Dim L_RequreMember2_Text
  130.     L_RequireMember2_Text = "インストールして実行する必要があります。"
  131. Dim L_RequireMember3_Text
  132.     L_RequireMember3_Text = "設定を変更してもよろしいですか。"
  133. Dim L_RestartUni1_Text
  134.     L_RestartUni1_Text = "変更を有効にするには、Windows Media Unicast Service を終了して再起動する必要があります。"
  135. Dim L_RestartUni2_Text
  136.  
  137.     L_RestartUni2_Text = "警告 : Windows Media Unicast Service を再起動した後で、Windows Media アドミニストレータを再起動する必要があります。"
  138. Dim L_Pending_Text 
  139.     L_Pending_Text = "保留"
  140. Dim L_Selected_Text
  141.     L_Selected_Text = "選択済み"
  142. Dim L_RuntimeFailure_Text
  143.     L_RuntimeFialure_Text = "実行時エラー"
  144. Dim L_LoadFailure_Text
  145.     L_LoadFailure_Text = "読み込みエラー "
  146. Dim L_Active_Text
  147.     L_Active_Text = "アクティブ"
  148. Dim L_DontUseAuth_Text
  149.     L_DontUseAuth_Text = "認証を使用しない"
  150. Dim L_Status_Text
  151.     L_Status_Text = "状態"
  152. Dim L_SpecifyDirectory_Text
  153.     L_SpecifyDirectory_Text = "ログを収集する場合、ディレクトリを指定する必要があります。"
  154. Dim L_MaxFileSizeNumeric_Text
  155.     L_MaxFileSizeNumeric_Text =  "最大ファイル サイズのフィールドに数字以外の文字が含まれています。数字のみを入力してください。"
  156. Dim L_LogFileSizeLimit_Text
  157.     L_LogFileSizeLimit_Text = "ログ ファイルのサイズには 8 KB から 1,000,000 KB までの値を指定してください。"
  158. Dim L_ValidEntries_Text
  159.     L_ValidEntries_Text = "すべてのフィールドに有効な値を入力してください。"
  160. Dim L_MaxBandZero_Text
  161.     L_MaxBandZero_Text = "最大帯域幅には 0 より大きい値を指定してください。"
  162. Dim L_MaxClientZero_Text
  163.     L_MaxClientZero_Text = "最大クライアント値には、0 以上の値を指定してください。"
  164. Dim L_MaxBitRateZero_Text
  165.     L_MaxBitRateZero_Text = "最大ファイル転送率には、0 より大きい値を指定してください。"
  166.  
  167. Dim L_HTTPStreaming_Text
  168.     L_HTTPStreaming_Text = "HTTP ストリーム配信と配布"
  169. Dim L_NoHTTPStreaming_Text
  170.     L_NoHTTPStreaming_Text = "HTTP のストリーム配信または配布を使用しない"
  171. Dim L_EnableHTTPUnicast_Text
  172.     L_EnableHTTPUnicast_Text = "Windows Media ユニキャスト サービス用の HTTP ストリーミングを有効にする"
  173. Dim L_EnableHTTPMulticast_Text
  174.     L_EnableHTTPMulticast_Text = "Windows Media ステーション サービス用の HTTP 配布を有効にする"
  175. Dim L_MustRebootStream_Text
  176.     L_MustRebootStream_Text = "変更を有効にするためには、コンピュータを再起動する必要があります。"
  177. Dim L_LogFileFormat_Text
  178.     L_LogFileFormat_Text = "注 : 上記ディレクトリの Windows Media ログ ファイルは、NetShow.yymmddiii.log の形式になっています。たとえば、NetShow.980201000.log となります。"
  179.  
  180. Dim L_LocalizedFontName_Text
  181.     L_LocalizedFontName_Text = "MS Pゴシック"
  182.  
  183.  
  184.     '***********************************************************
  185.     'CODE
  186.     '***********************************************************
  187.     
  188.     
  189. Dim Sorting, Col1, Col2
  190. '------------------------------------------------------------------------------
  191. 'GENERAL TAB BEGINS
  192. '------------------------------------------------------------------------------
  193.  
  194.  
  195. Sub GetGeneralTabData()
  196. On Error Resume Next
  197.  
  198.     if(nsadmin.MaxClients > 0) Then
  199.         Maxclients.value = nsadmin.MaxClients
  200.         document.all.SelClientLimit.value = 1
  201.         Maxclients.disabled=false
  202.         Maxclients.style.backgroundColor = gMAXCLIENTS.style.backgroundColor
  203.     else
  204.         Maxclients.style.backgroundColor = document.body.bgcolor
  205.         SelClientLimit.value = -1
  206.         Maxclients.value=""    
  207.         Maxclients.disabled=true
  208.     end if
  209.     
  210.     if(nsadmin.MaxBandWidth > 0) then
  211.         Maxbitrate.value = Round(nsadmin.MaxBandWidth/1024)
  212.         BitrateLimit.value = 1
  213.         Maxbitrate.disabled=false
  214.         Maxbitrate.style.backgroundColor = gMAXBANDWIDTH.style.backgroundColor
  215.     else
  216.         BitrateLimit.value = -1
  217.         Maxbitrate.value=""    
  218.         Maxbitrate.disabled=true
  219.         Maxbitrate.style.backgroundColor = document.body.bgcolor
  220.     end if
  221.     if(nsadmin.MaxFileBitRate > 0) then
  222.         Maxfilerate.value = Round(nsadmin.MaxFileBitRate/1024)
  223.         FilerateLimit.value = 1
  224.         Maxfilerate.disabled=false
  225.         Maxfilerate.style.backgroundColor = gMAXFILEBITRATE.style.backgroundColor
  226.     else
  227.         Maxfilerate.style.backgroundColor = document.body.bgcolor
  228.         FilerateLimit.value = -1
  229.         Maxfilerate.value=""    
  230.         Maxfilerate.disabled=true
  231.     end if
  232.         
  233. End Sub
  234.  
  235.  
  236. function ActivateApply()
  237.     if(Apply.disabled) then
  238.         Apply.disabled=false
  239.     end if
  240. end function
  241.  
  242. Function ChangeSelClientLimit()
  243.     on error resume next
  244.     err.clear()
  245.  
  246.     document.all.Maxclients.value =""
  247.  
  248.  
  249.     'If user selected No Limit then grey out and set maxclients to 0xffffffff
  250.     if SelClientLimit.options(SelClientLimit.selectedIndex).Text = Top.Code.L_NoLimit_Text then
  251.         document.all.Maxclients.disabled = true
  252.         document.all.Maxclients.style.backgroundColor = document.body.bgcolor
  253.         document.all.Apply.disabled=false    
  254.         document.all.Maxclients.value = ""
  255.     else
  256.         if nsadmin.MaxClients <> -1 then
  257.             document.all.Maxclients.value = Top.Code.NSUniMgr.MaxClients
  258.         end if
  259.         document.all.Maxclients.disabled = false
  260.         document.all.Maxclients.style.backgroundColor = gMAXCLIENTS.style.backgroundColor
  261.         document.all.Apply.disabled=false
  262.     end if
  263.  
  264.     if err.number<>0 Then
  265.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  266.     end if
  267.     
  268. end function
  269.  
  270. function ChangeTxtClientLimit()
  271.     on error resume next
  272.     err.clear()
  273.  
  274.     document.all.Apply.disabled=false
  275.  
  276.     if IsNumeric(document.all.Maxclients.value) then
  277.         if (document.all.Maxclients.value - CLng(document.all.Maxclients.value)) = 0 And CLng(document.all.Maxclients.value) >= 0 then
  278.             document.all.Apply.disabled=false
  279.         else
  280.             msgbox(L_MaxClientZero_Text),vbExclamation,Top.Code.L_Title_Text
  281.             if Top.Code.NSUniMgr.MaxClients < 0 then
  282.                 document.all.Maxclients.value = ""
  283.             else
  284.                 document.all.Maxclients.value=Top.Code.NSUniMgr.MaxClients
  285.             end if
  286.         end if
  287.     else
  288.         msgbox(L_MaxClientZero_Text),vbExclamation,Top.Code.L_Title_Text
  289.         if Top.Code.NSUniMgr.MaxClients < 0 then
  290.             document.all.Maxclients.value = ""
  291.         else
  292.             document.all.Maxclients.value=Top.Code.NSUniMgr.MaxClients
  293.         end if
  294.     end if
  295.  
  296.     if err.number<>0 Then
  297.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  298.     end if
  299. end function
  300.  
  301. function ChangeSelBitrateLimit()
  302.     on error resume next
  303.     err.clear()
  304.  
  305.     document.all.Maxbitrate.value =""
  306.     
  307.     if window.event.srcElement.value <>1 then
  308.         document.all.Maxbitrate.disabled = true
  309.         document.all.Maxbitrate.style.backgroundColor = document.body.bgcolor
  310.         document.all.Apply.disabled=false
  311.         document.all.Maxbitrate.value = ""
  312.     else
  313.         if Top.Code.NSUniMgr.MaxBandWidth <> -1 then
  314.             document.all.Maxbitrate.value = Top.Code.NSUniMgr.MaxBandWidth \ 1024
  315.         end if
  316.         document.all.Maxbitrate.disabled = false
  317.         document.all.Maxbitrate.style.backgroundColor = gMAXBANDWIDTH.style.backgroundColor
  318.         document.all.Apply.disabled=false
  319.     end if
  320.  
  321.     if err.number<>0 Then
  322.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  323.     end if
  324.  
  325. end function
  326.  
  327. function ChangeSelFileRateLimit()
  328.     on error resume next
  329.     err.clear()
  330.  
  331.     document.all.Maxfilerate.value =""
  332.  
  333.     if window.event.srcElement.value <>1 then
  334.         document.all.Maxfilerate.disabled = true
  335.         document.all.Maxfilerate.style.backgroundColor = document.body.bgcolor
  336.         document.all.Apply.disabled=false        
  337.     else
  338.         if Top.Code.NSUniMgr.MaxFileBitRate <> -1 then
  339.             document.all.Maxfilerate.value = Top.Code.NSUniMgr.MaxFileBitRate \ 1024
  340.         end if
  341.         document.all.Maxfilerate.disabled = false
  342.         document.all.Maxfilerate.style.backgroundColor = gMAXFILEBITRATE.style.backgroundColor
  343.         document.all.Apply.disabled=false
  344.     end if
  345.  
  346.     if err.number<>0 Then
  347.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  348.     end if
  349.  
  350. end function
  351.  
  352. function ChangeTxtMaxbitrate()
  353.     on error resume next
  354.     err.clear()
  355.  
  356.     document.all.Apply.disabled=false
  357.  
  358.     if IsNumeric(document.all.Maxbitrate.value) then
  359.         if (document.all.Maxbitrate.value - CLng(document.all.Maxbitrate.value)) = 0 And CLng(document.all.Maxbitrate.value) > 0 then
  360.             document.all.Apply.disabled=false        
  361.         else
  362.             msgbox(L_MaxBandZero_Text),vbExclamation,Top.Code.L_Title_Text
  363.             if Top.Code.NSUniMgr.MaxBandWidth < 0 then
  364.                 document.all.Maxbitrate.value=""
  365.             else
  366.                 document.all.Maxbitrate.value=Top.Code.NSUniMgr.MaxBandWidth \ 1024                
  367.             end if
  368.         end if
  369.     else
  370.         msgbox(L_MaxBandZero_Text),vbExclamation,Top.Code.L_Title_Text
  371.         if Top.Code.NSUniMgr.MaxBandWidth < 0 then
  372.             document.all.Maxbitrate.value=""
  373.         else
  374.             document.all.Maxbitrate.value=Top.Code.NSUniMgr.MaxBandWidth \ 1024                
  375.         end if
  376.     end if        
  377.  
  378.     if err.number<>0 Then
  379.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  380.     end if
  381.  
  382. end function
  383.  
  384. function ChangeTxtMaxfilerate()
  385.     on error resume next
  386.     err.clear()
  387.  
  388.     document.all.Apply.disabled=false
  389.  
  390.  
  391.     if IsNumeric(document.all.Maxfilerate.value) then
  392.         if (document.all.Maxfilerate.value - CLng(document.all.Maxfilerate.value)) = 0 And CLng(document.all.Maxfilerate.value) > 0 then
  393.             document.all.Apply.disabled=false        
  394.         else
  395.             msgbox(L_MaxBitRateZero_Text),vbExclamation,Top.Code.L_Title_Text
  396.             if Top.Code.NSUniMgr.MaxFileBitRate < 0 then
  397.                 document.all.Maxfilerate.value=""
  398.             else
  399.                 document.all.Maxfilerate.value=Top.Code.NSUniMgr.MaxFileBitRate \ 1024
  400.             end if
  401.         end if
  402.     else
  403.         msgbox(L_MaxBitRateZero_Text),vbExclamation,Top.Code.L_Title_Text
  404.         if Top.Code.NSUniMgr.MaxFileBitRate < 0 then
  405.             document.all.Maxfilerate.value=""
  406.         else
  407.             document.all.Maxfilerate.value=Top.Code.NSUniMgr.MaxFileBitRate \ 1024
  408.         end if
  409.     end if        
  410.  
  411.     if err.number<>0 Then
  412.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  413.     end if
  414.  
  415. end function
  416.  
  417. function OnApplyGeneral()
  418.     on error resume next
  419.  
  420.     err.clear()
  421.     if (document.all.Maxfilerate.value <> "" AND document.all.Maxbitrate.value <> "") then
  422.     if (document.all.Maxfilerate.value * 1024) > (document.all.Maxbitrate.value *1024 ) then
  423.         msgbox     L_BandLessThanBitRate_Text,vbExclamation,Top.Code.L_Title_Text
  424.     end if
  425.     end if
  426.  
  427.     if document.all.FilerateLimit.value > 0 then
  428.         if Not IsNumeric(document.all.Maxfilerate.value) then
  429.             msgbox(L_MaxBitRateZero_Text),vbExclamation,Top.Code.L_Title_Text
  430.             document.all.Maxfilerate.value = ""
  431.             Call document.all.Maxfilerate.focus()
  432.             exit function    
  433.         end if
  434.         
  435.         if (document.all.Maxfilerate.value * 1024) <> top.Code.NSUniMgr.MaxFileBitRate Then
  436.                 if (document.all.Maxfilerate.value - CLng(document.all.Maxfilerate.value)) = 0 And CLng(document.all.Maxfilerate.value) > 0 then
  437.                     top.Code.NSUniMgr.MaxFileBitRate = document.all.Maxfilerate.value * 1024        
  438.                 else
  439.                     msgbox(L_MaxBitRateZero_Text),vbExclamation,Top.Code.L_Title_Text
  440.                     document.all.Maxfilerate.value = ""
  441.                     exit function
  442.                 end if
  443.             end if
  444.     
  445.     else
  446.         top.Code.NSUniMgr.MaxFileBitRate = -1
  447.     end if
  448.     
  449.     Call err.clear()
  450.  
  451.     if document.all.BitrateLimit.value > 0 then
  452.         if IsNumeric(document.all.Maxbitrate.value) then
  453.         
  454.             if (document.all.Maxbitrate.value * 1024) <> top.Code.NSUniMgr.MaxBandWidth Then
  455.                 if (document.all.Maxbitrate.value - CLng(document.all.Maxbitrate.value)) = 0 And CLng(document.all.Maxbitrate.value) > 0 then
  456.                     top.Code.NSUniMgr.MaxBandWidth = document.all.Maxbitrate.value * 1024        
  457.                 else
  458.                     msgbox(L_ZMaxBandero_Text),vbExclamation,Top.Code.L_Title_Text
  459.                     document.all.Maxbitrate.value=""
  460.                     exit function
  461.                 end if
  462.             end if
  463.         else
  464.             msgbox(L_MaxBandZero_Text),vbExclamation,Top.Code.L_Title_Text
  465.             document.all.Maxbitrate.value=""
  466.             exit function
  467.         end if 
  468.     else
  469.         top.Code.NSUniMgr.MaxBandWidth = -1
  470.         
  471.     end if
  472.     
  473.     err.clear()
  474.     
  475.     if   SelClientLimit.options(SelClientLimit.selectedIndex).Text <> Top.Code.L_NoLimit_Text then
  476.         if IsNumeric(document.all.Maxclients.value) then
  477.             if (document.all.Maxclients.value - CLng(document.all.Maxclients.value)) = 0 And CLng(document.all.Maxclients.value) >= 0 then
  478.                 top.Code.NSUniMgr.MaxClients = document.all.Maxclients.value    
  479.             else
  480.                 msgbox(L_MaxClientZero_Text),vbExclamation,Top.Code.L_Title_Text
  481.                 document.all.Maxclients.value = ""
  482.                 exit function
  483.             end if
  484.         else
  485.             msgbox(L_MaxClientZero_Text),vbExclamation,Top.Code.L_Title_Text
  486.             document.all.Maxclients.value = ""
  487.             exit function
  488.         end if 
  489.     else
  490.         top.Code.NSUniMgr.MaxClients = -1
  491.     end if
  492.  
  493.     
  494.     document.all.Apply.disabled=true    
  495. end function
  496.  
  497. function OnRefreshKey()
  498.     if window.event.keycode = 9 then
  499.         window.event.cancelbubble = true
  500.         document.all.SelClientLimit.focus()
  501.     end if
  502. end function
  503.  
  504. function OnRefreshGeneral()
  505.     on error resume next
  506.     err.clear()
  507.  
  508.     if(Top.Code.NSUniMgr.MaxClients < 0) then
  509.         document.all.SelClientLimit.value = -1
  510.         document.all.Maxclients.disabled = true
  511.         document.all.Maxclients.style.backgroundColor = document.body.bgcolor
  512.         document.all.Apply.disabled=false        
  513.         document.all.Maxclients.value = ""
  514.     else
  515.         document.all.Maxclients.value = Top.Code.NSUniMgr.MaxClients
  516.         document.all.SelClientLimit.value = 1
  517.         document.all.Maxclients.disabled = false
  518.         document.all.Maxclients.style.backgroundColor = gMAXCLIENTS.style.backgroundColor
  519.         document.all.Apply.disabled=false        
  520.     end if
  521.  
  522.     if err.number<>0 Then
  523.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  524.         err.clear()
  525.     end if
  526.  
  527.     if Top.Code.NSUniMgr.MaxBandWidth < 0 then
  528.         document.all.BitrateLimit.value = -1
  529.         document.all.Maxbitrate.disabled = true
  530.         document.all.Maxbitrate.style.backgroundColor = document.body.bgcolor
  531.         document.all.Apply.disabled=false    
  532.         document.all.Maxbitrate.value = ""
  533.     else
  534.         document.all.Maxbitrate.value=(Top.Code.NSUniMgr.MaxBandWidth \ 1024)    
  535.         document.all.BitrateLimit.value = 1
  536.         document.all.Maxbitrate.disabled = false
  537.         document.all.Maxbitrate.style.backgroundColor = gMAXBANDWIDTH.style.backgroundColor
  538.         document.all.Apply.disabled=false    
  539.     end if
  540.  
  541.     if err.number<>0 Then
  542.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  543.         err.clear()
  544.     end if
  545.  
  546.     if Top.Code.NSUniMgr.MaxFileBitRate < 0 then
  547.         document.all.FilerateLimit.value = -1
  548.         document.all.Maxfilerate.disabled = true
  549.         document.all.Maxfilerate.style.backgroundColor = document.body.bgcolor
  550.         document.all.Apply.disabled=false        
  551.         document.all.Maxfilerate.value = ""
  552.     else
  553.         document.all.Maxfilerate.value = (Top.Code.NSUniMgr.MaxFileBitRate \ 1024)
  554.         document.all.FilerateLimit.value = 1
  555.         document.all.Maxfilerate.disabled = false
  556.         document.all.Maxfilerate.style.backgroundColor = gMAXFILEBITRATE.style.backgroundColor
  557.         document.all.Apply.disabled=false        
  558.     end if
  559.  
  560.     if err.number<>0 Then
  561.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  562.     end if
  563.  
  564.     document.all.Apply.disabled=true
  565. end function
  566.  
  567. '--------------------------------------------------------------------------------------------
  568. 'GENERAL TAB ENDS
  569. '-------------------------------------------------------------------------------------------    
  570.  
  571.  
  572.  
  573.  
  574. '----------------------------------------------------------------------------------------------
  575. 'Authentication TAB Begins
  576. '---------------------------------------------------------------------------------------------
  577.  
  578.  
  579. function OnPubRefreshKey()
  580.     if window.event.keycode = 9 then
  581.         window.event.cancelbubble = true
  582.         document.all.AuthFlexGrid.focus()
  583.     end if
  584. end function
  585.  
  586. function ToggleACL() 
  587.     document.all.Authorization.Click()
  588. end function
  589.  
  590. function AuthorizationClick()
  591.     AuthApply.disabled = False
  592. end function
  593.  
  594. Sub AuthFlexGrid_SelChange()
  595.     AuthApply.disabled = False
  596. End Sub
  597.  
  598. sub AuthFlexGrid_MouseDown(a,b,XPos,YPos)
  599.     on error resume next
  600.  
  601.     Col1W=int(AuthFlexGrid.ColWidth(1)/15.12)
  602.     Col2W=int(AuthFlexGrid.ColWidth(2)/15.12)
  603.     if YPos<18 then
  604.         if XPos < Col1W then
  605.             AuthFlexGrid.Col=1
  606.             if Col1 then AuthFlexGrid.Sort=2
  607.             if not Col1 then AuthFlexGrid.Sort=1
  608.             Col1=not Col1
  609.         elseif XPos > Col1W and XPos < Col1W+Col2W  then
  610.             AuthFlexGrid.Col=2
  611.             if Col2 then AuthFlexGrid.Sort=2
  612.             if not Col2 then AuthFlexGrid.Sort=1
  613.             Col2=not Col2
  614.         end if
  615.         Sorting=true
  616.     end if
  617. end sub
  618.  
  619. function InitializePPSecurity()
  620.  
  621.     document.all.AuthFlexGrid.Cols=3
  622.     document.all.AuthFlexGrid.fontsize=10
  623.     document.all.AuthFlexGrid.ColWidth(0)=0
  624.     document.all.AuthFlexGrid.ColWidth(1)=5525
  625.     document.all.AuthFlexGrid.ColWidth(2)=1525
  626.     document.all.AuthFlexGrid.Col=1
  627.     document.all.AuthFlexGrid.Row=0
  628.     document.all.AuthFlexGrid.Text= L_AuthenticationPkg_Text
  629.     document.all.AuthFlexGrid.Col=2
  630.     document.all.AuthFlexGrid.Text= L_Status_Text
  631.     document.all.AuthFlexGrid.font.name=L_LocalizedFontName_Text
  632.     document.all.AuthFlexGrid.font.italic=false
  633.  
  634.  
  635.     RefreshPPSecurity()
  636. end function
  637. function AuthRefreshClick()
  638.  
  639.     Call Top.Menu.oList.ConnectToUni()
  640.  
  641. end function
  642.  
  643.  
  644. function RestoreState()
  645.     SET Plugins = top.code.NSUniMgr.AuthenticationPlugins
  646.     for i=0 to Plugins.count-1
  647.         Set Plugin=Plugins.item(i)
  648.         if (Plugin.Status AND NSOADM_PLUGIN_ENABLED) then
  649.             Plugin.Enabled=false    
  650.         end if
  651.     next
  652.     for i=0 to Plugins.count-1
  653.         Set Plugin=Plugins.item(i)
  654.         if (Plugin.Status AND NSOADM_PLUGIN_UNLOAD_NEXT_RESTART) then
  655.             Plugin.Enabled=true    
  656.         end if
  657.     next
  658. end function         
  659.  
  660. function RefreshPPSecurity()
  661.  
  662.     document.all.AuthFlexGrid.BackColorSel = 16777215 
  663.     Authenabled = false
  664.     ActiveRow=1
  665.     Plugins = top.code.NSUniMgr.AuthenticationPlugins.count
  666.     document.all.AuthFlexGrid.rows=Plugins+2
  667.  
  668.     'first option created here: Do not use authentication
  669.     document.all.AuthFlexGrid.row=1    
  670.     document.all.AuthFlexGrid.col=1
  671.     document.all.AuthFlexGrid.text=L_DontUseAuth_Text
  672.     document.all.AuthFlexGrid.col=2
  673.     document.all.AuthFlexGrid.text=""
  674.     nUnloadingAndRunning = 0
  675.     nloadingOnNextRestart = 0
  676.     ErrorState = false
  677.     for i=0 to Plugins-1
  678.         document.all.AuthFlexGrid.row=i+2    
  679.         document.all.AuthFlexGrid.col=1
  680.         document.all.AuthFlexGrid.text=top.code.NSUniMgr.AuthenticationPlugins.item(i).description
  681.         document.all.AuthFlexGrid.col=2
  682.         
  683.         select case top.code.NSUniMgr.AuthenticationPlugins.item(i).Status
  684.             Case 0
  685.                 document.all.AuthFlexGrid.text = ""
  686.             Case NSOADM_PLUGIN_ERROR
  687.                 document.all.AuthFlexGrid.text=L_LoadFailure_Text
  688.                 bLoadFailure = True
  689.                 ActiveRow=document.all.AuthFlexGrid.Row
  690.                 ErrorState = True
  691.             Case NSOADM_PLUGIN_RUNNING + NSOADM_PLUGIN_LOADED + NSOADM_PLUGIN_ENABLED
  692.                 document.all.AuthFlexGrid.text= L_Active_Text
  693.                 ActiveRow=document.all.AuthFlexGrid.Row
  694.             Case NSOADM_PLUGIN_LOADED + NSOADM_PLUGIN_RUNNING + NSOADM_PLUGIN_UNLOAD_NEXT_RESTART
  695.                 document.all.AuthFlexGrid.text= L_Active_Text
  696.                 bActiveRow = True
  697.                 ActiveRow=document.all.AuthFlexGrid.Row
  698.                 nUnloadingAndRunning = ActiveRow
  699.             Case NSOADM_PLUGIN_LOAD_NEXT_RESTART + NSOADM_PLUGIN_ENABLED
  700.                 document.all.AuthFlexGrid.text=L_Pending_Text
  701.                 nloadingOnNextRestart = document.all.AuthFlexGrid.Row
  702.             Case NSOADM_PLUGIN_ENABLED + NSOADM_PLUGIN_ERROR
  703.                 document.all.AuthFlexGrid.text=L_LoadFailure_Text
  704.                 bLoadFailure = True
  705.                 ActiveRow=document.all.AuthFlexGrid.Row
  706.             Case NSOADM_PLUGIN_UNLOAD_NEXT_RESTART + NSOADM_PLUGIN_ERROR
  707.                 document.all.AuthFlexGrid.text=L_LoadFailure_Text
  708.                 nUnloadingAndRunning = ActiveRow
  709.             Case NSOADM_PLUGIN_LOAD_NEXT_RESTART + NSOADM_PLUGIN_ENABLED + NSOADM_PLUGIN_ERROR
  710.                 document.all.AuthFlexGrid.text= L_Pending_Text
  711.                 nloadingOnNextRestart = document.all.AuthFlexGrid.Row
  712.             Case 35
  713.                 document.all.AuthFlexGrid.text= L_RuntimeFailure_Text
  714.         end select
  715.     next
  716.  
  717.     
  718.     document.all.AuthFlexGrid.Row=1
  719.     document.all.AuthFlexGrid.Col=2
  720.  
  721.     if ActiveRow>1 then
  722.         document.all.Authorization.disabled=false
  723.         if disabledPending then
  724.             document.all.AuthFlexGrid.text= L_Pending_Text
  725.         else
  726.             document.all.AuthFlexGrid.text=""
  727.         end if
  728.         if ACLRunning then
  729.             document.all.Authorization.checked=true
  730.         else
  731.             document.all.Authorization.checked=false
  732.         end if
  733.     else
  734.         document.all.AuthFlexGrid.text= L_Selected_Text
  735.         document.all.Authorization.disabled=true
  736.         call disableACL()
  737.     end if
  738.     If (nUnloadingAndRunning > 0 AND nloadingOnNextRestart  = 0) OR (Not AnyEnabled AND ErrorState) Then
  739.  
  740.         document.all.AuthFlexGrid.row = 1
  741.         document.all.AuthFlexGrid.col = 2
  742.         document.all.AuthFlexGrid.Text = L_Pending_Text
  743.     End If
  744.     document.all.AuthFlexGrid.Row=ActiveRow
  745.     document.all.AuthFlexGrid.Col=0
  746.     document.all.AuthFlexGrid.ColSel=2
  747.     
  748.     
  749.     if ACLRunning then
  750.         document.all.authorization.checked=true
  751.     end if
  752.     
  753.     
  754.  
  755.     document.all.AuthFlexGrid.BackColorSel=  2147483661
  756.     document.all.AuthApply.disabled = true
  757. end function
  758.  
  759. function disabledPending()
  760.     Pendingload=false
  761.     ActivePendingUnload=false
  762.     SET Plugins = top.code.NSUniMgr.AuthenticationPlugins
  763.     for i=0 to Plugins.count-1
  764.         Set Plugin=Plugins.item(i)
  765.         if (Plugin.Status AND (NSOADM_PLUGIN_LOADED + NSOADM_PLUGIN_RUNNING + NSOADM_PLUGIN_UNLOAD_NEXT_RESTART)) then
  766.             ActivePendingUnload=true
  767.         end if
  768.         if (Plugin.Status AND (NSOADM_PLUGIN_LOAD_NEXT_RESTART + NSOADM_PLUGIN_ENABLED)) then
  769.             Pendingload=true
  770.         end if
  771.     next
  772.     if (NOT PendingLoad) AND (ActivePendingUnload) then
  773.         disabledPending=true
  774.     else
  775.         disabledPending=false
  776.     end if
  777. end function
  778. function AnyEnabled()
  779.     AnyEnabled=false
  780.     SET Plugins = top.code.NSUniMgr.AuthenticationPlugins
  781.  
  782.     for i=0 to Plugins.count-1
  783.         Set Plugin=Plugins.item(i)
  784.         if Plugin.Status AND NSOADM_PLUGIN_ENABLED OR Plugin.Status = NSOADM_PLUGIN_ENABLED + NSOADM_PLUGIN_ERROR OR Plugin.Status AND NSOADM_PLUGIN_LOADED then
  785.             AnyEnabled=true
  786.             Exit Function
  787.         end if
  788.     next
  789. end function
  790. function clearAllEnables()
  791.     SET Plugins = top.code.NSUniMgr.AuthenticationPlugins
  792.     for i=0 to Plugins.count-1
  793.         Set Plugin=Plugins.item(i)
  794.  
  795.         if (Plugin.Status AND NSOADM_PLUGIN_ENABLED) then
  796.             Plugin.Enabled=false    
  797.         end if
  798.     next
  799. end function         
  800. function AuthApplyEnable(ItemNum)
  801.     SET Plugins = top.code.NSUniMgr.AuthenticationPlugins
  802.     call clearAllEnables()
  803.     Plugins.item(ItemNum).Enabled=true
  804.     if NOT document.all.authorization.disabled then
  805.         if document.all.authorization.checked then
  806.             enableACL()
  807.         else
  808.             disableACL()
  809.         end if
  810.     end if
  811.     call RefreshPPSecurity()
  812.     if RestartUnicast then
  813.         msgbox L_RestartUni1_Text & chr(13) & chr(13) & L_RestartUni2_Text ,vbExclamation,Top.Code.L_Title_Text
  814.     end if
  815. end function
  816.  
  817. function AuthApplyClick()
  818. On Error Resume Next
  819.     RestartUnicast=false
  820.     if document.all.AuthFlexGrid.row=1 then
  821.       Any = AnyEnabled
  822.         If Err.Number <> 0 Then
  823.          Call AuthRefreshClick()
  824.          Exit Function
  825.         End iF
  826.         if Any then
  827.             if msgbox (L_ChangeAuth1_Text & L_ChangeAuth2_Text & chr(13) ,292,Top.Code.L_Title_Text)=6 then
  828.                 call clearAllEnables()
  829.                 call RefreshPPSecurity()
  830.                 document.all.AuthFlexGrid.row = 1
  831.                 document.all.AuthFlexGrid.col = 2
  832.                 document.all.AuthFlexGrid.Text = L_Pending_Text
  833.             
  834.                 msgbox L_RestartUni1_Text & chr(13) & chr(13) & L_RestartUni2_Text ,vbExclamation,Top.Code.L_Title_Text
  835.             else
  836.                 Call RefreshPPSecurity()
  837.             end if
  838.         end if
  839.         exit function
  840.     end if 
  841.     ItemNum=document.all.AuthFlexGrid.row-2
  842.     selPackStat=top.code.NSUniMgr.AuthenticationPlugins.item(ItemNum).status
  843.     selPackCLSID=top.code.NSUniMgr.AuthenticationPlugins.item(ItemNum).CLSID
  844.  
  845.     if selPackstat AND (NSOADM_PLUGIN_RUNNING + NSOADM_PLUGIN_UNLOAD_NEXT_RESTART) then
  846.         RestartUnicast=false
  847.         call AuthApplyEnable(ItemNum)
  848.     end if
  849.     if selPackstat AND (NSOADM_PLUGIN_ENABLED + NSOADM_PLUGIN_RUNNING) then
  850.         exit function
  851.     end if
  852.     if selPackstat AND (NSOADM_PLUGIN_LOAD_NEXT_RESTART) then
  853.         exit function
  854.     end if
  855.     if NOT (selpack AND NSOADM_PLUGIN_ENABLED) then
  856.         if selPackCLSID="{d9df823c-4425-11d1-932c-00c04fd919b7}" then
  857.             if msgbox (L_RequireMember1_Text & Chr(13) & L_RequireMember2_Text & chr(13) & L_RequireMember3_Text ,292,Top.Code.L_Title_Text)=6 then
  858.                 RestartUnicast=true
  859.                 call AuthApplyEnable(ItemNum)
  860.                 
  861.             else
  862.                 Call RefreshPPSecurity()
  863.             end if
  864.         else
  865.             if msgbox (L_ChangeAuth1_Text & chr(13) & L_ChangeAuth2_Text ,292,Top.Code.L_Title_Text)=6 then
  866.                 RestartUnicast=true
  867.                 call AuthApplyEnable(ItemNum)
  868.             else
  869.                 Call RefreshPPSecurity()
  870.             end if
  871.         end if
  872.     end if
  873.     if document.all.Authorization.checked then
  874.         call enableACL()
  875.     else
  876.         call disableACL()
  877.     end if
  878. end function
  879. function enableACL()
  880.     Set EventPlugins = top.code.nsunimgr.EventPlugins
  881.     for i=0 to EventPlugins.count-1
  882.             if Ucase(EventPlugins.item(i).clsid)= Ucase("{A5E8B32E-442A-11D1-9EA0-006097D2D7CF}") then
  883.                 EventPlugins.item(i).Enabled=true
  884.             end if
  885.     next
  886. end function
  887. function disableACL()
  888.     Set EventPlugins = top.code.nsunimgr.EventPlugins
  889.     for i=0 to EventPlugins.count-1
  890.             if Ucase(EventPlugins.item(i).clsid)= Ucase("{A5E8B32E-442A-11D1-9EA0-006097D2D7CF}") then
  891.                 EventPlugins.item(i).Enabled=false
  892.             end if
  893.     next
  894. end function
  895. function ACLRunning()
  896.     ACLRunning=false
  897.     Set EventPlugins = top.code.nsunimgr.EventPlugins
  898.     for i=0 to EventPlugins.count-1
  899.             if Ucase(EventPlugins.item(i).clsid)= Ucase("{A5E8B32E-442A-11D1-9EA0-006097D2D7CF}") then
  900.                 if EventPlugins.item(i).Status AND NSOADM_PLUGIN_ENABLED then
  901.                     ACLRunning=true
  902.                 end if
  903.             end if
  904.     next
  905. end function
  906.  
  907. function OnDistAuthRefreshKey()
  908.     if window.event.keycode = 9 then
  909.         window.event.cancelbubble = true
  910.         document.all.EnableProxy.focus()
  911.     end if
  912. end function
  913.  
  914. function initDistAuth()
  915.     on error resume next
  916.  
  917.     document.all.EnableProxy.checked = Top.Code.NSUniMgr.EnableProxy
  918.     If Err.Number <> 0 Then
  919.         Call Top.Code.CheckCriticalError(err.number, "Unicast")
  920.         Exit Function
  921.     End If
  922.  
  923.     document.all.Proxy.value = Top.Code.NSUniMgr.ProxyHostName
  924.     If Err.Number <> 0 Then
  925.         Call Top.Code.CheckCriticalError(err.number, "Unicast")
  926.         Exit Function
  927.     End If
  928.     
  929.     document.all.UserID.value = Top.Code.NSUniMgr.ProxyUser    
  930.     
  931.     If Err.Number <> 0 Then
  932.         Call Top.Code.CheckCriticalError(err.number, "Unicast")
  933.         Exit Function
  934.     End If
  935.     
  936.     Call ToggleEnableProxy( document.all.EnableProxy.checked)
  937.     document.all.DistApply.disabled=true
  938.  
  939.     
  940.     if(document.all.UserID.value <> "" ) then
  941.         document.all.NewPassword.value = L_TenAsterisks_Text 
  942.     else
  943.         document.all.NewPassword.value = ""
  944.     end if
  945.  
  946.  
  947.     
  948. end function
  949.  
  950.  
  951. sub ToggleEnableProxy(b)
  952.     if b then
  953.         document.all.Proxy.style.backgroundColor = gPROXY.style.backgroundColor
  954.         document.all.Proxy.disabled = false
  955.         document.all.UserID.style.backgroundColor = gPROXY.style.backgroundColor
  956.         document.all.NewPassword.style.backgroundColor = gPROXY.style.backgroundColor
  957.         document.all.UserID.disabled = false
  958.         document.all.NewPassword.disabled=false
  959.         document.all.DistApply.disabled=false                
  960.     else
  961.         document.all.Proxy.style.backgroundColor = document.body.bgcolor
  962.         document.all.Proxy.disabled = true
  963.         document.all.UserID.style.backgroundColor = document.body.bgcolor
  964.         document.all.NewPassword.style.backgroundColor= document.body.bgcolor
  965.         document.all.UserID.disabled = true
  966.         document.all.NewPassword.disabled=true
  967.     end if
  968.  
  969. end sub
  970.  
  971. function OnEnableProxy()
  972.     on error resume next
  973.     Call ToggleEnableProxy(document.all.EnableProxy.checked)
  974.     document.all.DistApply.disabled=false
  975.  
  976. end function
  977.  
  978. function EnableApply()
  979.     document.all.DistApply.disabled=false
  980.         
  981.  
  982. end function
  983.  
  984. function KeyUpUserID()
  985.     
  986.     
  987.     if(document.all.UserID.value <> Top.Code.NSUniMgr.ProxyUser) then
  988.         document.all.NewPassword.value = ""
  989.         EnableApply()
  990.     end if
  991. end function    
  992.  
  993.  
  994.  
  995. function OnApplyAuthentication()
  996.     on error resume next
  997.  
  998.  
  999.     Top.Code.NSUniMgr.EnableProxy = document.all.EnableProxy.checked
  1000.     if err.number<>0 Then
  1001.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  1002.         exit function    
  1003.     end if
  1004.         
  1005.     Top.Code.NSChanMgr.EnableProxy = document.all.EnableProxy.checked
  1006.     if err.number<>0 Then
  1007.         msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  1008.         exit function    
  1009.     end if
  1010.  
  1011.         
  1012.     if document.all.EnableProxy.checked then
  1013.         if (document.all.Proxy.value = "") then
  1014.             msgbox L_ProxyNameRequired_Text, vbExclamation, Top.Code.L_Title_Text
  1015.             exit function
  1016.         end if
  1017.         
  1018.         Top.Code.NSUniMgr.ProxyHostName = CStr(document.all.Proxy.value)
  1019.         if err.number<>0 Then
  1020.             msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  1021.             exit function
  1022.         end if
  1023.         Top.Code.NSChanMgr.ProxyHostName = CStr(document.all.Proxy.value)
  1024.         if err.number<>0 Then
  1025.             msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  1026.             exit function
  1027.         end if
  1028.  
  1029.  
  1030.         if (document.all.UserID.value = "" AND document.all.NewPassword.value <> "") then
  1031.             document.all.NewPassword.value = ""
  1032.         end if
  1033.     
  1034.         if (document.all.UserID.value <> "" AND document.all.NewPassword.value = "") then
  1035.             msgbox L_PasswordRequired_Text, vbExclamation, Top.Code.L_Title_Text
  1036.             exit function
  1037.         end if
  1038.  
  1039.         if (document.all.UserID.value <> "" AND document.all.NewPassword.value <> "") then
  1040.     
  1041.          if (Top.Code.NSUniMgr.ProxyUser    <> document.all.UserID.value AND document.all.UserID.value <> "" ) OR (document.all.NewPassword.value <> "**********") then
  1042.              res = validatePassword()
  1043.              if ( res = "-1") then
  1044.                 exit function
  1045.              end if 
  1046.          end if
  1047.         end if
  1048.     
  1049.  
  1050.         Top.Code.NSUniMgr.SetProxyAuthenticationInfo CStr(document.all.UserID.value),CStr(document.all.NewPassword.value)
  1051.         if err.number<>0 Then
  1052.             msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  1053.             exit function
  1054.         end if
  1055.         
  1056.         Top.Code.NSChanMgr.SetProxyAuthenticationInfo CStr(document.all.UserID.value),CStr(document.all.NewPassword.value)
  1057.         if err.number<>0 Then
  1058.             msgbox err.description,vbExclamation,Top.Code.L_Title_Text
  1059.             exit function
  1060.         end if
  1061.  
  1062.         
  1063.  
  1064.     end if
  1065.     
  1066.     if (document.all.UserId.value <> "") then
  1067.         document.all.NewPassword.value= L_TenAsterisks_Text
  1068.     else
  1069.         document.all.NewPassword.value=""
  1070.     end if         
  1071.     document.all.DistApply.disabled=true        
  1072.         
  1073. end function
  1074.  
  1075. '-----------------------------------------------------------
  1076. 'LOGGING
  1077.  
  1078.  
  1079.  
  1080. function OnLogRefreshKey()
  1081.     if window.event.keycode = 9 then
  1082.         window.event.cancelbubble = true
  1083.         document.all.bEnableLogging.focus()
  1084.     end if
  1085. end function
  1086.  
  1087. function LApply()
  1088. On Error Resume Next
  1089.     if Document.all.period.item(3).checked then
  1090.         if Document.all.bEnableLogging.Checked then
  1091.             if IsNumeric(document.all.UpperLimit.value) then
  1092.                 if document.all.UpperLimit.value > 1000000 OR document.all.UpperLimit.value<8 then
  1093.                     msgbox L_LogFileSizeLimit_Text ,vbExclamation,Top.Code.L_Title_Text
  1094.                     document.all.UpperLimit.value=""
  1095.                     exit function
  1096.                 end if
  1097.             else
  1098.                 msgbox L_MaxFileSizeNumeric_Text ,vbExclamation,Top.Code.L_Title_Text
  1099.                 document.all.UpperLimit.value=""
  1100.                 exit function            
  1101.             end if
  1102.         end if
  1103.     end if
  1104.     
  1105.     if Trim(Document.all.LogFileDir.Value) = "" then
  1106.         msgbox  L_SpecifyDirectory_Text,vbExclamation, Top.Code.L_Title_Text
  1107.         exit function    
  1108.     end if
  1109.     
  1110.     top.code.NSUniMgr.EnableLogging=Document.all.bEnableLogging.Checked
  1111.  
  1112.     if Document.all.period.item(0).checked then
  1113.         top.code.NSUniMgr.LogFilePeriod = 1 
  1114.         top.code.NSUniMgr.LogFileSize=0
  1115.     elseif Document.all.period.item(1).checked then
  1116.         top.code.NSUniMgr.LogFilePeriod = 2 
  1117.         top.code.NSUniMgr.LogFileSize=0
  1118.     elseif Document.all.period.item(2).checked then
  1119.         top.code.NSUniMgr.LogFilePeriod = 3
  1120.         top.code.NSUniMgr.LogFileSize=0
  1121.     elseif Document.all.period.item(3).checked then
  1122.         top.code.NSUniMgr.LogFilePeriod = 0
  1123.         top.code.NSUniMgr.LogFileSize=clng(trim(Document.all.UpperLimit.Value))*1000
  1124.     end if
  1125.  
  1126.     ErrMsg=ValidatesLogFileDirectory()
  1127.     if ErrMsg="" then
  1128.         top.code.NSUniMgr.LogFileDirectory=Trim(Document.all.LogFileDir.Value)
  1129.         if err.number <> 0 then
  1130.             msgbox err.description,64,Top.Code.L_Title_Text
  1131.             exit function
  1132.         end if 
  1133.     else
  1134.         MsgBox L_CannotApplyLogDir_Text & Chr(13) & ErrMsg,64,Top.Code.L_Title_Text
  1135.     end if
  1136.     
  1137.     Document.all.LogApply.disabled=true
  1138. end function
  1139.  
  1140. function EnableLogApply()
  1141.     Document.all.LogApply.disabled=false
  1142. end function
  1143.  
  1144. function LRefresh()
  1145. On Error Resume Next
  1146.     Document.all.bEnableLogging.Checked=top.code.NSUniMgr.EnableLogging
  1147.     
  1148.     Select Case top.code.NSUniMgr.LogFilePeriod
  1149.         Case 1
  1150.             Document.all.Period.item(0).checked=true
  1151.         Case 2
  1152.             Document.all.Period.item(1).checked=true
  1153.         Case 3
  1154.             Document.all.Period.item(2).checked=true
  1155.         Case 0
  1156.             Document.all.Period.item(3).checked=true
  1157.     end select
  1158.     Document.all.UpperLimit.Value=int(top.code.NSUniMgr.LogFileSize/1000)
  1159.     Document.all.LogFileDir.Value=trim(top.code.NSUniMgr.LogFileDirectory)
  1160.     enableLogging()
  1161.     Document.all.LogApply.disabled=true
  1162. end function
  1163.  
  1164. function enableLogging()
  1165.     Document.all.LogApply.disabled=false
  1166.     if top.code.regkey.InstServer then
  1167.         Document.all.BrowseLogfile.disabled=NOT Document.all.bEnableLogging.Checked
  1168.     end if
  1169.     Document.all.Period.item(0).disabled=NOT Document.all.bEnableLogging.Checked
  1170.     Document.all.Period.item(1).disabled=NOT Document.all.bEnableLogging.Checked
  1171.     Document.all.Period.item(2).disabled=NOT Document.all.bEnableLogging.Checked
  1172.     Document.all.Period.item(3).disabled=NOT Document.all.bEnableLogging.Checked
  1173.  
  1174.     If Document.all.bEnableLogging.Checked AND Document.all.Period.item(3).checked then
  1175.         Document.all.UpperLimit.disabled=false
  1176.         Document.all.UpperLimit.style.backgroundColor = gENABLELOG.style.backgroundColor
  1177.     else
  1178.         Document.all.UpperLimit.disabled=true
  1179.         Document.all.UpperLimit.style.backgroundColor = document.body.bgcolor
  1180.     end if
  1181.  
  1182.     if Document.all.bEnableLogging.Checked then
  1183.         Document.all.LogFileDir.disabled=false
  1184.         Document.all.LogFileDir.style.backgroundColor = gENABLELOG.style.backgroundColor
  1185.     else
  1186.         Document.all.LogFileDir.disabled=true
  1187.         Document.all.LogFileDir.style.backgroundColor = document.body.bgcolor
  1188.     end if
  1189.      
  1190. end function
  1191.  
  1192. function ToggleEnableLogging()
  1193.     Document.all.bEnableLogging.Checked = NOT Document.all.bEnableLogging.Checked
  1194.     enableLogging()
  1195. end function
  1196. function enableLimit()
  1197.     if Window.event.srcElement.value = 4 then
  1198.         Document.all.UpperLimit.disabled=NOT Window.event.srcElement.checked
  1199.         Document.all.UpperLimit.style.backgroundColor = gENABLELOG.style.backgroundColor
  1200.     else
  1201.         Document.all.UpperLimit.disabled=true
  1202.         Document.all.UpperLimit.style.backgroundColor = document.body.bgcolor        
  1203.     end if
  1204.     Document.all.LogApply.disabled=false
  1205. end function
  1206.  
  1207. function textChange()
  1208.     Document.all.LogApply.disabled=false
  1209. end function
  1210. function ValidatesLogFileDirectory()
  1211.     document.all.LogFileDir.value = trim(document.all.LogFileDir.value)
  1212.     if Len(document.all.LogFileDir.value)=0 then
  1213.         exit function
  1214.     end if
  1215.     if Len(document.all.LogFileDir.value)<3 then
  1216.         ValidatesLogFileDirectory= L_PathTooShort_Text
  1217.         exit function
  1218.     end if
  1219.     
  1220.     if (Mid(document.all.LogFileDir.value,2,2) <> ":\" ) AND (Left(document.all.LogFileDir.value,2) <> "\\") then
  1221.         ValidatesLogFileDirectory=L_PathNotValid_Text
  1222.     
  1223.         exit function
  1224.     end if
  1225.     
  1226.     if (Left(document.all.LogFileDir.value,2) = "\\") Then
  1227.         
  1228.         MsgBox Top.Code.L_UNCLogFileWarning_Text, vbExclamation, Top.Code.L_Title_Text
  1229.     end if
  1230.     
  1231.     for i = 1 to Len(document.all.LogFileDir.value)
  1232.         If InStr("/<>|*?" & Chr(34),Mid(document.all.LogFileDir.value,i,1))>0 Then
  1233.             ValidatesLogFileDirectory = L_PathInvalidChars1_Text & chr(13) & L_PathInvalidChars2_Text
  1234.             exit function
  1235.         end if
  1236.     next 
  1237.     IF (NOT Cbool(InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ",UCase(left(document.all.LogFileDir.value,1))))) and cBool((Left(document.all.LogFileDir.value,2) <> "\\")) then
  1238.         ValidatesLogFileDirectory = L_PathNotValid2_Text
  1239.         exit function
  1240.     end if
  1241. end function
  1242.  
  1243. function BrowseLogFileDir()
  1244.     Temp=trim(document.all.LogFileDir.value)
  1245.     Top.Code.dlgDirPicker.DialogTitle= Top.Code.L_Title_Text
  1246.         Top.Code.dlgDirPicker.PathName="c:\"
  1247.     call Top.Code.dlgDirPicker.ShowDialog()
  1248.     if not Top.Code.dlgDirPicker.WasCanceled then
  1249.         if Temp<>Trim(Top.Code.dlgDirPicker.PathName) then
  1250.             document.all.LogFileDir.value = Top.Code.dlgDirPicker.PathName
  1251.             Document.all.LogApply.disabled=false
  1252.         end if
  1253.     end if
  1254. end function
  1255. '/////HTTP STREAMING
  1256.  
  1257.  
  1258. Dim bCommitedStreamChanges
  1259. Sub EnableStreamApply()
  1260.  
  1261.     IF nsadmin.EnableHTTPStreaming AND rdStream(1).checked Then
  1262.         Exit Sub
  1263.     End If
  1264.     
  1265.     IF Top.Code.NsChanMgr.EnableHTTPStreaming  AND rdStream(2).checked Then
  1266.         Exit Sub
  1267.     End If
  1268.     
  1269.     IF NOT nsadmin.EnableHTTPStreaming  AND NOT Top.Code.NsChanMgr.EnableHTTPStreaming  AND rdStream(0).checked Then
  1270.         Exit Sub
  1271.     End If
  1272.     
  1273.     StreamApply.disabled = False
  1274. End Sub
  1275.  
  1276. Sub ApplyStreaming()
  1277. On Error Resume Next
  1278.     
  1279.     nsadmin.EnableHTTPStreaming = rdStream(1).checked
  1280.     If Err.Number <> 0 Then
  1281.         Call Top.Code.CheckCriticalError(err.number, "Unicast")
  1282.     End If
  1283.     Top.Code.NsChanMgr.EnableHTTPStreaming = rdStream(2).checked
  1284.     If Err.Number <> 0 Then
  1285.         Call Top.Code.CheckCriticalError(err.number, "Channel")
  1286.     End If
  1287.     
  1288.     MsgBox L_MustRebootStream_Text, , Top.Code.L_Title_Text
  1289.     
  1290.     StreamApply.disabled = True
  1291. End Sub
  1292.  
  1293.  
  1294. Sub InitializeHTTPStreaming()
  1295. On Error Resume Next
  1296.         
  1297.     StreamApply.disabled = True
  1298.     UStream = nsadmin.EnableHTTPStreaming
  1299.     If Err.Number <> 0 Then
  1300.         Call Top.Code.CheckCriticalError(err.number, "Unicast")
  1301.     End If
  1302.     err.clear
  1303.  
  1304.     MStream = Top.Code.NsChanMgr.EnableHTTPStreaming
  1305.     If Err.Number <> 0 Then
  1306.         Call Top.Code.CheckCriticalError(err.number, "Channel")
  1307.     End If
  1308.     
  1309.     If NOT UStream And NOT MStream Then
  1310.         rdStream(0).checked = True
  1311.         Exit Sub
  1312.     Else
  1313.         If UStream AND MStream Then
  1314.             rdStream(1).checked = True
  1315.             rdStream(2).checked = False
  1316.             Exit Sub
  1317.         End If
  1318.         
  1319.         rdStream(1).checked =  UStream
  1320.         rdStream(2).checked = MStream
  1321.     End If
  1322.  
  1323.  
  1324. End Sub
  1325.  
  1326. Function DoTrim(s)
  1327.  
  1328.     DoTrim = Trim(s)
  1329. End Function
  1330.  
  1331.  
  1332.