home *** CD-ROM | disk | FTP | other *** search
/ Igromania 2000 January / Igromania_01.iso / files / jerboa080.exe / data1.cab / Web_page / www / send.cgi < prev   
Text File  |  1999-10-06  |  1KB  |  37 lines

  1. #!/opt/perl/bin/perl
  2. require '/opt/perl/lib/CGI.pm';
  3. use CGI;
  4.  
  5. &CGI::ReadParse;
  6.  
  7. $mailprog = '/usr/lib/sendmail';    # Mail program location.
  8. $shell = '/bin/sh';
  9. $to = "mips\@sci.fi";
  10.  
  11.  
  12. if( ($in{'Country'} ne "") && ($in{'Version'} ne "") && ($in{'Status'} ne "") ){
  13.  
  14. $page = $in{'Page'};
  15. $page = 'http://www.sci.fi/~mips/jerboa/thanks.html' unless $page;
  16. print "Content-type: text/html\n";    # Tell browser what's coming..
  17. print "Location: $page\n\n";
  18.  
  19. open (LIST,"|$shell") || die$!;
  20. print LIST "echo $in{'Country'} $in{'Status'} $in{'Version'} >> list.txt\n";
  21. close (LIST);
  22.  
  23. open (MAIL,"|$mailprog $to") || die$!;
  24. print MAIL "Subject: Jerboa user notify\n\n";
  25. print MAIL "Country: $in{'Country'}\n";
  26. print MAIL "Status: $in{'Status'}\n";
  27. print MAIL "Version: $in{'Version'}\n";
  28. print MAIL "Comment: $in{'Comment'}\n";
  29. close (MAIL);
  30. }
  31. else{
  32. $page = $in{'Page'};
  33. $page = 'http://www.sci.fi/~mips/jerboa/notall.html' unless $page;
  34. print "Content-type: text/html\n";    # Tell browser what's coming..
  35. print "Location: $page\n\n";
  36. }
  37.