Leaked source code of windows server 2003
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.

66 lines
2.1 KiB

  1. <%@ LANGUAGE = PerlScript%>
  2. <HTML>
  3. <HEAD>
  4. <!--
  5. Copyright (c) 1996, Microsoft Corporation. All rights reserved.
  6. Developed by ActiveState Internet Corp., http://www.ActiveState.com
  7. -->
  8. <TITLE> Browser Capabilities </TITLE>
  9. </HEAD>
  10. <BODY>
  11. <BODY BGCOLOR=#FFFFFF>
  12. <!--
  13. ActiveState PerlScript sample
  14. PerlScript: The coolest way to program custom web solutions.
  15. -->
  16. <!-- Masthead -->
  17. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  18. <TR VALIGN=TOP ><TD WIDTH=400>
  19. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
  20. </TD></TR></TABLE>
  21. <%
  22. $bc = $Server->CreateObject("MSWC.BrowserType");
  23. sub tf($) {
  24. return $_[0] ? 'True' : 'False';
  25. }
  26. %>
  27. <H2>Browser Properties</H2><hr>
  28. This example uses the BrowsCap COM component which installs with IIS. To create an instance of a
  29. COM component, you provide the $Server->CreateObject() method with the progID for the component that you
  30. wish to create.
  31. <BR><BR>
  32. <TABLE BORDER=1>
  33. <TR><TD>Browser Type</TD> <TD><%= $bc->browser %></TD>
  34. <TR><TD>What Version</TD> <TD><%= $bc->Version %></TD>
  35. <TR><TD>Major Version</TD> <TD><%= $bc->majorver %></TD>
  36. <TR><TD>Minor Version</TD> <TD><%= $bc->minorver %></TD>
  37. <TR><TD>Frames</TD> <TD><%= tf($bc->Frames) %></TD>
  38. <TR><TD>Tables</TD> <TD><%= tf($bc->Tables) %></TD>
  39. <TR><TD>Cookies</TD> <TD><%= tf($bc->cookies) %></TD>
  40. <TR><TD>Background Sounds</TD> <TD><%= tf($bc->BackgroundSounds) %></TD>
  41. <TR><TD>VBScript</TD> <TD><%= tf($bc->VBScript) %></TD>
  42. <TR><TD>JavaScript</TD> <TD><%= tf($bc->Javascript) %></TD>
  43. </TABLE>
  44. <!-- +++++++++++++++++++++++++++++++++++++
  45. here is the standard showsource link -
  46. Note that PerlScript must be the default language --> <hr>
  47. <%
  48. $url = $Request->ServerVariables('PATH_INFO')->item;
  49. $_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
  50. s/[\/\\](\w*\.asp\Z)//m;
  51. $params = 'filename='."$1".'&URL='."$url";
  52. $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  53. %>
  54. <A HREF="index.htm"> Return </A>
  55. <A HREF="showsource.asp?<%=$params%>">
  56. <h4><i>view the source</i></h4></A>
  57. </BODY>
  58. </HTML>