Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
3.9 KiB

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