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.

780 lines
22 KiB

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