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

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% 
  6. Const L_BROWSE_TEXT="Browse"
  7. Const L_FILE_TEXT="File"
  8. Const L_URL_TEXT="URL"
  9. Const L_ALLUNASSIGNED_TEXT="All Unassigned"
  10. Const L_NA_TEXT="N/A"
  11. %>
  12. <HTML>
  13. <HEAD>
  14.     <TITLE></TITLE>
  15.  
  16.     <SCRIPT LANGUAGE="JavaScript">
  17.         function chgStatus(indexnum){
  18.             parent.head.listFunc.id =indexnum;
  19.             self.location.href="iibkupls.asp"
  20.             
  21.         }
  22.  
  23.     function SetUpdated(){
  24.     }
  25.     
  26.     function writeCol(colspan,w,str){
  27.         var writestr = "<TD";
  28.         if (colspan != ""){
  29.             writestr += " COLSPAN = " + colspan
  30.         }
  31.         if (w != ""){
  32.             writestr += " WIDTH = " + w;
  33.         }
  34.         <% if Session("IsIE") then %>
  35.                 writestr += " STYLE = 'font-face: Helv; font-size: 8pt;'";
  36.         <% end if %>                
  37.         writestr += "><FONT SIZE = 1 FACE = 'Helv,ARIAL'>" + str + "</FONT></TD>";
  38.  
  39.         return writestr;    
  40.         }
  41.     
  42.     function crop(thestring,size){
  43.         <% if Session("FONTSIZE") = "LARGE" then %>
  44.             size = size-10;
  45.         <% end if %>
  46.         sLen = thestring.length
  47.         if (sLen > size)
  48.             {
  49.             thestring = thestring.substring(0,size) + "...";
  50.             }
  51.         else{
  52.             for (var i = sLen ; i < size; i++) {
  53.                 thestring = thestring + " "
  54.             }            
  55.         }
  56.         return thestring;
  57.     }
  58.     
  59.     </SCRIPT>
  60. </HEAD>
  61.  
  62. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  63.  
  64.  
  65. <% if Request.Querystring("text") <> "" then %>
  66. <FONT SIZE=1 FACE='Helv,ARIAL'>
  67.     <%= Request.Querystring("text") %>
  68. </font>
  69. <% else %>
  70. <FORM NAME="listform">
  71.  
  72. <SCRIPT LANGUAGE="JavaScript">
  73.     var wrtstr = "";
  74.     var editOK=false;
  75.     var sel=eval(parent.head.listFunc.id );
  76.     var writestr = "<TABLE BORDER=0 CELLPADDING = 2 CELLSPACING = 0>"        
  77.     for (var i=0;i < parent.head.cachedList.length; i++) {
  78.         if (sel !=i) {
  79.             if (parent.head.cachedList[i].deleted){
  80.             }
  81.             else{
  82.                 writestr += "<TR>";    
  83.                 writestr += writeCol(1,175,"<A HREF='javascript:chgStatus("+i+");'>" + crop(parent.head.cachedList[i].blocation,30) +"</A>");
  84.                 writestr += writeCol(1,8,parent.head.cachedList[i].bversion);        
  85.                 writestr += writeCol(1,120,crop(parent.head.cachedList[i].bdate,20));            
  86.                 writestr += "</TR>";    
  87.             }
  88.         }
  89.         else{
  90.             writestr += "<TR BGCOLOR='#DDDDDD'>";    
  91.             writestr += writeCol(1,175,crop(parent.head.cachedList[i].blocation,30));
  92.             writestr += writeCol(1,8,parent.head.cachedList[i].bversion);        
  93.             writestr += writeCol(1,120,crop(parent.head.cachedList[i].bdate,20));            
  94.             writestr += "</TR>";
  95.         }        
  96.     }
  97.     
  98.     writestr += "</TABLE>";
  99.     document.write(writestr);
  100.  
  101. </SCRIPT>
  102.  
  103. <P> 
  104. <P> 
  105. </FORM>
  106. <SCRIPT LANGUAGE="JavaScript">
  107.     if (editOK){
  108.         document.listform.editMe.focus();
  109.         document.listform.editMe.select();
  110.     }
  111. </SCRIPT>
  112.  
  113. <% end if %>
  114. </BODY>
  115. </HTML>
  116.  
  117.