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

  1. <%@ LANGUAGE=VBScript %>
  2. <% Response.Expires = 0 %>
  3.  
  4. <%
  5.  
  6. Dim browserobj, browser
  7. Set browserobj=Server.CreateObject("MSWC.BrowserType") 
  8. if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then
  9.         browser = "IE" & FormatNumber(browserobj.MajorVer)
  10. else
  11.         browser = "OTHER"
  12. end if
  13.  
  14. %>
  15.  
  16. <HTML>
  17. <HEAD>
  18.     <TITLE></TITLE>
  19.     <SCRIPT LANGUAGE = "JavaScript">
  20.         function selItem(item)
  21.             {
  22.             parent.head.listFunc.selIndex=item;
  23.             if (!parent.head.cachedList[item].isFolder)            
  24.  
  25.                 {
  26.                 parent.filter.document.userform.currentFile.value = parent.head.cachedList[item].fname;
  27.                 if (parent.head.cachedList[item].fext != ""){
  28.                     parent.filter.document.userform.currentFile.value += "."+parent.head.cachedList[item].fext;
  29.                 }
  30.                 
  31.                 }
  32.                 <% if browser = "IE3" then %>                    
  33.                     self.location.href="JSBrwLs.asp#curItem";
  34.                 <% else %>
  35.                     self.location.href="JSBrwLs.asp";            
  36.                 <% end if %>                
  37.  
  38.             }
  39.         
  40.         function delve(item)
  41.             {
  42.             if (!parent.head.cachedList[item].isFolder)                
  43.  
  44.                 {
  45.                     selItem(item);
  46.                 }
  47.             else
  48.                 {
  49.                 parent.filter.document.userform.currentFile.value = "";
  50.                 parent.head.document.userform.currentPath.value = parent.head.cachedList[item].path;
  51.                 parent.head.listFunc.changeDir(parent.head.cachedList[item].path);
  52.                 }
  53.             }
  54.             
  55.         function tdsize(stringwidth)
  56.             {
  57.             return stringwidth;
  58.             }
  59.                 
  60.     </SCRIPT>
  61. </HEAD>
  62.  
  63. <BODY BGCOLOR="#FFFFFF" TEXT="black" TOPMARGIN = 1 LEFTMARGIN = 1 LINK="BLACK" VLINK="BLACK" ALINK="BLACK">
  64.  
  65.  
  66. <SCRIPT LANGUAGE="JavaScript">
  67.     var fs = "<FONT SIZE=2>"
  68.     var fsb = "<FONT SIZE=2 COLOR='black'>"    
  69.     var theList = parent.head.cachedList;
  70.     var sel = eval(parent.head.listFunc.selIndex);
  71.     var filtBy = parent.head.listFunc.filterType;    
  72.     dispstr = "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0>"
  73.     for (var i = 0; i < parent.head.cachedList.length; i++)
  74.         {
  75.         fext = theList[i].fext;
  76.         if((filtBy == "") || (fext.indexOf(filtBy) != -1))
  77.             {            
  78.             if (sel != i)
  79.                 {
  80.                 dispstr += "<TR><TD WIDTH =  16>";
  81.                 dispstr += "<A HREF='javascript:selItem("+i+");'><IMG BORDER = 0 SRC='" + theList[i].icon     + "'></A>";
  82.                 dispstr += "</TD>";
  83.                 dispstr += "<TD WIDTH = " + tdsize(160) + ">" + fs + "<A HREF='javascript:selItem("+i+");'>"+ theList[i].displayname +"</A></TD>";
  84.                 dispstr += "<TD WIDTH = " + tdsize(75) + " ALIGN='right'>" + fs +theList[i].displaysize +" KB </TD>";
  85.                 dispstr += "<TD WIDTH = " + tdsize(140) + ">" + fs + theList[i].ftype +"</TD>";
  86.                 dispstr += "<TD WIDTH = " + tdsize(180) + ">" + fs + theList[i].displaydate +"</TD></TR>";            
  87.  
  88.                 }
  89.             else
  90.                 {    
  91.                 dispstr += "<TR BGCOLOR='#DDDDDD'>";
  92.                 dispstr += "<TD WIDTH = 16><A NAME='curItem'></A><IMG BORDER = 0 SRC='"+theList[i].icon +"'></TD>";
  93.                 dispstr += "<TD WIDTH = " + tdsize(160) + ">";                
  94.                 dispstr += fsb + "<A HREF='javascript:delve("+i+");'>" + theList[i].displayname + "</A></TD>";
  95.                 dispstr += "<TD WIDTH = " + tdsize(75) + " ALIGN='right'>" + fsb + theList[i].displaysize+" KB </TD>";
  96.                 dispstr += "<TD WIDTH = " + tdsize(140) + ">" + fsb + theList[i].ftype +"</TD>";
  97.                 dispstr += "<TD WIDTH = " + tdsize(180) + ">" + fsb + theList[i].displaydate +"</TD></TR>";
  98.                 }                
  99.             }
  100.         }
  101.         dispstr += "</TABLE>"
  102.         document.write(dispstr);        
  103.     <% if browser <> "IE3" then %>
  104.         self.location.href = "JSBrwLs.asp#curItem";
  105.     <% end if %>                
  106. </SCRIPT>
  107.  
  108. </BODY>
  109. </HTML>
  110.