Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 331bdb5
Showing
32 changed files
with
33,852 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/perl -w | ||
|
||
use strict; | ||
use CGI qw(:standard); | ||
|
||
print header; | ||
|
||
my $mailprog = '/usr/sbin/sendmail'; | ||
|
||
my $recipient = 'dave@dave.org.uk'; | ||
|
||
open (MAIL, "|$mailprog -t") or &dienice("Can't access $mailprog: $!\n"); | ||
|
||
print MAIL "To: $recipient\n"; | ||
print MAIL "Reply-to: ", param('email'), ' (', param('name'), ")\n"; | ||
print MAIL "Subject: Form Data\n\n"; | ||
|
||
foreach (param) { | ||
my ($key) = /^req(.*)$/; | ||
|
||
print MAIL "$key = ", param($_), "\n"; | ||
} | ||
|
||
close(MAIL); | ||
|
||
print <<EndHTML; | ||
<h2>Thank You</h2> | ||
Thank you for applying. Your application has been delivered.<p> | ||
Return to our <a href="../homemain.html">home page</a>. | ||
</body></html> | ||
EndHTML | ||
|
||
sub dienice { | ||
|
||
my ($errmsg) = @_; | ||
|
||
print "<h2>Error</h2>\n"; | ||
print "$errmsg<p>\n"; | ||
print "</body></html>\n"; | ||
|
||
exit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(c) 1998, Magnum Solutions Ltd, All rights reserved. | ||
|
||
This script is free software; you are free to redistibute it | ||
and/or modify it under the same terms as Perl itself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
M S - E N V v 1 . 4 | ||
-------------------------- | ||
|
||
ms-env.pl is a simple CGI script for World Wide Web pages. | ||
It allows you to find out various useful things about the | ||
Perl environment on your web server. This is particularly | ||
useful if you don't have telnet access to you ISP. | ||
|
||
|
||
|
||
AVAILABILITY | ||
|
||
The latest version of ms-mail should always be available from: | ||
|
||
http://www.mag-sol.com/Download.shtml | ||
|
||
|
||
|
||
PREREQUISITES | ||
|
||
In order to install and use this script you will need Perl version | ||
5.002 or better. This package also depends on packages that are | ||
distributed separately from perl. We recommend that you have | ||
the following packages installed before you install ms-env: | ||
|
||
CGI (bundled with perl5.004 and better) | ||
|
||
These packages should be available on CPAN (the Comprehensive | ||
Perl Archive Network) and your nearest CPAN mirror can be found | ||
at www.perl.com. | ||
|
||
|
||
|
||
INSTALLATION | ||
|
||
ms-env is distributed as a gzipped tar file. To extract the files | ||
from the archive type the following commands: | ||
|
||
gunzip ms-env.tar.gz | ||
tar xvf ms-env.tar | ||
|
||
You will end up with three files called README (this file), COPYING | ||
and ms-env.pl. | ||
|
||
Installation of ms-env is as simple as copying the file ms-env.pl | ||
into the cgi directory of your web server. This directory may be called | ||
cgi or cgi-bin or perhaps something completely different. If in doubt | ||
ask the person responsible for running your web server. | ||
|
||
|
||
|
||
USAGE | ||
|
||
The simplest (and probably most useful) way to run ms-perl is simply | ||
to enter the URL of the script in you browser. For example ms-perl | ||
is installed on www.mag-sol.com in the cgi directory. Therefore if | ||
you enter the address: | ||
|
||
http://www.mag-sol.com/cgi/ms-env.pl | ||
|
||
in you browser, you will see the output of the script which will | ||
tell you various useful things about my Perl installation (like | ||
how out of date my Perl is!) | ||
|
||
If you install ms-perl on your web server you shouild replace | ||
www.mag-sol.com with the address of your web server. If in doubt | ||
ask the person responsible for running your web server. | ||
|
||
ms-perl will give you a number of useful details about the Perl | ||
environment on your web server. These are: | ||
|
||
* The version of Perl installed | ||
|
||
* The version of CGI.pm installed | ||
|
||
* The library path that Perl runs with | ||
|
||
* The complete list of modules installed on that path | ||
|
||
|
||
|
||
DOCUMENTATION | ||
|
||
This file is currently all of the documentation you get! if you think | ||
you need any more, please let me know. | ||
|
||
|
||
|
||
SUPPORT | ||
|
||
Questions about using this script should be directed to the author at | ||
dave@mag-sol.com. I also monitor the newsgroup comp.infosys.www.authoring.cgi | ||
which would be another good place to ask questions. | ||
|
||
|
||
|
||
COPYRIGHT | ||
|
||
(c) 1999, 2000 Magnum Solutions Ltd, All rights reserved. | ||
|
||
This script is free software; you are free to redistibute it | ||
and/or modify it under the same terms as Perl itself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/perl -Tw | ||
# | ||
# ms-env.pl | ||
# | ||
# A simple script to get information about the Perl environment on a | ||
# web server. | ||
# | ||
# Copyright (c) 1998, 1999, Magnum Solutions Ltd, All rights reserved. | ||
# | ||
# This script is free software; you are free to redistibute it | ||
# and/or modify it under the same terms as Perl itself. | ||
# | ||
# $Id: ms-env.pl,v 1.4 2000/08/23 20:33:32 dave Exp $ | ||
# | ||
# $Log: ms-env.pl,v $ | ||
# Revision 1.4 2000/08/23 20:33:32 dave | ||
# Fixed so it _works_ in taint mode! | ||
# | ||
# Revision 1.3 2000/08/23 20:05:00 dave | ||
# Added taint mode. | ||
# | ||
# Revision 1.2 2000/06/04 17:31:04 dave | ||
# Renamed 'copying' and 'readme' to 'COPYING' and 'README'. | ||
# Added header info. | ||
# | ||
# | ||
|
||
use lib '.'; | ||
|
||
use CGI qw(:standard); | ||
use File::Find; | ||
use strict; | ||
use diagnostics; | ||
|
||
$ENV{PATH} = '/bin:/usr/bin'; | ||
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; | ||
|
||
my $VERSION = sprintf "%d.%02d", '$Revision: 1.4 $ ' =~ /(\d+)\.(\d+)/; | ||
|
||
print header, "\n"; | ||
print start_html(-dtd=>'-//W3C//DTD HTML 4.0 Transitional//EN', | ||
-title=>"Perl Environment: $ENV{SERVER_NAME}"), "\n"; | ||
|
||
print h1("Perl Environment: $ENV{SERVER_NAME}"), "\n"; | ||
|
||
print p("Perl Version: $]"), "\n"; | ||
|
||
print p("CGI.pm Version: $CGI::VERSION"), "\n"; | ||
|
||
print p("Library Path (\@INC):"), "\n"; | ||
|
||
print ul(li([@INC])), "\n"; | ||
|
||
print p('Modules:'), "\n"; | ||
|
||
my @mods; | ||
my $list; | ||
my $dir; | ||
foreach (@INC) { | ||
@mods = (); | ||
$dir = $_; | ||
find({wanted => \&wanted, untaint => 1}, $_); | ||
|
||
$list .= ul(li($dir), | ||
ul(li([sort @mods]))); | ||
} | ||
|
||
print $list, "\n"; | ||
|
||
sub wanted { | ||
return unless /\.pm$/; | ||
|
||
push @mods, $File::Find::name; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(c) 1998, Magnum Solutions Ltd, All rights reserved. | ||
|
||
This script is free software; you are free to redistibute it | ||
and/or modify it under the same terms as Perl itself. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
M S - G U E S T v 2 . 0 | ||
----------------------------- | ||
|
||
ms-guest.pl is a simple guest-book script for World Wide Web pages. | ||
It allows visitors to a page to write comments which are stored | ||
along with their name and email address. These comments can then be | ||
viewed by later visitors to the same page. | ||
|
||
|
||
|
||
AVAILABILITY | ||
|
||
The latest version of ms-guest should always be available from: | ||
|
||
http://www.mag-sol.com/Download.shtml | ||
|
||
|
||
PREREQUISITES | ||
|
||
In order to install and use this script you will need Perl version | ||
5.002 or better. This package also depends on packages that are | ||
distributed separately from perl. We recommend that you have | ||
the following packages installed before you install ms-guest: | ||
|
||
CGI (bundled with perl5.004 and better) | ||
FreezeThaw | ||
|
||
These packages should be available on CPAN (the Comprehensive | ||
Perl Archive Network) and your nearest CPAN mirror can be found | ||
at www.perl.com. | ||
|
||
|
||
|
||
INSTALLATION | ||
|
||
ms-guest is distributed as a gzipped tar file. To extract the files | ||
from the archive type the following commands: | ||
|
||
gunzip ms-guest.tar.gz | ||
tar xvf ms-guest.tar | ||
|
||
You will end up with three files called README (this file), COPYING | ||
and ms-guest.pl. | ||
|
||
Installation of ms-guest is as simple as copying the file ms-guest.pl | ||
into the cgi directory of your web server. This directory may be called | ||
cgi or cgi-bin or perhaps something completely different. If in doubt | ||
ask the person responsible for running your web server. | ||
|
||
|
||
|
||
USAGE | ||
|
||
ms-guest can be used in two modes. In the simple mode you just insert | ||
a call to the cgi script in your HTML page. This might look something | ||
like this: | ||
|
||
<P>Please sign our <A HREF="/cgi/ms-guest.pl">Guest Book</A>.</P> | ||
|
||
ms-guest will then generate a default guest book page. To see what | ||
this looks like try entering the URL | ||
|
||
http://www.mag-sol.com/cgi/ms-guest.pl | ||
|
||
in your browser. | ||
|
||
If you want to maintain more than one guest book on a site you can | ||
pass a file parameter to the script. The default file name is 'guest'. | ||
A site that had two guest books might (just) have this HTML fragment | ||
on it: | ||
|
||
<P>Please sign our <A HREF="/cgi/ms-guest.pl?file=guest1">first</A> | ||
or <A HREF="/cgi/ms-guest.pl?gile=guest2">second</A> guest books.</P> | ||
|
||
ms-guest takes one other parameter which is a template file name. This | ||
allows you to customise your guest book page to look however you like. | ||
|
||
A template is a normal HTML file that contains two special tags, | ||
'!!FORM!!' is inserted where you want the form for entering comments | ||
and '!!COMMENTS!!' is inserted where you want the comments displayed. | ||
A link to one of these pages would look something like this: | ||
|
||
<P>Please sign our | ||
<A HREF="/cgi/ms-guest.pl?file=guest1&template=guest.html">guest | ||
book</A>.</P> | ||
|
||
An example of this usage can be seen in the guest book link on the | ||
Magnum Solutions main page at: | ||
|
||
http://www.mag-sol.com | ||
|
||
and if you want to see what the page looks like before the tags | ||
are replaced by the cgi scripts, take a look at: | ||
|
||
http://www.mag-sol.com/Guest.html | ||
|
||
The default guest book page contains a copyright notice and a link | ||
to the Magnum Solutions home page. I'd appreciate it if you would | ||
do the same on any pages you create. | ||
|
||
As of version 2.0, the ms-guest distribution also includes another | ||
progrma called e-guest.pl which allows you to edit your guest book. | ||
e-guest is passed the name of the guest book file, like this: | ||
|
||
http://www.mag-sol.com/cgi/e-guest.pl?file=sample | ||
|
||
You should probably consider adding some sort of security on the | ||
eecution of this file! | ||
|
||
Please let me know where you're using ms-guest so I can pop by and | ||
have a look. I'll also keep you informed of new releases. | ||
|
||
|
||
|
||
DOCUMENTATION | ||
|
||
This file is currently all of the documentation you get! if you think | ||
you need any more, please let me know. | ||
|
||
|
||
|
||
SUPPORT | ||
|
||
Questions about using this script should be directed to the author at | ||
dave@mag-sol.com. I also monitor the newsgroup comp.infosys.www.authoring.cgi | ||
which would be another good place to ask questions. | ||
|
||
|
||
|
||
COPYRIGHT | ||
|
||
(c) 1998, 2000 Magnum Solutions Ltd, All rights reserved. | ||
|
||
This script is free software; you are free to redistibute it | ||
and/or modify it under the same terms as Perl itself. |
Oops, something went wrong.