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.

73 lines
2.0 KiB

  1. <HTML>
  2. <HEAD><TITLE>PerlScript Welcome Sample</TITLE></HEAD>
  3. <!--
  4. ActiveState PerlScript sample
  5. PerlScript: The easiest, most powerful way to program custom web solutions.
  6. -->
  7. <BODY BGCOLOR=#FFFFFF>
  8. <!-- Table A - Page heading including masthead -->
  9. <TABLE CELLPADDING=0 BORDER=3 CELLSPACING=0>
  10. <TR VALIGN=TOP ><TD>
  11. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="The power of PerlScript!" BORDER=2></A><P>
  12. </TD></TR></TABLE>
  13. <hr>
  14. <BR>
  15. <FONT SIZE=5>
  16. <SCRIPT language="PerlScript">
  17. sub PrintWelcome {
  18. ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime();
  19. $thisday=(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday)[$wday];
  20. $thismon=(January,February,March,April,May,June,July,August,September,October,November,December)[$mon];
  21. if ($hour < 12) {
  22. $window->document->write( "Good morning! ");
  23. } elsif ($hour < 17) {
  24. $window->document->write( "Good afternoon! ");
  25. } else {
  26. $window->document->write( "Good evening! ");
  27. };
  28. $ampm = 'AM';
  29. if ($hour > 12) {
  30. $hour-=12;
  31. $ampm = 'PM';
  32. }
  33. $time = sprintf '%d:%2.2d:%2.2d',$hour,$min,$sec;
  34. $year += 1900;
  35. $datetime = $time.' '.$ampm.', '.$thisday.', '.$thismon.' '.$mday.', '.$year;
  36. $window->document->write("Welcome to the world of PerlScript.<BR> ");
  37. $window->document->write("Just in case you were wondering, it's<BR> ");
  38. $window->document->write($datetime);
  39. }
  40. PrintWelcome();
  41. </SCRIPT>
  42. </FONT>
  43. <P>
  44. <FONT SIZE=2>
  45. <hr>
  46. If this sample doesn't work, download <A HREF="http://www.microsoft.com/ie/">Internet Explorer 3.0</A> now.
  47. </FONT>
  48. <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 width=600>
  49. <TR VALIGN=TOP>
  50. <TD ALIGN=RIGHT>
  51. <FONT FACE="Arial, Helvetica" SIZE="1">
  52. <B>Best experienced with<BR>
  53. <A HREF="http://www.microsoft.com/ie/" TARGET="_top"><img src="ie_animated.gif" width="88" height="31" border="0" alt="Microsoft Internet Explorer" vspace="5"></a>
  54. <BR>Click here to start.</B>
  55. </FONT></TD>
  56. </TR>
  57. </TABLE>
  58. </BODY>
  59. </HTML>