home *** CD-ROM | disk | FTP | other *** search
/ Excalibur 71 / Excalibur_71_cd2.bin / Microsoft_Internet_50 / ieak5.exe / RCDATA / CABINET / reconfg3.pl < prev    next >
Perl Script  |  1999-02-24  |  3KB  |  101 lines

  1. #!/usr/bin/perl
  2. # Written by Edward C Kubaitis
  3.  
  4.  
  5. # Start HTML output
  6. &startHTML;
  7.  
  8. # The host URL of the Signup Files
  9. $hostURL="http://myserver";
  10.  
  11. # Parse the CGI input
  12. $BACKURL=&parse_input;
  13.  
  14.  
  15.  
  16. # Display the HTML head
  17. &headHTML;
  18.  
  19. # Display the HTML body
  20. &bodyHTML;
  21.  
  22. # End HTML output
  23. &endHTML;
  24.  
  25. # Exit the CGI
  26. &quit;
  27.  
  28. ##########################################################
  29. sub startHTML {
  30.     print "Content-type: text/html\n\n";print "<HTML>\n";
  31. }
  32. ##########################################################
  33. sub endHTML {
  34.     print "</html>\n";
  35. }
  36. ##########################################################
  37. sub quit {
  38.     exit(0);
  39. }
  40. ##########################################################
  41. sub parse_input {
  42.         @pairs = split(/&/, $ENV{'QUERY_STRING'});
  43.  
  44.     foreach $pair (@pairs) {
  45.        ($name, $value) = split(/=/, $pair);
  46.     $ABACKURL=$ABACKURL+"$name=$value\&";
  47.        # Un-Webify plus signs and %-encoding
  48.        $value =~ tr/+/ /;
  49.           $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  50.           $value =~ s/<!--(.|\n)*-->//g;
  51.           if ($allow_html != 1) {
  52.           $value =~ s/<([^>]|\n)*>//g;
  53.           }
  54.          if ($value eq ""){$value=" ";}
  55.        $FORM{$name} = $value;
  56.  
  57.     }
  58. chop($ABACKURL);return $ABACKURL;
  59. }
  60. ##########################################################
  61. sub bodyHTML {
  62.  
  63. print "<BODY bgColor=THREEDFACE color=WINDOWTEXT>\n";
  64. print "<FONT style=\"font: 8pt ' ms sans serif' black\">\n";
  65.  
  66. print "<FORM NAME=\"PAGEID\" ACTION=\"PAGE3\" STYLE=\"background:transparent\"></FORM>\n";
  67. print "<FORM NAME=\"BACK\" ACTION=\"$hostURL/reconfg2.pl?$BACKURL\" STYLE=\"background:transparent\"></FORM>\n";
  68. print "<FORM NAME=\"PAGETYPE\" ACTION=\"FINISH\" STYLE=\"background:transparent\"></FORM>\n";
  69. print "<FORM NAME=\"NEXT\" ACTION=\"$hostURL/reconfg4.pl\" STYLE=\"background:transparent\">\n";
  70. print "<B>Re-Establishing Your Internet Services Internet Account</B><BR>\n";
  71. print "Your signup is completed. Please note that it may take us up to 30 minutes to process and activate your \n";
  72. print "account. If your account is not active within 30 minutes please notify our system administrators and \n";
  73. print "they will rectify the problem for you.<P>\n";
  74. print "<INPUT TYPE=\"HIDDEN\" NAME=\"EMAILNAME\" VALUE=\"$FORM{'EMAILNAME'}\">\n";
  75. print "<INPUT TYPE=\"HIDDEN\" NAME=\"EMAILPASSWORD\" VALUE=\"$FORM{'EMAILPASSWORD'}\">\n";
  76. print "<INPUT TYPE=\"HIDDEN\" NAME=\"POPSELECTION\" VALUE=\"$FORM{'POPSELECTION'}\">\n";
  77. ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
  78. $m="";$s="";$md="";$mn="";$mon++;
  79. if ($min < 10){$m="0";}
  80. if ($sec < 10){$s="0";}
  81. if ($mday < 10){$md="0";}
  82. if ($mon < 10){$mn="0";}
  83. $THETIME="$hour".$m."$min".$s."$sec";
  84. $THEDATE="19$year".$mn."$mon".$md."$mday";
  85. print "</FORM>\n";
  86. print "<!--- The following line should be commented out unless you are using this document for a referral server offer\n";
  87. print "<IMG SRC=\"http://192.100.100.0/refer/ispend.asp?OFFERID=$FORM{'OFFERID'}&GUID={'GUID'}&DATE=$THEDATE&TIME=$THETIME\">\n";
  88. print "-->\n";
  89. print "</BODY>\n";
  90.  
  91. }
  92. ##########################################################
  93. sub headHTML {
  94.  
  95. print "<HEAD>\n";
  96. print "<TITLE>IEAK Sample Reconfiguration Signup Page 3</TITLE>\n";
  97. print "</HEAD>\n";
  98.  
  99. }
  100. ##########################################################
  101.