#!/usr/bin/perl # Enter page variables. $bg = '000000'; $text = 'ffffff'; $link ='bda73a'; $menutxt = '191970'; $tabc = '6699ff'; $grdc = '000000'; $angl = '90'; $txtbxtag = 'bgcolor=171726 text=bda73a cursor=bda73a'; $btntag = 'text=ffffff borderimage=file://ROM/tvimages/TVButtonBorder.bif'; # Environment variables. $root = $ENV{'DOCUMENT_ROOT'} . '/'; $server = $ENV{'SERVER_NAME'}; $server =~ s/www\.//; $script = $ENV{'SCRIPT_NAME'}; # Enter FM url. $fmUrl = "fm2.pl"; # Enter chmod values. $dir_perms = '711'; $cgi_perms = '755'; $file_perms = '644'; # Use these modules. use LWP::Simple; use CGI qw(param); # Read in the variables. $file = param('file'); $dir = param('dir'); $get = param('get'); $rename = param('rename'); # Begin subroutine selection. if ($get) { &beam_file; } else { &main_page; } # Begin the beamer page. sub main_page { $title = "Beamer"; &html_header; print qq~
|
$title |
\n~; &html_footer; } # Begin error messages. sub error_report { $dots = 1 if $rename =~ /\.\./g; @Chars = split(//,$rename); foreach (@Chars) { $char = $_ if !m/[A-Za-z\/\-_0-9\.]/g; } if (!$File && $rename || !$rename || $dots || $char) { $title = 'ERROR!'; &html_header; print "
Possible reasons:
|
Error 400 Bad URL Syntax Error 403 Forbidden Error 404 File Not Found Error 500 Internal Server Error Error 503 Gateway Timeout |
| ";
if (!$rename) { print "New name for file is missing!"; }
if ($dots) { print " "; } if ($char) { print " numbers, underlines, hyphens and dots without spaces! "; } } print qq~ |
\n~; &html_footer; } } # Begin html footer. sub html_footer { print qq~