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.

42 lines
1.5 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> Demonstration of the Request Object's QueryString Collection</TITLE>
  9. </HEAD>
  10. <BODY> <BODY BGCOLOR=#FFFFFF>
  11. <!--
  12. ActiveState PerlScript sample
  13. PerlScript: The coolest way to program custom web solutions.
  14. -->
  15. <!-- Masthead -->
  16. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  17. <TR VALIGN=TOP ><TD WIDTH=400>
  18. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
  19. </TD></TR></TABLE>
  20. <A HREF="<%=$Request->ServerVariables('PATH_INFO')->item%>?Size=Medium&Color=Yellow">
  21. This link will demonstrate the Request object's QueryString collection.</A><P>
  22. The current value of Size is <%= $Request->querystring('Size')->item %><BR>
  23. The current value of Color is <%= $Request->querystring('Color')->item %><BR>
  24. <!-- +++++++++++++++++++++++++++++++++++++
  25. here is the standard showsource link -
  26. Note that PerlScript must be the default language --> <hr>
  27. <%
  28. $url = $Request->ServerVariables('PATH_INFO')->item;
  29. $_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
  30. s/[\/\\](\w*\.asp\Z)//m;
  31. $params = 'filename='."$1".'&URL='."$url";
  32. $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  33. %>
  34. <A HREF="index.htm"> Return </A>
  35. <A HREF="showsource.asp?<%=$params%>">
  36. <h4><i>view the source</i></h4></A>
  37. </BODY>
  38. </HTML>