home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_03.cab / iifiltls.asp < prev    next >
Encoding:
Text File  |  1997-08-28  |  3.6 KB  |  126 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <%Option Explicit %>
  3.  
  4. <% 
  5. Const L_ENTERVALUE_ERRORMESSAGE="Please enter a value."
  6. Const L_LOADED_TEXT = "Loaded"
  7. Const L_UNLOADED_TEXT = "Unloaded"
  8. Const L_DISABLED_TEXT = "Disabled"
  9. Const L_LOW_TEXT = "Low"
  10. Const L_MEDIUM_TEXT = "Medium"
  11. Const L_HIGH_TEXT = "High"
  12. Const L_BROWSE_TEXT = "Browse"
  13. %>
  14.  
  15. <HTML>
  16. <HEAD>
  17.     <TITLE></TITLE>
  18.     <SCRIPT LANGUAGE = "JavaScript">
  19.         function SetUpdated(){
  20.             i = parent.head.listFunc.sel;
  21.             parent.head.cachedList[i].filter = document.listform.editMe.value;
  22.             parent.head.cachedList[i].status = "<%= L_LOADED_TEXT  %>";
  23.             parent.head.cachedList[i].filterpath = document.listform.filterpath.value;
  24.             parent.head.cachedList[i].displayexe = parent.head.cachedList[i].crop(document.listform.filterpath.value,35);
  25.             parent.head.cachedList[i].updated = true;
  26.         }
  27.  
  28.  
  29.         function chgStatus(indexnum){
  30.             parent.head.listFunc.sel=indexnum
  31.             self.location.href = "iifiltls.asp";
  32.         }
  33.         
  34.         function chkPath(pathCntrl){
  35.             if (pathCntrl.value != ""){
  36.                 top.connect.location.href = "iichkpath.asp?path=" + escape(pathCntrl.value) + "&ptype=1";            
  37.             }
  38.         }        
  39.         
  40.         function pathBrowser(){
  41.             JSBrowser=new BrowserObj(document.listform.filterpath,POP,TFILE,<%= Session("FONTSIZE") %>);
  42.         }
  43.  
  44.         function displayVal(dispstr, altstr){
  45.             if (dispstr == ""){
  46.                 dispstr = altstr;
  47.             }
  48.             return dispstr;
  49.         }
  50.         
  51.         function writeCol(colspan,w,str){
  52.                 var writestr = "<TD";
  53.                 if (colspan != ""){
  54.                     writestr += " COLSPAN = " + colspan
  55.                 }
  56.                 if (w != ""){
  57.                     writestr += " WIDTH = " + w;
  58.                 }        
  59.                 writestr += " STYLE = 'font-face: Helv; font-size: 8pt;'><FONT SIZE = 1 FACE = 'Helv'>" + str + "</FONT></TD>";
  60.         
  61.                 return writestr;    
  62.         }
  63.  
  64.     </SCRIPT>
  65.     
  66.     <SCRIPT SRC="JSBrowser/JSBrowser.js">
  67.     </SCRIPT>
  68.     
  69. </HEAD>
  70.  
  71. <BODY BGCOLOR="FFFFFF" LEFTMARGIN = 0 TOPMARGIN = 0>
  72.  
  73. <FORM NAME="listform">
  74.  
  75.  
  76.  
  77. <SCRIPT LANGUAGE="JavaScript">
  78.     editOK = false;
  79.     sel = eval(parent.head.listFunc.sel);
  80.     var writestr = "<TABLE BORDER=0 CELLPADDING = 2 CELLSPACING = 0>"        
  81.     for (var i = 0; i < parent.head.cachedList.length; i++) {
  82.         if (!parent.head.cachedList[i].deleted){
  83.             <% if Session("IsAdmin") then %>
  84.                 if (sel != i) {
  85.             <% else %>
  86.                 if (true){        
  87.             <% end if %>
  88.                 writestr += "<TR>"
  89.                 writestr += writeCol(1,40,parent.head.cachedList[i].displaystatus);
  90.                 writestr += writeCol(1,55,displayVal(parent.head.cachedList[i].priority," "));
  91.                 writestr += writeCol(1,100,"<A HREF='javascript:chgStatus("+i+");'>"+parent.head.cachedList[i].filter +"</A>");                    
  92.                 writestr += writeCol(1,225,parent.head.cachedList[i].displayexe);
  93.                 writestr += "</TR>";
  94.             }
  95.             else {
  96.                 editOK = true;                
  97.                 writestr += "<TR BGCOLOR=#DDDDDD>"
  98.                 writestr += writeCol(1,40,parent.head.cachedList[i].displaystatus);
  99.                 writestr += writeCol(1,55,displayVal(parent.head.cachedList[i].priority," "));
  100.                 writestr += writeCol(1,100,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].filter +"' SIZE=10 onBlur='SetUpdated();'>");                    
  101.                 writestr += writeCol(1,225,"<INPUT TYPE='text' NAME='filterpath' VALUE='"+parent.head.cachedList[i].filterpath +"' SIZE = 25 onBlur='chkPath(this);SetUpdated();'>  <A HREF='javascript:pathBrowser();'><IMG ALIGN=middle SRC='images/browse.gif' BORDER=0></A>");
  102.                 writestr += "</TR>";
  103.  
  104.             }
  105.         }
  106.     }
  107.     writestr += "</TABLE>";
  108.     document.write(writestr);
  109.  
  110. </SCRIPT>
  111. </TABLE>
  112.  
  113. </FORM>
  114. <% if Session("IsAdmin") then %>
  115. <SCRIPT LANGUAGE="JavaScript">
  116.  
  117.     if (editOK){
  118.     document.listform.editMe.focus();
  119.     document.listform.editMe.select();
  120.     }
  121.  
  122. </SCRIPT>
  123. <% end if %>
  124. </BODY>
  125. </HTML>
  126.