#!/usr/local/bin/perl -w
######################
# Copyright © 2000 Portal Scripts.
# All Rights Reserved.
#
# The original developer of this software module and his/her company, the subsequent
# editors and their companies, have no liability for use of this
# software module or modifications thereof in an implementation.
#
# Permission to use, copy, and modify this software and its documentation on
# the server of the customer is hereby granted, provided that the above copyright
# notice, this paragraph and the following two paragraphs appear in all
# copies.
#
# This software program and documentation are copyrighted by Portal Scripts.
# The software program and documentation are supplied "as is", without any
# accompanying services. Portal Scripts does not
# warrant that the operation of the program will be
# uninterrupted or error-free.
#
# IN NO EVENT SHALL PORTAL SCRIPTS BE LIABLE TO ANY PARTY FOR
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
# LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION.
#
######################
use strict;
my $real_path;
if($^O =~ m#win32#i){
if($ENV{'PATH_TRANSLATED'} ne ""){
$real_path = $ENV{'PATH_TRANSLATED'};
$real_path =~ s#\\#/#g;
$real_path =~ s#[^/]*$##;
chdir($real_path);
}
}
else{
if($ENV{'SCRIPT_FILENAME'} ne ""){
$real_path = $ENV{'SCRIPT_FILENAME'};
$real_path =~ s#[^/]*$##;
chdir($real_path);
}
}
my $exit;
eval q{use LWP::Simple;};
if($@ ne ''){
print "Content-type: text/html\n\n";
print qq!
LWP::Simple perl library is not found in your installation.
This is a requirement to be able to run ODP++.
!;
$exit = 1;
}
eval q{use URI::Escape;};
if($@ ne ''){
print "Content-type: text/html\n\n";
print qq!
URI::Escape perl library is not found in your installation.
This is a requirement to be able to run ODP++.
!;
$exit = 1;
}
exit if($exit == 1);
my $help = get("http://www.portalscripts.com/odp/help.txt");
my %HELP = grep{length} split("ODP++ Admin