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

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% 
  6.  
  7. On Error Resume Next 
  8.  
  9. Const L_SAVING_TEXT="Saving"
  10. Const L_CLEARPATHS_TEXT = "Property changes made to this Web Site or directory will not be applied to any \rchild directories whose properties have already been explicitly set, unless you \rchoose to override those previously set properties.\r\rClick OK if you want to override explicitly set properties on all child directories. \r\rClick Cancel if you do not want to override explicitly set properties on all child directories.\r\r"
  11.  
  12.  
  13.  
  14. %>
  15.  
  16.  
  17.  
  18.  
  19. <HTML>
  20.  
  21. <HEAD>
  22.  
  23. <SCRIPT LANGUAGE="javascript">
  24.  
  25.     function chkDataPaths(){
  26.         if (top.title.Global.siteProperties){
  27.             top.connect.location.href="iisess.asp?clearPathsOneTime=False";        
  28.             save();
  29.         }
  30.         else{
  31.             top.title.Global.updated=false;
  32.             if (!top.title.Global.dontAsk){
  33.                 width = 450;
  34.                 height = 210;
  35.                 popbox=window.open("iigtdata.asp","GetDataPaths","toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  36.                 if(popbox !=null){
  37.                     if (popbox.opener==null){
  38.                         popbox.opener=self;
  39.                     }
  40.                 }
  41.             }
  42.             else{
  43.                 save();
  44.             }
  45.         }
  46.     }
  47.     
  48.     
  49.     function save() {
  50.         
  51.         parent.iisstatus.location.href="iistat.asp?status=<%= L_SAVING_TEXT %>";        
  52.         if (parent.main.head != null){
  53.             uform=parent.main.head.document.userform;
  54.             parent.main.head.listFunc.writeList();
  55.         }
  56.         else{
  57.             uform=parent.main.document.userform;        
  58.         }
  59.  
  60.         path="?state=saving";
  61.         for (i=0; i < uform.elements.length;i++){
  62.             thiselement=uform.elements[i];
  63.             thisname=uform.elements[i].name;
  64.             thisval=uform.elements[i].value;
  65.  
  66.             if (thisname !=""){
  67.                 if (thisname.substring(0,3) !="chk"){                                            
  68.                     if (thisname.substring(0,3) !="txt"){
  69.                         if (thisname.substring(0,3) !="btn"){                    
  70.                             if (thisname.substring(0,3) !="rdo"){                        
  71.                                 if (thisname.indexOf("hdn") != ""){
  72.                                         path=path + "&" + escape(thisname);
  73.                                         path=path + "=" + escape(thisval);
  74.                                 }
  75.                             }
  76.                         }
  77.                     }
  78.                     else{
  79.                         path=path + "&" + thisname.substring(3, thisname.length);
  80.                         path=path + "=" + escape(thisval);
  81.                     }
  82.                 }
  83.                 else{
  84.                     path=path + "&" + thisname.substring(3, thisname.length);
  85.                     if (thiselement.checked){
  86.                         path=path + "="+true;
  87.                     }
  88.                     else{
  89.                         path=path + "="+false;                
  90.                     }            
  91.                 }
  92.             }
  93.             else{
  94.                 path=path + "&GreetingMessage=" + escape(thisval);
  95.             }
  96.         }
  97.             //write off non-list values & checks for child inheritence...
  98.             top.connect.location.href=("iiput.asp"+path);
  99.     }
  100.  
  101.     function reset() {
  102.         top.title.Global.updated=false;
  103.         parent.main.location.href=parent.main.location.href;
  104.     }
  105.  
  106.     function toolFunc(){
  107.         this.save=save;
  108.     }
  109.  
  110.     function sleep(cnt){
  111.         for (i=0;i<cnt;i++){
  112.         }
  113.     }
  114.  
  115.     toolFuncs=new toolFunc();
  116.  
  117.         
  118. </SCRIPT>
  119.  
  120. </HEAD>
  121.  
  122. <BODY BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#FFFFFF" ALINK="#FFFFFF" VLINK="#FFFFFF">
  123.  
  124. <TABLE HEIGHT=30 ALIGN="right" CELLPADDING=1 CELLSPACING=1>
  125.  
  126.     <TR>
  127.  
  128.     <TD><TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0>
  129.  
  130.         <TR>
  131.             <TD VALIGN="middle">
  132.                 <FONT SIZE=2 FACE="Verdana,Arial"><B>
  133.                 <A HREF="javascript:chkDataPaths();"><IMG HEIGHT=16 WIDTH=16 HSPACE=2 ALIGN="top" SRC="images/save.gif" BORDER=0 ALT="Save">Save</A>
  134.                 </B>
  135.                 </FONT>
  136.             </TD>
  137.         </TR>
  138.  
  139.     </TABLE></TD>
  140.     
  141.     <TD><FONT SIZE=2 FACE="Arial">|</FONT></TD>
  142.  
  143.     <TD><TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0>
  144.  
  145.         <TR>
  146.             <TD VALIGN="middle">
  147.                 <FONT SIZE=2 FACE="Verdana,Arial"><B>
  148.                 <A HREF="javascript:reset();"><IMG HEIGHT=16 WIDTH=16 HSPACE=2 ALIGN="top" SRC="images/refr.gif" BORDER=0 ALT="Reset">Reset</A>
  149.                 </B></FONT>
  150.             </TD>
  151.         </TR>
  152.  
  153.     </TABLE></TD>
  154.     
  155.     <TD></TD>
  156.     </TR>
  157.  
  158. </TABLE>
  159.  
  160. </BODY>
  161. </HTML>