home *** CD-ROM | disk | FTP | other *** search
/ CGI How-To / CGI HOW-TO.iso / chap8 / 8_4 / get_info.cgi next >
Encoding:
Text File  |  1996-06-15  |  2.2 KB  |  60 lines

  1. #!/usr/local/bin/perl
  2.  
  3. # The above line explains where your perl program is.  You'll need to
  4. # change it to reflect the location of your program on your system.  
  5. # If you don't know where it is, type "which perl" or "whereis perl" 
  6. # at the command line and substitute the resulting path for the path 
  7. # above.
  8.  
  9. unshift (@INC, "/usr/local/etc/httpd/cgi-bin/Library");
  10.  
  11. require "cgi-lib.pl";
  12. &ReadParse(*MYDATA);
  13.  
  14. $customer_service_email = "selena\@eff.org";
  15. $mail_program = "mail";
  16. $get_info_who = "./register.temp";
  17.  
  18. # Add a couple new variables for this script
  19.  
  20.   $warehouse_script = "warehouse.pl";
  21.   $background= "/Images/Backgrounds/grey_stone.jpg";
  22.   $ibm_button = "http://kragar.eff.org/~erict/Graphics/Scripts/Digicon/ibm.jpg";
  23.   $apple_button = "http://kragar.eff.org/~erict/Graphics/Scripts/Digicon/apple.jpg";
  24.   $software_button = "http://kragar.eff.org/~erict/Graphics/Scripts/Digicon/software.jpg";
  25.   $workstations_button = "http://kragar.eff.org/~erict/Graphics/Scripts/Digicon/workstations.jpg";
  26.   $peripherals_button = "http://kragar.eff.org/~erict/Graphics/Scripts/Digicon/peripherals.jpg";
  27.  
  28. open (NOTE, ">$get_info_who") || die "Could not open the file";
  29.  
  30. print NOTE "Someone has been perusing the Computer Outlet!\n\n";
  31. print NOTE "    Name:    $MYDATA{'name'}\n";
  32. print NOTE "    Phone:   $MYDATA{'phone'} \n";
  33. print NOTE "    E-Mail:  $MYDATA{'email'} \n";
  34. print NOTE "    Referring Distributor:  $MYDATA{'referrer'} \n";
  35.  
  36. close (NOTE);
  37. system ("$mail_program -s Registration  $customer_service_email < $get_info_who");
  38.  
  39.  
  40.  print "Content-type: text/html \n\n";
  41.  print <<" end_of_html";
  42.  <HTML><HEAD><TITLE>Quotes Page</TITLE></HEAD>
  43.  <BODY BACKGROUND="$background">
  44.  <CENTER>
  45.  <A HREF="$warehouse_script?oid=$MYDATA{'name'}&system=IBM">
  46.  <IMG SRC="$ibm_button" BORDER=0></A>
  47.  <A HREF="$warehouse_script?oid=$MYDATA{'name'}&system=APPLE">
  48.  <IMG SRC="$apple_button" BORDER=0></A>
  49.  <A HREF="$warehouse_script?oid=$MYDATA{'name'}&system=SOFTWARE">
  50.  <IMG SRC="$software_button" BORDER=0></A>
  51.  <A HREF="$warehouse_script?oid=$MYDATA{'name'}&system=WORKSTATIONS">
  52.  <IMG SRC="$workstations_button" BORDER=0></A>
  53.  <A HREF="$warehouse_script?oid=$MYDATA{'name'}&system=PERIPHERALS">
  54.  <IMG SRC="$peripherals_button" BORDER=0></A>
  55.  </BODY></HTML>
  56.  end_of_html
  57.  die;
  58.  
  59.  
  60.