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

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% if Session("FONTSIZE") = "" then %>
  6.     <!--#include file="iito.inc"-->
  7. <% else %>
  8.  
  9. <% 
  10. '    strings for localization
  11. Const L_ACCESSDENIED_TEXT="Access Denied" 
  12. Const L_PATH_TEXT="Network share:"
  13. Const L_CONNECTAS_TEXT="Connect as..."
  14. Const L_USERNAME_TEXT="User Name:"
  15. Const L_PASSWORD_TEXT="Password:"
  16. Const L_ACCESSFLAGS_TEXT="Access Permissions"
  17. Const L_APPFLAGS_TEXT="Permissions"
  18. Const L_READ_TEXT="Read"
  19. Const L_WRITE_TEXT="Write"
  20. Const L_SCRIPT_TEXT="Script"
  21. Const L_EXECUTE_TEXT="Execute (including Script)"
  22. Const L_CONTENTCONTROL_TEXT="Content Control"
  23. Const L_LOGACCESS_TEXT="Log access"
  24. Const L_ENABLEBROWSING_TEXT="Directory browsing allowed"
  25. Const L_INDEX_TEXT="Index this directory"
  26. Const L_FRONTPAGE_TEXT="FrontPage Web"
  27. Const L_APPLICATIONS_TEXT="Application Settings"
  28. Const L_ISAPPROOT_TEXT="This is an application starting point"
  29. Const L_STARTPOINT_TEXT="Starting Point"
  30. Const L_APPNAME_TEXT="Name"
  31. Const L_ISOLATEAPP_TEXT="Run in separate memory space"
  32. Const L_NONE_TEXT = "None"
  33. Const L_CREATE_TEXT = "     Create     "
  34. Const L_REMOVE_TEXT = "   Remove   "
  35. Const L_UNLOAD_TEXT = "    Unload     "
  36. Const L_DISABLE_TEXT = "   Disable  "
  37. Const L_ENABLE_TEXT = "   Enable   "
  38. Const L_CONFIGURE_TEXT = " Configure... "
  39. Const L_NA_TEXT =        "                        "
  40. Const L_APPMAP_TEXT = "Mappings... "
  41.  
  42. On Error Resume Next 
  43.  
  44. Dim path, currentobj, spath, instobj, approot, thisroot, isApp, displayapproot
  45.  
  46. path=Session("dpath")
  47. Set currentobj=GetObject(path)
  48. spath=Session("spath")
  49. Set instobj=GetObject(spath)
  50. Session("SpecObj")=spath
  51. Session("SpecProps")="FrontPageWeb"
  52.  
  53. approot = currentobj.AppRoot
  54. if len(approot) <> 0 then
  55.     thisroot = LCase(currentobj.ADsPath)
  56.     approot = Mid(approot,Instr(approot,"w3svc/")+1)
  57.     thisroot = Mid(thisroot,Instr(thisroot,"w3svc/")+1) & "/"        
  58.     if thisroot=approot then
  59.         isApp = True
  60.     end if
  61. end if
  62.  
  63. %>
  64.  
  65. <!--#include file="iiset.inc"-->
  66.  
  67. <% Session("isInProc") = currentobj.AppIsolated %>
  68.  
  69. <HTML>
  70. <HEAD>
  71. <TITLE></TITLE>
  72. <SCRIPT LANGUAGE="JavaScript">
  73.     <% if UCase(Right(currentobj.ADsPath,4))="ROOT" then %> 
  74.         top.title.Global.helpFileName="iipy_3";    
  75.     <% else %>
  76.         top.title.Global.helpFileName="iipy_5";
  77.     <% end if %>
  78.     var Global=top.title.Global;
  79.  
  80.     function disableDefault(dir,fromCntrl, toCntrl){
  81.         if (!dir){
  82.             if (fromCntrl.value !=""){
  83.                 toCntrl.value=fromCntrl.value;
  84.                 fromCntrl.value="";
  85.             }
  86.         }
  87.         else{
  88.             if (toCntrl.value !=""){
  89.                 fromCntrl.value=toCntrl.value;
  90.                 toCntrl.value="";
  91.             }
  92.         }
  93.     }
  94.  
  95.     function enableDefault(chkCntrl){
  96.         chkCntrl.checked=true;
  97.     }
  98.     
  99.     function setLog(chkCntrl){
  100.         if (chkCntrl.checked){
  101.             document.userform.DontLog.value = "False";
  102.         }
  103.         else{
  104.             document.userform.DontLog.value = "True";                
  105.         }
  106.         
  107.     }    
  108.  
  109.     function popBox(title, width, height, filename){
  110.         thefile=(filename + ".asp");
  111.         thefile="iipop.asp?pg="+thefile;
  112.         <% if Session("Browser") <> "IE3" then %>
  113.             width=width +25;
  114.             height=height + 50;                
  115.         <% end if %>
  116.  
  117.         popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  118.         if(popbox !=null){
  119.             if (popbox.opener==null){
  120.                 popbox.opener=self;
  121.             }
  122.         }
  123.     }
  124.  
  125.     function listFuncs(){
  126.         this.writeList=buildListForm;
  127.     }
  128.  
  129.     function buildListForm(){
  130.     }
  131.     
  132.     function setIsolated(isIsolated){
  133.         top.connect.location.href = "iisess.asp?isInProc=" + isIsolated;
  134.     }
  135.         
  136.     function setApp(isIsolated){
  137.  
  138.         if (document.userform.hdnIsApp.value == "False"){
  139.             top.connect.location.href = "iiaction.asp?a=CreateApp&isIsolated=" + isIsolated;
  140.             document.userform.hdnAppButton.value = "<%= L_REMOVE_TEXT %>";
  141.             document.userform.hdnConfigButton.value = "<%= L_CONFIGURE_TEXT %>";
  142.             document.userform.hdnMapButton.value = "<%= L_APPMAP_TEXT %>";
  143.             //document.userform.hdnAppUnload.value = "<%= L_UNLOAD_TEXT %>";                                            
  144.             document.userform.hdnIsApp.value = "True";
  145.         }
  146.         else{
  147.             top.connect.location.href = "iiaction.asp?a=RemoveApp";
  148.             document.userform.hdnAppButton.value = "<%= L_CREATE_TEXT %>";
  149.             document.userform.hdnConfigButton.value = "<%= L_NA_TEXT %>";
  150.             document.userform.hdnMapButton.value = "<%= L_NA_TEXT %>";
  151.             //document.userform.hdnAppUnload.value = "<%= L_NA_TEXT %>";                            
  152.             document.userform.hdnIsApp.value = "False";
  153.         }
  154.     }    
  155.     
  156.     function unloadApp(){
  157.         if (document.userform.hdnIsApp.value == "True"){
  158.             top.connect.location.href = "iiaction.asp?a=UnloadApp";
  159.         }
  160.     }        
  161.     
  162.     function popConfig(){
  163.         if (document.userform.hdnIsApp.value == "True"){
  164.             popBox('AppProp',400,400,'iiapp');
  165.         }
  166.     }
  167.     
  168.     function popAppMap(){
  169.         if (document.userform.hdnIsApp.value == "True"){
  170.             popBox('AppProp',560,400,'iiamap');
  171.         }
  172.     }    
  173.  
  174.     function setAccessFlag(){    
  175.         ndx = document.userform.hdnAppAccess.selectedIndex;
  176.         if(ndx > 0)
  177.             {script = "TRUE"}
  178.         else
  179.             {script = "FALSE"}
  180.             
  181.         if(ndx > 1)
  182.             {exe = "TRUE"}
  183.         else
  184.             {exe = "FALSE"}            
  185.             
  186.         document.userform.AccessScript.value = script;
  187.         document.userform.AccessExecute.value = exe;        
  188.     }
  189.  
  190.  
  191.     listFunc=new listFuncs();
  192.  
  193.  
  194. </SCRIPT>
  195. </HEAD>
  196.  
  197. <BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 TEXT="#000000" LINK="#FFFFFF" STYLE="font-face: Helv,Arial; font-size:10pt;">
  198.  
  199. <FONT SIZE=1 FACE="HELV,ARIAL">
  200.  
  201. <BLOCKQUOTE>
  202. <FORM NAME="userform" onSubmit="return false">
  203.  
  204. <TABLE BORDER=0 CELLPADDING=0>
  205. <TR>
  206.     <TD WIDTH = 100>
  207.         <FONT SIZE=1 FACE="HELV,ARIAL">
  208.         <%= L_PATH_TEXT %>
  209.         </FONT>
  210.     </TD>
  211.     <TD>
  212.         <FONT SIZE=1 FACE="HELV,ARIAL">
  213.         <% if InStr(currentobj.Path,"\\") then %>
  214.             <%= text("Path",30,"","","",false,true) %>      
  215.         <% else %>
  216.             <%= inputbox(0,"text","Path","\\",30,"","","",False,True,False) %>
  217.         <% end if %>
  218.         <!--blank out redirect value...-->
  219.         <INPUT TYPE="hidden" NAME="HttpRedirect" VALUE = "">
  220.         </FONT>
  221.     </TD>
  222.     <TD> </TD>
  223.     <TD VALIGN="bottom">
  224.     </TD>
  225. </TR>
  226.  
  227. <TR>
  228.     <TD>
  229.         <FONT SIZE=1 FACE="HELV,ARIAL">
  230.             <%= L_USERNAME_TEXT %>
  231.         </FONT>
  232.     </TD>
  233.     <TD>
  234.         <FONT SIZE=1 FACE="HELV,ARIAL">
  235.             <%= text("UNCUserName",30,"","","",false,true) %>  
  236.         </FONT>
  237.         
  238.     </TD>
  239. </TR>
  240. <TR>
  241.     <TD>
  242.         <FONT SIZE=1 FACE="HELV,ARIAL">
  243.             <%= L_PASSWORD_TEXT %>
  244.         </FONT>
  245.     </TD>
  246.     <TD>
  247.         <FONT SIZE=1 FACE="HELV,ARIAL">
  248.             <%= pword("UNCPassword",30,"","","",false,true) %>  
  249.         </FONT>
  250.     </TD>
  251. </TR>
  252.  
  253.  
  254. <TR>
  255.     <TD WIDTH = 50> </TD>
  256.     <TD COLSPAN=3>
  257.         <TABLE>
  258.             <TR>
  259.                 <TD VALIGN="top">
  260.                     <FONT SIZE=1 FACE="HELV,ARIAL">
  261.                         <%= L_ACCESSFLAGS_TEXT %><BR>
  262.                         <%= checkbox("AccessRead","",false) %> <%= L_READ_TEXT %><BR>
  263.                         <%= checkbox("AccessWrite","",false) %> <%= L_WRITE_TEXT %><P>
  264.  
  265.                     </FONT>
  266.                 </TD>
  267.  
  268.                 <TD>     
  269.                 </TD>
  270.  
  271.                 <TD VALIGN="top">
  272.                     <FONT SIZE=1 FACE="HELV,ARIAL">
  273.                         <%= L_CONTENTCONTROL_TEXT %><BR>
  274.                         <% if currentobj.DontLog then %>
  275.                             <INPUT TYPE="checkbox" NAME="hdnDontLog" OnClick="top.title.Global.updated=true;setLog(this);"> <%= L_LOGACCESS_TEXT %><BR>                            
  276.                             <INPUT TYPE="hidden" NAME="DontLog" VALUE="True">                            
  277.                         <% else %>
  278.                             <INPUT TYPE="checkbox" NAME="hdnDontLog" CHECKED  OnClick="top.title.Global.updated=true;setLog(this);"> <%= L_LOGACCESS_TEXT %><BR>
  279.                             <INPUT TYPE="hidden" NAME="DontLog" VALUE="False">                            
  280.                         <% end if %>
  281.  
  282.                         
  283.                         <%= checkbox("EnableDirBrowsing","",false) %> <%= L_ENABLEBROWSING_TEXT %><BR>
  284.                         <%= checkbox("ContentIndexed","",false) %> <%= L_INDEX_TEXT %><BR>
  285.                         <% if Session("vtype") <> "dir" then %>
  286.                             <% if UCase(Right(currentobj.ADsPath,4))="ROOT" then %> 
  287.                                 <% if instobj.FrontPageWeb=True then %>
  288.                                     <INPUT type="checkbox" NAME="chkFrontPageWeb" CHECKED> <%= L_FRONTPAGE_TEXT %>
  289.                                 <% else %>
  290.                                     <INPUT type="checkbox" NAME="chkFrontPageWeb"> <%= L_FRONTPAGE_TEXT %>
  291.                                 <% end if %>
  292.                                 
  293.                             <% end if %>
  294.                         <% end if %>                        
  295.                     </FONT>
  296.                 </TD>
  297.             </TR>
  298.         </TABLE>
  299.     </TD>
  300. </TR>
  301.  
  302. <TR>
  303.     <TD COLSPAN = 4> <HR><P>
  304.     <FONT SIZE=1 FACE="HELV,ARIAL">
  305.         <%= L_APPLICATIONS_TEXT %>                
  306.     </FONT>
  307.     </TD>
  308. </TR>
  309.  
  310. <TR> 
  311.     <TD> </TD>
  312.     <TD>
  313.  
  314.             <TABLE>
  315.                 <TR>
  316.                     <TD>        
  317.                         <FONT SIZE=1 FACE="HELV,ARIAL" COLOR="Gray">
  318.                             <%= L_APPNAME_TEXT %>:
  319.                         </FONT>    
  320.                     </TD>
  321.                     <TD>
  322.                         <FONT SIZE=1 FACE="HELV,ARIAL">
  323.                             <%= disabletextstart & "<FONT FACE=HELV SIZE=1> <FONT>" &  disabletextend %>
  324.                         </FONT>
  325.                     </TD>
  326.                 </TR>
  327.                 <TR>
  328.                     <TD WIDTH =75 >        
  329.                         <FONT SIZE=1 FACE="HELV,ARIAL">
  330.                             <%= L_STARTPOINT_TEXT %>:
  331.                         </FONT>
  332.                     </TD>
  333.                     <TD>
  334.                         <FONT SIZE=1 FACE="HELV,ARIAL">
  335.                             <%                            
  336.                             approot = Mid(approot,Instr(approot,"ROOT")+4)
  337.                             if Left(approot,1) = "/" then
  338.                                 approot = Mid(approot,2)
  339.                             end if                    
  340.                             displayapproot = "[" & instobj.ServerComment & "]" & "/" & approot
  341.                             if Right(displayapproot,1) = "/" then
  342.                                 displayapproot = Mid(displayapproot, 1, len(displayapproot)-1)
  343.                             end if                                 
  344.                             %>
  345.                             <%= disabletextstart & "<FONT FACE=HELV SIZE=1>" & displayapproot &  " </FONT>" &  disabletextend %>
  346.                         </FONT>
  347.                     </TD>
  348.                 </TR>
  349.                 
  350.                 <TR>
  351.                     <TD> </TD>
  352.                     <TD VALIGN="bottom">        
  353.                         <FONT SIZE=1 FACE="HELV,ARIAL">
  354.                             <%= checkbox("AppIsolated","setIsolated(this.checked);",true) %> <%= L_ISOLATEAPP_TEXT %><BR>
  355.                         </FONT>    
  356.                     </TD>
  357.                 </TR>
  358.  
  359.                 <TR>
  360.                     <TD>
  361.                         <FONT SIZE=1 FACE="HELV,ARIAL">
  362.                             <%= L_APPFLAGS_TEXT %>:
  363.                         </FONT>
  364.                     </TD>
  365.                     <TD>
  366.                         <FONT SIZE=1 FACE="HELV,ARIAL">                    
  367.                         <SELECT NAME="hdnAppAccess" onChange="setAccessFlag();">
  368.                             <%= printoption(((not currentObj.AccessScript) and (not currentobj.AccessExecute)), L_NONE_TEXT, false) %>
  369.                             <%= printoption(currentObj.AccessScript, L_SCRIPT_TEXT, false) %>
  370.                             <%= printoption(currentobj.AccessExecute, L_EXECUTE_TEXT, false) %>                            
  371.                         </SELECT>
  372.                         <INPUT TYPE="hidden" NAME="AccessScript" VALUE="<%= currentObj.AccessScript %>">
  373.                         <INPUT TYPE="hidden" NAME="AccessExecute" VALUE="<%= currentObj.AccessExecute %>">
  374.                         </FONT>
  375.                     </TD>
  376.                 </TR>
  377.             </TABLE>
  378.         </TD>
  379.     <TD WIDTH = 10> </TD>
  380.         <TD VALIGN="top"><FONT SIZE=1 FACE="HELV,ARIAL">
  381.         
  382.             <% if not isApp then %>
  383.                 <% if Session("IsAdmin") then %>
  384.                 <INPUT TYPE="hidden" VALUE="False" NAME="hdnIsApp">
  385.                 <INPUT TYPE="button" NAME="hdnAppButton" VALUE="<%= L_CREATE_TEXT %>" OnClick="setApp(document.userform.chkAppIsolated.checked);"><P>
  386.                 <INPUT TYPE="button" NAME="hdnConfigButton" VALUE="<%= L_NA_TEXT %>" OnClick="popConfig();"><P>
  387.                 <INPUT TYPE="button" NAME="hdnMapButton" VALUE="<%= L_NA_TEXT %>" OnClick="popAppMap();"><P>                    
  388.                 <!--<INPUT TYPE="button" NAME="hdnAppUnload" VALUE="<%= L_NA_TEXT %>" OnClick="unloadApp();"><P>-->
  389.                 <% end if %>                
  390.             <% else %>
  391.                 <INPUT TYPE="hidden" VALUE="True" NAME="hdnIsApp">
  392.                 <% if Session("IsAdmin") then %>                        
  393.                 <INPUT TYPE="button"  NAME="hdnAppButton" VALUE="<%= L_REMOVE_TEXT %>" OnClick="setApp(document.userform.chkAppIsolated.checked);"><P>            
  394.                 <% end if %>
  395.                 <INPUT TYPE="button" NAME="hdnConfigButton" VALUE="<%= L_CONFIGURE_TEXT %>" OnClick="popConfig();"><P>
  396.                 <INPUT TYPE="button" NAME="hdnMapButton" VALUE="<%= L_APPMAP_TEXT %>" OnClick="popAppMap();"><P>                
  397.                 <!--<INPUT TYPE="button" NAME="hdnAppUnload" VALUE="<%= L_UNLOAD_TEXT %>" OnClick="unloadApp();"><P>-->
  398.             <% end if %>    
  399.             </FONT>
  400.         </TD>
  401.         </BLOCKQUOTE>
  402.         </TD>
  403.     </TR>
  404.  
  405. </TABLE>
  406.  
  407. </FORM>
  408. </BLOCKQUOTE>
  409. </FONT>
  410. </BODY>
  411.  
  412. </HTML>
  413.  
  414.  
  415. <% end if %>
  416.  
  417.  
  418.