Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

822 lines
24 KiB

  1. <%@ Language=VBScript %>
  2. <% Option Explicit %>
  3. <%
  4. '------------------------------------------------------------------
  5. ' share_prop.asp: Share Property page
  6. '
  7. ' Copyright (c) Microsoft Corporation. All rights reserved.
  8. '
  9. ' Date Description
  10. ' 12 March 2001 Creation Date
  11. '------------------------------------------------------------------
  12. %>
  13. <meta http-equiv="Content-Type" content="text/html; charset=<%=GetCharSet()%>">
  14. <!-- #include virtual="/admin/inc_framework.asp" -->
  15. <!-- #include virtual= "/admin/inc_accountsgroups.asp" -->
  16. <!-- #include file="loc_shares.asp" -->
  17. <!-- #include file="inc_shares.asp" -->
  18. <!-- #include file="share_genprop.asp" -->
  19. <!-- #include file="share_cifsprop.asp" -->
  20. <!-- #include file="share_nfsprop.asp" -->
  21. <!-- #include file="share_ftpprop.asp" -->
  22. <!-- #include file="share_httpprop.asp" -->
  23. <!-- #include file="share_Appletalkprop.asp" -->
  24. <!-- #include file="inc_shares.js" -->
  25. <%
  26. '-------------------------------------------------------------------------
  27. ' Global Constants and Variables
  28. '-------------------------------------------------------------------------
  29. Dim rc 'Return value for CreatePage
  30. Dim page 'Variable that receives the output page object when
  31. 'creating a page
  32. Dim idTabGeneral 'Variable for General tab
  33. Dim idTabCIFS 'Variable for CIFS tab
  34. Dim idTabNFS 'Variable for NFS tab
  35. Dim idTabFTP 'Variable for FTP tab
  36. Dim idTabHTTP 'Variable for HTTP tab
  37. Dim idTabAppleTalk 'Variable for AppleTalk Tab
  38. Const CONST_CHECKED = "CHECKED"
  39. Const CONST_UNCHECKED = ""
  40. Const CONST_UNIX = "U"
  41. Const CONST_WINDOWS = "W"
  42. Const CONST_FTP = "F"
  43. Const CONST_HTTP = "H"
  44. Const CONST_APPLETALK = "A"
  45. Dim SOURCE_FILE 'To hold source file name
  46. SOURCE_FILE = SA_GetScriptFileName()
  47. '------------------------------------------------------------------
  48. 'Form Variables
  49. '------------------------------------------------------------------
  50. Dim F_strShareName 'share name from area page
  51. Dim F_strSharePath 'share path from area page
  52. Dim F_strShareTypes 'share type from area page
  53. Dim F_strDelete
  54. 'For Access to all the tab pages
  55. Dim G_strChecktheShareMsg
  56. Dim G_objShareNewConnection 'WMI connection
  57. Dim G_bFTPInstalled 'Flag to indicate whether ftp service is installed
  58. Dim G_bNFSInstalled 'Flag to indicate whether nfs service is installed
  59. Dim G_bAppleTalkInstalled 'Flag to indicate whether Apple service is installed
  60. 'Get the WMI connection
  61. Set G_objShareNewConnection = getWMIConnection(CONST_WMI_WIN32_NAMESPACE)
  62. G_bNFSInstalled = isServiceInstalled(G_objShareNewConnection,"nfssvc")
  63. G_bFTPInstalled = isServiceInstalled(G_objShareNewConnection,"msftpsvc")
  64. G_bAppleTalkInstalled = isServiceInstalled(G_objShareNewConnection,"MacFile")
  65. 'get share name from area page.
  66. GetShareName()
  67. Dim arrVarReplacementStrings(0)
  68. arrVarReplacementStrings(0) = F_strShareName
  69. DIM L_TASKTITLE_PROP_TEXT
  70. L_TASKTITLE_PROP_TEXT = SA_GetLocString("foldermsg.dll", "403A0028", arrVarReplacementStrings)
  71. 'Create a Tabbed Property Page
  72. rc = SA_CreatePage( L_TASKTITLE_PROP_TEXT , "",PT_TABBED,page )
  73. 'Add Tabs
  74. rc = SA_AddTabPage( page, L_TAB_GENERAL_TEXT, idTabGeneral)
  75. rc = SA_AddTabPage( page, L_TAB_CIFSSHARING_TEXT, idTabCIFS)
  76. If G_bNFSInstalled Then
  77. rc = SA_AddTabPage( page, L_TAB_NFSSHARING_TEXT, idTabNFS)
  78. End If
  79. If G_bFTPInstalled Then
  80. rc = SA_AddTabPage( page, L_TAB_FTPSHARING_TEXT, idTabFTP)
  81. End If
  82. rc = SA_AddTabPage( page, L_TAB_WEBSHARING_TEXT, idTabHTTP)
  83. If G_bAppleTalkInstalled Then
  84. rc = SA_ADDTabPage( Page, L_TAB_APPLETALKSHARING_TEXT ,idTabAppleTalk)
  85. End If
  86. 'Show the page
  87. rc = SA_ShowPage( page )
  88. '---------------------------------------------------------------------
  89. 'Function: OnInitPage()
  90. 'Description: Called to signal first time processing for this page.
  91. 'Input Variables: PageIn,EventArg
  92. 'Output Variables: PageIn,EventArg
  93. 'Returns: True/False
  94. 'Global Variables: F_(*)
  95. '---------------------------------------------------------------------
  96. Public Function OnInitPage(ByRef PageIn, ByRef EventArg)
  97. Call SA_TraceOut(SOURCE_FILE,"OnInitPage")
  98. If Request.QueryString("ParentPlugin") = "Folders" then
  99. Call SA_MungeURL(mstrReturnURL, "PKey", Request.QueryString("path"))
  100. End if
  101. 'get share name from area page.
  102. Call GetShareName()
  103. F_strDelete="False"
  104. Call GeneralOnInitPage()
  105. If instr(F_strShareTypes,CONST_WINDOWS)> 0 then
  106. call CIFSOnInitPage()
  107. End If
  108. If G_bNFSInstalled Then
  109. call NFSOnInitPage()
  110. End IF
  111. If G_bFTPInstalled Then
  112. If instr(F_strShareTypes,CONST_FTP)> 0 then
  113. call FTPOnInitPage()
  114. End If
  115. End if
  116. If instr(F_strShareTypes,CONST_HTTP)> 0 then
  117. call HTTPOnInitPage()
  118. End If
  119. If G_bAppleTalkInstalled Then
  120. If instr(F_strShareTypes,CONST_APPLETALK)> 0 then
  121. call AppleTalkOnInitPage()
  122. End If
  123. End If
  124. OnInitPage = TRUE
  125. End Function
  126. '---------------------------------------------------------------------
  127. 'Function: OnPostBackPage()
  128. 'Description: Called to signal that the page has been posted-back.
  129. 'Input Variables: PageIn,EventArg
  130. 'Output Variables: PageIn,EventArg
  131. 'Returns: True/False
  132. 'Global Variables: F_(*),G_objService,L_WMI_CONNECTIONFAIL_ERRORMESSAGE
  133. '---------------------------------------------------------------------
  134. Public Function OnPostBackPage(ByRef PageIn, ByRef EventArg)
  135. Err.Clear
  136. On Error Resume Next
  137. 'Global form varibales
  138. F_strShareName = Request.Form("hidOldSharename")
  139. F_strSharePath = Request.Form("hidOldstrSharePath")
  140. F_strShareTypes = Request.Form("hidShareTypes")
  141. 'Get General Variables from form
  142. Call GeneralOnPostBackPage
  143. 'Get CIFS Variables from form
  144. Call CIFSOnPostBackPage
  145. 'Get NFS Variables from form
  146. If G_bNFSInstalled Then
  147. Call NFSOnPostBackPage
  148. End if
  149. 'Get NFS Variables from form
  150. If G_bFTPInstalled Then
  151. Call FTPOnPostBackPage
  152. End If
  153. 'Get NFS Variables from form
  154. Call HTTPOnPostBackPage
  155. 'Get AppleTalk Variables from form
  156. If G_bAppleTalkInstalled Then
  157. Call AppleTalkOnPostBackPage
  158. End if
  159. 'checking for the shares types
  160. Call isShareChecked()
  161. OnPostBackPage = True
  162. End Function
  163. '---------------------------------------------------------------------
  164. 'Function: OnServeTabbedPropertyPage()
  165. 'Description: Called when the content needs to send
  166. 'Input Variables: PageIn,EventArg,iTab,bIsVisible
  167. 'Output Variables: PageIn,EventArg
  168. 'Returns: True/False
  169. 'Global Variables: iTab
  170. '---------------------------------------------------------------------
  171. Public Function OnServeTabbedPropertyPage(ByRef PageIn, _
  172. ByVal iTab, _
  173. ByVal bIsVisible, ByRef EventArg)
  174. ' Emit Web Framework required functions
  175. If ( iTab = 0 ) Then
  176. Call ServeCommonJavaScript()
  177. End If
  178. ' Emit content for the requested tab
  179. Select Case iTab
  180. Case idTabGeneral
  181. Call ServeTabGeneral(PageIn, bIsVisible)
  182. Case idTabCIFS
  183. Call ServeTabCIFS(PageIn, bIsVisible)
  184. Case idTabNFS
  185. If G_bNFSInstalled Then
  186. Call ServeTabNFS(PageIn, bIsVisible)
  187. End If
  188. Case idTabFTP
  189. If G_bFTPInstalled Then
  190. Call ServeTabFTP(PageIn, bIsVisible)
  191. End If
  192. Case idTabHTTP
  193. Call ServeTabHTTP(PageIn, bIsVisible)
  194. Case idTabAppleTalk
  195. If G_bAppleTalkInstalled Then
  196. Call ServeTabAppleTalk(PageIn, bIsVisible)
  197. End If
  198. Case Else
  199. SA_TraceOut "TEMPLAGE_TABBED", _
  200. "OnServeTabbedPropertyPage unrecognized tab id: " + CStr(iTab)
  201. End Select
  202. OnServeTabbedPropertyPage = TRUE
  203. End Function
  204. '---------------------------------------------------------------------
  205. 'Function: OnSubmitPage()
  206. 'Description: Called when the page has been submitted for processing.
  207. 'Input Variables: PageIn,EventArg
  208. 'Output Variables: PageIn,EventArg
  209. 'Returns: True/False
  210. 'Global Variables: None
  211. '---------------------------------------------------------------------
  212. Public Function OnSubmitPage(ByRef PageIn, ByRef EventArg)
  213. 'Create new group on submitting the page
  214. OnSubmitPage = CreateShare()
  215. End Function
  216. '---------------------------------------------------------------------
  217. 'Function: OnClosePage()
  218. 'Description: Called when the page is about closed.
  219. 'Input Variables: PageIn,EventArg
  220. 'Output Variables: PageIn,EventArg
  221. 'Returns: True/False
  222. 'Global Variables: None
  223. '---------------------------------------------------------------------
  224. Public Function OnClosePage(ByRef PageIn, ByRef EventArg)
  225. OnClosePage = TRUE
  226. End Function
  227. '-------------------------------------------------------------------------
  228. 'SubRoutine: ServeTabGeneral()
  229. 'Description: For displaying outputs HTML for tab 1 to the user
  230. 'Input Variables: PageIn,bIsVisible
  231. 'Output Variables: PageIn
  232. 'Returns: None
  233. 'Global Variables: None
  234. '-------------------------------------------------------------------------
  235. Sub ServeTabGeneral(ByRef PageIn, ByVal bIsVisible)
  236. If (bIsVisible) Then
  237. Call ServeCommonJavaScriptGeneral()
  238. Call ServeGenPage()
  239. Else
  240. Call ServeGenHiddenValues
  241. End If
  242. End Sub
  243. '-------------------------------------------------------------------------
  244. 'SubRoutine ServeTabCIFS()
  245. 'Description: For displaying outputs HTML for tab 2 to the user
  246. 'Input Variables: PageIn,bIsVisible
  247. 'Output Variables: PageIn
  248. 'Returns: None
  249. 'Global Variables: None
  250. '-------------------------------------------------------------------------
  251. Sub ServeTabCIFS(ByRef PageIn, ByVal bIsVisible)
  252. If (bIsVisible) Then
  253. Call ServeCommonJavaScriptCIFS()
  254. Call ServeCIFSPage()
  255. Else
  256. Call ServeCIFSHiddenValues
  257. End If
  258. End Sub
  259. '-------------------------------------------------------------------------
  260. 'SubRoutine: ServeTabFTP()
  261. 'Description: For displaying outputs HTML for tab 2 to the user
  262. 'Input Variables: PageIn,bIsVisible
  263. 'Output Variables: PageIn
  264. 'Returns: None
  265. 'Global Variables: None
  266. '-------------------------------------------------------------------------
  267. Sub ServeTabFTP(ByRef PageIn, ByVal bIsVisible)
  268. If (bIsVisible) Then
  269. Call ServeCommonJavaScriptFTP()
  270. Call ServeFTPPage()
  271. Else
  272. Call ServeFTPHiddenValues
  273. End If
  274. End Sub
  275. '-------------------------------------------------------------------------
  276. 'SubRoutine: ServeTabNFS()
  277. 'Description: For displaying outputs HTML for tab 2 to the
  278. 'Input Variables: PageIn,bIsVisible
  279. 'Output Variables: PageIn,bIsVisible
  280. 'Returns: None
  281. 'Global Variables: None
  282. '-------------------------------------------------------------------------
  283. Sub ServeTabNFS(ByRef PageIn, ByVal bIsVisible)
  284. If (bIsVisible) Then
  285. Call ServeCommonJavaScriptNFS()
  286. Call ServeNFSPage()
  287. Else
  288. Call ServeNFSHiddenValues
  289. End If
  290. End Sub
  291. '-------------------------------------------------------------------------
  292. 'SubRoutine: ServeTabHTTP
  293. 'Description: For displaying outputs HTML for tab 2 to the
  294. 'Input Variables: PageIn,bIsVisible
  295. 'Output Variables: PageIn
  296. 'Returns: None
  297. 'Global Variables: None
  298. '-------------------------------------------------------------------------
  299. Sub ServeTabHTTP(ByRef PageIn, ByVal bIsVisible)
  300. If (bIsVisible) Then
  301. Call ServeCommonJavaScriptHTTP
  302. Call ServeHTTPPage()
  303. Else
  304. Call ServeHTTPHiddenValues
  305. End If
  306. End Sub
  307. '-------------------------------------------------------------------------
  308. 'SubRoutine: ServeTabAppleTalk
  309. 'Description: For displaying outputs HTML for tab 2 to the
  310. 'Input Variables: PageIn,bIsVisible
  311. 'Output Variables: PageIn
  312. 'Returns: None
  313. 'Global Variables: None
  314. '-------------------------------------------------------------------------
  315. Sub ServeTabAppleTalk(ByRef PageIn, ByVal bIsVisible)
  316. Call SA_TraceOut(SOURCE_FILE,"ServeTabAppleTalk")
  317. If (bIsVisible) Then
  318. call ServeCommonJavaScriptAppleTalk
  319. ServeAppleTalkPage()
  320. Else
  321. Call ServeAppleTalkHiddenValues
  322. Call ServeAppleTalkVisibleValues
  323. End If
  324. End Sub
  325. '-------------------------------------------------------------------------
  326. 'Function: ServeCommonJavaScriptAppleTalk
  327. 'Description: Serves in initializing the values,setting the form
  328. ' data and validating the form values
  329. 'Input Variables: None
  330. 'Output Variables: None
  331. 'Returns: None
  332. 'Global Variables: None
  333. '-------------------------------------------------------------------------
  334. Function ServeCommonJavaScriptAppleTalk()
  335. %>
  336. <script language="JavaScript" src="<%=m_VirtualRoot%>inc_global.js"></script>
  337. <script language="JavaScript" >
  338. function Init()
  339. {
  340. AppleTalkInit()
  341. }
  342. // Validate the page form values
  343. function ValidatePage()
  344. {
  345. if (AppleTalkValidatePage())
  346. return true;
  347. else
  348. return false;
  349. }
  350. // Set Data
  351. function SetData()
  352. {
  353. AppleTalkSetData()
  354. }
  355. </script>
  356. <% End Function
  357. '-------------------------------------------------------------------------
  358. 'Function: ServeCommonJavaScriptGeneral
  359. 'Description: Serves in initializing the values,setting the form
  360. ' data and validating the form values
  361. 'Input Variables: None
  362. 'Output Variables: None
  363. 'Returns: None
  364. 'Global Variables: None
  365. '-------------------------------------------------------------------------
  366. Function ServeCommonJavaScriptGeneral()
  367. %>
  368. <script language="JavaScript" src="<%=m_VirtualRoot%>inc_global.js"></script>
  369. <script language="JavaScript" >
  370. function Init()
  371. {
  372. GenInit()
  373. }
  374. // Validate the page form values
  375. function ValidatePage()
  376. {
  377. if (GenValidatePage())
  378. return true;
  379. else
  380. return false;
  381. }
  382. // Set Data
  383. function SetData()
  384. {
  385. GenSetData()
  386. }
  387. </script>
  388. <% End Function
  389. '-------------------------------------------------------------------------
  390. 'Function: ServeCommonJavaScriptCIFS
  391. 'Description: Serves in initializing the values,setting the form
  392. ' data and validating the form values
  393. 'Input Variables: None
  394. 'Output Variables: None
  395. 'Returns: None
  396. 'Global Variables: None
  397. '-------------------------------------------------------------------------
  398. Function ServeCommonJavaScriptCIFS()
  399. %>
  400. <script language="JavaScript" src="<%=m_VirtualRoot%>inc_global.js"></script>
  401. <script language="JavaScript" >
  402. function Init()
  403. {
  404. CIFSInit()
  405. }
  406. // Validate the page form values
  407. function ValidatePage()
  408. {
  409. if (CIFSValidatePage())
  410. return true;
  411. else
  412. return false;
  413. }
  414. // Set Data
  415. function SetData()
  416. {
  417. CIFSSetData();
  418. }
  419. </script>
  420. <% End Function
  421. '-------------------------------------------------------------------------
  422. 'Function: ServeCommonJavaScriptNFS
  423. 'Description: Serves in initializing the values,setting the form
  424. ' data and validating the form values
  425. 'Input Variables: None
  426. 'Output Variables: None
  427. 'Returns: None
  428. 'Global Variables: None
  429. '-------------------------------------------------------------------------
  430. Function ServeCommonJavaScriptNFS()
  431. %>
  432. <script language="JavaScript" src="<%=m_VirtualRoot%>inc_global.js"></script>
  433. <script language="JavaScript" >
  434. function Init()
  435. {
  436. NFSInit()
  437. }
  438. // Validate the page form values
  439. function ValidatePage()
  440. {
  441. if(NFSValidatePage())
  442. return true;
  443. else
  444. return false;
  445. }
  446. // Set Data
  447. function SetData()
  448. {
  449. NFSSetData();
  450. }
  451. </script>
  452. <% End Function
  453. '-------------------------------------------------------------------------
  454. 'Function: ServeCommonJavaScriptFTP
  455. 'Description: Serves in initializing the values,setting the form
  456. ' data and validating the form values
  457. 'Input Variables: None
  458. 'Output Variables: None
  459. 'Returns: None
  460. 'Global Variables: None
  461. '-------------------------------------------------------------------------
  462. Function ServeCommonJavaScriptFTP()
  463. %>
  464. <script language="JavaScript" src="<%=m_VirtualRoot%>inc_global.js"></script>
  465. <script language="JavaScript" >
  466. function Init()
  467. {
  468. FTPInit();
  469. }
  470. // Validate the page form values
  471. function ValidatePage()
  472. {
  473. if(FTPValidatePage())
  474. return true;
  475. else
  476. return false;
  477. }
  478. // Set Data
  479. function SetData()
  480. {
  481. FTPSetData();
  482. }
  483. </script>
  484. <% End Function
  485. '-------------------------------------------------------------------------
  486. 'Function: ServeCommonJavaScriptHTTP
  487. 'Description: Serves in initializing the values,setting the form
  488. ' data and validating the form values
  489. 'Input Variables: None
  490. 'Output Variables: None
  491. 'Returns: None
  492. 'Global Variables: None
  493. '-------------------------------------------------------------------------
  494. Function ServeCommonJavaScriptHTTP()
  495. %>
  496. <script language="JavaScript" src="<%=m_VirtualRoot%>inc_global.js"></script>
  497. <script language="JavaScript" >
  498. function Init()
  499. {
  500. HTTPInit();
  501. }
  502. // Validate the page form values
  503. function ValidatePage()
  504. {
  505. if(HTTPValidatePage())
  506. return true;
  507. else
  508. return false;
  509. }
  510. // Set Data
  511. function SetData()
  512. {
  513. HTTPSetData();
  514. }
  515. </script>
  516. <%
  517. End Function
  518. '-------------------------------------------------------------------------
  519. 'Function: ServeCommonJavaScript
  520. 'Description: Serves in initializing the values,setting the form
  521. ' data and validating the form values
  522. 'Input Variables: None
  523. 'Output Variables: None
  524. 'Returns: None
  525. 'Global Variables: None
  526. '-------------------------------------------------------------------------
  527. Function ServeCommonJavaScript()
  528. %>
  529. <script language="JavaScript" src="<%=m_VirtualRoot%>inc_global.js"></script>
  530. <%
  531. End Function
  532. '------------------------------------------------------------------
  533. 'SubRoutine: isShareChecked
  534. 'Description: Checking the share is checked or not
  535. 'Input Variables: None)
  536. 'Output Variables: None)
  537. 'Global Variables: In:F_strSharesChecked
  538. ' In:L_(*)
  539. ' Out:G_strChecktheShareMsg
  540. '------------------------------------------------------------------
  541. Sub isShareChecked()
  542. Err.clear
  543. On Error Resume Next
  544. If G_bNFSInstalled Then
  545. If mintTabSelected = idTabNFS and (instr(F_strSharesChecked,CONST_UNIX) = 0) then
  546. G_strChecktheShareMsg = L_NFS_NOTCHECKED_ERRORMESSAGE
  547. Call SA_SetActiveTabPage(page, idTabGeneral)
  548. End If
  549. End If
  550. If mintTabSelected = idTabCIFS and (instr(F_strSharesChecked,CONST_WINDOWS) = 0) then
  551. G_strChecktheShareMsg = L_CIFS_NOTCHECKED_ERRORMESSAGE
  552. Call SA_SetActiveTabPage(page, idTabGeneral)
  553. End If
  554. If G_bFTPInstalled Then
  555. If mintTabSelected = idTabFTP and (instr(F_strSharesChecked,CONST_FTP) = 0) then
  556. G_strChecktheShareMsg = L_FTP_NOTCHECKED_ERRORMESSAGE
  557. Call SA_SetActiveTabPage(page, idTabGeneral)
  558. End If
  559. End If
  560. If mintTabSelected = idTabHTTP and (instr(F_strSharesChecked,CONST_HTTP) = 0) then
  561. G_strChecktheShareMsg = L_HTTP_NOTCHECKED_ERRORMESSAGE
  562. Call SA_SetActiveTabPage(page, idTabGeneral)
  563. End If
  564. If G_bAppleTalkInstalled Then
  565. If mintTabSelected = idTabAppleTalk and (instr(F_strSharesChecked,CONST_APPLETALK) = 0) then
  566. G_strChecktheShareMsg = L_APPLETALK_NOTCHECKED_ERRORMESSAGE
  567. Call SA_SetActiveTabPage(page, idTabGeneral)
  568. End If
  569. End If
  570. End Sub
  571. '------------------------------------------------------------------
  572. 'Function name: CreateShare()
  573. 'Description: Creating Share
  574. 'Input Variables: None
  575. 'Output Variables: None
  576. 'Global Variables: In:F_strNewShareName
  577. ' In:F_strNewSharePath
  578. ' In:F_strSharesChecked
  579. ' Out:F_strShareName
  580. ' Out:F_strSharePath
  581. ' Out:F_strShareDescription
  582. '------------------------------------------------------------------
  583. Function CreateShare()
  584. on error resume next
  585. Err.clear
  586. Dim i
  587. Dim strNewstring
  588. If F_strSharesChecked="" and F_strDelete="False" then
  589. F_strDelete="True"
  590. Call SA_SetErrMsg(L_AREYOUSUREDELETE_FOLDER_TEXT)
  591. Call SA_SetActiveTabPage(page, idTabGeneral)
  592. CreateShare = False
  593. Exit Function
  594. End if
  595. 'Getting the values from gen tab
  596. If not GenShareProperties then
  597. CreateShare = false
  598. Call SA_SetActiveTabPage(page, idTabGeneral)
  599. Exit Function
  600. End If
  601. 'getting the share name and path
  602. F_strNFSShareName=F_strNewShareName
  603. F_strShareNFSPath= F_strNewSharePath
  604. 'For NFS
  605. If instr(F_strSharesChecked,CONST_UNIX) > 0 then
  606. If not UpdateNFSPermissions then
  607. CreateShare = false
  608. Call SA_SetActiveTabPage(page,idTabNFS)
  609. Exit Function
  610. End If
  611. End If
  612. 'getting the share name and path
  613. F_strShareName=F_strNewShareName
  614. F_strSharePath= F_strNewSharePath
  615. 'For CIFS
  616. if instr(F_strSharesChecked,CONST_WINDOWS) >0 then
  617. if not SetCIFSshareProp then
  618. CreateShare = false
  619. Call SA_SetActiveTabPage(page,idTabCIFS)
  620. Exit Function
  621. end if
  622. end if
  623. 'For AppleTalk
  624. if instr(F_strSharesChecked,CONST_APPLETALK) >0 then
  625. if not SetShareforAppleTalk(F_strShareName,F_strSharePath) then
  626. CreateShare = false
  627. Call SA_SetActiveTabPage(page,idTabAppleTalk)
  628. Exit Function
  629. end if
  630. end if
  631. 'For FTP
  632. if instr(F_strSharesChecked,CONST_FTP) > 0 then
  633. if not SetFTPSHAREProp then
  634. CreateShare = false
  635. Call SA_SetActiveTabPage(page, idTabFTP)
  636. Exit Function
  637. end if
  638. end if
  639. 'For HTTP
  640. if instr(F_strSharesChecked,CONST_HTTP) > 0 then
  641. if not SetHTTPSHAREProp then
  642. CreateShare = false
  643. Call SA_SetActiveTabPage(page, idTabHTTP)
  644. Exit Function
  645. end if
  646. end if
  647. CreateShare = true
  648. 'replacing the F_strSharesChecked string with space i between shares types
  649. for i = 1 to len(F_strSharesChecked)-1
  650. strNewstring = strNewstring & mid(F_strSharesChecked,i,1) & " "
  651. next
  652. F_strSharesChecked = strNewstring & mid(F_strSharesChecked,len(F_strSharesChecked),1)
  653. CreateShare = True
  654. End Function
  655. '------------------------------------------------------------------
  656. 'SubRoutine: GetShareName()
  657. 'Description: Serve share name from area page.
  658. 'Input Variables: None
  659. 'Output Variables: None
  660. 'Returns: None
  661. 'Global Variables: F_(*)
  662. '------------------------------------------------------------------
  663. Sub GetShareName()
  664. Dim arrQueryVariables 'query string
  665. Dim strShareName 'share name
  666. Dim stritemKey
  667. 'get the selected item from OTS
  668. If ( OTS_GetTableSelection("", 1, stritemKey) ) Then
  669. strShareName = stritemKey
  670. End If
  671. arrQueryVariables = split(strShareName,chr(1))
  672. F_strShareName = replace(arrQueryVariables(0),"\","")
  673. F_strSharePath = replace(arrQueryVariables(1),"/","\")
  674. F_strShareTypes = arrQueryVariables(2)
  675. F_strComment=arrQueryVariables(3)
  676. End Sub
  677. '------------------------------------------------------------------
  678. 'Function name: ServeHiddenValues()
  679. 'Description: Serve Hidden Values
  680. 'Input Variables: None
  681. 'Output Variables: None
  682. 'Global Variables: F_(*)
  683. '------------------------------------------------------------------
  684. Function ServeHiddenValues()
  685. %>
  686. <input type="hidden" name="hidOldSharename" value="<%=F_strShareName%>">
  687. <input type="hidden" name="hidOldstrSharePath" value="<%=F_strSharePath%>">
  688. <input type="hidden" name="hidShareTypes" value="<%=F_strShareTypes%>">
  689. <%
  690. End function
  691. %>