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

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% 
  6. Const L_ENTERVALUE_ERRORMESSAGE="Please enter a value."
  7. Const L_LOADED_TEXT = "Loaded"
  8. Const L_UNLOADED_TEXT = "Unloaded"
  9. Const L_DISABLED_TEXT = "Disabled"
  10. Const L_LOW_TEXT = "Low"
  11. Const L_MEDIUM_TEXT = "Medium"
  12. Const L_HIGH_TEXT = "High"
  13. Const L_BROWSE_TEXT = "Browse"
  14. %>
  15.  
  16. <HTML>
  17. <HEAD>
  18.     <TITLE></TITLE>
  19.     <SCRIPT LANGUAGE = "JavaScript">
  20.         function SetUpdated(){
  21.             i = parent.head.listFunc.sel;            
  22.             parent.head.cachedList[i].ext = document.listform.editMe.value;
  23.             parent.head.cachedList[i].exclusions = document.listform.exclusions.value;
  24.             parent.head.cachedList[i].path = document.listform.exepath.value;
  25.             parent.head.cachedList[i].checkfiles = document.listform.checkfiles.checked;
  26.             parent.head.cachedList[i].scripteng = document.listform.scripteng.checked;
  27.             parent.head.cachedList[i].displaypath = crop(document.listform.exepath.value,18);
  28.             parent.head.cachedList[i].updated = true;
  29.         }
  30.  
  31.         function crop(thestring,size){
  32.         <% if Session("FONTSIZE") = "LARGE" then %>
  33.             size = size-10;
  34.         <% end if %>
  35.         if (thestring.length > size)
  36.             {
  37.             thestring = thestring.substring(0,size) + "...";
  38.             }
  39.         return thestring;
  40.         }
  41.  
  42.         function chgStatus(indexnum){
  43.             parent.head.listFunc.sel=indexnum
  44.             self.location.href = "iiamapls.asp";
  45.         }
  46.         
  47.         function chkPath(pathCntrl){
  48.             if (pathCntrl.value != ""){
  49.                 top.connect.location.href = "iichkpath.asp?path=" + escape(pathCntrl.value) + "&ptype=1";            
  50.             }
  51.         }
  52.  
  53.         function displayVal(dispstr, altstr){
  54.             if (dispstr == ""){
  55.                 dispstr = altstr;
  56.             }
  57.             return dispstr;
  58.         }
  59.         
  60.         function writeCol(colspan,w,str){
  61.                 var writestr = "<TD";
  62.                 if (colspan != ""){
  63.                     writestr += " COLSPAN = " + colspan
  64.                 }
  65.                 if (w != ""){
  66.                     writestr += " WIDTH = " + w;
  67.                 }        
  68.                 <% if Session("IsIE") then %>
  69.                 writestr += " STYLE = 'font-face: Helv; font-size: 8pt;'";
  70.                 <% end if %>                
  71.                 writestr += "><FONT SIZE = 1 FACE = 'Helv,ARIAL'>" + str + "</FONT></TD>";    
  72.                 return writestr;    
  73.         }        
  74.         
  75.  
  76.     </SCRIPT>
  77.     
  78. </HEAD>
  79.  
  80. <BODY BGCOLOR="FFFFFF" LEFTMARGIN = 0 TOPMARGIN = 0>
  81.  
  82. <FORM NAME="listform">
  83.  
  84. <SCRIPT LANGUAGE="JavaScript">
  85.     editOK = false;
  86.     sel = eval(parent.head.listFunc.sel);
  87.     var writestr = "<TABLE BORDER=0 CELLPADDING = 2 CELLSPACING = 0>"    
  88.     for (var i = 0; i < parent.head.cachedList.length; i++) {
  89.         if (!parent.head.cachedList[i].deleted){
  90.             <% if Session("IsAdmin") then %>
  91.                 if (sel != i) {
  92.             <% else %>
  93.                 if (true){        
  94.             <% end if %>
  95.                     writestr += "<TR>"                                    
  96.                     writestr += writeCol(1,50,"<A HREF='javascript:chgStatus("+i+");'>" + parent.head.cachedList[i].ext +" </A>");                
  97.                     writestr += writeCol(1,125,parent.head.cachedList[i].displaypath);
  98.                     writestr += writeCol(1,80,parent.head.cachedList[i].exclusions);
  99.                     if (parent.head.cachedList[i].scripteng){
  100.                         writestr += writeCol(1,75,"<IMG HSPACE=4 SRC='images/checkon.gif'>");
  101.                     }
  102.                     else{
  103.                         writestr += writeCol(1,75,"<IMG HSPACE=4 SRC='images/checkoff.gif'>");            
  104.                     }
  105.                     if (parent.head.cachedList[i].checkfiles){
  106.                         writestr += writeCol(1,125,"<IMG HSPACE=4 SRC='images/checkon.gif'>");
  107.                     }
  108.                     else{
  109.                         writestr += writeCol(1,125,"<IMG HSPACE=4 SRC='images/checkoff.gif'>");            
  110.                     }                                                                                    
  111.                     writestr += "</TR>";
  112.             }
  113.             else {
  114.                 editOK = false;
  115.                 writestr += "<TR>"                                    
  116.                 writestr += writeCol(1,50,"<INPUT NAME='editMe' SIZE='2' VALUE='" + parent.head.cachedList[i].ext + "' OnBlur='SetUpdated();'>");                
  117.                 writestr += writeCol(1,125,"<INPUT NAME='exepath' SIZE='15' VALUE='" + parent.head.cachedList[i].path + "' OnBlur='SetUpdated();'>");
  118.                 writestr += writeCol(1,80,"<INPUT NAME='exclusions' SIZE='8' VALUE='" + parent.head.cachedList[i].exclusions + "' OnBlur='SetUpdated();'>");
  119.                 if (parent.head.cachedList[i].scripteng){
  120.                     writestr += writeCol(1,75,"<INPUT TYPE='checkbox' NAME='scripteng' CHECKED  ONCLICK='SetUpdated();'>");
  121.                 }
  122.                 else{
  123.                     writestr += writeCol(1,75,"<INPUT TYPE='checkbox' NAME='scripteng' ONCLICK='SetUpdated();'>");            
  124.                 }
  125.                 if (parent.head.cachedList[i].checkfiles){
  126.                     writestr += writeCol(1,125,"<INPUT TYPE='checkbox' NAME='checkfiles' CHECKED  ONCLICK='SetUpdated();'>");
  127.                 }
  128.                 else{
  129.                     writestr += writeCol(1,125,"<INPUT TYPE='checkbox' NAME='checkfiles' ONCLICK='SetUpdated();'>");            
  130.                 }                                                                                    
  131.                 writestr += "</TR>";
  132.             }
  133.         }
  134.     }
  135.     writestr += "</TABLE>";
  136.     document.write(writestr);
  137.  
  138. </SCRIPT>
  139.  
  140.  
  141. </FORM>
  142. <% if Session("IsAdmin") then %>
  143. <SCRIPT LANGUAGE="JavaScript">
  144.  
  145.     if (editOK){
  146.     document.listform.editMe.focus();
  147.     document.listform.editMe.select();
  148.     }
  149.  
  150. </SCRIPT>
  151. <% end if %>
  152. </BODY>
  153. </HTML>
  154.