home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 March / VPR0003B.ISO / nec98 / iifiltls.asp < prev    next >
Text File  |  1999-10-14  |  4KB  |  147 lines

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