home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
FAQ
/
cgi-bin
/
discus4_00
/
source
/
reply-email.cgi
< prev
next >
Wrap
Text File
|
2009-11-06
|
1KB
|
50 lines
#
#-------------------------------------------------------------------------------
# DISCUS COPYRIGHT NOTICE
#
# Discus is copyright (c) 2002 by DiscusWare, LLC, all rights reserved.
# The use of Discus is governed by the Discus License Agreement which is
# available from the Discus WWW site at:
# http://www.discusware.com/discus/license
#
# Pursuant to the Discus License Agreement, this copyright notice may not be
# removed or altered in any way.
#-------------------------------------------------------------------------------
use strict;
use vars qw($GLOBAL_OPTIONS $PARAMS $DCONF);
$DCONF->{script_dir} = ".";
my $e = get_cgi_extension($0);
if (-e "$DCONF->{script_dir}/config.$e") {
require "$DCONF->{script_dir}/config.$e";
} elsif (-e "./config.$e") {
require "./config.$e";
} else {
print "Content-type: text/html\n\n";
print "Script Execution Error: <b>config.*** location error [1]</b>.\n";
exit(0);
}
discus("reply-email");
sub get_cgi_extension {
my ($zero) = @_;
if ($zero =~ m|\.(\w+)$|) {
return $1;
}
foreach my $try ('cgi', 'pl') {
return $try if -e "./config.$try";
}
opendir(DIR, ".");
while (my $i = readdir(DIR)) {
return $1 if $i =~ m|^config\.(\w+)$|;
}
closedir(DIR);
print "Content-type: text/html\n\n";
print "Script Execution Error: <b>config.*** location error [2]</b>.\n";
exit(0);
}
1;