home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_03.cab / iifvdhd.asp < prev    next >
Text File  |  1997-11-12  |  3KB  |  122 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% 
  6. Const L_VIRTUALDIRECTORY_TEXT="Directory Properties"
  7. Const L_WHENCONNECTING_TEXT="When connecting to this resource"
  8. Const L_FTP_TEXT="ftp://"
  9. Const L_CONTENTSHOULD_TEXT="the content should come from:"
  10. Const L_DIR_TEXT="a directory located on the server you are configuring."
  11. Const L_NETDIR_TEXT="a share located on another computer."
  12. Const L_REDIR_TEXT="a redirection to a URL."
  13.  
  14.  
  15. On Error Resume Next 
  16.  
  17. Dim path, currentobj, keyType, redir, dirtype, quote, dirkeyType
  18.  
  19. path=Session("dpath")
  20. Session("path")=path
  21. Set currentobj=GetObject(path)
  22. dirkeyType = "IIsFTPDirectory"
  23. %>
  24. <!--#include file="iifixpth.inc"-->
  25. <%    
  26.  
  27. redir=currentobj.HttpRedirect
  28. path=currentobj.path
  29. if redir <> "" then
  30.     dirtype="redir"
  31. elseif instr(path,"\\") then
  32.     dirtype="net"
  33. else
  34.     dirtype="dir"
  35. end if
  36.  
  37.  
  38. quote=chr(34)
  39. function writeDirType(thetype) 
  40.     if thetype=dirtype then
  41.         writeDirType="<INPUT TYPE=radio NAME=" & quote & "rdoDirType" & quote & " CHECKED OnClick=" & quote & "SetDirType('" & thetype & "')" & quote & ">"
  42.     else
  43.         writeDirType="<INPUT TYPE=radio NAME=" & quote & "rdoDirType" & quote & " OnClick=" & quote & "SetDirType('" & thetype & "')" & quote & ">"
  44.     end if
  45. end function
  46.  
  47.  %>
  48.  
  49. <HTML>
  50. <HEAD>
  51.     <TITLE></TITLE>
  52.  
  53.     <SCRIPT LANGUAGE="JavaScript">
  54.         
  55.  
  56.         function SetDirType(theType){
  57.     <% if Session("IsIE") then %>
  58.         if (theType=="net"){
  59.             parent.head.location.href="iifvdnt.asp";
  60.         }
  61.         if (theType=="redir"){
  62.             parent.head.location.href="iifvdrd.asp";
  63.         }
  64.         if (theType=="dir"){
  65.             parent.head.location.href="iifvddir.asp";
  66.         }    
  67.     <% else %>
  68.             if (theType=="net"){
  69.             parent.frames[1].location.href="iifvdnt.asp";
  70.         }
  71.         if (theType=="redir"){
  72.             parent.frames[1].location.href="iifvdrd.asp";
  73.         }
  74.         if (theType=="dir"){
  75.             parent.frames[1].location.href="iifvddir.asp";
  76.         }    
  77.     
  78.     <% end if %>
  79.         }
  80.     </SCRIPT>
  81. </HEAD>
  82.  
  83. <BODY BGCOLOR="#CCCCCC" TOPMARGIN=5  OnLoad="SetDirType('<%= dirtype %>');" TEXT="#000000" LINK="#FFFFFF" STYLE="font-face: Helv,Arial; font-size:10pt;">
  84.  
  85. <FONT SIZE=1 FACE="Helv,ARIAL">
  86. <B><%= L_VIRTUALDIRECTORY_TEXT %></B>
  87. <BLOCKQUOTE>
  88.  
  89. <%= L_WHENCONNECTING_TEXT %> <%= L_CONTENTSHOULD_TEXT %><P>
  90. <BLOCKQUOTE>
  91. <FORM NAME="userform">
  92. <TABLE>
  93.     <TR>
  94.         <TD ALIGN="left" VALIGN="bottom">
  95.             <FONT SIZE=1 FACE="Helv,ARIAL">
  96.             <%= writeDirType("dir") %> <%= L_DIR_TEXT %>
  97.             </FONT>
  98.         </TD>
  99.     </TR>
  100.     <TR>
  101.         <TD ALIGN="left" VALIGN="bottom">
  102.             <FONT SIZE=1 FACE="Helv,ARIAL">
  103.             <% if Session("vtype") <> "dir" then %>
  104.                 <%= writeDirType("net") %> <%= L_NETDIR_TEXT %>
  105.             <% else %>
  106.                   <IMG SRC="images/radiooff.gif" WIDTH=12 HEIGHT=12 BORDER=0 ALT="">
  107.                 <FONT COLOR="Gray">
  108.                     <%= L_NETDIR_TEXT %>
  109.                 </FONT>
  110.             <% end if %>
  111.             </FONT>
  112.         </TD>
  113.     </TR>
  114. </TABLE>
  115.  
  116. </BLOCKQUOTE>
  117. </BLOCKQUOTE>
  118. </FORM>
  119. </FONT>
  120. </BODY>
  121. </HTML>
  122.