#!/usr/bin/perl
require ("cgi-lib.pl") or die "Could not open or find cgi-lib.pl\n";
# declare variables
$current_ip = "nothing";
$filename = "links.txt";
# call initial functions
&Get_request_types;
&Analyse_file;
#########################################################################
sub Get_request_types {
&ReadParse(*input);
$link_cat = ($input{'Category'});
}
#########################################################################
sub Analyse_file {
print &Header;
print &Top("test");
$output = "STDOUT";
print $output "
$link_cat
";
open (LOGFILE, ") {
($category, $name, $url, $desc) = split(' : ', $line);
if ($category eq $link_cat) {
print $output "$name
";
print $output "$desc";
}
}
&Bottom;
close(LOGFILE);
}
#########################################################################
#_____Module Returns the Output Document Type______#
sub Header
{
return "Content-type: text/html\n\n";
}
#_____Module Returns the Output Document Head_______#
sub Top
{
my ($title) = @_;
return <<"ENDPRINT";
acheron.org // links
";
print $output "
";
print $output " | ";
print $output " ";
print $output " ";
print $output " ";
print $output " ";
print $output " ";
print $output " |
| ";
print $output " | ";
print $output "
";
print $output "";
print $output " |
| |
";
print $output "