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.

703 lines
22 KiB

  1. <% '-------------------------------------------------------------------------
  2. ' share_gennew.asp: Serves in creating a new share with general properties
  3. ' (name,path,description)
  4. '
  5. ' Copyright (c) Microsoft Corporation. All rights reserved.
  6. '
  7. ' Date Description
  8. ' 9 March 2001 Creation Date
  9. '-------------------------------------------------------------------------
  10. %>
  11. <!--#include file="share_gennew.js" -->
  12. <%
  13. '------------------------------------------------------------------------
  14. ' Form Variables
  15. '------------------------------------------------------------------------
  16. Dim F_strNewSharename 'Modified share name
  17. Dim F_strNewSharePath 'Modified share path
  18. Dim F_strSharesChecked 'Type of shares selected
  19. Dim F_strCreatePathChecked 'status for the checkbox to create path
  20. '-------------------------------------------------------------------------
  21. ' Global Variables
  22. '-------------------------------------------------------------------------
  23. Dim G_objConnection 'gets the WMI connection
  24. Dim G_strErrorinShareType 'gets the type of share which is not created
  25. Dim G_blnFlag
  26. Dim G_ErrFlag
  27. Const CONST_WINDOWSSHARES="W"
  28. Const CONST_NFSSHARES="U"
  29. Const CONST_FTPSHARES="F"
  30. Const CONST_HTTPSHARES="H"
  31. Const CONST_APPLETALKSHARES="A"
  32. G_ErrFlag = 0
  33. G_blnFlag = 0
  34. G_strErrorinShareType =""
  35. '-------------------------------------------------------------------------
  36. 'Function name: ServeGenPage
  37. 'Description: Serves in getting the general properties(tab) sheet
  38. ' for shares
  39. 'Input Variables: None
  40. 'Output Variables: None
  41. 'Returns: (True / Flase )
  42. 'Global Variables: G_strChecktheShareMsg,G_strErrorinShareType
  43. '--------------------------------------------------------------------------
  44. Function ServeGenPage()
  45. %>
  46. <table width="518" valign="middle" align="left" border="0" cellspacing="0" cellpadding="2" >
  47. <tr>
  48. <td class="TasksBody" nowrap>
  49. <%=L_SHARENAME_TEXT%>
  50. </td>
  51. <td class="TasksBody">
  52. <input type="text" class="FormField" name="txtShareName" maxlength="80" size="20"
  53. onfocus="this.select()" onkeyup="makeDisable(this)" onMouseOut="makeDisable(this)"
  54. value="<%=server.HTMLEncode(F_strNewSharename)%>">
  55. </td>
  56. </tr>
  57. <tr>
  58. <td class="TasksBody">
  59. <%=L_SHAREDPATH_TEXT%>
  60. </td>
  61. <td class="TasksBody" nowrap>
  62. <input type="text" class="FormField" name="txtSharePath" size="20" onFocus="this.select()"
  63. value="<%=server.HTMLEncode(F_strNewSharePath)%>">
  64. &nbsp;&nbsp;
  65. <%If lcase(F_strCreatePathChecked) = lcase("true") Then%>
  66. <input type="checkbox" class="FormCheckBox" name="chkCreatePath" checked>
  67. <%Else%>
  68. <input type="checkbox" class="FormCheckBox" name="chkCreatePath">
  69. <%End If%>
  70. <%=L_CREATEPATH_TEXT%>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td colspan="2" class="TasksBody">
  75. &nbsp;
  76. </td>
  77. </tr>
  78. <tr>
  79. <td colspan="2" class="TasksBody">
  80. <%=L_CLIENTSLIST_TEXT%>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td colspan="2" class="TasksBody">
  85. <table border=0>
  86. <tr>
  87. <td class="TasksBody">
  88. &nbsp;
  89. <%
  90. 'checkbox selected/unselected
  91. If instr(F_strSharesChecked,CONST_WINDOWSSHARES) > 0 Then
  92. SelectCheckBox CONST_WINDOWSSHARES,true,false
  93. Else
  94. SelectCheckBox CONST_WINDOWSSHARES,false ,false
  95. End If
  96. 'to dispaly as error
  97. If instr(G_strErrorinShareType,CONST_WINDOWSSHARES) > 0 Then
  98. ShowErrorinRed L_CHK_WINDOWS_TEXT
  99. Else
  100. response.write L_CHK_WINDOWS_TEXT
  101. End If
  102. %>
  103. </td>
  104. </tr>
  105. <%Set G_objConnection = getWMIConnection(CONST_WMI_WIN32_NAMESPACE)
  106. 'to make the checkbox disable if the service is not installed
  107. If isServiceInstalled(G_objConnection,"nfssvc") Then
  108. %>
  109. <tr>
  110. <td class="TasksBody">
  111. &nbsp;
  112. <%
  113. 'checkbox selected/unselected
  114. If instr(F_strSharesChecked,CONST_NFSSHARES) > 0 Then
  115. SelectCheckBox CONST_NFSSHARES,true,false
  116. Else
  117. SelectCheckBox CONST_NFSSHARES,false,false
  118. End If
  119. 'to dispaly as error
  120. If instr(G_strErrorinShareType,CONST_NFSSHARES) > 0 Then
  121. ShowErrorinRed L_CHK_UNIX_TEXT
  122. Else
  123. response.write L_CHK_UNIX_TEXT
  124. End If
  125. %>
  126. </td>
  127. </tr>
  128. <%
  129. End If
  130. %>
  131. <%
  132. 'to make the checkbox disable if the service is not installed
  133. If isServiceInstalled(G_objConnection,"msftpsvc") Then
  134. %>
  135. <tr>
  136. <td class="TasksBody">
  137. &nbsp;
  138. <%'checkbox selected/unselected
  139. If instr(F_strSharesChecked,CONST_FTPSHARES) > 0 Then
  140. SelectCheckBox CONST_FTPSHARES,true,false
  141. Else
  142. SelectCheckBox CONST_FTPSHARES,false ,false
  143. End If
  144. 'to dispaly as error
  145. If instr(G_strErrorinShareType,CONST_FTPSHARES) > 0 Then
  146. ShowErrorinRed L_CHK_FTP_TEXT
  147. Else
  148. response.write L_CHK_FTP_TEXT
  149. End If
  150. %>
  151. </td>
  152. </tr>
  153. <%
  154. End If
  155. %>
  156. <tr>
  157. <td colspan="0" class="TasksBody">
  158. &nbsp;
  159. <%
  160. 'checkbox selected/unselected
  161. If instr(F_strSharesChecked,CONST_HTTPSHARES) > 0 Then
  162. SelectCheckBox CONST_HTTPSHARES,true,false
  163. Else
  164. SelectCheckBox CONST_HTTPSHARES,false ,false
  165. End If
  166. 'to dispaly as error
  167. If instr(G_strErrorinShareType,CONST_HTTPSHARES) > 0 Then
  168. ShowErrorinRed L_CHK_HTTP_TEXT
  169. Else
  170. response.write L_CHK_HTTP_TEXT
  171. End If
  172. %>
  173. </td>
  174. </tr>
  175. <%
  176. If isServiceInstalled(G_objConnection,"MacFile") Then
  177. %>
  178. <tr>
  179. <td class="TasksBody">
  180. &nbsp;
  181. <%
  182. 'checkbox selected/unselected
  183. If instr(F_strSharesChecked,CONST_APPLETALKSHARES) > 0 Then
  184. SelectCheckBox CONST_APPLETALKSHARES,true,false
  185. Else
  186. SelectCheckBox CONST_APPLETALKSHARES,false ,false
  187. End If
  188. 'to dispaly as error
  189. If instr(G_strErrorinShareType,CONST_APPLETALKSHARES) > 0 Then
  190. ShowErrorinRed L_CHK_APPLETALK_TEXT
  191. Else
  192. response.write L_CHK_APPLETALK_TEXT
  193. End If
  194. %>
  195. </td>
  196. </tr>
  197. <%End if %>
  198. </table>
  199. </tr>
  200. </table>
  201. <% 'check for the error message of shares
  202. If G_strChecktheShareMsg <> "" Then
  203. SA_SetErrMsg G_strChecktheShareMsg
  204. End If
  205. ServeGenHiddenValues
  206. 'clean the object
  207. Set G_objConnection = nothing
  208. End Function
  209. '-------------------------------------------------------------------------
  210. 'Function name: CreatePath()
  211. 'Description: Creates the given Path
  212. 'Input Variables: strDirectoryPath
  213. 'Output Variables: None
  214. 'Returns: (True / Flase )
  215. 'Global Variables: None
  216. '--------------------------------------------------------------------------
  217. Function CreatePath(strCreatePath)
  218. Err.Clear
  219. On Error Resume Next
  220. CreatePath = false
  221. Dim objFsonew, strDir, strIndx, strDriveName, strDirStruct, strDirList, strMain
  222. Dim strCount, strEachDir, strCreateDir
  223. Set objFsonew = server.CreateObject("Scripting.FileSystemObject")
  224. if Err.number <> 0 then
  225. Call SA_ServeFailurepageEx(L_FILESYSTEMOBJECTFAIL_ERRORMESSAGE,mstrReturnURL)
  226. Err.Clear
  227. Exit Function
  228. end if
  229. strDir = strCreatePath
  230. strIndx = instr(1,strDir,":\")
  231. strDriveName = left(strDir,strIndx)
  232. strDirStruct = mid(strDir,strIndx+1)
  233. strDirList = split(strDirStruct,"\")
  234. if objFsonew.DriveExists(ucase(strDriveName)) then
  235. for strCount = 0 to UBound(strDirList)
  236. if strCount>=UBound(strDirList) then exit for
  237. if strCount=0 then
  238. strMain = strDriveName & "\" & strDirList(strCount+1)
  239. if objFsonew.FolderExists(strMain)=false then
  240. objFsonew.CreateFolder(strMain)
  241. end if
  242. else
  243. strEachDir = strEachDir & "\" & strDirList(strCount+1)
  244. strCreateDir = strMain & strEachDir
  245. if objFsonew.FolderExists(strCreateDir)=false then
  246. objFsonew.CreateFolder(strCreateDir)
  247. end if
  248. end if
  249. next
  250. if Err.number <> 0 then
  251. Err.Clear
  252. Exit Function
  253. end if
  254. CreatePath = true
  255. else
  256. Exit Function
  257. end if
  258. 'clean the object
  259. Set objFsonew = nothing
  260. End Function
  261. '-------------------------------------------------------------------------
  262. 'Function name: GenShareProperties
  263. 'Description: serves in doing share create,delete,update functions
  264. 'Input Variables: None
  265. 'Output Variables: None
  266. 'Returns: (True / Flase )
  267. 'Global Variables: G_objConnection
  268. ' in: L_*
  269. ' in: F_*
  270. '--------------------------------------------------------------------------
  271. Function GenShareProperties()
  272. Err.Clear
  273. On Error Resume Next
  274. Dim nReturnVar 'return var for the function
  275. Dim arrStrErrorNum(2) 'array to store the errors types
  276. Dim oValidator
  277. Set oValidator = new CSAValidator
  278. If ( FALSE = oValidator.IsValidFileName(F_strNewSharename)) Then
  279. Call SA_SetErrMsg(L_INVALIDNAME_ERRORMESSAGE)
  280. Call SA_TraceOut(SA_GetScriptFileName(), "Invalid share name specified: " & F_strNewSharename)
  281. Exit Function
  282. End If
  283. Set oValidator = Nothing
  284. GenShareProperties=true
  285. 'check for the existence of drive
  286. If isDriveExists(F_strNewSharePath) then
  287. 'check for the existence of the given path
  288. If not isPathExisting(F_strNewSharePath) Then
  289. 'check for the checkbox "create path if does not exits" checked/
  290. 'unchecked.
  291. IF F_strCreatePathChecked = "true" then
  292. 'create path
  293. If NOT CreatePath(F_strNewSharePath) Then
  294. SA_SetErrMsg L_CREATEPATH_ERRORMESSAGE & " " & " (" & Hex(Err.Number) & ") "
  295. GenShareProperties=false
  296. Exit Function
  297. End if
  298. else
  299. SA_SetErrMsg L_DIR_ERRORMESSAGE & " " & " (" & Hex(Err.Number) & ") "
  300. G_blnFlag = 1
  301. GenShareProperties=false
  302. Exit Function
  303. End if
  304. End if
  305. else
  306. SA_SetErrMsg L_DRIVENOTEXISTS_ERRORMESSAGE & " " & " (" & Hex(Err.Number) & ") "
  307. GenShareProperties=false
  308. Exit Function
  309. end if
  310. 'Creates the CIFS share
  311. if instr(F_strShareTypes,CONST_WINDOWSSHARES)= 0 and instr(F_strSharesChecked,CONST_WINDOWSSHARES) >0 then
  312. 'Get the WMI connection
  313. Set G_objConnection = GetWMIConnection(CONST_WMI_WIN32_NAMESPACE)
  314. 'Create the CIFS share
  315. nReturnVar = cifsnewshare(G_objConnection, F_strNewSharename,F_strNewSharePath,"")
  316. 'to frame the error messages with return variable
  317. if nReturnVar =0 then
  318. F_strShareTypes = F_strShareTypes& "W "
  319. else
  320. GenShareProperties=false
  321. FrameErrorMessage arrStrErrorNum,nReturnVar," "& L_CIFS_TEXT
  322. G_strErrorinShareType = G_strErrorinShareType & CONST_WINDOWSSHARES
  323. end if
  324. 'clean the object
  325. Set G_objConnection = nothing
  326. end if
  327. 'Creates the NFS share
  328. if instr(F_strShareTypes,CONST_NFSSHARES) =0 and instr(F_strSharesChecked,CONST_NFSSHARES) >0 then
  329. 'Create the NFS share
  330. nReturnVar =CreateNFSShare(F_strNewSharename,F_strNewSharePath, "")
  331. G_ErrFlag = nReturnVar
  332. 'To frame the error messages with return variable
  333. if G_ErrFlag = True then
  334. F_strShareTypes = F_strShareTypes & "U "
  335. else
  336. if not G_ErrFlag then
  337. FrameErrorMessage arrStrErrorNum,nReturnVar, " "&L_NFS_TEXT
  338. G_strErrorinShareType = G_strErrorinShareType & CONST_NFSSHARES
  339. GenShareProperties=false
  340. end if
  341. end if
  342. 'clean the object
  343. Set G_objConnection = nothing
  344. end if
  345. 'Creates the FTP share
  346. if instr(F_strShareTypes,CONST_FTPSHARES) =0 and instr(F_strSharesChecked,CONST_FTPSHARES) >0 then
  347. 'Get the WMI connection
  348. Set G_objConnection = GetWMIConnection(CONST_WMI_IIS_NAMESPACE)
  349. 'Create the FTP share
  350. nReturnVar =ftpnewshare(G_objConnection, F_strNewSharename,F_strNewSharePath)
  351. 'to frame the error messages with return variable
  352. if nReturnVar =0 then
  353. F_strShareTypes = F_strShareTypes& "F "
  354. else
  355. GenShareProperties=false
  356. FrameErrorMessage arrStrErrorNum,nReturnVar," "&L_FTP_TEXT
  357. G_strErrorinShareType = G_strErrorinShareType & CONST_FTPSHARES
  358. end if
  359. 'clean the object
  360. Set G_objConnection = nothing
  361. end if
  362. 'Create the HTTP share
  363. if instr(F_strShareTypes,CONST_HTTPSHARES) =0 and instr(F_strSharesChecked,CONST_HTTPSHARES) >0 then
  364. 'Get the WMI connection
  365. Set G_objConnection = GetWMIConnection(CONST_WMI_IIS_NAMESPACE)
  366. 'Create the HTTP share
  367. nReturnVar = httpnewshare(G_objConnection, F_strNewSharename,F_strNewSharePath)
  368. 'to frame the error messages with return variable
  369. if nReturnVar= 0 then
  370. F_strShareTypes = F_strShareTypes& "H "
  371. else
  372. GenShareProperties=false
  373. FrameErrorMessage arrStrErrorNum,nReturnVar," " &L_HTTP_TEXT
  374. G_strErrorinShareType = G_strErrorinShareType & CONST_HTTPSHARES
  375. end if
  376. 'clean the object
  377. Set G_objConnection = nothing
  378. end if
  379. 'Create the APPLETALK share
  380. if instr(F_strShareTypes,CONST_APPLETALKSHARES) =0 and instr(F_strSharesChecked,CONST_APPLETALKSHARES) >0 then
  381. Dim strQueryForCmd
  382. 'Query to create Apple Talk share
  383. strQueryForCmd = "VOLUME /ADD /NAME:" & chr(34) & F_strNewSharename & chr(34) & " /PATH:" & chr(34) & F_strNewSharePath & chr(34)
  384. nReturnVar = CreateAppleTalkShare(F_strNewSharename,F_strNewSharePath,strQueryForCmd)
  385. 'to frame the error messages with return variable
  386. if nReturnVar= True then
  387. F_strShareTypes = F_strShareTypes& "A "
  388. else
  389. GenShareProperties=false
  390. FrameErrorMessage arrStrErrorNum,nReturnVar," " & L_APPLETALK_TEXT
  391. G_strErrorinShareType = G_strErrorinShareType & CONST_APPLETALKSHARES
  392. end if
  393. end if
  394. 'check for error in creating shares,if there is any error delete all the shares created.
  395. if G_strErrorinShareType <> "" then
  396. 'windows share if created to be deleted
  397. if instr(F_strShareTypes,"W") > 0 then
  398. 'Get the WMI connection
  399. Set G_objConnection = GetWMIConnection(CONST_WMI_WIN32_NAMESPACE)
  400. if not deleteShareCIFS(G_objConnection, F_strSharename) then
  401. Call SA_ServeFailurepageEx( L_UPDATION_FAIL_ERRORMESSAGE,mstrReturnURL)
  402. else
  403. F_strShareTypes = replace(F_strShareTypes,"W","")
  404. end if
  405. 'clean the object
  406. Set G_objConnection = nothing
  407. end if
  408. 'unix share if created to be deleted
  409. if instr(F_strShareTypes,"U") > 0 then
  410. 'Get the WMI connection
  411. Set G_objConnection = RegConnection()
  412. if not deleteShareNFS(F_strShareName) then
  413. Call SA_ServeFailurepageEx(L_UPDATION_FAIL_ERRORMESSAGE,mstrReturnURL)
  414. else
  415. F_strShareTypes = replace(F_strShareTypes,"U","")
  416. end if
  417. 'clean the object
  418. Set G_objConnection = nothing
  419. end if
  420. 'FTP share if created to be deleted
  421. if instr(F_strShareTypes,"F") > 0 then
  422. 'Get the WMI connection
  423. Set G_objConnection = GetWMIConnection(CONST_WMI_IIS_NAMESPACE)
  424. if not deleteShareFTP(G_objConnection, F_strSharename) then
  425. Call SA_ServeFailurepageEx(L_UPDATION_FAIL_ERRORMESSAGE,mstrReturnURL)
  426. else
  427. F_strShareTypes = replace(F_strShareTypes,"F","")
  428. end if
  429. 'clean the object
  430. Set G_objConnection = nothing
  431. end if
  432. 'HTTP share if created to be deleted
  433. if instr(F_strShareTypes,"H") > 0 then
  434. 'Get the WMI connection
  435. Set G_objConnection = GetWMIConnection(CONST_WMI_IIS_NAMESPACE)
  436. 'Delete the HTTP share
  437. if not deleteShareHTTP(G_objConnection, F_strSharename) then
  438. Call SA_ServeFailurepageEx (L_UPDATION_FAIL_ERRORMESSAGE, mstrReturnURL)
  439. else
  440. F_strShareTypes = replace(F_strShareTypes,"H","")
  441. end if
  442. end if
  443. 'Delete the APPLETALK share
  444. if instr(F_strShareTypes,CONST_APPLETALKSHARES) >0 and instr(F_strSharesChecked,CONST_APPLETALKSHARES) =0 then
  445. if not deleteShareAppleTalk(F_strSharename) then
  446. Call SA_ServeFailurepageEx(L_UPDATION_FAIL_ERRORMESSAGE,mstrReturnURL)
  447. else
  448. F_strShareTypes = replace(F_strShareTypes,"A","")
  449. end if
  450. end if
  451. G_strChecktheShareMsg = ShowErrorMessage(arrStrErrorNum) & " " &ShowUNIXError(G_ErrFlag)& " (" & Hex(Err.Number) & ") "
  452. GenShareProperties=false
  453. exit function
  454. end if
  455. End function
  456. '-------------------------------------------------------------------------
  457. 'Function name: ShowUNIXError
  458. 'Description: to frame error messages to display error messages
  459. ' accordingly(either duplicate share name/share name not valid)
  460. 'Input Variables: strMsg
  461. 'Output Variables: None
  462. 'Returns: (True / Flase )
  463. 'Global Variables: None
  464. '--------------------------------------------------------------------------
  465. Function ShowUNIXError(nErrFlag)
  466. Err.Clear
  467. On Error Resume Next
  468. Dim strError
  469. Select case nErrFlag
  470. case -4
  471. strError = L_SUB_PATH_ALREADY_SHARED_ERRORMESSAGE& " <I>" &L_NFS_TEXT&"</I>"
  472. case -8
  473. strError = L_PARENT_PATH_ALREADY_SHARED_ERRORMESSAGE& " <I>" &L_NFS_TEXT&"</I>"
  474. End Select
  475. ShowUNIXError = strError
  476. End Function
  477. '-------------------------------------------------------------------------
  478. 'Function name: GeneralOnInitPage
  479. 'Description: Serves in Getting the varibales from the system
  480. 'Input Variables: None
  481. 'Output Variables: None
  482. 'Returns: (True / Flase )
  483. 'Global Variables: None
  484. ' in: F_(*)
  485. '--------------------------------------------------------------------------
  486. Function GeneralOnInitPage
  487. Err.Clear
  488. On Error Resume Next
  489. F_strSharesChecked = F_strShareTypes
  490. End Function
  491. '-------------------------------------------------------------------------
  492. 'Function name: GeneralOnPostBackPage
  493. 'Description: Serves in Getting the varibales from the Form
  494. 'Input Variables: None
  495. 'Output Variables: None
  496. 'Returns: (True / Flase )
  497. 'Global Variables: None
  498. ' in: F_(*)
  499. '--------------------------------------------------------------------------
  500. Function GeneralOnPostBackPage
  501. Err.Clear
  502. On Error Resume Next
  503. F_strNewShareName = Request.Form("hidSharename")
  504. F_strNewSharePath = Request.Form("hidSharePath")
  505. F_strSharesChecked = Request.Form("hidSharesChecked")
  506. F_strCreatePathChecked = Request.Form("hidCreatePathChecked")
  507. F_strConfirmed = Request.Form("hidConfirmation")
  508. F_strShareTypes = Request.form("hidShareTypes")
  509. End Function
  510. '-------------------------------------------------------------------------
  511. 'Function name: isDriveExists
  512. 'Description: Checks for existence of the given path
  513. 'Input Variables: strDirectoryPath
  514. 'Output Variables: None
  515. 'Returns: (True / Flase )
  516. 'Global Variables: None
  517. '--------------------------------------------------------------------------
  518. Function isDriveExists(strDirPath)
  519. Err.Clear
  520. On Error Resume Next
  521. isDriveExists=true
  522. Dim objFso, strDir, strIndx, strDriveName
  523. Set objFso = server.CreateObject("Scripting.FileSystemObject")
  524. if Err.number <> 0 then
  525. Call SA_ServeFailurepageEx(L_FILESYSTEMOBJECTFAIL_ERRORMESSAGE,mstrReturnURL)
  526. Exit Function
  527. end if
  528. strDir = strDirPath
  529. strIndx = instr(1,strDir,":\")
  530. strDriveName = left(strDir,strIndx)
  531. if not objFso.DriveExists(ucase(strDriveName)) then
  532. isDriveExists=false
  533. Err.Clear
  534. Exit Function
  535. end if
  536. 'clean the object
  537. Set objFso = nothing
  538. End Function
  539. '-------------------------------------------------------------------------
  540. 'Function name: isPathExisting
  541. 'Description: Checks for existence of the given path
  542. 'Input Variables: strDirectoryPath
  543. 'Output Variables: None
  544. 'Returns: (True / Flase )
  545. 'Global Variables: None
  546. '--------------------------------------------------------------------------
  547. Function isPathExisting(strDirectoryPath)
  548. Err.Clear
  549. On Error Resume Next
  550. Dim objFSO 'to create filesystemobject instance
  551. isPathExisting = true
  552. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
  553. if Err.number <> 0 then
  554. Call SA_ServeFailurepageEx(L_FILESYSTEMOBJECTFAIL_ERRORMESSAGE,mstrReturnURL)
  555. Exit Function
  556. end if
  557. 'Checks for existence of the given path
  558. If NOT objFSO.FolderExists(strDirectoryPath) Then
  559. isPathExisting = false
  560. Exit Function
  561. End If
  562. 'clean the object
  563. Set objFSO = nothing
  564. End Function
  565. '-------------------------------------------------------------------------
  566. 'Function name: ServeGenHiddenValues
  567. 'Description: footer function
  568. 'Input Variables: None
  569. 'Output Variables: None
  570. 'Returns: (True / Flase )
  571. 'Global Variables: None
  572. '
  573. '--------------------------------------------------------------------------
  574. Function ServeGenHiddenValues
  575. %>
  576. <input type="hidden" name="hidSharename" value="<%=server.HTMLEncode(F_strNewSharename)%>">
  577. <input type="hidden" name="hidSharePath" value="<%=server.HTMLEncode(F_strNewSharePath)%>">
  578. <input type="hidden" name="hidCreatePathChecked" value="<%=server.HTMLEncode(F_strCreatePathChecked)%>">
  579. <input type="hidden" name="hidSharesChecked" value ="<%=F_strSharesChecked%>" >
  580. <input type="hidden" name="hidErrFlag" value ="<%=G_blnFlag%>" >
  581. <input type="hidden" name="hidShareTypes" value ="<%=F_strShareTypes%>">
  582. <%
  583. End Function
  584. %>